OperatorBudget¶
- class OperatorBudget(max_paulis=None, max_qwc_groups=None, simplify=True)[source]¶
Bases:
object
A class for storing the constants that determine how large an operator may grow.
Backpropagation will stop if either of the following conditions is met:
The number of Pauli terms across all of the observables exceeds
max_paulis
. Whenmax_paulis = None
, the number of Pauli terms in the observables is not constrained.The number of qubit-wise commuting Pauli groups across all of the observables exceed
max_qwc_groups
. Whenmax_qwc_groups = None
, the number of qubit-wise commuting Pauli groups in the observables is not constrained.
Attributes
- max_paulis: int | None = None¶
The maximum number of Pauli terms the backpropagated operator may contain.
- max_qwc_groups: int | None = None¶
The maximum number of qubit-wise commuting Pauli groups the backpropagated operator may contain.
- simplify: bool = True¶
A flag denoting whether to call
simplify()
at every iteration.
Methods