Skip to content

bloqade.stim.rewrite.set_detector_partial.SetDetectorPartial

← Module overview

classSetDetectorPartialsource

bloqade.stim.rewrite.set_detector_partial.SetDetectorPartial

Bases: RewriteRule

Rewrite SetDetector using GetRecIdxFromMeasurement placeholders.

class SetDetectorPartial

Instead of computing record indices from analysis results immediately, this injects GetRecIdxFromMeasurement statements that will be resolved post-analysis.

methodrewrite_Statementsource

bloqade.stim.rewrite.set_detector_partial.SetDetectorPartial.rewrite_Statement

def rewrite_Statement(node: ir.Statement) -> RewriteResult

Parameters

NameTypeDescription
nodeir.Statement

Returns

RewriteResult

source

methodrewrite_SetDetectorsource

bloqade.stim.rewrite.set_detector_partial.SetDetectorPartial.rewrite_SetDetector

def rewrite_SetDetector(node: SetDetector) -> RewriteResult

Parameters

NameTypeDescription
nodeSetDetector

Returns

RewriteResult

source