Physical vs Logical Qubits¶
Real quantum hardware is noisy. To build something that computes reliably on top of noisy hardware, quantum error correction (QEC) draws a distinction between two kinds of qubit: the ones that physically exist on a chip, and the ones a program actually computes with.
No equations needed yet — just two ideas: a logical qubit is what you mean to compute with, and it gets spread out ("encoded") across several physical qubits so that no single hardware failure can destroy it.
Physical Qubits¶
A physical qubit is an actual quantum system implemented in hardware — a real, physical object that can hold a quantum state. The details vary by platform (superconducting circuits, trapped ions, neutral atoms, photons, and others each implement a physical qubit differently), but every platform shares the same problem: physical qubits are imperfect. They interact weakly with their environment, and that interaction introduces errors — small, essentially random corruptions of the state over time.
A single physical qubit, on its own, has no way to protect itself from this.
Logical Qubits¶
A logical qubit is the qubit a program actually computes with. Instead of trusting one fragile physical qubit, QEC represents the logical qubit's state as a pattern spread across several physical qubits — an encoding.
This is the central idea of the whole module: a logical qubit is not a physical object — it's a pattern distributed across physical objects.
Encoding ≠ cloning
It might sound like encoding "copies" the logical qubit onto three physical qubits. It doesn't. The no-cloning theorem means there's no way to make independent copies of an arbitrary unknown quantum state. Encoding instead distributes the one state across multiple physical qubits in a correlated way — the information only exists in how they relate to each other, not as three separate copies.
Interactive Demo — Encode a Logical Qubit¶
Try it yourself with a simplified 3-qubit example. This is a teaching example, not a general recipe — most real logical qubits use far more than three physical qubits, and this simple version can only protect against one specific kind of error.
Click Encode to distribute the logical state across three physical qubits.
Notice that the logical box's state changed from α|0⟩ + β|1⟩ to α|000⟩ + β|111⟩ the moment you hit Encode — that's the encoding. And when you injected an error, only one physical qubit changed; the logical information is still represented by the correlated pattern across all three. Detecting which qubit flipped — without collapsing that pattern by measuring it directly — is exactly the problem the next section, Encoding & Syndrome Measurement, solves.
Warning
This is a simplified example. The 3-qubit repetition code can protect against certain errors, but not all types of quantum errors. We'll examine exactly what it can and cannot correct in Repetition Codes.
Physical vs Logical, Side by Side¶
| Physical Qubit | Logical Qubit |
|---|---|
| Hardware-level qubit | Encoded quantum information |
| Subject to physical noise | Can be protected using QEC |
| An individual quantum system | Distributed across multiple physical qubits |
| A building block | A fault-tolerant computational unit |
Takeaway¶
- Physical qubits are the hardware.
- Logical qubits are encoded quantum information.
- Quantum error correction uses multiple physical qubits to protect logical information from errors.
If one physical qubit can fail, how can multiple physical qubits help us figure out what went wrong?