bloqade.lanes.rewrite.fuse_gates.GateGroup
← Module overview
class
method
method
sourcemethod
classGateGroup¶source
bloqade.lanes.rewrite.fuse_gates.GateGroup
Bases: ABC, Generic[T]
A run of textually-adjacent fusable statements of one opcode.
class GateGroupMaintains all_qubits incrementally so disjointness checks are O(1)
per statement. Subclasses implement opcode-specific predicate bits
(non-qubit SSA arg comparison) and the merged-statement construction.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
statements | list[T] | [] | |
all_qubits | set[int] | set() |
methodappend¶source
bloqade.lanes.rewrite.fuse_gates.GateGroup.append
methodmerge_in_place¶source
bloqade.lanes.rewrite.fuse_gates.GateGroup.merge_in_place
def merge_in_place() -> boolIf the group has ≥2 stmts, replace the tail with one merged op covering all qubits and delete the earlier statements. Returns True iff a merge was performed.
Returns
bool
methodcan_extend¶source
bloqade.lanes.rewrite.fuse_gates.GateGroup.can_extend