LookaheadSwap.run

LookaheadSwap.run(dag)[source]

Run the LookaheadSwap pass on dag.

Parameters

dag (DAGCircuit) – the directed acyclic graph to be mapped

Returns

A dag mapped to be compatible with the coupling_map in

the property_set.

Return type

DAGCircuit

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

  • compatible with the DAG