SupportsMajoranaOperator
class SupportsMajoranaOperator(*args, **kwargs)
Bases: Protocol
An equivalent of the SupportsFermionOperator protocol, targeting Majorana operators.
See majorana_operator() for the type-agnostic helper function dispatching to the method below.
>>> from qiskit_fermions.operators import FermionOperator
>>> fer_op = FermionOperator.from_dict({((True, 0), (False, 0)): 1})
>>> maj_op = fer_op._majorana_operator_()
>>> print(format(maj_op.normal_ordered().simplify()))
5.000000e-1 +0.000000e0j * ()
0.000000e0-5.000000e-1j * (γ'0 γ0)
Protocol Methods