qiskit.transpiler.passes.Commuting2qGateRouter.swap_decompose¶
- Commuting2qGateRouter.swap_decompose(dag, node, current_layout, swap_strategy)[fuente]¶
Take an instance of
Commuting2qBlock
and map it to the coupling map.The mapping is done with the swap strategy.
- Parámetros
dag (DAGCircuit) – The dag which contains the
Commuting2qBlock
we route.node (DAGOpNode) – A node whose operation is a
Commuting2qBlock
.current_layout (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.
swap_strategy (SwapStrategy) – The swap strategy used to decompose the node.
- Devuelve
A dag that is compatible with the coupling map where swap gates have been added to map the gates in the
Commuting2qBlock
to the hardware.- Tipo del valor devuelto