bloqade.qasm2.rewrite.uop_to_parallel.GreedyMixin
← Module overview
class
method
source
classGreedyMixin¶source
bloqade.qasm2.rewrite.uop_to_parallel.GreedyMixin
Bases: MergePolicyABC
Merge policy that greedily merges gates together.
class GreedyMixinThe merge_gates method will merge policy will try greedily merge gates together.
This policy has a worst case complexity of O(n) where n is the
number of gates in the input iterable.
methodmerge_gates¶source
bloqade.qasm2.rewrite.uop_to_parallel.GreedyMixin.merge_gates
Signature
def merge_gates(gate_stmts: Iterable[ir.Statement]) -> List[List[ir.Statement]]Parameters
| Name | Type | Description |
|---|---|---|
gate_stmts | Iterable[ir.Statement] |
Returns
List[List[ir.Statement]]