Skip to content

bloqade.rewrite.rules.remove_empty_arg_gates.RemoveEmptyArgOps

← Module overview

classRemoveEmptyArgOpssource

bloqade.rewrite.rules.remove_empty_arg_gates.RemoveEmptyArgOps

Bases: RewriteRule

Remove squin gates, noise channels, and measurements on empty qubit lists.

class RemoveEmptyArgOps(call_graph: CallGraph, callee: ir.Method)

Parameters

NameTypeDescription
call_graphCallGraph
calleeir.Method

Attributes

NameTypeDescription
call_graphCallGraph
calleeir.Method

methodrewrite_Statementsource

bloqade.rewrite.rules.remove_empty_arg_gates.RemoveEmptyArgOps.rewrite_Statement

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

Delete quantum statements whose qubit arguments are compile-time empty.

Parameters

NameTypeDescription
nodeir.Statement

Returns

RewriteResult

source