Entanglement can be performed just between two ** adjacent qubits** (e.g. 1 and 2) or even non-physically adjacent qubits on the processor architecture can be entangled (e.g. 2 and 6).

double T-shape coupling map

How entangled between non-physically adjacent qubits could happen?

  • 3
    $\begingroup$ You are using incorrect terminology. Qubits 2 and 6 are connected but not adjacent. Since they are connected you can entangle them by series of swap operations. $\endgroup$
    – MonteNero
    Commented Dec 11, 2022 at 15:25

1 Answer 1


As @MonteNero mentioned in the comment, it is posible to entangle non-adjacent qubits using $\mathrm{SWAP}$ gates.

In Qiskit, there is a transpilation stage called routing that introduce the $\mathrm{SWAP}$ gates for exactly that propose. Taking the example from your question:

The following circuit entangles the qubits $q_2$ and $q_6$:

from qiskit import QuantumCircuit

circuit = QuantumCircuit(7)

cnot between q2 and q6 The backend you are suggesting has the shape many of the IBM's Falcon r5.11H, such as ibm_oslo

from qiskit.providers.fake_provider import FakeOslo
from qiskit.visualization import plot_gate_map

backend = FakeOslo()

oslo coupling map

The transpiler will insert the $\mathrm{SWAP}# gates to make possible the entanglement between adjacent qubits.

from qiskit import transpile

transpile(circuit, coupling_map=backend.coupling_map, layout_method='trivial').draw('mpl', with_layout=False)

transpiled circuit with swap gates

Let's analyse this case layer by layer:

  • Layer 1, $q_1$ swaps with $q_2$ and $q_5$ with $q_6$. Logically speaking, you can see the connectivity map like this now:

coupling map after layer 1

  • Layer 2, $q_3$ swaps with $q_2$:

coupling map after layer 2

Now, $q_6$ and $q_2$ are adjacent and the $\mathrm{CNOT}$ gate between them works.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.