PauliTerm.id¶
-
PauliTerm.
id
(sort_ops=True)[source]¶ Returns an identifier string for the PauliTerm (ignoring the coefficient).
Don’t use this to compare terms. This function will not work with qubits that aren’t sortable.
- Parameters
sort_ops (
bool
) – Whether to sort operations by qubit. This is True by default for backwards compatibility but will change in a future version. Callers should never rely on comparing id’s for testing equality. Seeoperations_as_set
instead.- Return type
- Returns
A string representation of this term’s operations.