qrunch.quantum.operators.second_quantization.fermion.operator_base

Base class for all fermion operators, which define internal logic.

Classes

FermionOperator

Base class for an abstract fermion operator.

FermionOperators

Represents the collection of fermion operators.

class FermionOperator

Bases: Expression[FermionOperators], Indexable[FermionOperators], ABC

Base class for an abstract fermion operator.

All concrete fermion operators should inherit from this.

__init__(site: AbstractIndex | int) None

Initialize the fermion operator on a specific site.

Parameters:

site (AbstractIndex | int) – The site to act upon.

Return type:

None

get_indices() tuple[AbstractIndex | int]

Get indices of the operator.

Returns: Indices of the operator

Return type:

tuple[AbstractIndex | int]

property site: AbstractIndex | int

The site the operator acts on.

with_indices(index_value_pairs: IndexValuePairs) FermionOperator

Create a new copy of the operator with the AbstractIndex set to the given value.

Parameters:

index_value_pairs (IndexValuePairs) – Map of abstract indices to concrete values.

Return type:

FermionOperator

Returns: New copy of the operator with the AbstractIndex set to the given value.

class FermionOperators

Bases: OperatorCollection

Represents the collection of fermion operators.