∑ | Quantum Computing
Chapter 15 / 20

Superdense coding

Send two classical bits using one transmitted qubit and shared entanglement.

1. Core idea

Starting with a shared Bell pair, Alice applies one of four local Pauli encodings and sends her qubit to Bob. Bob decodes with CX and H and measures both qubits. The resource count includes the previously shared entanglement.

2. Mathematical foundation

The notation describes a precise relationship among states, transformations or probabilities. Identify each symbol, check the dimensions of the objects, and distinguish amplitudes from the probabilities produced by a measurement.

3. Worked example

Encode 10 by applying Z to Alice’s qubit. After Bell-basis decoding Bob reads the two classical bits.

4. Reasoning flow

  1. Define the initial register and its basis states.
  2. Apply the transformations in their intended order.
  3. Track amplitude magnitudes and relative phases.
  4. Measure in the basis that reveals the desired property.
  5. Interpret the result and check the resource assumptions.

Qiskit implementation

Run this standalone Python script with Qiskit installed. It uses exact statevector simulation rather than noisy hardware shots.

from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector
a, b = 1, 0  # two classical bits to send
qc = QuantumCircuit(2)
qc.h(0); qc.cx(0, 1)  # pre-shared Bell pair
if a: qc.z(0)        # phase encoding
if b: qc.x(0)        # bit-flip encoding
qc.cx(0, 1); qc.h(0) # Bell-basis decoder
print(qc.draw())
print(Statevector.from_instruction(qc).probabilities_dict())
# Expected decoded bitstring: '01' in Qiskit's displayed q1q0 order.
Download runnable Python

5. Check your understanding

Practice question

Explain why the protocol does not allow two bits to be recovered from an arbitrary lone qubit.

6. What to watch out for

Ideal-state calculations assume perfect gates and measurements. When assessing an algorithm, separate its mathematical guarantee from the cost of building oracles, preparing inputs, repeating experiments and correcting physical noise.

◈ QubitSemantics Hub