ExpGate
The exponential of a generator: one variational gate, abstract over the family.
Applies for driving angle and Hermitian generator
. Note the positive sign: qiskit's PauliEvolutionGate and r\<P> rotations
use , 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= _structuralattribute_atol= atolattribute__hash__= NoneFunctions
func__init__(self, generator, index=None, *, atol=1e-08, _structural=False) -> NoneWrap a generator operator; its type selects the family and normalization convention.
paramselfparamgeneratorMajoranaOperator | PauliOperator | FermiOperatorA 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= NoneThe variational-angle index, or None for the identity mapping (see
Circuit).
paramatolfloat= 1e-08Generator terms with |coeff| \<= atol are dropped.
param_structuralbool= FalseInternal. 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
Nonefunc__eq__(self, other) -> boolEqual when the generator, parameter index, family, and structural flag all match.
paramselfparamotherobjectReturns
boolfunc__repr__(self) -> strReturn a string representation such as ExpGate(\<generator>, index=0).
paramselfReturns
str