bloqade.qasm2.rewrite.uop_to_parallel.MergePolicyABC
← Module overview
class
method
sourcemethod
sourcemethod
source
classMergePolicyABC¶source
bloqade.qasm2.rewrite.uop_to_parallel.MergePolicyABC
Bases: abc.ABC
class MergePolicyABCmethodcan_merge¶source
bloqade.qasm2.rewrite.uop_to_parallel.MergePolicyABC.can_merge
def can_merge(stmt1: ir.Statement, stmt2: ir.Statement) -> boolParameters
| Name | Type | Description |
|---|---|---|
stmt1 | ir.Statement | |
stmt2 | ir.Statement |
Returns
bool
methodmerge_gates¶source
bloqade.qasm2.rewrite.uop_to_parallel.MergePolicyABC.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]]
methodfrom_analysis¶source
bloqade.qasm2.rewrite.uop_to_parallel.MergePolicyABC.from_analysis
Signature
def from_analysis(dag: StmtDag, address_analysis: Dict[ir.SSAValue, address.Address]) -> MergePolicyABCParameters
| Name | Type | Description |
|---|---|---|
dag | StmtDag | |
address_analysis | Dict[ir.SSAValue, address.Address] |
Returns
MergePolicyABC