linear_operator
linear_operator(operator, norb, nelec)
Returns a scipy.sparse.linalg.LinearOperator for an operator on the (norb, nelec) FCI sector.
This is a thin, type-agnostic wrapper around the SupportsLinearOperator protocol method, mirroring the free-function style of ffsim.linear_operator().
Parameters
- operator (SupportsLinearOperator) – the operator to convert, implementing
SupportsLinearOperator. - norb (int) – the number of spatial orbitals.
- nelec (int |tuple[int, int]) – the electron count – an integer for a spinless sector, or an
(n_alpha, n_beta)pair for a spinful one.
Returns
A scipy.sparse.linalg.LinearOperator applying operator on the requested sector.
Return type