quri_parts.openfermion.operator.fermion_operator module#

class FermionOperator(term=None, coefficient=1.0)#

Bases: FermionOperator

Wrapper class for OpenFermion’s FermionOperator.

hermitian_conjugated()#

Returns the hermitian conjugate of itself.

Return type:

FermionOperator

fermion_operator_from_openfermion_op(openfermion_op)#

Create FermionOperator from OpenFermion’s FermionOperator

Parameters:

openfermion_op (FermionOperator) –

Return type:

FermionOperator

has_particle_number_symmetry(f_op, check_spin_symmetry=False)#

Query whether operator conserves particle number and (optionally) spin symmetry.

Parameters:
  • f_op (FermionOperator) – fermionic operator (FermionOperator)

  • check_spin_symmetry (bool) – boolean value

Returns:

bool

Return type:

bool