openfermion.circuits.ControlledAsymmetricSplitOperatorTrotterStep

A method for performing a Trotter step.

Inherits From: SplitOperatorTrotterStep, TrotterStep

This class assumes that Hamiltonian evolution using a Trotter-Suzuki product formula is performed in the following steps:

1. Perform some preparatory operations (for instance, a basis change).
2. Perform a number of Trotter steps. Each Trotter step may induce a
   permutation on the ordering in which qubits represent fermionic
   modes.
3. Perform some finishing operations.

hamiltonian The Hamiltonian being simulated.

Methods

finish

View source

Operations to perform after all Trotter steps are done.

Args
qubits The qubits on which to perform operations.
hamiltonian The Hamiltonian to simulate.
n_steps The total number of Trotter steps that have been performed.
control_qubit The control qubit, if the algorithm is controlled.
omit_final_swaps Whether or not to omit swap gates at the end of the circuit.

prepare

View source

Operations to perform before doing the Trotter steps.

Args
qubits The qubits on which to perform 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.
control_qubit The control qubit, if the algorithm is controlled.

step_qubit_permutation

View source

The qubit permutation induced by a single Trotter step.

Returns
A tuple whose first element is the new list of system qubits and second element is the new control qubit

trotter_step

View source

Yield operations to perform a Trotter step.

Args
qubits The qubits on which to apply the Trotter step.
hamiltonian The Hamiltonian to simulate.
time The evolution time.
control_qubit The control qubit, if the algorithm is controlled.