FermionCircuitSolver.operator_to_mat

FermionCircuitSolver.operator_to_mat(operator)[source]

Convert the fermionic operator to a sparse matrix.

Parameters:

operator (FermionicOp) – fermionic operator of which to compute the matrix representation

Return type:

csc_matrix

Returns:

scipy.sparse matrix of the Hamiltonian