|View source on GitHub|
Compute and return the normal ordered form of a FermionOperator,
openfermion.transforms.normal_ordered( operator, hbar=1.0 )
Used in the notebooks
|Used in the tutorials|
BosonOperator, QuadOperator, or InteractionOperator.
Due to the canonical commutation/anticommutation relations satisfied by these operators, there are multiple forms that the same operator can take. Here, we define the normal ordered form of each operator, providing a distinct representation for distinct operators.
In our convention, normal ordering implies terms are ordered from highest tensor factor (on left) to lowest (on right). In addition:
- FermionOperators: a^\dagger comes before a
- BosonOperators: b^\dagger comes before b
- QuadOperators: q operators come before p operators,