|q⟩ Bad Qubits

advanced · Programming · Capstone Projects

Project: Entanglement Network

A quantum network's job is to share entanglement between distant nodes — and to make that entanglement good enough despite lossy channels. This capstone wires the two core primitives: distribution of Bell pairs across a four-qubit, two-node network, and the bilateral-CNOT step that begins entanglement purification.

Distributing Bell pairs

Each link in the network shares a Bell pair Φ+=12(00+11)|\Phi^+\rangle = \tfrac{1}{\sqrt 2}(|00\rangle + |11\rangle), one half at each node, created by H then CX. Our toy network has two such pairs:

pair A (keep):qubits 0,1,pair B (sacrifice):qubits 2,3,\text{pair A (keep)} : \text{qubits } 0,1, \qquad \text{pair B (sacrifice)} : \text{qubits } 2,3,

with Alice holding qubits 0,20, 2 and Bob holding 1,31, 3. After distribution the joint state is the product Φ+01Φ+23|\Phi^+\rangle_{01} \otimes |\Phi^+\rangle_{23}.

Why purification is needed

Real channels degrade a Bell pair into a mixed state of fidelity F<1F < 1 to Φ+|\Phi^+\rangle. Purification (Bennett et al., 1996; the BBPSSW protocol) consumes two imperfect pairs to distill one pair of higher fidelity. The opening move is a bilateral CNOT: each node applies a local CNOT from its half of the kept pair onto its half of the sacrificial pair,

Alice:CX(0,2),Bob:CX(1,3).\text{Alice}: \texttt{CX}(0,2), \qquad \text{Bob}: \texttt{CX}(1,3).

Both operations are strictly local — no quantum communication is required beyond the pre-shared pairs — which is what makes purification practical over long distances.

Reading out the distillation

After the bilateral CNOT, both parties measure the sacrificial pair (qubits 2,32, 3) in the computational basis and compare results over a classical channel. Coincident outcomes "pass" and herald a kept pair of improved fidelity; mismatches are discarded. Iterating the protocol drives the kept-pair fidelity toward 11, the resource a repeater chain needs to extend entanglement across the whole network.

Try it

Distribute the two Bell pairs and apply the bilateral CNOT. The grader checks the 4-qubit statevector right after the local CNOTs — the state from which the heralding measurement is made.

Run your code to see the quantum state.

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