Back to Module 9 notes

Overview: Problem 9.1 and Problem 9.3 are computations, Problem 9.2 and Problem 9.4 are proofs, Problem 9.5 connects the surface code to matching, and Problem 9.6 is a Stim experiment.

Throughout, the distance-3 repetition code has data qubits and ancillas . Check A is (ancilla 1) and check B is (ancilla 3). A detector stream is .

Problem 1

Problem 9.1 (Reading the streams).

For each pair of outcome streams over rounds , compute the detection events and give the most likely single fault (data flip on which qubit and when, or measurement error on which check and when).

  1. A: and B: .
  2. A: and B: .
  3. A: and B: .
  4. A: and B: . Give two different explanations with two faults each.

Problem 2

Problem 9.2 (Where detectors go).
  1. In a memory of the rotated surface code, prove that an X-check outcome in the first round is uniformly random. (Use the measurement rule of Module 6.)
  2. Now consider a memory: data reset to , final data measured in the X basis. Describe the first-round, middle and final detectors and count them.
  3. Prove the count for a distance- repetition code with rounds. Check it against the Stim circuit of the notes (, ).

Problem 3

Problem 9.3 (A detector error model by hand).

One round of the distance-3 repetition code: reset all qubits; X_ERROR(0.01) on the data; the CNOTs; X_ERROR(0.02) on the ancillas; measure the ancillas (detectors D0 for A, D1 for B); then X_ERROR(0.03) on the data; measure the data; final detectors D2 (A) and D3 (B); observable L0 = data qubit 4.

  1. List every error mechanism with its probability, detectors and observable effect.
  2. Draw the decoding graph. Which edges cross the observable?
  3. Suppose a second, independent X_ERROR(0.03) is applied to data qubit 0 before the final measurement. Which line of the DEM changes, and to what?

Problem 4

Problem 9.4 (Merging many mechanisms).

Let independent mechanisms with probabilities all have the same symptom. Show that the merged mechanism has probability

Check that it reduces to Lemma 9.1 for , and evaluate it for . Why is always?

Problem 5

Problem 9.5 (Hyperedges in the surface code).

Use the rotated code of Module 8 in a memory experiment with many rounds and code-capacity-style data depolarization between rounds.

  1. How many detectors does a error on data qubit 4 flip in a middle round? On qubit 0? On qubit 1?
  2. Explain why a mechanism that flips 4 detectors is not an edge of a graph, and how decompose_errors=True fixes this.
  3. Matching the X-part and Z-part independently ignores the fact that they are correlated (a is one fault, not two). Under depolarizing noise, is the probability of “an X-type flip on qubit ” in the decomposed model or ? What information is lost?

Problem 6

Problem 9.6 (A threshold experiment in Stim).

Write a generator rep_phenom(d, r, p, q) for the distance- repetition code with rounds. In each round apply X_ERROR(p) to every data qubit, the CNOTs, X_ERROR(q) to the ancillas, then MR on the ancillas. Finish with a noiseless data readout and final detectors. The observable is the last data qubit.

  1. Check that the circuit has detectors and that the DEM has mechanisms.
  2. With and , estimate the logical error rate per shot with PyMatching for and ( shots each).
  3. Where do the curves cross? Why is this “repetition code with measurement errors” the same graph problem as the toric code under code-capacity noise?