openfermion.transforms.reverse_jordan_wigner
Transforms a QubitOperator into a FermionOperator using the Jordan-Wigner transform.
openfermion.transforms.reverse_jordan_wigner(
qubit_operator, n_qubits=None
)
Used in the notebooks
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
Args |
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.
|
Returns |
transformed_term
|
An instance of the FermionOperator class.
|
Raises |
TypeError
|
Input must be a QubitOperator.
|
TypeError
|
Invalid number of qubits specified.
|
TypeError
|
Pauli operators must be X, Y or Z.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]