View source on GitHub |
Puts a two-body fermion operator in chemist ordering.
openfermion.transforms.chemist_ordered(
fermion_operator
)
The normal ordering convention for chemists is different. Rather than ordering the two-body term as physicists do, as \(a^\dagger a^\dagger a a\) the chemist ordering of the two-body term is \(a^\dagger a a^\dagger a\)
Args | |
---|---|
fermion_operator
|
FermionOperator
a fermion operator guaranteed to have number conserving one- and two-body fermion terms only. |
Returns | |
---|---|
chemist_ordered_operator
|
FermionOperator
the input operator ordered in the chemistry convention. |
Raises | |
---|---|
OperatorSpecificationError
|
Operator is not two-body number conserving. |