qiskit.transpiler.CouplingMap.compute_distance_matrix¶
- CouplingMap.compute_distance_matrix()[código fonte]¶
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 thedistance()
method but can be called if you’re accessing the distance matrix outside of those or want to pre-generate it.