![]() |
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} \]
Args | |
---|---|
sz_value(float): Desired Sz value. Should be an integer or half-integer. n_qubits(int): Number of qubits defining the total state n_electrons(int, optional): Number of particles to restrict the operator to, if such a restriction is desired up_index (Callable, optional): Function that maps a spatial index to the index of the corresponding up site down_index (Callable, optional): Function that maps a spatial index to the index of the corresponding down site |
Returns | |
---|---|
indices(list): The list of indices |