bloqade.rewrite.rules.remove_empty_arg_gates.RemoveEmptyArgOps
← Module overview
class
method
source
classRemoveEmptyArgOps¶source
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
| Name | Type | Description |
|---|---|---|
call_graph | CallGraph | |
callee | ir.Method |
Attributes
| Name | Type | Description |
|---|---|---|
call_graph | CallGraph | |
callee | ir.Method |
methodrewrite_Statement¶source
bloqade.rewrite.rules.remove_empty_arg_gates.RemoveEmptyArgOps.rewrite_Statement
def rewrite_Statement(node: ir.Statement) -> RewriteResultDelete quantum statements whose qubit arguments are compile-time empty.
Parameters
| Name | Type | Description |
|---|---|---|
node | ir.Statement |
Returns
RewriteResult