Skip to content

bloqade.stim.passes.constprop_override

constprop_override

bloqade.stim.passes.constprop_override

Early-termination scf.For constprop for the Stim pipeline.

Kirin’s default scf.For constprop iterates the loop body N times for range(N). For loops where the body produces the same result each iteration (e.g. REPEAT-eligible loops in Stim), this is redundant — the analysis converges after 1-2 iterations.

This module registers an early-termination handler under the “stim.constprop” key on the scf dialect. StimConstProp resolves “stim.constprop” first, falling back to “constprop” for everything else.