qiskit.transpiler.CouplingMap.shortest_undirected_path¶
- CouplingMap.shortest_undirected_path(physical_qubit1, physical_qubit2)[Quellcode]¶
Returns the shortest undirected path between physical_qubit1 and physical_qubit2.
- Parameter
physical_qubit1 (int) – A physical qubit
physical_qubit2 (int) – Another physical qubit
- Rückgabe
The shortest undirected path
- Rückgabetyp
List
- Verursacht
CouplingError – When there is no path between physical_qubit1, physical_qubit2.