Skip to content

bloqade.stim.passes.flatten.SelectiveForLoop

← Module overview

classSelectiveForLoopsource

bloqade.stim.passes.flatten.SelectiveForLoop

Bases: ForLoop

ForLoop rewrite that skips REPEAT-eligible outermost loops.

class SelectiveForLoop

Only the outermost REPEAT-eligible loop is preserved. If a loop is nested inside another REPEAT-eligible loop, it gets unrolled.

methodrewrite_Statementsource

bloqade.stim.passes.flatten.SelectiveForLoop.rewrite_Statement

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

Parameters

NameTypeDescription
nodeir.Statement

Returns

RewriteResult

source