# openfermion.linalg.jw_sz_indices

Return the indices of basis vectors with fixed Sz under JW encoding.

The returned indices label computational basis vectors which lie within the corresponding eigenspace of the Sz operator,

.. math:: \begin{align} S^{z} = \frac{1}{2}\sum{i = 1}^{n}(n{i, \alpha} - n_{i, \beta}) \end{align}

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

indices(list): The list of indices