# What is the default coupling map for qiskit

When creating a coupling map the parameters can be left empty, but what type of coupling map does this create. In the Qiskit documentation it says

By default, the generated coupling has no nodes.

But I don't quite understand what this means. What is a coupling map without nodes? I obviously presume that it uses a fully connected coupling map, but I can't seem to find a straight answer to this question.

• If I simply run CouplingMap().draw() it really is an empty, Dec 4 '21 at 11:09

The CouplingMap class is used to model the connectivity constraints of a backend for Qiskit's compiler. The compiler uses it to know what the limitations are on connectivity when mapping a circuit to a given backend and optimizing it for that backend. It is basically just a directed graph where the nodes are the qubits and the edges represent 2q gate connectivity between qubits. The class can be used to model any connectivity constraints on a QPU. If you create an empty graph with no nodes that's modeling a backend without any qubits (i.e. no nodes) which while valid is not particularly useful as it could only run an empty quantum circuit.

The main reason the constructor by default (with no arguments specified) creates an empty graph is to enable dynamically create the graph after creation. For example, if you wanted to create a new linear coupling graph by adding edges after it's created you could do something like:

from qiskit.transpiler import CouplingMap
cmap = CouplingMap()
for i in range(4):

which is equivalent of doing cmap = CouplingMap([(0, 1), (1, 2), (2, 3), (3, 4)]) but there could be use cases where you need to add edges or nodes to the graph after it's initial creation.