Part 1 · The code · Chapter 1 · 5 min read
Why qubits need protecting
A qubit cannot be copied and cannot be read without changing it. After this chapter you can say why, name the three kinds of error a qubit suffers, and see what each one does to a state.
Key terms
Two things you cannot do
A classical bit is protected by copying it. Store the bit three times and a single flipped copy is outvoted. A qubit offers two obstacles to that plan.
First, a qubit can be in a superposition, written , where the weights and carry the information. No physical process copies an unknown state of that kind onto a second qubit. This is the no-cloning theorem. Repetition, the classical remedy, is not available.
Second, looking is not free. A measurement returns one bit, 0 or 1, and leaves the qubit in the state it reported. The weights are gone. So the obvious alternative, reading the qubit now and then to check it, destroys the very thing it protects.
Both obstacles point the same way. The information has to be spread over several qubits, and the questions asked about them have to concern the group, never one member. The next two chapters build exactly that.
Why it matters here
The simulator never reads a data qubit during error correction. It only asks parity questions through an ancilla, and it reads the data qubits once, at the very end of a shot.
Three kinds of error
Whatever the physical cause, noise on one qubit can be described as a mixture of three operations, the Pauli errors. A bit flip is X, which swaps 0 and 1. A phase flip is Z, which leaves 0 alone and changes the sign of 1. Y is both at once, up to a factor that does not affect the outcomes here.
In words: X turns 0 into 1. Z turns the equal mix into the equal mix with a minus sign, . Measured in the 0/1 basis the two mixes look identical; the phase flip is invisible there.
| Error | Name | On 0 and 1 | On + and − |
|---|---|---|---|
| X | bit flip | 0 ↔ 1 | + stays +, − gets a sign |
| Z | phase flip | 0 stays, 1 gets a sign | + ↔ − |
| Y | both | 0 ↔ 1, with a factor | + ↔ −, with a factor |
This is why the same code appears twice in the simulator. Orange Z checks catch bit flips, blue X checks catch phase flips. Y is caught by both, because it contains both. Chapter 6 shows how often each kind occurs in each noise model.
What protection means
A logical qubit is one qubit of information stored across several physical qubits so that a single error can be found and undone without reading the stored value. You pay in qubits and in extra measurements: the simulator uses seven data qubits for each logical qubit. In return, a single error no longer destroys the state. The price is only worth paying if the code corrects more errors than it adds, and showing that is the purpose of the whole simulator.
Careful
Correcting errors does not remove them. Each round of checks is itself a set of noisy operations. Chapters 4 to 6 follow how those errors appear in the data and how a decoder copes with them.
Try it in the simulator
Choose Bit flip noise at p = 0.02 and press Run, then change the noise to Depolarizing and run again. Look at the orange cells and the blue cells: bit flips light mostly orange checks, depolarizing noise lights both.
Open the simulator with this setupCheck yourself
Why can’t a qubit be protected by storing three copies?
An unknown quantum state cannot be copied, and reading it to compare copies would collapse it.
A qubit in state + suffers a bit flip. What does a 0/1 measurement notice?
Nothing. X maps + to +, so the state is unchanged. Only a phase flip turns + into −.
Sources
- W. K. Wootters, W. H. Zurek (1982). A single quantum cannot be cloned. Nature 299, 802–803. doi.org/10.1038/299802a0
Supports: the no-cloning theorem. - M. A. Nielsen, I. L. Chuang (2010). Quantum Computation and Quantum Information, 10th anniversary edition. Cambridge University Press. ISBN 978-1-107-00217-3. www.cambridge.org/9781107002173
Supports: qubits, measurement and the Pauli operators X, Y, Z (chapters 1–2 of the book). - B. M. Terhal (2015). Quantum error correction for quantum memories. Reviews of Modern Physics 87, 307. doi.org/10.1103/RevModPhys.87.307
Supports: an overview of why quantum memories need error correction.