openfermion.hamiltonians.majorana_operator

Initialize a Majorana operator.

term(tuple or string): The first element of the tuple indicates the mode on which the Majorana operator acts, starting from zero. The second element of the tuple is an integer, either 0 or 1, indicating which type of Majorana operator it is:

    Type 0: :math:`a^\dagger_p + a_p`

    Type 1: :math:`i (a^\dagger_p - a_p)`

where the :math:`a^\dagger_p` and :math:`a_p` are the usual
fermionic ladder operators.
Alternatively, one can provide a string such as 'c2', which
is a Type 0 operator on mode 2, or 'd3', which is a Type 1
operator on mode 3.
Default will result in the zero operator.

coefficient(complex or float, optional): The coefficient of the term. Default value is 1.0.

FermionOperator