openfermion.circuits.get_chemist_two_body_coefficients

Convert two-body operator coefficients to low rank tensor.

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.

two_body_coefficients ndarray

an N x N x N x N numpy array giving the \(h_{pqrs}\) tensor.

spin_basis bool

True if the two-body terms are passed in spin orbital basis. False if already in spatial orbital basis.

one_body_correction ndarray

an N x N array of floats giving coefficients of the \(a^\dagger_p a_q\) terms that come out.

chemist_two_body_coefficients ndarray

an N x N x N x N numpy array giving the \(g_{pqrs}\) tensor in chemist notation.

ValueError Input two-body tensor is not spin-symmetric. The LOW_RANK decomposition requires a spin-symmetric interaction when spin_basis=True. A spin-symmetric interaction satisfies h[p,q,r,s] == h[p+1,q+1,r+1,s+1] for all even p, q, r, s (i.e., the same coefficient for alpha and beta spin channels). Consider passing spin_basis=False if your Hamiltonian is not spin-symmetric.