![]() |
Map the term a^\dagger_p a^\dagger_q a_r a_s + h.c. to QubitOperator.
openfermion.transforms.jordan_wigner_two_body(
p, q, r, s, coefficient=1.0
)
Note that the diagonal terms are divided by a factor of two because they are equal to their own Hermitian conjugate.