View source on GitHub |
Convert two-body operator coefficients to low rank tensor.
openfermion.circuits.get_chemist_two_body_coefficients(
two_body_coefficients, spin_basis=True
)
The input is a two-body fermionic Hamiltonian expressed as \(\sum_{pqrs} h_{pqrs} a^\dagger_p a^\dagger_q a_r a_s\)
We will convert this to the chemistry convention expressing it as \(\sum_{pqrs} g_{pqrs} a^\dagger_p a_q a^\dagger_r a_s\) but without the spin degree of freedom.
In the process of performing this conversion, constants and one-body terms come out, which will be returned as well.
Raises | |
---|---|
TypeError
|
Input must be two-body number conserving FermionOperator or InteractionOperator. |