build_coupling_graph¶
- build_coupling_graph(backend, multigraph=False)[source]¶
Build a rustworkx undirected graph from the backend’s coupling map.
If multigraph=True then parallel edges in the coupling map will produce parallel edges in the constructed graph. For example, if both [1, 2] and [2, 1] are in the coupling map, then the graph will contain two edges between the nodes labeled 1 and 2.
The graph’s edges are labeled with the coupling edge. So, the two edges from the previous example will be labeled [1, 2] and [2, 1].
If multigraph=False then parallel edges will produce a single edge in the graph; the node order in the edge’s label will be arbitrary.
- Parameters:
backend (Backend) – A Qiskit backend instance
multigraph (bool) – If True, create parallel edges for bidirectional coupling map entries
- Returns:
Undirected graph representing the coupling map
- Return type:
PyGraph