Set detector partial
SetDetectorPartial
dataclass
SetDetectorPartial()
Bases: RewriteRule
Rewrite SetDetector using GetRecIdxFromMeasurement placeholders.
Instead of computing record indices from analysis results immediately, this injects GetRecIdxFromMeasurement statements that will be resolved post-analysis.
extract_coord_ssas
extract_coord_ssas(
node: Statement,
) -> list[ir.SSAValue] | None
Extract coordinate values from a SetDetector's coordinates argument and insert corresponding stim constant statements before the node.
Returns the list of coord SSA values, or None if extraction fails.
Source code in .venv/lib/python3.12/site-packages/bloqade/stim/rewrite/set_detector_partial.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |