prune
Method of PauliSum.
prune(const real tol, const integer max_weight) -> PauliSum
Prunes the PauliSum by removing terms with a coefficient magnitude less than tol and a weight greater than max_weight.
Parameters
- tol: The tolerance for the coefficient magnitude.
- max_weight: The maximum weight of the Pauli strings to keep.