TrotterizationResult

class TrotterizationResult(effective_hamiltonian, sampled_terms=None)[source]

Bases: object

Output of one trotterization step: the Hamiltonian to build the circuit from, plus (for sampling strategies) the exact sequence of sampled terms.

Attributes Summary

effective_hamiltonian

Simplified Hamiltonian the observable/circuit is built from.

sampled_terms

For sampling strategies such as QDrift, the drawn terms in order with repeats kept (one entry per draw).

Methods Summary

synthesize_evolution(qc, *, time, n_steps, ...)

Append this result's time-evolution gates to qc.

Attributes Documentation

effective_hamiltonian: SparsePauliOp = <dataclasses._MISSING_TYPE object>

Simplified Hamiltonian the observable/circuit is built from.

sampled_terms: SparsePauliOp | None = None

For sampling strategies such as QDrift, the drawn terms in order with repeats kept (one entry per draw). None for deterministic strategies.

Methods Documentation

synthesize_evolution(qc, *, time, n_steps, order, qubits, basis_gates)[source]

Append this result’s time-evolution gates to qc.

A sampling result (sampled_terms set) applies one evolution gate per sampled term — preserving sampling-with-replacement multiplicities — repeated n_steps times at time / n_steps per step. A deterministic result synthesizes exp(-i t H) from effective_hamiltonian via PauliEvolutionGate (LieTrotter for order == 1, else SuzukiTrotter), then lowers the circuit to basis_gates.

Adjoint evolution is realized via negative time; single-term Hamiltonians use positive time to preserve the exp(-i t H) sign convention even when H carries its own coefficient sign. Returns the resulting circuit (a new object when synthesis required transpilation, otherwise qc).

Return type:

QuantumCircuit