![]() |
Return the s^{2} operator.
openfermion.hamiltonians.s_squared_operator(
n_spatial_orbitals: int
) -> openfermion.ops.FermionOperator
\[ \begin{align} S^{2} = S^{-} S^{+} + S^{z}( S^{z} + 1) \end{align} \]
Args | |
---|---|
n_spatial_orbitals
|
number of spatial orbitals (n_qubits + 1 // 2). |
Returns | |
---|---|
operator (FermionOperator): corresponding to the s+ operator over n_spatial_orbitals. |
Note:
The indexing convention used is that even indices correspond to spin-up (alpha) modes and odd indices correspond to spin-down (beta) modes.