bloqade.stim.rewrite.resolve_set_annotate.ResolveSetAnnotate
← Module overview
class
method
source
classResolveSetAnnotate¶source
bloqade.stim.rewrite.resolve_set_annotate.ResolveSetAnnotate
Bases: RewriteRule
Expand SetObservable / SetDetector statements that survived the partial rewrites' scf.For-owner guard.
Signature
class ResolveSetAnnotate(measure_id_frame: MeasureIDFrame, obs_idx_frame: ObservableIdxFrame)Runs post-MeasurementIDAnalysis. Reads MeasureIdTuple directly from the analysis frame and computes record indices without going through GetRecIdxFromMeasurement placeholders. Applicable when concrete RawMeasureId (or MeasureIdBool) entries survive in frame — true for scf.For result SSAs consumed outside the loop. Observable indices come from ObservableIdxAnalysis to share a single namespace with SetObservablePartial.
Parameters
| Name | Type | Description |
|---|---|---|
measure_id_frame | MeasureIDFrame | |
obs_idx_frame | ObservableIdxFrame |
Attributes
| Name | Type | Description |
|---|---|---|
measure_id_frame | MeasureIDFrame | |
obs_idx_frame | ObservableIdxFrame |
methodrewrite_Statement¶source
bloqade.stim.rewrite.resolve_set_annotate.ResolveSetAnnotate.rewrite_Statement
def rewrite_Statement(node: ir.Statement) -> RewriteResultParameters
| Name | Type | Description |
|---|---|---|
node | ir.Statement |
Returns
RewriteResult