Back to Module 10 notes

Problem 10.1 and Problem 10.2 are short computations. Problem 10.3 makes the degeneracy example from the notes quantitative. Problem 10.4 and Problem 10.5 are proofs about matching. Problem 10.6 is a coding exercise. Qubits are numbered from 1. In code they are numbered from 0.

Problem 1

Problem 10.1 (Weights from non-uniform priors).

Consider the distance-5 bit-flip repetition code with checks . Qubit suffers an X error independently with probability .

  1. Show that the most probable error with a given syndrome minimizes with .
  2. Let , and suppose only is flagged. List the two candidate corrections, compute their total weights, and say which one MWPM chooses.
  3. Compute the probabilities of the two candidates, and , and check that they agree with part 2. Which correction would MWPM choose if all were equal?

Problem 2

Problem 10.2 (A lookup table for the distance-3 rotated code).

Use the layout of the Module 10 notes (Example 10.1), which is the Module 8 layout mirrored left to right and numbered 1 to 9: Z checks , , , ; X checks , , , ; . (Module 8 qubit is qubit here, so the Homework 8 syndrome table carries over after relabeling.)

  1. Explain why there are exactly 16 distinct X-error syndromes.
  2. Find all minimum-weight X errors with syndrome , and .
  3. For each syndrome in part 2, show that all the minimum-weight errors lie in the same logical class. (Hint: what is the product of two of them?)
  4. Syndrome has a unique minimum-weight error. Find it. Is the lookup decoder correct when the true error is that error? When it is ?

Problem 3

Problem 10.3 (When entropy beats energy).

In the distance-5 example of the notes (three flagged checks, i.i.d. X noise on 25 qubits), the two logical classes have weight enumerators, truncated at weight 8,

So class B has one error of weight 3, 28 of weight 5, and so on.

  1. Which class does the minimum-weight decoder choose? Does the answer depend on ?
  2. Using only the leading terms, find the at which ML switches from B to A.
  3. Using the truncated enumerators, compute and at and . Which class does ML choose at each?
  4. Explain in one or two sentences why the minimum-weight threshold of a code family can be lower than its ML threshold.

Problem 4

Problem 10.4 (Counting and constructing matchings).
  1. Show that the complete graph on nodes has perfect matchings. Evaluate it for .
  2. On an torus with uniform weights, defects sit at , , , . Compute the toric Manhattan distances and the weights of all perfect matchings. Which does MWPM choose?
  3. A planar-code matching graph has an odd number of defects. Explain the boundary-copy construction from the notes, and show that the augmented syndrome graph always has a perfect matching. Show also that every perfect matching of it gives a valid correction.

Problem 5

Problem 10.5 (The path decomposition behind MWPM).

Let be a graph with positive edge weights. Let be an edge set, and let be the set of nodes with odd degree in .

  1. Prove that is even.
  2. Prove that is the disjoint union of paths, whose endpoints pair up the nodes of , and a set of cycles.
  3. Conclude that the weight of a minimum perfect matching of the complete graph on with edge weights (shortest-path distances).
  4. Where did you use positivity of the weights? How should a decoder handle a mechanism with ?

Problem 6

Problem 10.6 (A code-capacity threshold with PyMatching).

Build the toric code check matrix ( vertex checks, edge qubits) for . Sample i.i.d. Z errors with probability , decode with pymatching.Matching(Hx).decode_batch, and count a failure when the residual has odd overlap with either of the two dual non-contractible cuts.

  1. Estimate for with at least shots each.
  2. Where do the curves cross? Compare with the literature value of about .
  3. Explain why checking ” has odd overlap with a cut” detects exactly the logical failures.