Transforms a QubitOperator into a FermionOperator using the

Used in the notebooks

Used in the tutorials

Jordan-Wigner transform.

Operators are mapped as follows: Z_j -> I - 2 a^\dagger_j a_j X_j -> (a^\dagger_j + aj) Z{j-1} Z_{j-2} .. Z_0 Y_j -> i (a^\dagger_j - aj) Z{j-1} Z_{j-2} .. Z_0

qubit_operator the QubitOperator to be transformed.
n_qubits the number of qubits term acts on. If not set, defaults to the maximum qubit number acted on by term.

transformed_term An instance of the FermionOperator class.

TypeError Input must be a QubitOperator.
TypeError Invalid number of qubits specified.
TypeError Pauli operators must be X, Y or Z.