FermionicOperator#
- class FermionicOperator(terms_dict={})[source]#
This class provides an efficient implementation of ladder term operators, i.e., operators of the form
\[O=\sum\limits_{j}\alpha_jO_j \]where each term \(O_j\) is a product of fermionic raising \(a_i^{\dagger}\) and lowering \(a_i\) operators acting on the \(i\) th fermionic mode.
The ladder operators satisfy the commutation relations
\[\begin{split}\{a_i,a_j^{\dagger}\} &= a_ia_j^{\dagger}+a_j^{\dagger}a_i = \delta_{ij}\\ \{a_i^{\dagger},a_j^{\dagger}\} &= \{a_i,a_j\} = 0\end{split}\]Examples
A ladder term operator can be specified conveniently in terms of
a
(lowering, i.e., annihilation),c
(raising, i.e., creation) operators:from qrisp.operators.fermionic import a, c O = a(2)*c(1)+a(3)*c(2) O
Yields \(a_2c_1+a_3c_2\).
Methods#
Returns the daggered/adjoint version of self. |
|
Returns the hermitized version of self. |
|
Calculates the ground state energy (i.e., the minimum eigenvalue) of the operator classically. |
|
Imports a FermionicOperator from OpenFermion. |
|
|
Applies the fermionic anticommutation laws to bring the operator into a standard form. |
|
This method returns the expected value of a Hamiltonian for the state of a quantum argument. |
Transforms the FermionicOperator to a QubitOperator. |
|
Returns a function for performing Hamiltonian simulation, i.e., approximately implementing the unitary operator \(U(t) = e^{-itH}\) via Trotterization. |