BasicSwap.run

BasicSwap.run(dag)[source]

Run the BasicSwap pass on dag.

Parameters

dag (DAGCircuit) – DAG to map.

Returns

A mapped DAG.

Return type

DAGCircuit

Raises
  • TranspilerError – if the coupling map or the layout are not

  • compatible with the DAG.