linear_operator¶
- linear_operator(operator, norb, nelec)¶
Returns a
scipy.sparse.linalg.LinearOperatorfor an operator on the(norb, nelec)FCI sector.This is a thin, type-agnostic wrapper around the
SupportsLinearOperatorprotocol method, mirroring the free-function style offfsim.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.LinearOperatorapplyingoperatoron the requested sector.- Return type: