Algorithm guide · protocol
Superdense Coding
Send two classical bits by transmitting a single entangled qubit.
Circuit size: 2 qubits, 2 classical bits
Bell state · Local Pauli gates · Bell-basis decoding
Review quantum fundamentals →Notation used in this lesson
- |ψ⟩ and ⟨ψ|
- A state vector (ket) and its conjugate transpose (bra). ⟨a|b⟩ is their inner product.
- α, β and i
- α and β are complex amplitudes; i²=−1. A probability is the squared magnitude |α|².
- XOR, · and ⊗
- XOR adds bits modulo two. In s·x, multiply corresponding bits and XOR them. ⊗ combines registers or operations on different wires.
- U†, Σ and Tr
- U† is the adjoint (inverse for a unitary). Σ sums terms. Tr is the matrix trace, the sum of diagonal entries.
- Probability, shots and angles
- Ideal probabilities describe the model; measured shot frequencies fluctuate. Angles inside trigonometric expressions are in radians unless explicitly labeled turns.
1. The problem
Communicate two classical message bits by sending one qubit, provided Alice and Bob already share a Bell pair. Include that pre-shared entanglement in the resource accounting.
2. How it works
Alice’s four local choices I,X,Z,XZ turn the shared pair into four orthogonal Bell states. Bob receives Alice’s qubit, reunites the pair and performs a Bell decoder to distinguish them.
Share entanglement
Prepare Φ+ on q0,q1, distributing one qubit to each party.
Encode
Alice applies Z for the first message bit and X for the second.
Send
Alice’s qubit must physically reach Bob; there is no message without transmission.
Decode
Bob applies CX and H, then measures both bits in the configured output order.
3. The mathematics, one idea at a time
The four possibilities differ as orthogonal joint states, although either single-qubit reduced state remains I/2.
This labels phase and bit-flip information. Global signs from ordering X and Z do not affect distinguishability.
Work this through by hand
4. Warm-up 00, then send 11
Two qubits: the smallest Bell resource. 00 uses no encoding gate; 11 shows both message controls.
Select Superdense 11.
| Stage | Calculation or state | What it means |
|---|---|---|
| Resource | (|00⟩+|11⟩)/√2 | The initial shared state is Φ+. |
| Apply message gates | Φ+ → Ψ−, up to global phase | The pair now carries both a phase and a bit-flip label. |
| Decode | Classical output 11 | Both original message bits are recovered deterministically. |
Expected outcomes for this example
These are ideal predictions for the stated configuration, not a result already measured by your browser. Rows describing alternative modes or combined events are labeled explicitly.
| Outcome or event | Ideal probability | Interpretation |
|---|---|---|
| 11 | 100% ideal | The recovered two-bit classical message. |
5. Load the worked example in Composer
The worked example can use smaller or simpler inputs than the gallery defaults. The button below loads the exact circuit used in this lesson.
Selected variant: Superdense 11
- Save any current circuit you want to keep, then open the worked example. Loading it does not execute a paid hardware job.
- Trace the preparation, main operations and measurements against the worked table. Check the gate editor for controls, targets and angles.
- Start with an ideal noiseless simulator compatible with the circuit. Mid-circuit measurement, reset and feed-forward require support from the chosen backend.
- Inspect the live preview. For a recorded experiment, open Execute, set the available backend options and shots, and Run. Sign in when prompted to retain it in My Jobs.
- Read the output as described below before changing one setting and repeating. The guide describes the original example; edits can change the answer.
6. Read the output correctly
The generator maps measurements into c1c0 to match the displayed message order. Use the template mapping rather than guessing from physical wire order.
Try all four message variants; each should give its matching two-bit label in ideal execution.
A bit label is a register value; its bar height is a probability or count. For S shots and observed count k, the sampled frequency is k/S. A typical sampling scale for probability p is √[p(1−p)/S]; this is not a strict error bound. Finite samples do not have to match the ideal percentages exactly.
7. Common mistakes & limits
- One transmitted qubit is not the only resource; a shared ebit was consumed too.
- Bob cannot read Alice’s message from his original local qubit before receiving hers.
8. Check your understanding
Which local action encodes message 10 in this convention?
Reveal the reasoning
Z on Alice’s half, producing Φ−, which the Bell decoder maps to 10.
9. Further study
The lesson’s register mappings, supported inputs and loadable example follow Quantket’s implemented circuit. A reference may use different wire names, bit order or resource conventions.
Gallery reference: defaults, definitions & implementation notes
Available example inputs
Choose a named circuit variant in Algorithms. Each variant fixes its preparation, operations and measurement mapping; the worked variant above is one of them.
- Superdense 00
- Superdense 01
- Superdense 10
- Superdense 11
Read your saved result
Check the submitted circuit, measured register and execution settings in Run details. Exact results give computed probabilities; sampled results show frequencies from the recorded shots. Edited circuits and noise can change the expected outcome. The algorithm label records the circuit's origin; it does not certify an edited circuit or a measured result.