ExactTrotterization¶
- class ExactTrotterization(keep_fraction=None, keep_top_n=None, _cache=<factory>)[source]¶
Bases:
TrotterizationStrategyExact Trotterization strategy.
Attributes Summary
Fraction of terms to keep by coefficient magnitude (largest first).
Number of top terms to keep by coefficient magnitude.
SPO from the most recent sampling pass, or
Nonewhen the strategy does not sample (e.g.ExactTrotterization).True if the strategy retains state across
process_hamiltoniancalls.Methods Summary
process_hamiltonian(hamiltonian)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.
- last_sampled_spo¶
- stateful¶
Methods Documentation