ffsim.number_operator

ffsim.number_operator(orb, spin=<Spin.ALPHA_AND_BETA: 3>)[source]

Occupation number operator.

The occupation number operator for orbital \(p\) is defined as

\[n_p = \sum_\sigma a^\dagger_{p\sigma} a_{p\sigma}\]
Parameters:
Return type:

FermionOperator

Returns:

The number operator acting on the specified orbital and spin sector(s).