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:
  • orb (int) – The orbital.

  • spin (Spin) –

    Choice of spin sector(s) to act on.

    • To act on only spin alpha, pass ffsim.Spin.ALPHA.

    • To act on only spin beta, pass ffsim.Spin.BETA.

    • To act on both spin alpha and spin beta, pass ffsim.Spin.ALPHA_AND_BETA (this is the default value).

Return type:

FermionOperator

Returns:

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