Skip to main content

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

NameDescription
appendAppends a PauliTerm to the PauliSum.
commutatorCalculates the commutator [S,T] of the PauliSum S with a PauliSum T.
multipliedMultiplies the PauliSum by a complex scalar out of place.
multiplyMultiplies the PauliSum by an integer scalar in place.
pauli_rotateRotates the PauliSum by an angle about an axis specified by a PauliTerm in place.
pauli_rotatedRotates the PauliSum by an angle about an axis specified by a PauliTerm out of place.
prunePrunes the PauliSum by removing terms with a coefficient magnitude less than tol and a weight greater than max_weight.
sizeReturns the number of PauliTerms in the PauliSum.