openfermion.circuits.simulate_trotter

Simulate Hamiltonian evolution using a Trotter-Suzuki product formula.

Used in the notebooks

Used in the tutorials

The input is a Hamiltonian represented as an InteractionOperator or DiagonalCoulombHamiltonian. Not all types are supported by all algorithm options.

The product formula used is from "General theory of fractal path integrals with applications to many-body theories and statistical physics" by Masuo Suzuki.

qubits The qubits on which to apply operations. They should be sorted so that the j-th qubit in the Sequence holds the occupation of the j-th fermionic mode.
hamiltonian The Hamiltonian to simulate.
time The evolution time.
n_steps The number of Trotter steps to use. Default is 1.
order The order of the product formula. The value indexes symmetric formulae, e.g., a value of 2 indicates a second-order symmetric, sometimes known as a fourth-order, Trotter formula. A value of 0 indicates an asymmetric Trotter formula. Default is 0.
algorithm The algorithm to use to simulate a single Trotter step. This is a constant exposed in the openfermion.trotter module. If not specified, a default option will be chosen based on the type of the given Hamiltonian. Available options: LINEAR_SWAP_NETWORK: The algorithm from arXiv:1711.04789. Requires the input to be a DiagonalCoulombHamiltonian. LOW_RANK: The "low rank" strategy. Requires the input to be an InteractionOperator. SPLIT_OPERATOR: The algorithm from arXiv:1706.00023. Requires the input to be a DiagonalCoulombHamiltonian.
control_qubit A qubit on which to control the Trotter step.
omit_final_swaps If this is set to True, then SWAP or FSWAP gates at the end of the circuit may be omitted. This option exists because certain Trotter step algorithms, such as those based on swap networks, induce a permutation on the qubits or on the ordering in which qubits represent fermionic modes. For instance, algorithms based on swap networks may reverse the qubits depending on the number of Trotter steps used and the order of the Trotter formula selected. Setting this option to True will sometimes result in a circuit with fewer gates, but with the ordering of qubits or modes reversed in the final wavefunction.