Lesson 10: Quantum Teleportation, Superdense Coding and Quantum Error Correction¶
10.1 Learning Outcomes¶
By the end of this hour a student will be able to:
- Derive the quantum teleportation protocol step by step and state its resource requirements.
- Explain why teleportation does not violate no-cloning or no-signalling.
- Derive superdense coding and state the duality between it and teleportation.
- Explain why classical repetition codes fail and how stabiliser measurement solves the problem.
- Construct the 3-qubit bit-flip and phase-flip codes and describe the 9-qubit Shor code.
- State the quantum threshold theorem and interpret physical-vs-logical qubit overhead.
10.2 Quantum Teleportation¶
The task. Alice holds an unknown qubit \(|\psi\rangle = \alpha|0\rangle + \beta|1\rangle\). She wants Bob to end up holding exactly \(|\psi\rangle\). They share one entangled pair and a classical channel. Alice may not send the qubit itself.
Resources: 1 shared ebit (\(|\Phi^+\rangle\)) + 2 classical bits + local operations.
The circuit¶
Alice
+-----------------------------+
q0 |psi> ----------*--------[H]------[M]---------.
| | m0
q1 (EPR) ---------[X]----------------[M]------. |
+----------------------------+ | | m1
| |
q2 (EPR) -------------------------------[X]--[Z]------> |psi>
Bob ^ ^
| |
controlled by m1, m0
Reading the diagram: * is a CNOT control, [X] its target, [M] a measurement,
and the final [X]/[Z] on Bob's wire are applied only if the corresponding
classical bit is 1.
Qubits 1 and 2 begin in the Bell state \(|\Phi^+\rangle\).
Full derivation¶
Initial state (qubit 0 is Alice's unknown; qubits 1–2 are the shared pair):
Step 1 — CNOT (control \(q_0\), target \(q_1\)). Flip \(q_1\) where \(q_0=1\):
Step 2 — Hadamard on \(q_0\). Substitute \(|0\rangle \to \frac{|0\rangle+|1\rangle}{\sqrt2}\) and \(|1\rangle\to\frac{|0\rangle-|1\rangle}{\sqrt2}\):
Step 3 — regroup by Alice's two qubits \(q_0q_1\):
Read this carefully. Bob's qubit already carries \(\alpha\) and \(\beta\) in all four branches — up to one of exactly four known corrections.
Step 4 — Alice measures \(q_0q_1\). Each outcome has probability \(\frac14\) (note \(|\alpha|^2+|\beta|^2=1\)), and this is what makes the protocol non-signalling: Alice's statistics carry no information about \(|\psi\rangle\).
Step 5 — Bob's correction, determined by the two classical bits \(m_0m_1\):
| Alice's bits \(m_0m_1\) | Bob's state | Correction | Why |
|---|---|---|---|
| \(00\) | \(\alpha\lvert 0\rangle + \beta\lvert 1\rangle\) | \(I\) | already correct |
| \(01\) | \(\alpha\lvert 1\rangle + \beta\lvert 0\rangle\) | \(X\) | bit flipped |
| \(10\) | \(\alpha\lvert 0\rangle - \beta\lvert 1\rangle\) | \(Z\) | phase flipped |
| \(11\) | \(\alpha\lvert 1\rangle - \beta\lvert 0\rangle\) | \(ZX\) | both |
General rule: apply \(X^{m_1}Z^{m_0}\). Bob then holds exactly \(|\psi\rangle\).
Why no laws are broken¶
- No-cloning is respected. Alice's measurement destroys her copy. At the end exactly one copy of \(|\psi\rangle\) exists, in Bob's hands. Teleportation moves a state; it does not duplicate it.
- No-signalling is respected. Without the two classical bits, Bob's qubit is in the maximally mixed state \(\rho_B = I/2\) — no information at all. The protocol is limited by the classical channel, hence by the speed of light.
- \(|\psi\rangle\) is never learned. Neither party discovers \(\alpha\) or \(\beta\); measuring to find them would require infinitely many copies.
Applications¶
Quantum repeaters (entanglement swapping), distributed quantum computing, and — importantly for fault tolerance — gate teleportation, the standard way to apply a \(T\) gate on encoded qubits using a pre-distilled magic state.
10.3 Superdense Coding¶
The task (the mirror image). Alice sends two classical bits to Bob by transmitting one qubit, using one pre-shared ebit.
Protocol.
- Alice and Bob share \(|\Phi^+\rangle = \frac{1}{\sqrt2}(|00\rangle+|11\rangle)\).
- To encode bits \(b_1b_0\), Alice applies \(Z^{b_1}X^{b_0}\) to her qubit only:
| Bits \(b_1b_0\) | Alice applies | Resulting Bell state |
|---|---|---|
| \(00\) | \(I\) | \(\lvert \Phi^+\rangle\) |
| \(01\) | \(X\) | \(\lvert \Psi^+\rangle\) |
| \(10\) | \(Z\) | \(\lvert \Phi^-\rangle\) |
| \(11\) | \(ZX\) | \(\lvert \Psi^-\rangle\) |
- Alice sends her single qubit to Bob.
- Bob, now holding both qubits, performs a Bell measurement (CNOT then \(H\), then measure both) and recovers \(b_1b_0\) with certainty, because the four Bell states are orthogonal.
Verification for \(b_1b_0 = 01\):
The duality.
Holevo's bound (one qubit carries at most one classical bit) is not violated: the second bit was carried by the pre-shared entanglement, distributed earlier.
10.4 Quantum Error Correction¶
Three obstacles that classical QEC does not face¶
- No-cloning — you cannot make three copies of \(|\psi\rangle\).
- Measurement destroys — reading the qubit to check it collapses the superposition.
- Continuous errors — a qubit can suffer \(R_x(0.01)\), not just a discrete flip. There are uncountably many possible errors.
The three ideas that solve them¶
- Encode, don't copy. Spread one logical qubit across several physical qubits in an entangled state.
- Measure the syndrome, not the data. Measure operators that reveal which error occurred without revealing \(\alpha\) or \(\beta\).
- Error discretisation. A continuous error is a superposition of \(\{I, X, Y, Z\}\); the syndrome measurement projects it onto one of these. Correcting \(X\), \(Z\) and \(Y = iXZ\) therefore corrects everything. This is the theorem that makes QEC possible at all.
The 3-qubit bit-flip code¶
Encoding.
Circuit: two CNOTs from \(q_0\) to \(q_1\) and \(q_2\). Note this is not cloning — the encoded state is entangled, not \(|\psi\rangle^{\otimes3}\).
Syndrome measurement. Measure the two stabilisers
These are parity checks. They commute with each other and with the logical operators, so they reveal the error location without disturbing \(\alpha,\beta\).
| \(S_1\) | \(S_2\) | Diagnosis | Correction |
|---|---|---|---|
| \(+1\) | \(+1\) | no error | none |
| \(-1\) | \(+1\) | flip on qubit 1 | \(X_1\) |
| \(-1\) | \(-1\) | flip on qubit 2 | \(X_2\) |
| \(+1\) | \(-1\) | flip on qubit 3 | \(X_3\) |
Corrects any single bit flip. Fails on two or more.
Failure probability. If each qubit flips independently with probability \(p\):
For \(p = 0.01\): \(P_{\text{fail}} \approx 2.98\times10^{-4}\) — a 34-fold improvement. The code helps whenever \(3p^2 < p\), i.e. \(p < 1/3\). This threshold behaviour is the seed of the full threshold theorem.
The 3-qubit phase-flip code¶
A \(Z\) error is a bit flip in the Hadamard basis, because \(HZH = X\). So conjugate the whole bit-flip code by Hadamards:
with stabilisers \(X_1X_2\) and \(X_2X_3\).
The 9-qubit Shor code¶
Concatenate the two: encode with the phase-flip code, then encode each of its three qubits with the bit-flip code.
This corrects an arbitrary single-qubit error — \(X\), \(Z\), \(Y\), or any continuous rotation — on any one of the nine qubits. It was the first QEC code (Peter Shor, 1995) and proved that fault-tolerant quantum computing is possible in principle.
Other important codes.
| Code | \([[n,k,d]]\) | Note |
|---|---|---|
| Shor | \([[9,1,3]]\) | first code |
| Steane | \([[7,1,3]]\) | CSS code from the classical Hamming \([7,4,3]\) code |
| Perfect / Laflamme | \([[5,1,3]]\) | smallest possible distance-3 code |
| Surface code | \([[d^2,1,d]]\) | 2-D nearest-neighbour only; today's leading candidate |
Notation \([[n,k,d]]\): \(n\) physical qubits, \(k\) logical qubits, distance \(d\), correcting \(t = \lfloor (d-1)/2\rfloor\) errors.
The threshold theorem¶
Theorem (Aharonov–Ben-Or; Knill–Laflamme–Zurek; Kitaev). If the physical error rate per gate is below a constant threshold \(p_{\text{th}}\), then arbitrarily long quantum computations can be performed reliably, with only polylogarithmic overhead in the number of qubits and gates.
For the surface code, \(p_{\text{th}} \approx 1\%\) — within reach of today's hardware. The price is overhead: roughly \(10^3\)–\(10^4\) physical qubits per logical qubit for cryptographically relevant computations. This is exactly why estimates for "breaking RSA-2048 with Shor" quote millions of physical qubits.
10.5 Solved Problems¶
Problem 1 — Teleporting a specific state¶
Alice teleports \(|\psi\rangle = \frac{1}{\sqrt5}\big(|0\rangle + 2|1\rangle\big)\) and measures \(m_0m_1 = 10\). Write Bob's pre-correction state, the correction, and verify the final state.
Solution. Here \(\alpha = \frac{1}{\sqrt5}\), \(\beta = \frac{2}{\sqrt5}\).
From the branch table, outcome \(10\) leaves Bob with
Correction: \(m_0 = 1\), \(m_1 = 0\), so apply \(X^{0}Z^{1} = Z\):
Note that the probability of this outcome is \(\frac14\) regardless of \(\alpha,\beta\) — Alice learns nothing about the state she teleported.
Problem 2 — Superdense coding, full trace¶
Alice wants to send \(11\). Trace the protocol and verify Bob decodes correctly.
Solution.
Shared state: \(|\Phi^+\rangle = \frac{1}{\sqrt2}(|00\rangle+|11\rangle)\).
Encode: \(b_1b_0 = 11\), so Alice applies \(ZX\) to her qubit.
Decode (Bell measurement): apply CNOT\(_{0\to1}\) then \(H\) on \(q_0\).
Bob measures and reads \(b_1b_0 = 11\) ✓ with probability 1. Two classical bits delivered by one transmitted qubit.
Problem 3 — Bit-flip code syndrome decoding¶
The state \(\alpha|000\rangle + \beta|111\rangle\) suffers an \(X\) error on qubit 2. Compute the syndrome and show that correction restores the state exactly, without revealing \(\alpha,\beta\).
Solution.
Corrupted state: \(X_2\big(\alpha|000\rangle + \beta|111\rangle\big) = \alpha|010\rangle + \beta|101\rangle\).
Measure \(S_1 = Z_1Z_2\) (parity of qubits 1 and 2):
- \(|010\rangle\): bits \(0,1\) → parity odd → eigenvalue \(-1\)
- \(|101\rangle\): bits \(1,0\) → parity odd → eigenvalue \(-1\)
Both branches give \(-1\), so the measurement returns \(S_1 = -1\) without collapsing the superposition — this is the key point.
Measure \(S_2 = Z_2Z_3\):
- \(|010\rangle\): bits \(1,0\) → odd → \(-1\)
- \(|101\rangle\): bits \(0,1\) → odd → \(-1\)
\(S_2 = -1\).
Syndrome \((-1,-1)\) ⟶ table says error on qubit 2 ⟶ apply \(X_2\):
Why \(\alpha,\beta\) stay secret. The stabilisers act identically on \(|0\rangle_L\) and \(|1\rangle_L\), so their eigenvalues depend only on the error, never on the encoded amplitudes. This is the central design principle of stabiliser codes.
Problem 4 — Error discretisation¶
A qubit in the bit-flip code suffers the continuous rotation \(R_x(\epsilon) = \cos\frac{\epsilon}{2}I - i\sin\frac{\epsilon}{2}X\) on qubit 1. Show that syndrome measurement corrects it exactly.
Solution. Write \(c = \cos\frac{\epsilon}{2}\), \(s = \sin\frac{\epsilon}{2}\). The corrupted state is
This is a superposition of "no error" and "\(X_1\) error".
Measuring the syndrome \((S_1, S_2)\) projects onto one of the error subspaces:
- With probability \(|c|^2 = \cos^2\frac{\epsilon}{2}\): syndrome \((+1,+1)\), state collapses to \(|\psi_L\rangle\). No error occurred.
- With probability \(|s|^2 = \sin^2\frac{\epsilon}{2}\): syndrome \((-1,+1)\), state collapses to \(X_1|\psi_L\rangle\). Apply \(X_1\) to restore \(|\psi_L\rangle\).
In both cases the final state is exactly \(|\psi_L\rangle\) — the small continuous error has been digitised by the measurement and then removed. No approximation, no residual error.
Significance. This is why a code that corrects only the discrete set \(\{X,Y,Z\}\) corrects the continuum of all possible single-qubit errors. Without it, QEC would be impossible.
Problem 5 — Logical error rate and the value of concatenation¶
Physical qubits have error rate \(p = 10^{-3}\). Compute the logical error rate for (a) the 3-qubit code, (b) one level of concatenation (\(9\) qubits), (c) two levels (\(27\) qubits). How many levels are needed for \(10^{-15}\)?
Solution. For a distance-3 code, \(p_L \approx 3p^2\) (fails only on 2 or more errors).
(a) \(p_L = 3(10^{-3})^2 = 3\times10^{-6}\).
(b) Concatenation applies the same formula to the previous level's rate:
(c) \(p_L^{(3)} = 3\left(2.7\times10^{-11}\right)^2 = 3\times 7.29\times10^{-22} = 2.19\times10^{-21}\).
So three levels already beat \(10^{-15}\) comfortably; two levels (\(2.7\times10^{-11}\)) do not.
Cost. Level \(k\) uses \(3^k\) physical qubits per logical qubit:
| Level | Physical qubits | Logical error rate |
|---|---|---|
| 1 | 3 | \(3\times10^{-6}\) |
| 2 | 9 | \(2.7\times10^{-11}\) |
| 3 | 27 | \(2.2\times10^{-21}\) |
Double-exponential suppression for exponential cost — the essence of the threshold theorem. Note that with \(p = 0.4 > 1/3\) the recursion diverges: concatenation makes things worse. This is the threshold in action.
10.6 Practice Problems¶
- Alice teleports \(|+\rangle\) and measures \(11\). What is Bob's pre-correction state and what correction restores \(|+\rangle\)? [Ans: \(\frac{1}{\sqrt2}(|1\rangle-|0\rangle)\); apply \(ZX\)]
- Verify \((Z\otimes I)|\Phi^+\rangle = |\Phi^-\rangle\).
- Show that Bob's reduced density matrix before receiving Alice's bits is \(I/2\), proving no-signalling.
- Encode \(\frac{1}{\sqrt2}(|0\rangle+|1\rangle)\) in the phase-flip code and show a \(Z_2\) error is detected.
- For the 3-qubit code with \(p = 0.05\), compute the logical error rate and the improvement factor. [Ans: \(7.1\times10^{-3}\); ≈ 7×]
- Why is the surface code preferred over the Shor code on superconducting hardware?
- Explain why teleportation requires two classical bits and not one.
10.7 Summary¶
- Teleportation: 1 ebit + 2 cbits move an unknown qubit. Alice's Bell measurement leaves Bob's qubit correct up to one of four Pauli corrections \(X^{m_1}Z^{m_0}\). No cloning (Alice's copy is destroyed) and no signalling (Bob sees \(I/2\) until the bits arrive).
- Superdense coding: the dual protocol — 1 ebit + 1 qubit send 2 classical bits, decoded by a Bell measurement.
- QEC cannot copy. It encodes into entangled states and measures stabilisers, which reveal the error without revealing the data.
- Error discretisation means correcting \(\{X,Y,Z\}\) corrects every continuous error.
- 3-qubit codes fix bit flips or phase flips; the 9-qubit Shor code fixes both. \([[n,k,d]]\) notation; the surface code leads today.
- Threshold theorem: below \(p_{\text{th}}\approx1\%\), arbitrarily long computation is possible with polylog overhead — but with \(10^3\)–\(10^4\) physical qubits per logical qubit in practice.
Unit I is now complete. You should be able to: manipulate states and gates algebraically, reason on the Bloch sphere, compute measurement statistics, detect entanglement, and explain why interference (not parallelism) is the source of quantum power.
Next lesson: L11 — Quantum oracles and phase kick-back (Unit II begins).
Practise now: unit1-qubit-lab.html → Teleportation tab runs the protocol shot by shot and
shows Bob's state before and after correction; the QEC tab lets you inject errors and read
syndromes.