qrunch.quantum.operators.second_quantization.fermion.operator_base
Base class for all fermion operators, which define internal logic.
Classes
Base class for an abstract fermion operator. |
|
Represents the collection of fermion operators. |
- class FermionOperator
Bases:
Expression[FermionOperators],Indexable[FermionOperators],ABCBase 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:
Returns: New copy of the operator with the AbstractIndex set to the given value.
- class FermionOperators
Bases:
OperatorCollectionRepresents the collection of fermion operators.