BasicSwap¶
- class BasicSwap(*args, **kwargs)[source]¶
Map (with minimum effort) a DAGCircuit onto a coupling_map adding swap gates.
The basic mapper is a minimum effort to insert swap gates to map the DAG onto a coupling map. When a cx is not in the coupling map possibilities, it inserts one or more swaps in front to make it compatible.
BasicSwap initializer.
- Parameters
coupling_map (CouplingMap) – Directed graph represented a coupling map.
Attributes
Check if the pass is an analysis pass.
Check if the pass is a transformation pass.
Methods
Return the name of the pass.
BasicSwap.run
(dag)Run the BasicSwap pass on dag.