Skip to main contentIBM Quantum Documentation

qiskit.visualization.plot_coupling_map

qiskit.visualization.plot_coupling_map(num_qubits, qubit_coordinates, coupling_map, figsize=None, plot_directed=False, label_qubits=True, qubit_size=None, line_width=4, font_size=None, qubit_color=None, qubit_labels=None, line_color=None, font_color='white', ax=None, filename=None)GitHub(opens in a new tab)

Plots an arbitrary coupling map of qubits (embedded in a plane).

Parameters

Returns

A Matplotlib figure instance.

Return type

Figure

Raises

Example

from qiskit.visualization import plot_coupling_map
 
num_qubits = 8
qubit_coordinates = [[0, 1], [1, 1], [1, 0], [1, 2], [2, 0], [2, 2], [2, 1], [3, 1]]
coupling_map = [[0, 1], [1, 2], [2, 3], [3, 5], [4, 5], [5, 6], [2, 4], [6, 7]]
plot_coupling_map(num_qubits, qubit_coordinates, coupling_map)
../_images/qiskit-visualization-plot_coupling_map-1.png
Was this page helpful?