# qml.qchem.jordan_wigner¶

jordan_wigner(op)[source]

Convert a fermionic operator to a qubit operator using the Jordan-Wigner mapping.

For instance, the one-body fermionic operator $$a_2^\dagger a_0$$ should be constructed as [2, 0] and the two-body operator $$a_4^\dagger a_3^\dagger a_2 a_1$$ should be constructed as [4, 3, 2, 1].

Parameters

op (list[int]) – the fermionic operator

Returns

tuple(list[complex], list[list[int, str]]): list of coefficients and the qubit-operator terms

Example

>>> f  = [0, 0]
>>> q = jordan_wigner(f)
>>> q
([(0.5+0j), (-0.5+0j)], [Identity(wires=[0]), PauliZ(wires=[0])]) # corresponds to :math:\frac{1}{2}(I_0 - Z_0)


Using PennyLane

Development

API