Convert a fermionic observable to a PennyLane qubit observable.
The fermionic operator is a tuple containing the fermionic coefficients and operators. For instance, the one-body fermionic operator \(a_2^\dagger a_0\) is specified as [2, 0] and the two-body operator \(a_4^\dagger a_3^\dagger a_2 a_1\) is specified as [4, 3, 2, 1].
tuple (o_ferm) – fermionic operator
cutoff (float) – cutoff value for discarding the negligible terms
Simplified PennyLane Hamiltonian
- Return type
>>> coeffs = np.array([1.0, 1.0]) >>> ops = [[0, 0], [0, 0]] >>> f = (coeffs, ops) >>> print(qubit_observable(f)) ((-1+0j)) [Z0] + ((1+0j)) [I0]
- What is PennyLane?
- Quantum circuits
- Gradients and training
- Quantum operators
- Inspecting circuits
- Compiling circuits
- Quantum Chemistry