workbench_algorithms.subroutines.trotterization
Qubricks for Trotterization.
TrotterStrategy
Bases: Protocol
Interface for applying unitary terms in Trotterization.
PauliSumTrotterStrategy
Implementation of a TrotterStrategy for the simplest case of looping through Hamiltonian terms.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hamiltonian
|
PauliSum
|
PauliSum representation of the Hamiltonian to be Trotterized. The order of the terms in the PauliSum determines the order in which the Trotterized terms will be applied, with the coefficients determining their magnitude. |
required |
trotter_order
|
int
|
The order of the Trotterization. |
None
|
TrotterQuery
TrotterQuery(
trotter_strategy: TrotterStrategy | None = None,
trotter_order: int | None = None,
hamiltonian: PauliSum | None = None,
**kwargs,
)
Bases: Qubrick
Qubrick for implementing a Suzuki-Trotter approximation of an exponentiated Hamiltonian.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trotter_strategy
|
TrotterStrategy | None
|
A class that implements a |
None
|
trotter_order
|
int
|
The order of Trotterization. |
None
|
hamiltonian
|
PauliSum
|
The Hamiltonian expressed as a PauliSum. |
None
|
**kwargs
|
dict[str, Any]
|
Other arguments to pass to the init. |
{}
|
trotter_strategy
property
Set the trotter_strategy property so it can't be modified.
compute
compute(
system: Qubits,
steps: int,
evo_time: int,
ctrl: Qubits | int = 0,
trotter_order: int | None = None,
)
Execute the Suzuki-Trotter circuit.
Performs first and second order Trotterization directly. For higher orders, uses recursive calls to generate the appropriate product of operators.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system
|
Qubits
|
Qubits the Hamiltonian is acting on. |
required |
steps
|
int
|
The number of Trotter steps. |
required |
evo_time
|
int
|
(int): The total evolution time. |
required |
ctrl
|
(Qubits, int)
|
Qubit register to control evolution on. Defaults to 0. |
0
|
trotter_order
|
int
|
The order of Trotterization. If not set,
uses the Qubrick attribute |
None
|