monoprop

ExpGate

The exponential of a generator: one variational gate, abstract over the family.

Applies e+iθHe^{+i\theta H} for driving angle θ\theta and Hermitian generator HH. Note the positive sign: qiskit's PauliEvolutionGate and r\<P> rotations use eitHe^{-itH}, so monoprop.qiskit_conversion negates the generator both ways. Every family supplies the Hermitian generator -- for a Majorana one that means the observable convention: imaginary coefficient for a weight-2 monomial, real for weight-4.

Attributes

attribute__slots__
= ('_atol', '_structural', 'family', 'generator', 'index')
attributegenerator
= self._truncated_term(generator, atol)

The generator operator (a FermiOperator is stored converted to Majorana).

attributeindex
= None if index is None else int(index)

The variational-angle index, or None for the identity mapping.

attributefamily
= family

"pauli" or "majorana", inferred from the generator type.

attribute_structural
= _structural
attribute_atol
= atol
attribute__hash__
= None

Functions

func__init__(self, generator, index=None, *, atol=1e-08, _structural=False) -> None

Wrap a generator operator; its type selects the family and normalization convention.

paramself
paramgeneratorMajoranaOperator | PauliOperator | FermiOperator

A MajoranaOperator, PauliOperator, or FermiOperator. A bare Majorana / Pauli term is not accepted; wrap it, e.g. MajoranaOperator(\{(0, 1): 1j\}, num_modes) -- the Hermitian convention makes a weight-2 coefficient imaginary.

paramindexint | None
= None

The variational-angle index, or None for the identity mapping (see Circuit).

paramatolfloat
= 1e-08

Generator terms with |coeff| \<= atol are dropped.

param_structuralbool
= False

Internal. Set by _structural_gate when the generator already carries the real structural coefficients g (the wire/dense format), so _gate_layers passes them through unnormalized.

Returns

None
func__eq__(self, other) -> bool

Equal when the generator, parameter index, family, and structural flag all match.

paramself
paramotherobject

Returns

bool
func__repr__(self) -> str

Return a string representation such as ExpGate(\<generator>, index=0).

paramself

Returns

str

On this page