Skip to content

bloqade.stim.passes.hint_const_in_loops.PropagateInitializerHints

← Module overview

classPropagateInitializerHintssource

bloqade.stim.passes.hint_const_in_loops.PropagateInitializerHints

Bases: RewriteRule

Propagate hints and types from For loop initializers to body block args and results.

class PropagateInitializerHints

Only applies to REPEAT-eligible For loops. Also propagates types through downstream GetItem and ilist.New use chains.

methodrewrite_Statementsource

bloqade.stim.passes.hint_const_in_loops.PropagateInitializerHints.rewrite_Statement

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

Parameters

NameTypeDescription
nodeir.Statement

Returns

RewriteResult

source