ffsim.s_squared_operator¶ ffsim.s_squared_operator(norb)[source]¶ Total spin operator \(S^2\). The total spin operator is defined as \[S^2 = S_x^2 + S_y^2 + S_z^2 = S_- S_+ + S_z (S_z + 1)\] Parameters: norb (int) – The number of spatial orbitals. Return type: FermionOperator Returns: The total spin operator \(S^2\).