TrotterizationResult¶
- class TrotterizationResult(effective_hamiltonian, sampled_terms=None)[source]¶
Bases:
objectOutput of one trotterization step: the Hamiltonian to build the circuit from, plus (for sampling strategies) the exact sequence of sampled terms.
Attributes Summary
Simplified Hamiltonian the observable/circuit is built from.
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).
Nonefor 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_termsset) applies one evolution gate per sampled term — preserving sampling-with-replacement multiplicities — repeatedn_stepstimes attime / n_stepsper step. A deterministic result synthesizesexp(-i t H)fromeffective_hamiltonianviaPauliEvolutionGate(LieTrotterfororder == 1, elseSuzukiTrotter), then lowers the circuit tobasis_gates.Adjoint evolution is realized via negative time; single-term Hamiltonians use positive time to preserve the
exp(-i t H)sign convention even whenHcarries its own coefficient sign. Returns the resulting circuit (a new object when synthesis required transpilation, otherwiseqc).- Return type: