Truncations

PauliPropagation.truncatedampingcoeffMethod
truncatedampingcoeff(
    pstr::Integer, 
    coeff::Real, 
    gamma::Number, 
    min_abs_coeff::Float64
)

Custom truncation function with dissipation-assisted damping of coefficients. It returns true (indicating to truncate) if the coefficient exponentially damped by the Pauli weight drops below min_abs_coeff.

The function evaluates the condition: abs(coeff) * 10^(-gamma * countweight(pstr)) < min_abs_coeff

gamma is the damping factor controlling the rate of exponential decay with Pauli weight.

To turn this function into a custom truncation function for propagate(), you need to define a closure that only takes the pstr and coeff as arguments, but has gamma and min_abs_coeff fixed.

Example:

customtruncfunc = (pstr, coeff) -> truncatedampingcoeff(pstr, coeff, 0.5, 1e-10) 
source