Superdense coding is a quantum communication protocol that lets one party transmit two classical
bits of information by sending a single qubit — but only when the two parties already share
an entangled Bell pair. This lesson focuses on Alice's half of that protocol: the encoding step.
The shared resource
Before any message is sent, Alice and Bob prepare and share a Bell pair
∣Φ+⟩=21(∣00⟩+∣11⟩).
Alice holds qubit 0 and Bob holds qubit 1. Neither qubit has a definite state on its own, but
together they are maximally entangled: any measurement outcome on one qubit is perfectly correlated
with the other.
Four messages, four operations
Alice wants to send one of four two-bit messages: 00, 01, 10, or 11. She encodes her choice
by applying a single-qubit operation to her qubit only (qubit 0). The four Pauli operations each
transform the shared Bell state into a different, orthogonal Bell state:
| Message | Operation on qubit 0 | Resulting state |
|---------|---------------------|-----------------|
| 00 | I (do nothing) | 21(∣00⟩+∣11⟩)=∣Φ+⟩ |
| 01 | X | 21(∣01⟩+∣10⟩)=∣Ψ+⟩ |
| 10 | Z | 21(∣00⟩−∣11⟩)=∣Φ−⟩ |
| 11 | ZX (X then Z) | 21(∣01⟩−∣10⟩)=∣Ψ−⟩ |
Why does this work? The four Bell states {∣Φ±⟩,∣Ψ±⟩} form an
orthonormal basis for two-qubit Hilbert space. Bob, upon receiving Alice's qubit, can measure
both qubits in the Bell basis — a CNOT followed by a Hadamard and then computational-basis
measurement — and read off which of the four states arrived, recovering both of Alice's bits
unambiguously.
The Z encoding in detail
Consider the 10 case. Starting from ∣Φ+⟩, Alice applies Z to qubit 0. The Z gate
leaves ∣0⟩ unchanged and maps ∣1⟩↦−∣1⟩, so
= \frac{1}{\sqrt{2}}\bigl(|00\rangle - |11\rangle\bigr) = |\Phi^-\rangle.$$
The relative phase between the two terms is all that changed. Bob can still distinguish this state
from $|\Phi^+\rangle$ because they are orthogonal: $\langle\Phi^+|\Phi^-\rangle = 0$.
<Callout type="tip">
The remarkable feature here is locality: Alice's operation touches only qubit 0, yet the global
two-qubit state changes in a way that encodes a full two-bit message. Entanglement makes the channel
twice as efficient as sending one classical bit per qubit.
</Callout>
## Try it
The starter code prepares $|\Phi^+\rangle$. Add the encoding operation for the message `10`
— a $Z$ gate on qubit 0. The grader compares the full two-qubit state vector, so the
amplitudes on $|00\rangle$ and $|11\rangle$ must be $+\tfrac{1}{\sqrt{2}}$ and $-\tfrac{1}{\sqrt{2}}$
respectively, with zero amplitude on $|01\rangle$ and $|10\rangle$.
<RunnableExample />
After running, check the **Amplitudes** panel: you should see index 0 ($|00\rangle$) at
$+0.707$ and index 3 ($|11\rangle$) at $-0.707$. That is $|\Phi^-\rangle$, Alice's encoded
message `10`.
Sign in on the full site to ask questions and join the discussion.