{ }
View source on GitHub |
Restrict a Jordan-Wigner encoded operator to a given Sz value
openfermion.linalg.jw_sz_restrict_operator(
operator,
sz_value,
n_electrons=None,
n_qubits=None,
up_index=openfermion.utils.up_index
,
down_index=openfermion.utils.down_index
)
Returns | |
---|---|
new_operator
|
ndarray or sparse
Numpy operator restricted to acting on states with the desired Sz value. |