|q⟩ Bad Qubits

advanced · Programming · Distributed & Networked Quantum Computing

Entanglement Distribution

The most basic service a quantum network provides is a shared Bell pair: one qubit held by node AA (Alice), the other by node BB (Bob), in the maximally entangled state

∣Φ+⟩AB=∣00⟩+∣11⟩2.|\Phi^+\rangle_{AB} = \frac{|00\rangle + |11\rangle}{\sqrt{2}}.

Every higher-level protocol — teleportation, swapping, distributed gates — assumes this pair already exists. In this lesson you distribute one and measure the correlations that prove it is entangled.

Generating a Bell pair

A Bell pair is prepared with exactly two gates, regardless of how far apart the qubits will eventually sit:

∣Φ+⟩=CNOT0→1 (H⊗I) ∣00⟩.|\Phi^+\rangle = \mathrm{CNOT}_{0\to 1}\,\big(H \otimes I\big)\,|00\rangle.

Reading it left to right:

  1. Start in ∣00⟩|00\rangle.
  2. A Hadamard on qubit 0 produces 12(∣0⟩+∣1⟩)⊗∣0⟩\tfrac{1}{\sqrt 2}(|0\rangle + |1\rangle)\otimes|0\rangle.
  3. A CNOT with qubit 0 as control entangles qubit 1, giving 12(∣00⟩+∣11⟩)\tfrac{1}{\sqrt 2}(|00\rangle + |11\rangle).

In a real network the two qubits are created together at a source and one half is then transmitted to the partner node. In our simulator we model both halves in a single register; qubit 0 is Alice's and qubit 1 is Bob's.

What entanglement looks like in the data

A Bell pair is not the same as two qubits that are each independently in superposition. The signature is perfect correlation. Measuring both qubits in the computational (ZZ) basis yields

P(00)=P(11)=12,P(01)=P(10)=0.P(00) = P(11) = \tfrac12, \qquad P(01) = P(10) = 0.

Alice's outcome is individually random — 50/5050/50 — yet it always matches Bob's. The same perfect correlation holds in the XX basis, which is what rules out any classical "shared coin" explanation and underpins entanglement-based quantum key distribution.

Fidelity and noise

Real links never deliver a perfect ∣Φ+⟩|\Phi^+\rangle. Loss and decoherence degrade it to a mixed state ρ\rho, characterised by its fidelity

F=⟨Φ+∣ρ∣Φ+⟩,F = \langle \Phi^+ | \rho | \Phi^+ \rangle,

the overlap with the ideal pair. F=1F = 1 is perfect; F=1/4F = 1/4 is no better than random noise. Later lessons (purification, repeaters) are entirely about pushing FF back up after distribution has degraded it. Here we work in the idealised F=1F = 1 regime so you can see the target those protocols aim for.

Try it

Distribute a Bell pair across the two nodes and measure both qubits. The grader checks the measurement distribution: only 00 and 11 should appear, each with probability 12\tfrac12.

Run your code to see the quantum state.

After running, open the Probabilities tab: two bars of height 0.50.5 at 00 and 11, zero everywhere else — the fingerprint of a perfectly distributed Bell pair.

Sign in on the full site to ask questions and join the discussion.