When CZNR pays off

The paper’s Fig. 7 compares CZNR with the direct implementation on dense blocks of CZ gates, at a budget of 2 on the gate overhead. We repeat it, add a budget of 4 and the Forte-like rates of Uniform or restricted checks, and run CliNR on the same blocks, since CZNR, for circuits of CZ gates shows CliNR to be the worse of the two only to first order. We first describe the experiment, then set our results against Fig. 7 and CZNR against CliNR, and close with the Forte-like rates.

The experiment

The data come from scripts/dense.py, which writes results/dense.json.gz with its settings, the versions that produced it, the circuits, and the counts of every draw.

The circuits are complete graphs, one CZ on every pair of \(n\) qubits, so \(s = n(n - 1)/2\), as in Fig. 7. The noise regimes are those of When CliNR pays off: clinr.noise_models.asymmetric_noise() at \(p_2 = 10^{-3}\) and \(10^{-4}\), and the Forte-like rates, none with idle noise. The sizes run \(n = 5, 10, 15, \dots\), in steps of 10 beyond \(n = 80\), until the direct implementation’s bound reaches \(0.9\): to \(n =\) 70, 220 and 35.

Four schemes run on each block, every one by the paper’s rule as in When CliNR pays off: \(r = \lfloor \log_2(s/n) \rfloor\) checks, at least 1, and the smallest \(t\) up to 12 whose overhead, judged by a pilot over 10 draws of 1,000 shots, is within the budget.

  • CZNR, with uniform checks and \(|+\rangle\) prepared as a reset and a Hadamard, as everywhere else in the package.

  • CZNR with native preparation, \(|+\rangle\) prepared in one operation, as the paper counts it.

  • CliNR with uniform checks.

  • CliNR with restricted checks, the family of the paper’s own CliNR numerics.

A chosen pair is estimated afresh over 10 draws of 10,000 shots, and the direct implementation over 100,000 shots. Judged by their fresh estimates, 3 of the 268 chosen pairs are over their budget, by at most 0.9%, 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 2 of them, where the excess is within that estimate’s own uncertainty; the interval lies wholly above it for the remaining 1. Every rate is a logical error rate per run of the circuit, and a scheme’s gain is the direct implementation’s rate over its own. The 95% interval of a single estimate has a median half-width of 6% of the rate, and at most 29%; every direct estimate counts at least 89 logical errors. There is one circuit per size, so these intervals are the whole of the statistical uncertainty. We begin with the paper’s own comparison, at a budget of 2.

Against the paper’s Fig. 7

../_images/3fe0a5b27a38568fae247f370afb0536928963a36271ad91ec70a0bce6b3e934.svg

Logical error rate of the complete graph on \(n\) qubits at a budget of 2 on the gate overhead, directly and under each scheme with the paper’s rule. A scheme is drawn where the rule finds a \(t\) within the budget.

Fig. 7 draws CZNR within a budget of 2 from \(n = 10\) to \(50\) at \(p_2 = 10^{-3}\) and from \(n = 10\) to \(85\) at \(10^{-4}\). At \(10^{-4}\) we find much the same: CZNR fits from \(n =\) 15 on, and past the end of Fig. 7’s range to \(n =\) 160, with a gain of up to 11.4, at \(n = 80\).

At \(10^{-3}\) we do not. With \(|+\rangle\) prepared as a reset and a Hadamard, the rule never fits a budget of 2: at \(n = 20\), for instance, the overhead at \(t = 1\) is 2.04. Prepared natively, as the paper counts it, CZNR fits from \(n =\) 15 to 25, with gains of 2.1, 3.0 and 3.2. Beyond, no \(t\) brings the overhead within 2: the least the pilots found is 2.05 at \(n = 30\) and 2.66 at \(n = 50\), since with one chunk the acceptance is low, and with several the cost that every chunk pays, whatever its size, adds up. Our overhead counts every operation of every attempt, restarts included; the paper does not state how it counts the overhead that keeps \(n = 50\) within a budget of 2, and we leave the difference unexplained. A budget of 2 thus leaves CZNR little room at \(10^{-3}\), so to compare the schemes we turn to a budget of 4.

CZNR against CliNR

../_images/60cad4fd1b8a4871d610741f65d5a045d253cef97ab0cf60e169f6987fdf5bc6.svg

Gain of each scheme over the direct implementation on the complete graph on \(n\) qubits, at a budget of 4 on the gate overhead. A scheme is drawn where the rule finds a \(t\) within the budget; above the gray line it pays off. The jumps fall where the rule’s \(r\) or \(t\) changes.

CZNR does better than CliNR with uniform checks wherever both fit, under every regime. At a budget of 4, CliNR’s rate is 1.21 to 1.30 times CZNR’s at \(p_2 = 10^{-3}\), over the 6 sizes where both fit, and 1.13 to 1.72 times at \(10^{-4}\), with a median of 1.28. CliNR also fits over a shorter range, since its overhead is higher: at \(p_2 = 10^{-3}\) it stops fitting after \(n =\) 35, while CZNR fits to \(n =\) 70. So the first-order comparison of CZNR, for circuits of CZ gates holds at these rates too, which reach well past first order.

Native preparation saves about \(n\) operations per chunk, and at the same \(t\) leaves the logical error rate within the noise: it matters only where the overhead is close to the budget, as at a budget of 2 above.

CliNR with restricted checks is the worst of the four. On a complete graph its propagated \(ZZ\) checks have weight 2 and the others weight \(n + 1\), so its checks are cheap and it fits at larger sizes than either uniform scheme. However, one draw may miss a damaging fault with probability up to \(1 - 2/(3n)\) (Checks and bounds), against \(1/2\) for a uniform check, and the rule’s few checks do not make up the difference: its gain at a budget of 4 never exceeds 1.4 at \(p_2 = 10^{-3}\) and 2.0 at \(10^{-4}\), against 4.3 and 13.5 for CZNR.

At Forte-like rates

No scheme fits a budget of 2 under the Forte-like rates, at any size.

At a budget of 4, CZNR pays off from \(n = 10\) to \(25\), with gains of 1.18, 1.36, 1.72 and 1.33, and with native preparation also at \(n = 30\), with 1.30. CliNR with uniform checks fits only at \(n = 15\), where its gain is 1.01, and CliNR with restricted checks never gains more than 1.01. On random Clifford circuits at these rates, the best gain of CliNR is about 1.6 (When CliNR pays off), so a dense block of CZ gates is where noise reduction at Forte-like rates has the most to offer, and only CZNR delivers it.

Thus CZNR reproduces Fig. 7 at \(p_2 = 10^{-4}\) and only in part at \(10^{-3}\), where the budget of 2 sits at the edge of what it needs. On these circuits it beats CliNR under every regime, as the first-order argument predicts, and it is the one scheme that pays off at the Forte-like rates, by up to 1.7.