openfermion.utils.up_then_down
up then down reordering, given the operator has the default even-odd ordering.
openfermion.utils.up_then_down(
mode_idx, num_modes
)
Otherwise this function will reorder indices where all even
indices now come before odd indices.
Example:
0,1,2,3,4,5 -> 0,2,4,1,3,5
The function takes in the index of the mode that will be relabeled and
the total number modes.
Args |
mode_idx
|
int
the mode index that is being reordered
|
num_modes
|
int
the total number of modes of the operator.
|
Returns (int): reordered index of the mode.
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."],[],[]]