bloqade.qasm2.rewrite.uop_to_parallel.OptimalMixIn
← Module overview
class
method
source
classOptimalMixIn¶source
bloqade.qasm2.rewrite.uop_to_parallel.OptimalMixIn
Bases: MergePolicyABC
Merge policy that merges gates together optimally.
class OptimalMixInThe merge_gates method will merge policy will try to merge every gate into every
group of gates, terminating when it finds a group that can be merged with the current
gate. This policy has a worst case complexity of O(n^2) where n is the number of gates
in the input iterable.
methodmerge_gates¶source
bloqade.qasm2.rewrite.uop_to_parallel.OptimalMixIn.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]]