![]() |
Initialize a Scipy sparse matrix from a FermionOperator.
openfermion.linalg.jordan_wigner_sparse(
fermion_operator, n_qubits=None
)
Operators are mapped as follows: a_j^\dagger -> Z0 .. Z{j-1} (X_j - iY_j) / 2 a_j -> Z0 .. Z{j-1} (X_j + iY_j) / 2
Args | |
---|---|
fermion_operator(FermionOperator): instance of the FermionOperator class. n_qubits(int): Number of qubits. |
Returns | |
---|---|
The corresponding Scipy sparse matrix. |