- Commuting2qGateRouter.swap_decompose(dag, node, current_layout, swap_strategy)¶
Take an instance of
Commuting2qBlockand map it to the coupling map.
The mapping is done with the swap strategy.
DAGCircuit) – The dag which contains the
DAGOpNode) – A node whose operation is a
Layout) – The layout before the swaps are applied. This function will modify the layout so that subsequent gates can be properly composed on the dag.
SwapStrategy) – The swap strategy used to decompose the node.
A dag that is compatible with the coupling map where swap gates have been added to map the gates in the
Commuting2qBlockto the hardware.