openfermion.linalg.jw_sz_indices

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

Main aliases

openfermion.jw_sz_indices, openfermion.linalg.sparse_tools.jw_sz_indices

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

Sz=12ni=1(ni,αni,β)

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