TrotterizationStrategy

class TrotterizationStrategy(*args, **kwargs)[source]

Bases: Protocol

Trotterization strategy protocol.

Attributes Summary

last_sampled_spo

SPO from the most recent sampling pass, or None when the strategy does not sample (e.g. ExactTrotterization).

stateful

True if the strategy retains state across process_hamiltonian calls.

Methods Summary

process_hamiltonian(hamiltonian)

Trotterize the Hamiltonian (SPO in, SPO out).

Attributes Documentation

last_sampled_spo

SPO from the most recent sampling pass, or None when the strategy does not sample (e.g. ExactTrotterization).

Sampling strategies (e.g. QDrift) populate this on every process_hamiltonian call with a faithful concatenation of the drawn terms — duplicates preserved so callers can emit one evolution gate per draw without recomputing multiplicities.

stateful

True if the strategy retains state across process_hamiltonian calls. This should be true for strategies that might re-process the Hamiltonian during execution.

Methods Documentation

process_hamiltonian(hamiltonian)[source]

Trotterize the Hamiltonian (SPO in, SPO out).

Return type:

SparsePauliOp