openfermion.circuits.simulation_ordered_grouped_low_depth_terms_with_info

Give terms from the dual basis Hamiltonian in simulated order.

Uses the simulation ordering, grouping terms into hopping (i^ j + j^ i) and number (i^j^ i j + c_i i^ i + c_j j^ j) operators. Pre-computes term information (indices each operator acts on, as well as whether each operator is a hopping operator.

hamiltonian (FermionOperator): The Hamiltonian. input_ordering (list): The initial Jordan-Wigner canonical order. If no input ordering is specified, defaults to [0..n_qubits] where n_qubits is the number of qubits in the Hamiltonian. external_potential_at_end (bool): Whether to include the rotations from the external potential at the end of the Trotter step, or intersperse them throughout it.

A 3-tuple of terms from the Hamiltonian in order of simulation, the indices they act on, and whether they are hopping operators (both also in the same order).

Notes:

Follows the "stagger"-based simulation order discussed in Kivlichan et al., "Quantum Simulation of Electronic Structure with Linear Depth and Connectivity", arxiv:1711.04789; as such, the only permitted types of terms are hopping (i^ j + j^ i) and potential terms which are products of at most two number operators.