ffsim.contract.one_body_linop

ffsim.contract.one_body_linop(mat, norb, nelec)[source]

Convert a one-body tensor to a linear operator.

A one-body tensor has the form

\[\sum_{ij} M_{ij} a^\dagger_i a_j\]

where \(M\) is a complex-valued matrix.

Parameters:
  • mat (ndarray) – The one-body tensor.

  • norb (int) – The number of spatial orbitals.

  • nelec (tuple[int, int]) – The number of alpha and beta electrons.

Return type:

LinearOperator

Returns:

A LinearOperator that implements the action of the one-body tensor.