Tamil
மொழிகள்
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.transpiler.CouplingMap.compute_distance_matrix

CouplingMap.compute_distance_matrix()[source]

Compute the full distance matrix on pairs of nodes.

The distance map self._dist_matrix is computed from the graph using all_pairs_shortest_path_length. This is normally handled internally by the distance_matrix attribute or the distance() method but can be called if you're accessing the distance matrix outside of those or want to pre-generate it.