![]() |
Initialize a Scipy sparse matrix in the Fock space
openfermion.linalg.boson_operator_sparse(
operator, trunc, hbar=1.0
)
Used in the notebooks
Used in the tutorials |
---|
from a bosonic operator.
Since the bosonic operators lie in an infinite Fock space, a truncation value needs to be provide so that a sparse matrix of finite size can be returned.
Returns | |
---|---|
The corresponding Scipy sparse matrix of size [trunc, trunc]. |