Repeat eligible
Utility for checking if an scf.For is eligible for REPEAT conversion.
get_repeat_range
get_repeat_range(node: For) -> range | None
Extract the range from a REPEAT-eligible scf.For, or None if not eligible.
Eligible means: - iterable has a const.Value hint containing a range (possibly wrapped in IList) - loop variable (first block arg) has no uses
Source code in .venv/lib/python3.12/site-packages/bloqade/stim/passes/repeat_eligible.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |