openfermion.transforms.reorder
Changes the ladder operator order of the Hamiltonian based on the provided order_function per mode index.
openfermion.transforms.reorder(
operator, order_function, num_modes=None, reverse=False
)
Used in the notebooks
Args
operator
SymbolicOperator
the operator that will be reordered. must
be a SymbolicOperator or any type of operator that inherits from
SymbolicOperator.
order_function
func
a function per mode that is used to map the
indexing. must have arguments mode index and num_modes.
num_modes
int
default None. User can provide the number of modes
assumed for the system. if None, the number of modes will be
calculated based on the Operator.
reverse
bool
default False. if set to True, the mode mapping is
reversed. reverse = True will not revert back to original if
num_modes calculated differs from original and reverted.
Note: Every order function must take in a mode_idx and num_modes.
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.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "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."],[],[]]