openfermion.transforms.reorder

Changes the ladder operator order of the Hamiltonian based on the

Used in the notebooks

Used in the tutorials

provided order_function per mode index.

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.