qrisp.operators.fermionic.FermionicOperator.to_qubit_operator#
- FermionicOperator.to_qubit_operator(mapping_type='jordan_wigner')[source]#
Transforms the FermionicOperator to a QubitOperator.
- Parameters:
- mappingstr, optional
The mapping to transform the Hamiltonian. Available is
jordan_wigner
. The default isjordan_wigner
.
- Returns:
- OQubitOperator
The resulting QubitOperator.
Examples
We map a singular fermionic ladder operator to a QubitOperator to see the Jordan-Wigner embedding.
>>> from qrisp.operators import a >>> O = a(4) >>> print(O.to_qubit_operator()) Z_0*Z_1*Z_2*Z_3*A_4