PauliSum
Base class: Object
Object that represents a sum of Pauli strings.
Represents a sum of Pauli strings and a complex coefficients stored as PauliTerms.
Constructors
PauliSum() -> PauliSum
Constructs an empty PauliSum.
PauliSum(const PauliTerm term) -> PauliSum
Constructs a PauliSumMap from a single PauliTerm.
Parameters
Members
| Name | Description |
|---|---|
| append | Appends a PauliTerm to the PauliSum. |
| commutator | Calculates the commutator [S,T] of the PauliSum S with a PauliSum T. |
| multiplied | Multiplies the PauliSum by a complex scalar out of place. |
| multiply | Multiplies the PauliSum by an integer scalar in place. |
| pauli_rotate | Rotates the PauliSum by an angle about an axis specified by a PauliTerm in place. |
| pauli_rotated | Rotates the PauliSum by an angle about an axis specified by a PauliTerm out of place. |
| prune | Prunes the PauliSum by removing terms with a coefficient magnitude less than tol and a weight greater than max_weight. |
| size | Returns the number of PauliTerms in the PauliSum. |