Skip to content

Commit

Permalink
Update docstring of CouplingMap.connected_components to reflect name …
Browse files Browse the repository at this point in the history
…change (#9979)

This method was renamed. But the docstring was not updated.
  • Loading branch information
jlapeyre authored Apr 17, 2023
1 parent 81e4913 commit ebf83b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qiskit/transpiler/coupling.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ def connected_components(self) -> List["CouplingMap"]:
from qiskit.transpiler import CouplingMap
cmap = CouplingMap([[0, 1], [1, 2], [2, 0], [3, 4], [4, 5], [5, 3]])
component_cmaps = cmap.get_component_subgraphs()
component_cmaps = cmap.connected_components()
print(component_cmaps[1].graph[0])
will print ``3`` as index ``0`` in the second component is qubit 3 in the original cmap.
Expand Down

0 comments on commit ebf83b6

Please sign in to comment.