QubitLab
IDELearnPlaygroundDocsCommunity
Log in
QubitLab
IDELearnPlaygroundDocsCommunity
Log in
HomeLearnCatalogRanksPlaygroundDocs
  1. Docs
  2. Entanglement: how CNOT connects qubits
Learn
  • Quantum basics
  • OpenQASM 3 cheat sheet
  • All gates, with the math
  • Every gate, interactive
  • Entanglement: how CNOT connects qubits
Circuits
  • Dynamic circuits: if/else, loops and conditions
Lessons
  • Learning path: from one qubit to algorithms
  • Quantum machine learning by hand
Run
  • Compile (transpile): levels, basis gates, topology
  • Simulators, noise, T1/T2 and fake backends
  • Python in the Playground
  • GitHub and git in the Playground
  • Articles and sharing
Analyze
  • Metrics: comparing distributions
  • Q-sphere and Bloch spheres
Hardware
  • Real IBM Quantum hardware
  • Device topology and calibration heat maps
  • Benchmark circuits: MQT Bench and QASMBench
Advanced
  • Circuit cutting, in depth
Story
  • The story of quantum computing
  • The Hamiltonian: where gates come from
  • What to expect next
Documentation/Learn/Entanglement: how CNOT connects qubits

Entanglement: how CNOT connects qubits

Single-qubit gates rotate one Bloch vector. Only a two-qubit gate can make two qubits share a state. Here is exactly how CNOT does it, why CZ and ECR are the same thing in disguise, and what 'native gate' means on a real chip.

Step 0 · A product state

∣ψ⟩=∣q1​⟩⊗∣q0​⟩=(a∣0⟩+b∣1⟩)⊗(c∣0⟩+d∣1⟩)
Two independent qubits: the joint state factorizes. Each qubit has its own Bloch vector of length 1. Nothing you do to q0 alone can change q1.

Step 1 · What CNOT does to each basis state

Input |q1 q0⟩Control q0OutputWhy
|00⟩0|00⟩control is 0 → target untouched
|01⟩1|11⟩control is 1 → target flips 0→1
|10⟩0|10⟩control is 0 → target untouched
|11⟩1|01⟩control is 1 → target flips 1→0

On basis states CNOT is just a classical XOR: target ← target ⊕ control. It only becomes quantum when the control is in superposition, because then both rows of the table happen at once.

Step 2 · H then CNOT: the Bell state

∣00⟩H on q0​​2​1​(∣00⟩+∣01⟩)CNOT​2​1​(∣00⟩+∣11⟩)
Apply the table to each term: |00⟩ stays, |01⟩ (control 1) becomes |11⟩. The result cannot be written as (…)⊗(…): try it, you would need ad = 0 and bc = 0 but ac ≠ 0 and bd ≠ 0. That impossibility is entanglement.
ρq0​​=Trq1​​∣Φ+⟩⟨Φ+∣=21​I,r=(0,0,0),purity=21​
Each qubit alone is now maximally mixed: its Bloch vector has length 0 (watch it shrink in the Playground). All the information is in the correlation: measure both and you always get 00 or 11, never 01 or 10, even if the qubits are far apart.

Try it: Playground → Bell state → press › twice and watch the two Bloch arrows collapse to the centre when CNOT is applied.

Step 3 · CZ, CNOT and ECR are the same resource

CNOT=(I⊗H);CZ;(I⊗H)
CZ adds a −1 phase to |11⟩ only. Sandwich the target with Hadamards and the phase flip turns into a bit flip: that is a CNOT. Because CZ is symmetric, 'control' and 'target' are only labels.
CNOT=(RZ​(−2π​)⊗RX​(2π​));ECR;(…)up to single-qubit gates
ECR (echoed cross-resonance) is what IBM Eagle chips physically do: drive the control at the target's frequency so the target rotates about X by ±π/2 depending on the control. Add a few single-qubit gates and it is a CNOT. Every entangler with 'maximal entangling power' (CNOT, CZ, ECR, iSWAP) can be converted to any other with single-qubit gates alone.

Step 4 · What 'native gate' means

ChipNative 1-qubitNative 2-qubitSo a CNOT costs
IBM Eagle (127q)RZ (free), √X, XECR1 ECR + a few √X/RZ (≈ 300–500 ns, error ~0.5–1 %)
IBM Heron (133–156q)RZ, √X, XCZ (+ fractional RZZ)1 CZ + 2 H (as RZ·√X·RZ) (≈ 70–100 ns, error ~0.2–0.5 %)
Trapped ionsR(θ,φ)RXX (Mølmer–Sørensen)1 RXX(π/2) + single-qubit rotations
Generic (QubitLab 'generic' target)RZ, √X, XCX1 CX

The transpiler's translation stage rewrites every gate you drew into the native set. That is why Compile on fake_sherbrooke (Eagle) shows ECR gates and on fake_torino (Heron) shows CZ: same circuit, different hardware dialect. The two-qubit count after translation is the number that matters for error, because each native entangler is 10–50× noisier than a single-qubit gate.

Step 5 · Connectivity: entangling qubits that are not neighbours

A native two-qubit gate only exists between physically coupled qubits (the coupling map, heavy-hex on IBM). To entangle q0 with q5 on a chain, the router inserts SWAPs to carry the state next to its partner: three CNOTs per hop. The Levels tab shows how many SWAPs each optimization level needed; cutting (next chapter) is the alternative when the chip is simply too small.

← Previous
Dynamic circuits: if/else, loops and conditions
Next →
Learning path: from one qubit to algorithms
On this page
  • Step 0 · A product state
  • Step 1 · What CNOT does to each basis state
  • Step 2 · H then CNOT: the Bell state
  • Step 3 · CZ, CNOT and ECR are the same resource
  • Step 4 · What 'native gate' means
  • Step 5 · Connectivity: entangling qubits that are not neighbours
Try it in the IDE →
QubitLab
IDELearnPlaygroundDocsCommunity
Log in
QubitLab
IDELearnPlaygroundDocsCommunity
Log in