Back to Module 1 notes

Conventions as in the notes: qubits are numbered from , Pauli strings omit identities, , and syndrome bit is iff the error anticommutes with check .

Problem 1

Problem 1.1 (Repetition codes and their threshold).

Each bit of an -bit repetition code flips independently with probability , and we decode by majority vote.

  1. Derive as a polynomial in .
  2. Show that if and only if .
  3. At , what is the smallest odd with ?
  4. Explain in one or two sentences why measuring the parities is enough to decode, and why this matters for the quantum version.

Problem 2

Problem 1.2 (Pauli expansions and digitization).
  1. Using for , show that every matrix equals with .
  2. Expand the Hadamard gate and the rotation in the Pauli basis. (Hint: .)
  3. The error hits qubit 1 of an encoded state of Shor’s code. List the possible syndromes, the probability of each, and the state after the measurement.

Problem 3

Problem 1.3 (No-cloning for two states).

Let and be two single-qubit states. Suppose a unitary satisfies and .

  1. Show that up to a phase, i.e. the two states are either orthogonal or equal (up to phase).
  2. Explain why the encoder of the bit-flip code does not contradict this.

Problem 4

Problem 1.4 (The phase-flip code).

The phase-flip code has , and checks , .

  1. Show that the circuit “CNOT from qubit 1 to qubit 2, CNOT from qubit 1 to qubit 3, then on all three qubits” maps to .
  2. Give the syndrome table for .
  3. Verify the Knill-Laflamme condition for and compute .
  4. Compute where is the codespace projector. What does this say about errors on this code?

Problem 5

Problem 1.5 (Shor's code in action).

Order the eight Shor checks as , then , .

  1. Compute the syndrome of and give a correction.
  2. Phase flips hit qubits 1 and 4 (). Which single-qubit error has the same syndrome? What is the net effect of applying that correction?
  3. Show that and have the same syndrome and act identically on the codespace. Which check product relates them?

Problem 6

Problem 1.6 (Detecting versus correcting).

An error is detectable by a code with projector if for a number .

  1. Show that for the bit-flip code every -type error of weight or is detectable, but is not.
  2. Show that the bit-flip code nevertheless cannot correct the set , using the Knill-Laflamme condition (Theorem 1.2 in the notes).
  3. Deduce, in your own words, the general rule “distance detects errors but corrects only ”.

Problem 7

Problem 1.7 (Simulating the bit-flip code with Stim).

Write a Stim circuit for one round of the three-qubit bit-flip code: data qubits start in , each suffers X_ERROR(p), two ancillas collect the parities of and , and finally all qubits are measured. Decode with the lookup table from the notes and estimate the logical error rate for with shots. Compare with .