Module builtin

Module builtin 

Source
Expand description

Built-in truncation policies and combinators. See design doc §7.

Structs§

And
Logical AND of two policies — both must accept.
CoefficientThreshold
Drop terms whose coefficient magnitude is at most epsilon.
Or
Logical OR of two policies — either accepting is enough.
TopN
Retain only the n terms with largest coefficient magnitude. Implemented as a finalize_layer partial sort (no per-term filter).
WeightCutoff
Drop terms whose Pauli weight (number of non-identity qubits) exceeds k.