Give terms from Hamiltonian in dictionary output order.

hamiltonian (FermionOperator): The Hamiltonian.

A list of terms from the Hamiltonian in simulated order.


Assumes the Hamiltonian is in the form discussed in Kivlichan et al., "Quantum Simulation of Electronic Structure with Linear Depth and Connectivity", arxiv:1711.04789. This constrains the Hamiltonian to have only hopping terms (i^ j + j^ i) and potential terms which are products of at most two number operators (n_i or n_i n_j).