quri_parts.openfermion.operator package#

quri_parts.openfermion.operator.fermion_operator_from_openfermion_op(openfermion_op: FermionOperator) FermionOperator#

Create FermionOperator from OpenFermion’s FermionOperator

quri_parts.openfermion.operator.has_particle_number_symmetry(f_op: FermionOperator, check_spin_symmetry: bool = False) bool#

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

Parameters:
  • f_op – fermionic operator (FermionOperator)

  • check_spin_symmetry – boolean value

Returns:

bool

quri_parts.openfermion.operator.operator_from_openfermion_op(openfermion_op: OpenFermionQubitOperator) Operator#

Converts a OpenFermion QubitOperator to a qp Operator.

Parameters:

openfermion_op – OpenFermion QubitOperator

Returns:

Operator

Return type:

operator

class quri_parts.openfermion.operator.FermionOperator(term=None, coefficient=1.0)#

Bases: FermionOperator

Wrapper class for OpenFermion’s FermionOperator.

hermitian_conjugated() FermionOperator#

Returns the hermitian conjugate of itself.

Submodules#