monoprop

PauliPropagator

Classical simulator for qubit (Pauli) operators.

Accepts a PauliOperator and a Circuit of qubit gates; see MonomialPropagator for the shared surface. The cutoff is qubit Pauli weight -- the number of qubits a retained term touches -- so cutoff_type is fixed and read-only here.

Attributes

attributenum_qubitsint

Number of qubits the propagator acts on.

Functions

func__init__(self, initial_operator, initial_state, *, cutoff, schrodinger_cutoff=None, lower_atol=None, upper_atol=None, comm=None) -> None

Initialize the qubit propagator.

paramself
paraminitial_operatorPauliOperator

Initial qubit operator; its num_qubits sizes the simulator.

paraminitial_statelist[int] | np.ndarray

Computational-basis reference (indices of qubits set to 1).

paramcutoffint

Maximum Pauli weight retained during evolution. The fully-paired exception described on MajoranaPropagator.__init__ still applies.

paramschrodinger_cutoffint | None
= None

None (default) keeps the Heisenberg picture; an integer selects the Schrodinger picture and bounds the Pauli weight of the evolved state, including its initialization from initial_state. Choose it at least as large as cutoff for comparable accuracy.

paramlower_atolNone | float
= None

Monomials with |coeff| \< lower_atol are discarded during evolution.

paramupper_atolNone | float
= None

Monomials with |coeff| > upper_atol are kept regardless of weight.

paramcommMPI.Comm | None
= None

Optional MPI communicator (must outlive the propagator).

Returns

None
funcevolved_operator(self, parameters=None, *, atol=1e-12) -> PauliOperator

Return the evolved operator as a PauliOperator.

paramself
paramparametersParameterValues
= None
paramatolfloat
= 1e-12

Returns

monoprop.pauli.PauliOperator

The evolved qubit operator (Heisenberg picture) or evolved state (Schrodinger picture).

funcupdate_initial_operator(self, new_operator) -> None

Replace coefficients of the initial operator (existing terms only).

paramself
paramnew_operatorPauliOperator

:class:~monoprop.pauli.PauliOperator whose terms replace the matching initial-operator coefficients.

Returns

None

On this page