ExactTrotterization

class ExactTrotterization(keep_fraction=None, keep_top_n=None)[source]

Bases: TrotterizationStrategy

Exact Trotterization strategy.

Attributes Summary

keep_fraction

Fraction of terms to keep by coefficient magnitude (largest first).

keep_top_n

Number of top terms to keep by coefficient magnitude.

Methods Summary

process_hamiltonian(hamiltonian, *[, rng])

Truncate the Hamiltonian to its top-magnitude terms.

Attributes Documentation

keep_fraction: float | None = None

Fraction of terms to keep by coefficient magnitude (largest first). Must be in (0, 1]. If None, keep all terms.

keep_top_n: int | None = None

Number of top terms to keep by coefficient magnitude. Must be >= 1. If None, keep all terms. Mutually exclusive with keep_fraction.

Methods Documentation

process_hamiltonian(hamiltonian, *, rng=None)[source]

Truncate the Hamiltonian to its top-magnitude terms.

Return type:

TrotterizationResult