English
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.transpiler.CouplingMap.shortest_undirected_path

CouplingMap.shortest_undirected_path(physical_qubit1, physical_qubit2)[source]

Returns the shortest undirected path between physical_qubit1 and physical_qubit2.

Parameters
  • physical_qubit1 (int) – A physical qubit

  • physical_qubit2 (int) – Another physical qubit

Returns

The shortest undirected path

Return type

List

Raises

CouplingError – When there is no path between physical_qubit1, physical_qubit2.