What the bounds cost

clinr.bounds.choose_tr() chooses an implementation by the bounds of Checks and bounds, which hold for every circuit but say nothing about how far above the true values they sit. A choice made from them is safe, in that its logical error rate is at most its bound, but it can be worse than the choice measurement would make. We measure how much worse, on the experiment of Uniform or restricted checks, and compare with the rule the paper uses to choose. We first set out the three ways of choosing and the measure of loss, then report the loss, and close by tracing it to the two bounds being compared.

Three ways to choose

Each way of choosing picks, for a given circuit, noise regime, family of checks and budget on the gate overhead, either the direct implementation or a pair \((t, r)\).

  • By the bounds: clinr.bounds.choose_tr() takes the least bound on the logical error rate among the direct implementation and the pairs whose overhead bound is within the budget.

  • By the paper’s rule: \(r = \lfloor \log_2(s/n) \rfloor\) checks, the choice in the proof of the paper’s Theorem 2, and the smallest \(t\) whose overhead is within the budget, as in the paper’s Fig. 2. We judge the overhead by measurement. The rule always chooses CliNR, and may find no \(t\) at all.

  • By measurement: the least measured logical error rate among the direct implementation and the pairs whose measured overhead is within the budget, as in Uniform or restricted checks.

Measurement is the best a user could do with full knowledge of the grid, so we measure every choice against it. The regret of a choice is the ratio of its logical error rate to that of the measured choice, both read from fresh estimates; a regret of 1 means nothing was lost. We also report the difference of the two rates, the logical errors lost per run.

How much each choice loses

../_images/e4e94940e82bb476c8dc4944f0c281f76a64f965dbd384eca2fc7545917e80fa.svg

Regret of choosing by the bounds (solid) and by the paper’s rule (dashed), for each family of checks. Lines join the medians over the circuits of each size; the rule’s are over the circuits on which some \(t\) fits the budget, and are drawn where it fits on at least half of them.

With uniform checks under the paper’s rates and an overhead of 4, choosing by the bounds loses little: a regret of 1.10, 1.19 and 1.37 at \(n = 8\), \(15\) and \(25\), or 0.023 in logical error rate at \(n = 25\). This is the regime the bounds were made for, and there they do as well as the paper’s rule or better: the rule loses 1.33, 1.37 and 1.37.

With restricted checks the bounds recommend the direct implementation throughout, as Uniform or restricted checks finds, and the regret is that of not using CliNR at all. Under the paper’s rates and an overhead of 4 it reaches 5.01 at \(n = 25\), a difference of 0.33 in logical error rate. The paper’s rule, which needs no bound, loses 1.44 there. The same holds under the Forte-like rates at an overhead of 4, for both families, where the bounds keep the direct implementation and lose up to 1.67 at \(n = 15\).

At an overhead of 2 the picture is mixed. Under the paper’s rates, the bounds still find a pair with uniform checks at \(n = 8\) and \(15\), but fall back to the direct implementation at \(n = 25\), with a regret of 1.99; the paper’s rule never fits this budget with uniform checks, since with its \(r\) checks no \(t\) brings the overhead within it. Under the Forte-like rates there is almost nothing to lose, because no pair does more than marginally better than the direct implementation.

The paper’s rule fails in the opposite way at the smallest size. At \(n = 3\) under the Forte-like rates the direct implementation is the best choice, and the bounds choose it on every circuit, while the rule, which always chooses CliNR, loses 2.21 with uniform checks at an overhead of 4.

Where the regret comes from

The bounds compare two numbers of very different quality. The bound on the direct implementation, the probability that some gate faults, is nearly exact: on every circuit and regime it agrees with the measured rate to within 1.4%, about the noise of the estimate, since a single fault in a Clifford circuit leaves a nontrivial Pauli on the output, and so a logical error. The bound on CliNR at the measured choice is 1.4 to 13.4 times the measured rate with uniform checks, and 2.1 to 25.8 times with restricted ones, whose worst-case miss per check is far from its typical one. A comparison of a nearly exact number with a loose one favors the former, so choosing by the bounds leans toward the direct implementation.

The budget adds a second, independent loss. The overhead bound replaces each chunk’s acceptance probability by the probability that nothing in its protected region faults, which is lower, so it overstates the overhead. Of the 199 measured choices that are pairs, 178 have an overhead bound above the budget, so the bounds cannot choose them at all, however good their logical error bound.

Thus the bounds are reliable as guarantees and conservative as guides. Where they are tight enough, with uniform checks and room in the budget, they choose nearly as well as measurement; elsewhere a simple rule with no guarantee chooses better.