qrisp.operators.fermionic.FermionicOperator.hermitize#
- FermionicOperator.hermitize()[source]#
Returns the hermitized version of self.
- Returns:
- FermionicOperator
The Operator \((O + O^\dagger)/2\).
Examples
We create a FermionicOperator and hermitize it:
from qrisp.operators import * O = a(0)*c(1)*a(2) + a(3) print(O.hermitize()) # Yields: 0.5*a0*c1*a2 + 0.5*a3 + 0.5*c2*a1*c0 + 0.5*c3