View source on GitHub |
Return the indices of basis vectors with fixed Sz under JW encoding.
openfermion.linalg.jw_sz_indices(
sz_value,
n_qubits,
n_electrons=None,
up_index=openfermion.utils.up_index
,
down_index=openfermion.utils.down_index
)
The returned indices label computational basis vectors which lie within the corresponding eigenspace of the Sz operator,
\[ \begin{align} S^{z} = \frac{1}{2}\sum_{i = 1}^{n}(n_{i, \alpha} - n_{i, \beta}) \end{align} \]
Returns | |
---|---|
indices
|
list
The list of indices |