---
title: "Quantum Teleportation Demo, with Superdense Coding"
description: "Move a hidden qubit state to Bob with a linked pair and two ordinary bits. See why this breaks neither the speed of light nor the rule against any copies."
url: https://tadams.net/quantum/teleportation
---

[Quantum demos](https://tadams.net/quantum)

# Teleportation

Move a hidden qubit state to Bob with a linked pair and two ordinary bits, and nobody reads it on the way.

New to qubits: start with the short guide, [Quantum basics](https://tadams.net/quantum#q-basics-title).

## The problem

Alice has a qubit in a hidden state: an arrow in a ball, pointing in a direction that nobody knows. Bob needs that state on his own qubit. She has no way to carry the qubit to him. She cannot read the state and phone it over, because a measurement gives only one 0 or 1 and destroys the rest. She cannot copy it either.

The state stays hidden for a practical reason. Partway through a quantum program, a qubit holds work that nobody has read, and a reading destroys that work. To pass the work to another machine, you must move the state unread. Bob does not read it either: his machine uses it in the next step of the program.

Teleportation moves the state anyway. Alice and Bob share a linked pair, two entangled qubits, ahead of time. Alice then measures her qubits, which gives two ordinary bits, and sends them to Bob by any normal means. With those bits, Bob can turn his half of the pair into the hidden state.

Despite the name, no matter moves, and nothing travels faster than light. What moves is the state of a qubit. Charles Bennett and five colleagues described this method in 1993, and it has since run in the lab, and in 2017 from the ground to a satellite.

1. Qubit 0 holds |ψ⟩ = α|0⟩ + β|1⟩. Qubits 1 and 2 hold |Φ⁺⟩, with qubit 2 at Bob’s side.
2. Alice applies CNOT from 0 to 1, then H on 0, and measures qubits 0 and 1 to get bits a and b. This is a measurement in the Bell basis.
3. Each outcome has probability ¼ for any |ψ⟩. Bob then holds XbZa|ψ⟩.
4. Bob applies Xb, then Za, and holds |ψ⟩. Alice’s qubits hold only |a⟩|b⟩, as no-cloning requires.

Bennett, Brassard, Crépeau, Jozsa, Peres, and Wootters published the protocol in 1993. Ren and colleagues ran it from the ground to the Micius satellite in 2017.

Part 1

## Move the hidden state

Your goal is to move five hidden states to Bob. The match says how close Bob’s state is to Alice’s: 100% is the same state, and 0% points the opposite way. You score a point for each state that arrives with a 100% match. Alice’s two bits leave Bob’s qubit off in one of four ways, and you choose his fix from the bits:

1. If the first bit is 1, Bob’s qubit has a wrong sign, its phase. The Z gate fixes that.
2. If the second bit is 1, Bob’s qubit has its 0 and 1 swapped. The X gate fixes that.

Each hidden state is a random pure state away from the X, Y, and Z axes, so each wrong correction gives a fidelity well below 1. Choose the correction from a and b.

Alice’s qubit, with the hidden state

Bob’s qubit

With the arrows on, watch the length. In golf, an arrow always reaches the edge of the ball. Here, an arrow gets shorter when its qubit is linked, because part of what it holds is in the link. After the pair is shared, Bob’s arrow is a dot until Alice measures. The full arrow then shows a view that Bob does not have: he needs her bits to know which way it is off.

With the arrows on, each sphere shows the reduced Bloch vector of its qubit. Its length is below 1 when the qubit is entangled, and it is 0 for one half of a Bell pair. After Alice measures, Bob’s vector has full length again, but only her bits tell him which Pauli correction it needs.

Alice’s first bit**?**

Alice’s second bit**?**

Part 2

## Is this faster than light?

Alice’s measurement changes Bob’s qubit at once, however far away he is. This looks like a signal sent faster than light. Test it: run the same hidden state 1,000 times, once where Bob ignores the bits, and once where he uses them. The bits travel at normal speed.

Read the match with this in mind: a qubit picked at random scores 50% on average. Without the bits, Bob cannot tell which of the four ways his qubit is off, so he scores about 50% too. That score means he has nothing useful. It does not mean that half of the state arrived. The count of Alice’s bits comes out about even, so her bits by themselves tell nobody anything.

Averaged over the outcomes, Bob’s reduced state is I/2 for any |ψ⟩, so he gains no information until the classical bits arrive. The mean fidelity without correction is (1 + x² + y² + z²) / 4 = ½ for a Bloch vector (x, y, z).

Part 3

## A real pair is not perfect

So far, the linked pair has been perfect. A real pair arrives damaged, because noise strikes it on the way. Move the slider to add a random error to Bob’s half.

Compare with two plans that use no pair. Alice can measure her qubit and phone the result, and Bob makes a qubit to match. Her one reading misses part of the state, and on average this gives a 66.7% match. A qubit picked at random gives 50%.

- Below an error chance of 50%, the pair beats 66.7%, so it is worth using.
- From 50% to 75%, the pair does worse than a phone call, but still better than a random qubit.
- Above 75%, it does worse than a random qubit, because the errors turn Bob’s qubit away from the state more often than they leave it alone.

With probability q, a random Pauli strikes Bob’s half. The mean fidelity over states uniform on the sphere is 1 − 2q/3. Measure-and-prepare, with no entanglement, has a limit of ⅔, so a test above ⅔ shows real teleportation. The pair beats ⅔ while q < ½, and falls below the random ½ at q = ¾. Each value here is the mean of 2,000 runs.

Average match in this run

Exact average

Best with no pair

66.7%

## What this shows

A qubit’s state can move with no qubit making the trip, for the price of one linked pair and two ordinary bits. Each pair works only once. The rule against copies holds, because Alice’s qubit loses the state as Bob’s gains it. Nobody learns the state at any point, and Alice’s bits are random.

This matters because a quantum network cannot boost a signal the way an ordinary one does, since a booster would have to copy it. Teleportation gives another way: build up pairs between stations, then move qubits across them. Damage to the pair is the hard part. This simulation has perfect gates, readings, and storage, and it has an error only on Bob’s half of the pair.

One ebit and two classical bits together are enough to send one qubit, and neither alone can do it. A shared ebit alone cannot signal, and classical bits alone cannot carry an unknown state, as the ⅔ limit shows. A repeater uses the same idea, entanglement swapping, to extend pairs across lossy links, and it purifies them along the way.

Teleportation also runs inside quantum computers. It can move data between modules and apply hard gates through prepared states. Each simulated run here is a state vector on three qubits, with mid-circuit measurement.

Part 4: the same trick in reverse

## Superdense coding: two bits on one qubit

Teleportation spends a linked pair and two bits to move one qubit. Superdense coding swaps these: it spends a linked pair and one qubit to move two bits. Two qubits travel in total, one for each half of the pair, so the gain is in the timing. Alice and Bob share the pair days before the message exists. Later, Alice wants to send two bits. She puts one gate on her qubit, and sends only that qubit to Bob. Bob then holds both qubits, and he reads the two bits.

Bob’s gates ask the pair two questions, the same two that Alice’s measurement asks in teleportation:

- The first bit asks: has the pair’s dial been turned half way around? Z turns it. This turn is the hidden sign, called the phase, so reading the qubits right after Z looks the same as before Z, until Bob’s gates turn the sign into a bit.
- The second bit asks: do the two qubits differ? X flips Alice’s qubit, which makes them differ.

How to play

Pick a message, then choose the gate that gives those answers. Send all four.

Alice and Bob share |Φ⁺⟩, ahead of time. One of I, X, Z, or ZX on Alice’s qubit moves the pair to one of the four orthogonal Bell states. She sends her qubit, and Bob undoes the Bell basis with a CNOT and an H. The first output bit records the relative phase, and the second records the parity.

Message to send

Alice’s gate

## What this gains, and why it breaks no rule

Bob’s half and Alice’s half can go out long before the message exists, when the line is free. When the message exists, Alice sends one qubit and delivers two bits. Her qubit still moves at normal speed, and until it arrives Bob has only coin flips, so nothing travels faster than light.

The Holevo bound limits one qubit to one classical bit when no entanglement is shared. A shared ebit raises the limit to two, as Bennett and Wiesner showed in 1992. The channel capacity counts both resources: one qubit sent and one ebit used, and the ebit can be distributed in advance. Alice’s gate leaves Bob’s reduced state at I/2, so no-signaling still holds until her qubit arrives.

## Other demos

- [Bloch sphere golf](https://tadams.net/quantum/bloch-golf)
- [Circuit puzzle](https://tadams.net/quantum/circuit)
- [The bomb tester](https://tadams.net/quantum/bomb-tester)
- [Entanglement games](https://tadams.net/quantum/chsh)
- [Eavesdropper](https://tadams.net/quantum/eavesdropper)
- [Keep it alive](https://tadams.net/quantum/error-correction)
- [Intercepts](https://tadams.net/quantum/intercepts)

Explain
