bloqade.stim.passes.hint_const_in_loops.HintLen
← Module overview
class
method
source
classHintLen¶source
bloqade.stim.passes.hint_const_in_loops.HintLen
Bases: RewriteRule
Hint py.Len results as const from static IList type info.
class HintLenKept distinct from HintPureFromConcrete because the length comes
from the operand’s type (IList[X, Literal(N)]), not from a
const-hinted operand value — useful when the IList itself isn’t const
but its length is statically known.
methodrewrite_Statement¶source
bloqade.stim.passes.hint_const_in_loops.HintLen.rewrite_Statement
def rewrite_Statement(node: ir.Statement) -> RewriteResultParameters
| Name | Type | Description |
|---|---|---|
node | ir.Statement |
Returns
RewriteResult