qrunch.quantum.operators.mappers.jordan_wigner.mapper
Module containing the logic for implementing the Jordan-Wigner transformation.
Classes
Class for mapping operators in second quantization space into operators in Pauli space. |
- class JordanWignerMapper
Bases:
objectClass for mapping operators in second quantization space into operators in Pauli space.
The Jordan-Wigner transformation is a method used to map fermionic creation and annihilation operators onto Pauli strings, enabling the representation of fermionic systems in a qubit-based quantum computing framework.
The transformation is defined as follows:
- A fermionic creation operator \(\hat{a}^\dagger_j\) acting on the \(j\)-th mode
is mapped to a Pauli string:
\[\hat{a}^\dagger_j \rightarrow \frac{1}{2} \left( X_j - i Y_j \right) \prod_{k=1}^{j-1} Z_k\]
A fermionic annihilation operator \(\hat{a}_j\) acting on the \(j\)-th mode is mapped to a Pauli string:
\[\hat{a}_j \rightarrow \frac{1}{2} \left( X_j + i Y_j \right) \prod_{k=1}^{j-1} Z_k\]
These transformations allow for the simulation of fermionic systems by qubit-based quantum computers, making the Jordan-Wigner transformation a crucial tool in quantum computational chemistry and physics.
- map(operator: FermionHermitianSumProtocol | PairedHardcoreBosonHermitianSumProtocol, tolerance: float = 1e-16) HermitianPauliSum
- map(operator: Expression[FermionOperators] | Expression[PairedHardcoreBosonOperators] | int | float | complex, tolerance: float = 1e-16) Expression[PauliOperators] | int | float | complex
Map an operator involving second quantization operators into one using Pauli strings.
An expression as input will return an expression, which allows for non-hermitian operators. A SecondQuantizationHamiltonian will map to a HermitianPauliSum directly.
Removes terms with coefficient less than the tolerance.
- Parameters:
operator (FermionHermitianSumProtocol | PairedHardcoreBosonHermitianSumProtocol | Expression[FermionOperators] | Expression[PairedHardcoreBosonOperators] | int | float | complex) – An expression or combination of second quantization operators and numbers.
tolerance (float) – Tolerance to use when removing small terms.
- Returns:
The simplified Pauli string or collection of Pauli strings given by the Jordan-Wigner transformation of the expression.
- Return type:
HermitianPauliSum | Expression[PauliOperators] | int | float | complex