|View source on GitHub|
Give terms simulated in a single stagger of a Trotter step.
openfermion.circuits.stagger_with_info( hamiltonian, input_ordering, parity, external_potential_at_end=False )
Groups 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. parity (boolean): Whether to determine the terms from the next even (False = 0) or odd (True = 1) stagger. 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 that are simulated in the stagger, the indices they act on, and whether they are hopping operators (all in the same order).|
The "staggers" used here are the left (parity=False) and right (parity=True) staggers detailed in Kivlichan et al., "Quantum Simulation of Electronic Structure with Linear Depth and Connectivity", arxiv:1711.04789. As such, the Hamiltonian must be in the form discussed in that paper. This constrains it 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).