---
title: plot_coupling_map (v1.0)
description: API reference for qiskit.visualization.plot_coupling_map in qiskit v1.0
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/1.0/qiskit.visualization.plot_coupling_map
---

# 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](https://github.com/Qiskit/qiskit/tree/stable/1.0/qiskit/utils/lazy_tester.py#L951-L1115)

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

**Parameters**

- **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int)) – The number of qubits defined and plotted.
- **qubit\_coordinates** (*List\[List\[*[*int*](https://docs.python.org/3/library/functions.html#int)*]]*) – A list of two-element lists, with entries of each nested list being the planar coordinates in a 0-based square grid where each qubit is located.
- **coupling\_map** (*List\[List\[*[*int*](https://docs.python.org/3/library/functions.html#int)*]]*) – A list of two-element lists, with entries of each nested list being the qubit numbers of the bonds to be plotted.
- **figsize** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple)) – Output figure size (wxh) in inches.
- **plot\_directed** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – Plot directed coupling map.
- **label\_qubits** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – Label the qubits.
- **qubit\_size** ([*float*](https://docs.python.org/3/library/functions.html#float)) – Size of qubit marker.
- **line\_width** ([*float*](https://docs.python.org/3/library/functions.html#float)) – Width of lines.
- **font\_size** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Font size of qubit labels.
- **qubit\_color** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)) – A list of colors for the qubits
- **qubit\_labels** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)) – A list of qubit labels
- **line\_color** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)) – A list of colors for each line from coupling\_map.
- **font\_color** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The font color for the qubit labels.
- **ax** (*Axes*) – A Matplotlib axes instance.
- **filename** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – file path to save image to.

**Returns**

A Matplotlib figure instance.

**Return type**

Figure

**Raises**

- [**MissingOptionalLibraryError**](/docs/api/qiskit/1.0/exceptions#qiskit.exceptions.MissingOptionalLibraryError "qiskit.exceptions.MissingOptionalLibraryError") – If matplotlib or graphviz is not installed.
- [**QiskitError**](/docs/api/qiskit/1.0/exceptions#qiskit.exceptions.QiskitError "qiskit.exceptions.QiskitError") – If length of qubit labels does not match number of qubits.

**Example**

```python
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](https://eu-de.quantum.cloud.ibm.com/docs/images/api/qiskit/1.0/qiskit-visualization-plot_coupling_map-1.avif)
