openfermion.transforms.get_majorana_operator

Convert to MajoranaOperator.

Uses the convention of even + odd indexing of Majorana modes derived from a fermionic mode: fermion annhil. ck -> ( gamma{2k} + 1.j * gamma_{2k+1} ) / 2 fermion creation c^k -> ( gamma{2k} - 1.j * gamma_{2k+1} ) / 2

operator (PolynomialTensor, DiagonalCoulombHamiltonian or FermionOperator): Operator to write as Majorana Operator.

majorana_operator An instance of the MajoranaOperator class.

TypeError If operator is not of PolynomialTensor, DiagonalCoulombHamiltonian or FermionOperator.