We're celebrating World Quantum Day 2022! Join us

openfermion.linalg.qubit_operator_sparse

Initialize a Scipy sparse matrix from a QubitOperator.

qubit_operator(QubitOperator): instance of the QubitOperator class. n_qubits (int): Number of qubits.

The corresponding Scipy sparse matrix.