When CliNR pays off¶
The paper’s numerics report where CliNR, with its parameters set by a simple rule, beats the direct implementation: against the number of qubits for random Clifford circuits (Sec. V, Fig. 2), and against the number of qubits and the shape of the circuit (App. D, Fig. 4). We repeat both under the paper’s rates, which checks that this implementation behaves as the paper’s does, and then ask the same question under the Forte-like rates of Uniform or restricted checks. We first describe the experiment, then compare with the paper’s two figures and with the scaling of its Theorem 2, and close with the Forte-like rates.
The experiment¶
The data come from scripts/payoff.py, which writes results/payoff.json.gz with its settings, the versions that produced it, the circuits, and the counts of every draw.
There are three noise regimes, none with idle noise.
Two are the paper’s: clinr.noise_models.asymmetric_noise() at \(10^{-3}\) and at \(10^{-4}\), i.e. two-qubit gates fault with probability \(p_2\) and every other operation with \(p_2/10\), for \(p_2 = 10^{-3}\) and \(10^{-4}\).
The third is the Forte-like regime of Uniform or restricted checks: \(p_1 = 2 \times 10^{-4}\), \(p_2 = 4 \times 10^{-3}\), \(p_m = 4.8 \times 10^{-3}\) and \(p_{\mathrm{prep}} = 2 \times 10^{-4}\).
CliNR’s parameters follow the paper’s rule (Fig. 2): \(r = \lfloor \log_2(s/n) \rfloor\) checks, at least 1 since the paper takes \(r \ge 1\), and the smallest \(t\), up to 12, whose gate overhead is within a budget of 2 or of 4. The overhead of each \(t\) is judged by a pilot estimate over 3 draws of the checks of 1,000 shots each, and the chosen pair is then estimated afresh over 10 draws of 10,000 shots. The direct implementation is estimated with 100,000 shots. Both families of checks are run on the same circuits. Judged by their fresh estimates, 23 of the 3,853 chosen pairs are over their budget, by at most 8.4%, since a pilot over few draws can fall within the budget at a \(t\) just over it, and the first \(t\) to fall within is more likely one whose pilot fell low. The budget lies inside the fresh estimate’s 95% interval for 15 of them, where the excess is within that estimate’s own uncertainty; the interval lies wholly above it for the remaining 8.
The experiment has two parts.
The curves take 10 random Clifford circuits at each size from clinr.circuits.random_clifford(), as the paper does, at \(n = 5, 10, 15, \dots\), in steps of 10 beyond \(n = 80\), until the direct implementation’s bound on the median circuit, which is nearly exact (What the bounds cost), reaches \(0.9\).
This takes the sizes to \(n =\) 55, 170 and 30 in the three regimes.
The maps take 10 circuits of \(s = n^\alpha\) gates drawn uniformly from \(\{H, S, \mathrm{CX}\}\), as in the paper’s App. D, from clinr.circuits.random_gate_sequence(), for \(\alpha = 1.2, 1.3, \dots, 2.0\) and \(n = 5, 10, \dots, 55\) at \(p_2 = 10^{-4}\) and \(n = 5, \dots, 30\) at the Forte-like rates.
Every rate is a logical error rate per run of the circuit. We report medians over the circuits of a size, and measure CliNR’s gain on a circuit by the ratio of the direct implementation’s rate to CliNR’s, so a gain above 1 means CliNR pays off; the gain of a size is the median over the circuits on which the rule finds a \(t\). The 95% interval of a single CliNR estimate has a median half-width of 7% of the rate, and at most 49%, at the largest sizes with restricted checks, where the draws of the checks differ most. Every direct estimate on the curves counts at least 182 logical errors; on the maps the smallest circuits count as few as 9, at rates of at most 0.002, far below the differences the maps resolve.
Against the paper’s Fig. 2¶
Logical error rate of random Clifford circuits, directly and with CliNR under the paper’s rule, for each family of checks and a budget of 4 (dots) or 2 (rings) on the gate overhead; a dot inside a ring is a size where the two budgets give the same choice. Lines join the medians over the circuits of each size, drawn where the rule finds a \(t\) on at least half of them; bands span the interquartile range at a budget of 4.¶
The paper reports a gain of 2 at \(n = 25\) for \(p_2 = 10^{-3}\), and of 4 at \(n = 60\) for \(p_2 = 10^{-4}\). Its circuits have \(s \approx n^2\) gates, while Stim’s synthesis gives about \(1.5 n^2\) (How tight the bounds are), so we compare at matched size: our \(n = 20\) has a median of 622 gates against the paper’s 625, and our \(n = 50\) has 3627 against its 3,600. At \(n = 20\) and \(p_2 = 10^{-3}\), the rule fits a budget of 2 with restricted checks, the paper’s family, on 10 of the 10 circuits, with a gain of 2.9. At \(n = 50\) and \(p_2 = 10^{-4}\), the gain is 7.7 with restricted checks and 11.6 with uniform ones, at either budget. The curves thus have the paper’s shape, and our gains are larger than the paper’s, by factors of about 1.5 and 2.
One plausible cause is idle noise, which the paper’s numerics include at rate \(p_1\) and ours omit. In a schedule that runs one operation at a time, the input block idles while each resource is prepared, where no check can see its faults, so idle noise reaches CliNR’s output much as it reaches the direct implementation’s, and the gain shrinks.
Matching the size also settles why the rule fits a budget of 2 at the paper’s \(n = 25\) and, with restricted checks, on only 1 of our circuits at \(n = 25\), the question left open in What the bounds cost. Our \(n = 25\) has 971 gates, so each chunk is half as large again as the paper’s and carries one more check, five rather than four, which lowers its acceptance and raises its cost.
The two budgets coincide wherever the smaller one is met with one chunk, since the rule fixes \(r\) and takes the smallest \(t\) that fits. The larger budget changes the choice only where the smaller one needs more chunks, and then buys fewer teleportations: at \(p_2 = 10^{-4}\) and \(n = 90\), restricted checks gain 5.1 with two chunks under a budget of 2, and 10.8 with one under a budget of 4.
Matching sizes calibrates the curves at each rate; taken together, the two rates also test how far each implementation reaches as \(p\) falls, which we now turn to.
The scaling of Theorem 2¶
Theorem 2 and its Corollary 2 compare how far the two implementations reach as \(p\) falls: for circuits of \(s \lesssim n^2\) gates, the direct implementation keeps a vanishing logical error rate up to \(n = O(p^{-1/2})\) qubits, and CliNR up to \(n = O(p^{-2/3})\). Dividing the rates by 10 should therefore stretch the direct implementation’s reach by \(\sqrt{10} \approx 3.2\) and CliNR’s by \(10^{2/3} \approx 4.6\).
Left: the direct implementation’s logical error rate against \(n \sqrt{p_2}\), under the paper’s two rates. Right: CliNR’s logical error rate at a budget of 4, divided by \(n p_2\), against \(n p_2\), for each family of checks; filled markers where the median \(t\) is 1, open where it is larger. Lines join the medians over the circuits of each size; bands span the interquartile range.¶
The direct implementation scales as predicted. Its rate is nearly \(1 - e^{-s \bar p}\), with \(\bar p\) the mean fault probability of a gate, so with \(s \propto n^2\) it depends on \(n\) and \(p\) through \(n \sqrt{p}\) alone, and the two curves of the left panel coincide. Interpolating linearly between sizes, the rate reaches \(0.1\) at \(n =\) 10.9 for \(p_2 = 10^{-3}\) and \(n =\) 35.1 for \(p_2 = 10^{-4}\), a ratio of 3.23 (95% bootstrap interval over circuits 3.19 to 3.32).
CliNR’s scaling depends on whether one chunk fits the budget. With \(r = \lfloor \log_2(s/n) \rfloor\) checks, \(s 2^{-r}\) lies between \(n\) and \(2n\), so in Theorem 1 the faults of a chunk that escape its checks, those of its checks, and those of its teleportation each contribute a term of order \(n p\). With one chunk the rate is therefore proportional to \(n p\), up to the slow growth of \(r\) and the fall of the acceptance with \(s p\), and the reach stretches by nearly 10, not 4.6. The right panel shows this: while \(t = 1\), the rate divided by \(n p_2\) stays between 3.0 and 4.1 for uniform checks and between 3.5 and 5.7 for restricted ones, under both rates. Once \(s p\) is large, a chunk is accepted often enough for the budget only if it has \(O(1/p)\) gates, so \(t\) grows in proportion to \(s p\), and the \(t\) teleportations contribute \(t n p \propto s n p^2 \propto n^3 p^2\). The reach then scales as \(p^{-2/3}\), the exponent of Theorem 2, whose own choice \(t = \lfloor \sqrt{s/n} \rfloor\) gives the same.
The measured reaches follow the two regimes. At a threshold of \(0.05\), which both rates reach with one chunk, the ratio is 8.0 for uniform checks (7.5 to 8.2) and 8.4 for restricted ones (7.8 to 8.7). At \(0.2\), which restricted checks reach at \(n =\) 158 for \(p_2 = 10^{-4}\) with two chunks, the ratio is 4.5 (4.1 to 4.7), near the asymptotic 4.6. Uniform checks do not reach \(0.2\) at \(p_2 = 10^{-4}\) within the sizes run.
Against the paper’s Fig. 4¶
Median over circuits of \(p^{\mathrm{direct}} - p^{\mathrm{CliNR}}\) for circuits of \(n^\alpha\) gates drawn from \(\{H, S, \mathrm{CX}\}\), under the paper’s rule and a budget of 2 or 4 on the gate overhead, for each family of checks; blue where CliNR is better. Blank cells are those where the rule finds a \(t\) on fewer than half the circuits. The rule never fits a budget of 2 at the Forte-like rates.¶
The paper’s Fig. 4 maps the difference of the two rates at \(p_2 = 10^{-4}\), without stating its budget, and finds the direct implementation competitive at small \(n\) and \(\alpha\) and CliNR favored as either grows. At a budget of 4 we find the same: the smallest \(\alpha\) at which CliNR is better falls from 2.0 at \(n = 10\) to 1.6 at \(n = 55\) with uniform checks, and from 1.9 at \(n = 15\) to 1.7 at \(n = 55\) with restricted ones. At a budget of 2 the rule fits only for \(\alpha\) of at least 1.6, and at small \(n\) only near \(\alpha = 2\), so the edge of the map is set by the budget rather than by the sign of the difference; within it uniform checks are better everywhere, and restricted checks lose at most 0.006, at the smallest \(\alpha\) that fits.
The magnitudes differ. Our largest difference is 0.10, while the paper’s color scale runs to \(0.30\); but no circuit of ours has a direct rate above 0.12, so no difference here could reach it. The paper’s model is thus the noisier one, as its idle noise would make it.
At Forte-like rates¶
Under the Forte-like rates the rule never fits a budget of 2, on either part of the experiment.
At a budget of 4, CliNR pays off on random Clifford circuits by more than a few percent only at \(n = 10\) and \(15\). At \(n = 10\) the gain is 1.46 with uniform checks and 1.29 with restricted ones; at \(n = 15\) it is 1.49 with restricted checks, and 1.64 with uniform ones on the 4 circuits where they fit. At \(n = 5\) CliNR loses, with gains of 0.82 and 0.76, and from \(n = 20\) uniform checks no longer fit while restricted ones gain at most 1.08. The maps show the same at smaller sizes: of the 54 cells where the rule fits, CliNR is better in 3, all with restricted checks at \(\alpha\) of 1.9 or 2.0 and by at most 0.06, and elsewhere worse by as much as 0.33. Since a synthesized Clifford has about \(1.5 n^2\) gates, the curves sit just above the top row of the map, and together they say that CliNR pays off at these rates only for circuits of about \(n^2\) gates or more, at around 10 to 15 qubits.
The cost that stops CliNR here is the teleportation. After a chunk’s last check come \(n\) CX, \(n\) Hadamards and \(2n\) measurements that no check protects. At \(n = 10\), the probability that one of them faults is 0.129 under the Forte-like rates, 45% of the direct implementation’s rate, against 0.013, or 15%, under the paper’s rates at \(p_2 = 10^{-3}\). The measurements alone fault with probability 0.092, since \(p_m\) exceeds \(p_2\) in this regime, while the paper’s rates put it at \(p_2/10\). This leans on the split of state preparation and measurement error assumed in Uniform or restricted checks, which places most of it on measurement; error moved to preparation would fall where the checks can catch it, and CliNR would do better.
Thus, under the paper’s rates, this implementation reproduces the shape of the paper’s two figures and the scaling of its Theorem 2, with gains larger than the paper reports. Under the Forte-like rates, CliNR with the paper’s rule pays off only for circuits of about \(n^2\) gates or more on 10 to 15 qubits, at a budget of 4, and by a gain of at most 1.6 at any size.