openfermion.linalg.jw_sz_indices
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
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]