bloqade.stim.rewrite.ifs_handling.StimSplitIfStmts
← Module overview
class
method
source
classStimSplitIfStmts¶source
bloqade.stim.rewrite.ifs_handling.StimSplitIfStmts
Bases: IsIfElseSimplifiable, SplitIfStmts
Splits the then body of an if-else statement into multiple if statements
class StimSplitIfStmtsGiven an IfElse with multiple valid statements in the then-body:
this should be rewritten to:
if measure_result
squin.x(q0) squin.y(q1)
if measure_result
squin.x(q0)
if measure_result
squin.y(q1)
methodrewrite_Statement¶source
bloqade.stim.rewrite.ifs_handling.StimSplitIfStmts.rewrite_Statement
def rewrite_Statement(node: ir.Statement) -> RewriteResultParameters
| Name | Type | Description |
|---|---|---|
node | ir.Statement |
Returns
RewriteResult