# openfermion.circuits.trotter.algorithms.linear_swap_network.ControlledSymmetricLinearSwapNetworkTrotterStep

A method for performing a Trotter step.

Inherits From: 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.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]