This set practises Lecture 3 and Lecture 4. Problem 1, Problem 2 and Problem 4 are mostly pen and paper, with a short Deltakit check at the end. Problem 3 and Problem 5 lean on the tools of Notebook 3 and Notebook 4. Try each problem before you open its solution. research/hw02_check.py recomputes every number in the solutions.

Problem 1 (Counting a distance-11 experiment).

Take Deltakit’s RotatedPlanarCode(11, 11) and an 11-round -basis memory experiment built by css_code_memory_circuit.

  1. How many data qubits, ancilla qubits and qubits in all does it use?
  2. How many checks have weight 4, and how many weight 2?
  3. How many two-qubit gates does one round use? How many does the whole experiment use?
  4. How many measurements does the experiment make, counting the final data readout?
  5. How many detectors sit in the first round (), in each round of the bulk, and in the last ()? What is the total?

Then confirm every answer with Deltakit.

Problem 2 (Two logical qubits on a torus).

The toric code on an torus puts a qubit on each of the edges, an check on each vertex (the four edges that meet there) and a check on each face (its four edges).

  1. Show that the product of all checks is the identity, and that no other non-empty set of checks multiplies to the identity. Conclude that . The same argument gives .
  2. Deduce . Why does it not depend on ?
  3. The planar code of Lecture 3 cuts the torus open. It has data qubits and checks of each type, all independent. Find .
  4. Check both answers at with UnrotatedToricCode(6, 6) and UnrotatedPlanarCode(6, 6), computing the ranks over .
Problem 3 (A hook in the wrong direction).

An check is measured with an ancilla prepared in , four CX gates from the ancilla to its data qubits, and an -basis measurement of the ancilla. The gates follow the order TL, TR, BL, BR (the “Z order”; points up).

  1. An error hits the ancilla just after the first, the second or the third CX. Which data qubits carry an error at the end of the round? Which of the three cases is equivalent, up to the check itself, to an error on a single qubit?
  2. In Deltakit’s layout is a column of operators, so an undetectable string that flips it runs along a row. Which memory experiment does the Z order hurt, and what does its circuit distance become for odd ? Why does the default N order (TL, BL, TR, BR) not have this problem?
  3. Predict the circuit distance of a 9-round, memory with checks in Z order, in both bases. Check it with the reorder helper of Notebook 3 and Stim’s shortest_graphlike_error under SD6 noise.
Problem 4 (Merging error mechanisms).
  1. Two independent mechanisms flip the same pair of detectors, with probabilities and . Show that the pair is flipped with probability .
  2. Show that for independent mechanisms the pair is flipped with probability . (Hint: compute the mean of , where if mechanism fires.)
  3. With SI1000 noise at , a -check ancilla’s measurement is flipped with probability , and its reset with probability . Explain why both flip the same two detectors. Merge them, find the edge weight , and find the relative error you would make by simply adding the probabilities.
  4. In the decoding graph of the , three-round SI1000 memory, detectors 0 and 5 belong to the same check in rounds 0 and 1. Find their edge’s probability and weight with Deltakit. Confirm that every edge’s probability is the merge of the decomposed DEM pieces with the same endpoints. Why is the probability larger than your answer to part 3?
Problem 5 (When a bigger code stops helping).

Lecture 4 and Notebook 4 ran -round SI1000 memories at with leakage probability . Each point used 200,000 shots, decoded by PyMatching built from the DEM.

fails fails
0730177
1008411
38193910
  1. At the decomposed DEM has 290 rows, the same rows whether is 0 or . Why? What does that mean for the decoder?
  2. Compute the ratio of failures, over , at each .
  3. At , is significantly worse than ? Treat each count as binomial, find the standard deviation of the difference of the two counts, and the -score.
  4. Name two ways to win back the benefit of a larger code.
  5. Reproduce the last row of the table with Deltakit.