LLogical Error Rate Scaling of the Toric Code
Fern H.E. Watson ∗ and Sean D. Barrett † Department of Physics, Imperial College London, Prince Consort Road, London SW7 2AZ, UK.
To date, a great deal of attention has focused on characterizing the performance of quantum errorcorrecting codes via their thresholds, the maximum correctable physical error rate for a given noisemodel and decoding strategy. Practical quantum computers will necessarily operate below thesethresholds meaning that other performance indicators become important. In this work we considerthe scaling of the logical error rate of the toric code and demonstrate how, in turn, this may beused to calculate a key performance indicator. We use a perfect matching decoding algorithm tofind the scaling of the logical error rate and find two distinct operating regimes. The first regimeadmits a universal scaling analysis due to a mapping to a statistical physics model. The secondregime characterizes the behavior in the limit of small physical error rate and can be understoodby counting the error configurations leading to the failure of the decoder. We present a conjecturefor the ranges of validity of these two regimes and use them to quantify the overhead – the totalnumber of physical qubits required to perform error correction.
PACS numbers: 03.67.Pp
I. INTRODUCTION
Quantum computers are sensitive to the effects of noisedue to unwanted interactions with the environment. Toovercome this, fault-tolerant protocols that utilize errorcorrection codes have been developed. These schemesallow arbitrary quantum gates to be performed in spite ofthe noise that is ubiquitous in current models of quantumcomputing.Recent progress has been made towards experimentalimplementations of quantum error correcting codes usingsmall numbers of qubits realized using photonic systems,trapped ions and NMR techniques [1–5]. Superconduct-ing qubits are another promising experimental techniquefor scalable fault-tolerant quantum computing [6–8], in-cluding surface code architectures [9].The surface code [10, 11] is one of a family of topo-logical codes, and is the basis for an approach to fault-tolerant quantum computing for which high thresholdshave been reported [12–15]. The toric code [16] is amongthe most extensively studied of this family of codes, re-vealing much insight into related topologically orderedsystems. A great deal of work has concentrated on cal-culating thresholds for various error models [17–19], andon the discovery and implementation of new classical de-coding algorithms [19–25]. The toric code performs well,with high thresholds for some commonly studied noisemodels.A high threshold is a very desirable property of anerror correcting code since for all error rates below thethreshold, increasing the number of physical qubits en-coding the quantum information reduces the logical errorrate. In a realistic setting the code must be operating atan error rate below the threshold. Other quantities then ∗ [email protected] † Deceased 19 October 2012. become important to characterize the performance of aquantum computer, for example the code overhead , thenumber of physical qubits comprising the code that arerequired to adequately protect the encoded quantum in-formation. This is an important consideration for thepractical implementation of fault-tolerant quantum com-putation and has recently begun to draw some attention[26–28].The logical failure rate of the error correction, denotedhere as P fail , is a key metric of the performance of acode, since it describes the likelihood of failing to protectthe encoded quantum information. In this work we seekthe logical failure rate of the toric code for fixed codedistance and physical error rate, p . The code distance isthe minimum length of a string-like operator that has anon-trivial effect on the code space, and in the case ofthe toric code such operators have a length equal to thelattice size L .The toric code is a simple model that is closely re-lated to other, more physically realistic systems. Weexpect therefore that results for the logical error ratescaling of the toric code could be applied in a range ofother physical systems – most obviously the planar code(with open, rather than periodic, boundary conditions)and with noisy syndrome measurements. The techniquesto determine the scaling of the logical error rate shouldbe analogous although the numerics would be expectedto differ from the toric code case [29]. Furthermore, oncethe scaling has been determined it can be used to calcu-late the fault-tolerant overhead for the planar code usingthe methods presented in this paper.Below the threshold, the logical failure rate of a topo-logical code is expected to reduce exponentially as weincrease the code distance [16]. Although the code per-formance improves rapidly with increasing L , in the lat-tice of the toric code the total number of physical qubitsscales as O ( L ). Manufacturing, storing, and manipulat-ing resources with such a scaling is a non-trivial task withtechnology available at present. We should then ask not a r X i v : . [ qu a n t - ph ] S e p simply how large we can make the code, but how manyphysical qubits are required to achieve a desired errorcorrection performance.In order to answer this question, we examine the be-havior of the toric code in the presence of uncorrelatedbit-flip and phase-flip noise. We numerically simulate theerror correction procedure and use this to find the failurerate as a function of the input parameters L and p andfind two operating regimes. The first of these, which wewill call the universal scaling hypothesis , extends ideas byWang et al. [30] and uses rescaling arguments based ona mapping to a well-studied model in statistical physics(the 2-dimensional random-bond Ising model, or RBIM).This approach provides a good estimate for P fail when theerror weight (the number of qubits an operator acts onnon-trivially) is high and code distance is large.Rescaling arguments apply in the thermodynamiclimit, and close to criticality, where the correlation lengthof the RBIM also diverges and the appropriate lengthscale is the ratio of the lattice size to the correlationlength, L/ξ . As p decreases there is a point at whichfinite-size effects begin to dominate and we no longer ex-pect the universal scaling hypothesis to apply. This limitcorresponds to low physical error rates, as well as smalllattices.The second approach extends ideas by Raussendorf etal. [12] and Fowler et al. [15] to find an analytic expres-sion for P fail in the limit p →
0. When the error weightis low and the code distance is small this expression givesa good estimate of the logical failure rate. We will referto this as the low p expression .Although we know the limits in which each of these ap-proaches is valid, we would like to make some quantita-tive statements about the range of parameters for whicheach is applicable. We shall present a heuristic argumentfor the range of L and p for which each regime gives agood approximation to the numerical data.The structure of the paper is as follows. In Sec. II wereview the toric code and its properties. Readers familiarwith this material may wish to skip to Sec. III whichdiscusses the universal scaling regime, in which rescalingarguments are used to estimate the logical failure rate.Sec. IV describes the regime in which finite-size effectsdominate the logical failure rate and the failure rate isdominated by spanning errors. In Sec. V we present ourconjectures regarding the ranges of validity of each of thetwo regimes described. In Sec. VI we use these resultsto demonstrate techniques to determine the overhead asa function of the single qubit error rate and the logicalerror rate. We conclude in Sec. VII. II. THE TORIC CODEA. Background
In the toric code, physical qubits reside on the edgesof an L × L square lattice, as shown in Fig. 1. There are ZZZ Z
XXX X XXX X
FIG. 1. (color online). Representation of stabilizer generatorson an L = 5 toric code lattice. Qubits, shown as yellow circles,are placed on the links of the lattice. Note that the periodicboundaries are indicated by the dashed lines. The dual latticeis shown using grey lines. Top:
A vertex operator on theprimal lattice (left) and the dual lattice (right).
Bottom:
Aplaquette operator on the primal lattice. n = 2 L physical qubits comprising the code. Periodicboundary conditions are imposed and the lattice can beimagined to be embedded on the surface of a torus.The toric code is described by a set of two types ofcommuting stabilizer generators — the so-called vertex , A v , and plaquette , B p , operators, defined as A v = ⊗ i ∈ v X i , B p = ⊗ i ∈ p Z i , (1)where X and Z are the conventional single-qubit Paulioperators, v indicates a vertex and p a plaquette of thelattice. The A v operators therefore act on the four qubitssurrounding a vertex of the lattice, and the B p operatorsact on the four qubits surrounding a plaquette, see Fig.1. These four-body measurements can be decomposedinto four two-qubit CNOT gates with the addition of anancilla [16].We denote the logical encoded state of the toric code by | ψ (cid:105) toric . In the absence of noise, measuring any elementof S = { A v , B p } on this state will yield a +1 eigenvalue: S i | ψ (cid:105) toric = + | ψ (cid:105) toric , (2)where S i ∈ S . The stabilizer group is generated by S with multiplication being the group action. All elementsof the stabilizer group act trivially on the code space.The code-space of the toric code is four-dimensional andhence can encode two logical qubits. This is independentof n , hence the toric code protects a constant number oflogical qubits regardless of its lattice size.The symmetry between the primal lattice and the duallattice (constructed by replacing plaquettes of the pri-mal lattice by vertices and vice versa) shown in Fig. 1,reveals a useful symmetry in the stabilizers of the toriccode. On the dual lattice the A v operators act on the X Z ¯ X ¯ Z ZZZZ
X X XX
Z ZZZ ZZ
FIG. 2. (color online).
Left: ¯ Z is a minimum-weight ho-mologically non-trivial cycle, equivalent to a logical operatoracting on the encoded information. Top:
The ¯ X operator,drawn as a cycle on the dual lattice (lattice not shown). The¯ X logical operator shares a single physical qubit with ¯ Z andhence they anticommute. Right:
An example of a homologi-cally trivial cycle generated by multiplication of two adjacentplaquette operators. qubits surrounding a plaquette, as shown in Fig. 1. Byconsidering both the primal and dual lattices we can viewall stabilizers as closed loops, meaning that all plaquette-type operators on the primal lattice have an analogousvertex-type operator on the dual lattice. It follows thatall results calculated for either bit-flip or phase-flip errorsare interchangeable with results for the other type.In the language of algebraic topology, all of the stabi-lizers correspond to homologically trivial cycles . In Fig.2 we show an example of a homologically trivial cyclethat is generated by multiplying two adjacent stabilizergenerators together. We see that all homologically trivialcycles act trivially on the code-space.The logical operators are also represented by cycles ofPauli operators. However, these cycles wrap around thetorus and are not homologically equivalent to stabilizers.The logical operators correspond to homologically non-trivial cycles and have a non-trivial effect on the code-space. The minimum weight of a logical operator is L .There are two sets of ¯ Z and ¯ X logical operators ad-dressing the two encoded qubits (overbar indicates a log-ical operation). One of these, labeled ¯ Z , is shown inFig. 2 spanning the lattice vertically. The correspond-ing ¯ X is also shown, and forms a closed horizontal loopon the dual lattice. By multiplying a logical operator bya subset of stabilizers we can continuously deform theminimum-weight cycle ¯ Z into any other operator span-ning the lattice vertically. The set of operators that areequivalent up to stabilizer operations belong to the same homology class [31].Errors are detectable if they anticommute with at least X Z ZZ Z ZZZ Z
XX X
FIG. 3. (color online). A string of X errors is shown as adashed line on the dual lattice. Measuring the two B p gen-erators indicated yields − X error chain forms a cycle then it will not be detectable. one element of the set of stabilizer generators S . In thiswork we assume that stabilizers are measured perfectly.It follows that if any non-trivial eigenvalues are observed,this indicates the presence of errors with certainty. Thepattern of stabilizers that anticommute with a given errorreveals some information about the location and mostlikely type of error, although it cannot uniquely identifythe error. This ambiguity is due to the code degeneracy.The set of all errors on the lattice is called a chain , E .We use notation from algebraic topology to indicate theboundary of the chain of errors as ∂E . (A good intro-duction to algebraic topology can be found in many text-books, for example see Ref. [32].) The errors commutewith the stabilizers except at the boundary of the chainwhere the measured eigenvalues are non-trivial. The fullset of stabilizer eigenvalues is called the syndrome . Fig.3 shows a string of X errors and the two plaquette oper-ators that anticommute with it.Once the syndrome has been established we employ aclassical algorithm called a decoder to decide which cor-rection chain, E (cid:48) , to apply. The goal of the decoder isto pair the non-trivial syndromes such that the total op-erator C = E + E (cid:48) has the highest probability of beinga homologically trivial cycle and thus a member of thestabilizer group. Failure of the decoding algorithm cor-responds to the creation of a homologically non-trivialcycle. The decoder used in this work, the minimum-weight perfect matching algorithm, is described in thenext section. B. Error correction
The optimal threshold for the independent noise modelthat we consider here has been calculated using numericaltechniques to be p c = 0 . efficient decoding algorithms that can obtainthis threshold for the independent noise model on thetoric code.Several classes of sub-optimal efficient decoding algo-rithm exist [19, 22, 25, 37]. The one used in this work isa version of Edmonds’ minimum-weight perfect match-ing algorithm (MWPMA) [38, 39]. This algorithm pairsthe non-trivial syndromes via a correction chain that hasthe least weight possible while satisfying the conditionthat its boundary matches the error chain boundary,i.e. ∂E = ∂E (cid:48) . This ensures that the total operator, C = E + E (cid:48) , is a cycle. We denote the threshold for theMWPMA by p c . Numerical simulations suggest that p c = 0 . ± . E (cid:48) and can give thresholds up to p c ≈ . a priori more likely than some matchings with a lower weight.The degeneracy itself is simple to calculate for a given(minimum-weight) matching. For instance, for a path m between two non-trivial syndromes, a and b , the degener-acy of that path D m is given by the number of differentcombinations of the links in the matching. The prod-uct of all individual D m is the total degeneracy of thematching, D M .To take degeneracy into account we compute thematching using the MWPMA, where the edge weights d ab are modified by the effect of the degeneracy of thatpath. Then the weight passed to the algorithm becomes d ab − τ ln D m . Here τ is a weighting that we assign tothe degeneracy term. The degeneracy is added in sucha way due to entropic considerations, see Ref. [40] fordetails. The decoding algorithm minimizes this quantityglobally and this has been shown to lead to an improvedthreshold [40]. We refer to this enhanced version of theminimum-weight perfect matching simply as the PMAdecoder. C. Simulating noise and error correction
An important tool in this work is the numerical simu-lation of the detection and correction of errors on a toriccode. Repeating random trials allows us to examine thefailure probability of the code over a wide range of param-eters. As stated earlier, we consider uncorrelated bit-flipand phase-flip errors arising at a rate p . It suffices toperform simulations for only one of these types of errorsince the results will be equivalent for the other.The behavior of the toric code is simulated by placingan error with probability p on each individual qubit ofthe toric code lattice of linear dimension L , giving rise to a (usually disjoint) error chain E . The syndromesare measured and the PMA decoder is used to deter-mine the correction chain E (cid:48) . These correction chainsare added, modulo 2, to E and a parity check with eachof the appropriate logical operators is used to determinethe homology class of the total operator C . The result ofthis random sample indicates whether the error correc-tion succeeds or fails.The outcome of the Bernoulli trial (a single simulationof error correction) is assigned the value n f = 0 if C isin the trivial homology class and n f = 1 if it is in anyof the non-trivial homology classes. To gather statisticswe repeat this procedure N times for the same inputparameters ( L, p ). Of these N trials, N f = (cid:80) Ni =1 n f ,i willhave failed to perform error correction successfully. Wetherefore estimate the error correction failure probabilityas P fail = N f /N and the variance of such a distributionis σ = P fail (1 − P fail ) /N . The resulting data P fail ( L, p )characterizes the toric code performance.
III. THE UNIVERSAL SCALING HYPOTHESIS
In Ref. [30], Wang et al. used ideas from the the-ory of critical phenomena in finite-sized systems to showthat there is a critical point in the failure probabil-ity of the toric code. To do this, they used the 2-dimensional random-bond Ising model (RBIM) which isa model of ferromagnetism in which antiferromagneticcouplings arise at random. The probability distributionof antiferromagnetic couplings in this model matches theprobability distribution of errors in the toric code, hencea mapping between the two models can be constructed[16, 21, 30]. The RBIM has been extensively studiedand it is known to undergo a phase transition from anordered to a disordered phase as the concentration of an-tiferromagnetic bonds is increased. This implies a phasetransition in the corresponding quantity of the toric code:its logical failure rate.Wang et al. demonstrated that for the regime where L (cid:29) ξ , where ξ = ( p − p c ) − ν is the RBIM correla-tion length , we expect scale-invariant behavior. This ar-gument leads to the conjecture that in this regime thefailure probability of the toric code is a function only of L/ξ [30].Below the threshold the failure rate is expected to de-pend exponentially on the system size [12, 16], and alsomore generally in the fault-tolerant case [41].ln P fail ∝ − L. (3)Numerical evidence for this will be provided later, in Fig.4. Together, the exponential dependence on L and thescaling hypothesis fix the functional form of P fail . P fail = Ae − a ( L/ξ ) (4)= Ae − a ( p − p c ) ν L . (5)In this expression A and a are constants that can bedetermined using numerical fitting techniques, see Sec.V A and Appendix A.In practice the toric code will be operating in the cor-rectable ( p < p c ) regime so we use the rescaled vari-able x = ( L/ξ ) /ν (alternatively this may be writtenas x = ( p − p c ) L /ν ) and we can rewrite the universalscaling hypothesis as P fail = Ae − ax ν . (6)We determine the values of A , p c and ν from a fitto data close to the threshold. In the remainder of thissection we give evidence that the numerical data meetsthe two conditions required for the universal scaling hy-pothesis, namely an exponential decay of the failure rateas L increases and scale invariance. A. Evidence for the universal scaling hypothesis
To observe the dependence of P fail on L and p we havegenerated a set of Monte Carlo data for 0 . ≤ p ≤ . ≤ L ≤
23. We usethe simulation method outlined in Sec. II C with eachsimulation repeated N = 10 times using Kolmogorov’sBlossom V minimum-weight perfect matching algorithmimplementation [42]. We pass modified weights to thealgorithm to account for degeneracy as described in Sec.II B.In Fig. 4 we plot the logical failure rate on a logarith-mic scale, as a function of the lattice size. The shadedportion of the figure indicates the region where this ex-ponential relationship is not expected to hold accordingto a conjecture that will be explained in Sec. V.Each set of data in Fig. 4 is fitted using a quadraticansatz in L : ln P fail = α + βL + γL . (7)For data in the range 0 . ≤ p ≤ .
08 and 5 ≤ L ≤ γ is typically 2–3 orders of mag-nitude smaller than the linear coefficient β . This is strongevidence for a linear fit to the (logarithmic) data, suggest-ing a fit of the form P fail ∝ e − L , matching equation (3).For data with values of p < .
035 the quadratic coefficientwas comparable in magnitude to the linear coefficient. Aselection of this data is also shown in Fig. 4, demon-strating that the behavior of the data for these values ofphysical error rate is ambiguous. Nevertheless, Fig. 4 es-tablishes an exponential dependence of the logical failureprobability on L for a wide range of the data.The universal scaling hypothesis in equation (4) alsorequires the system to be scale invariant which impliesthat the behaviour of P fail should depend only on thelength scale L/ξ . This is demonstrated in Fig. 5 whichshows the results of numerical simulations of the toriccode failure rate close to threshold. The plot will beexplained in detail in Appendix A but now we simply − − − −
10 15 20 L P f a il (cid:31) (cid:31) (cid:31) (cid:31) p (cid:31)(cid:31) (cid:31) p (%) FIG. 4. (color online). Dependence of the logical failure rate P fail on the size of the lattice. Each data point represents N = 10 runs. The data is plotted on a logarithmic scaleand linear fits to a selected set of the data between p = 3 . p = 8% are shown. The four data sets shown in in thelower part of the plot (dashed lines) are examples of data with p < .
5% for which linear fits could not be identified. In thegrey region the linear relationship is expected to break downaccording to our validity conjecture, see Sec. V. (cid:31) .
02 0 .
04 0 . − . − . − . P fail x . . . . . . . . . . P fail p .
095 0 .
100 0 .
105 0 . L FIG. 5. (color online). Data obtained from numerical simula-tions of the toric code failure rate close to threshold, rescaledusing x = ( p − p c ) L /ν . Each data point represents N = 10 runs. The finite-size correction DL − /µ is subtracted from P fail . All of the data collapses to a single curve and the thresh-old can be extracted as a fit parameter. Inset:
The data priorto rescaling. note that rescaling the numerical data using the variable x = ( L/ξ ) /ν leads to data collapse . This phenomenondescribes the situation when data generated in differentsystems, in this case different lattice sizes, falls onto thesame curve after an appropriate rescaling has been ap-plied. (a) (b) (c) (d) ZZZ ZZZZZ ZZZZZ EE (cid:31) E C FIG. 6. (color online). One way in which (cid:100) L/ (cid:101) errors ly-ing along a minimum weight homologically non-trivial cyclewill result in a logical error. The PMA decoder applies acorrection chain that results in a non-trivial cycle, causinga logical failure. (a) The errors are distributed arbitrarilyalong one minimum-weight homologically non-trivial cycle ofthe lattice. (b) The syndromes that arise as a result of the er-ror configuration are shown. (c) The minimum-weight perfectmatching returns the correction chain E (cid:48) with certainty. (d)The resultant cycle C = E + E (cid:48) is homologically non-trivial,which means that the error correction has failed. IV. THE LOW SINGLE QUBIT ERROR RATEREGIME
The universal scaling hypothesis is a good model forthe logical failure rate when the lattice size is large andwhen there are sufficiently many errors. For a fixed lat-tice size, as p is reduced the universal scaling behaviorshould not be expected to hold indefinitely. Indeed thenumerical evidence suggests that when p becomes suffi-ciently small the scaling hypothesis fails. In the p → p analytic approx-imation: P fail = 2 L L ! (cid:100) L/ (cid:101) ! (cid:98) L/ (cid:99) ! p (cid:100) L/ (cid:101) . (8)This is justified by considering the uncorrectable errorconfigurations in the p → P fail directly. Restricting ourselves to low single qubit errorrates we consider the minimum number of errors thatcan cause the error correction to fail, (cid:100) L/ (cid:101) . To causethe error correction to fail these errors must lie along asingle minimum-weight homologically non-trivial cycle ofthe toric code. If they fall in this way the PMA will cer-tainly apply the remaining (cid:98) L/ (cid:99) single qubit operatorsrequired to ensure C = E + E (cid:48) is a logical operator. Fig.6 shows a sketch of how this happens.Thus the expression in equation (8) for the failure rateis constructed via a counting argument. The first factor, 2 L , is the number of minimum-weight homologically non-trivial cycles of the code that exist. The second is thebinomial coefficient which counts the possible combina-tions of (cid:100) L/ (cid:101) errors along a cycle of weight L . Finallywe include a factor that accounts for the likelihood ofexactly (cid:100) L/ (cid:101) errors occurring on a lattice constructedfrom 2 L qubits, which is p (cid:100) L/ (cid:101) (1 − p ) L −(cid:100) L/ (cid:101) . Thesingle qubit error rate is small so we can neglect the fi-nal factor of (1 − p ) L −(cid:100) L/ (cid:101) to obtain equation (8). Inthe low p limit the L dependence is P fail ∝ e −(cid:100) L/ (cid:101) andwe see that it is quantitatively different to the universalscaling regime, P fail ∝ e − L . V. THE VALIDITY OF THE TWO REGIMES
The range of parameters we consider in our numericalsimulations encompasses both the small p limit and theuniversal scaling limit. For small single qubit error ratesthe weight of the errors is typically much smaller thanthe code distance and the low p analytic expression isapplicable. Conversely, for large L the number of errorscan be much larger than the code distance and we expecta universal scaling hypothesis to apply. These regimesare distinct, as we see from their differing dependence onthe code distance. Each of the two regimes will providea good approximation to the numerical data over someregion of parameter space. We shall now make a heuristicargument to quantify those regions.In order to make a conjecture about the validity ofthe regimes we consider the distribution of the numberof errors that arise on a lattice of fixed size, at a knownphysical error rate. We will relate this distribution to (cid:100) L/ (cid:101) , half the code distance. This number is signifi-cant to the PMA decoder because if the weight of theerror chain, | E | , is less than this number then the erroris certainly correctable. In the case when | E | ≥ (cid:100) L/ (cid:101) asubset of the possible error configurations will lead to anincorrect pairing of syndromes, causing a logical failure.These are the spanning errors illustrated in Fig. 6.The typical weight of errors on the lattice can be shownto be 2 L p . If 2 L p < (cid:100) L/ (cid:101) then the expected numberof errors is less than half the code distance and logicalerrors are dominated by spanning chains, see Fig. 6. Fora fixed p , as L increases this inequality is violated. Whenthe number of errors is much greater than L but they aretypically correctable, this is the universal scaling limit.Requiring p (cid:29) /L (up to a numerical factor) leads toa relationship between L and p that determines a mini-mum single qubit error rate for a given lattice size belowwhich the universal scaling hypothesis breaks. We makethe arbitrary but natural choice that the mean numberof errors on the lattice must be two standard deviationsabove (cid:100) L/ (cid:101) , leading to the expression p ush ≈ L + √ L + 2 L L . (9) − − − − P fail − . − . − . − . − . − . x L FIG. 7. (color online). Data satisfying the condition p > p ush ,plotted on a logarithmic scale and colored according to latticesize. Each data point represents N = 10 runs. Also shownin black is the fit of the ansatz, equation (4) with all valuestaken from the threshold fit (see Appendix A) except for a which was extracted using a fit to the data set shown. This expression, derived fully in Appendix B, determineswhether the behavior can be considered to be within theuniversal scaling regime.We can find an equivalent expression for p (cid:28) /L ,when the single qubit error rate above which the low p expression no longer provides a good approximation tothe numerical data. This can be shown to be p l p ≈ L − √ L + 2 L L . (10)When p ∼ /L there is a ‘crossover’ region, in whichthe logical failure rate cannot be considered to be wellapproximated by either regime. A. Testing the Range of Validity of the UniversalScaling Hypothesis
Substituting p ush given by equation (9) into the univer-sal scaling hypothesis in equation (4) yields an expressionfor the minimum P fail , for a fixed L , that belongs to theuniversal scaling regime. This expression is plotted as agrey line in Fig. 4 and hence the grey region indicatesthe region of parameter space where we do not expectthe universal scaling hypothesis to hold. This supportsthe previous observation that most of the data we haveobtained for p < .
5% would lie outside the universalscaling region and therefore be poorly fit by equation(5).We have fitted the universal scaling ansatz, equation(4) to the data that falls outside this grey region. (Thevalues of A , p c and ν are all determined from the fitto the data around threshold.) From the fit to the datain the universal scaling regime we find a = 32 . ± . L and vary the single (cid:31) (cid:31) (cid:31) (cid:31) (cid:31) (cid:31) (cid:31) (cid:31) (cid:31) (cid:31) − . − . − . − . − . − . x − − − − P fail L FIG. 8. (color online). Logarithmic plot of all numericaldata following the rescaling transformation (
L, p ) → x =( p − p c ) L /ν . The universal scaling fit is also shown in black.The data is plotted on a logarithmic scale and colored accord-ing to lattice size L . For fixed L , decreasing x correspondsto reducing p . As we do this the universal scaling hypothesisbreaks at a point predicted by equation (9). This is indicatedfor a single lattice size ( L = 11) as a vertical line. qubit error rate to see how the full set of data behaves inrelation to the universal scaling limit. For each fixed L in Fig. 8, reducing x corresponds to reducing p . When p becomes sufficiently small the scaling hypothesis fails andas expected the failure rate deviates below the universalscaling law. (cid:31) (cid:31) (cid:31) (cid:31) (cid:31) (cid:31) (cid:31) (cid:31) (cid:31) (cid:31) − . − . − . − . − . − . − − − − P fail x L FIG. 9. (color online). The full set of renormalized data, col-ored by lattice size. The low p analytic expression, equation(8) is shown for some small lattice sizes. As x decreases theanalytic expression tends towards the data. This numericalevidence suggests that the analytic expression is an underes-timate of the failure rate for this range of parameters. B. Testing the Range of Validity of the Low ErrorRate Regime
We have proposed that, in the low p limit, spanningerrors of the type illustrated in Fig. 6 dominate when2 L p < (cid:100) L/ (cid:101) . This is the validity condition we use forthe low p regime, see equation (10).We can rewrite equation (8) in terms of L and therescaling variable, x . Fig. 9 shows this analytic expres-sion plotted for some small values of L along with thenumerical data. As the probability of errors decreases ona fixed lattice the mean number of errors will approach (cid:100) L/ (cid:101) . As expected, the low p expression gives a good ap-proximation for small lattice sizes and low physical qubiterror rates. The data and low p analytic expression con-verge as x decreases, so for fixed lattice size as the phys-ical error rate decreases the approximation improves. VI. COMPARISON OF THE OVERHEAD INTHE TWO REGIMES
So far we have concentrated on determining the logicalerror rate as a function of the lattice size and single qubiterror rate. Now we wish to demonstrate that it is possibleto invert these relationships to find the overhead, Ω. Thiswill be a function of the experimentally determined singlequbit error rate, p , and maximum tolerable logical failurerate P fail .In this work we demonstrate the calculation for thetoric code with perfect stabilizer measurements. Howeverthe same techniques shown here will also be applicableto more physically realistic settings, for example a pla-nar code with noisy stabilizer measurements. Althoughthe numerics will differ from those presented here, themethods used are expected to be directly analogous.The first step in calculating the overhead is to deter-mine which of the two regimes (universal scaling or low p ) the code is operating within. To do this we use the ex-pression for p ush in equation (9), to find the minimum er-ror rate for which the universal scaling hypothesis holds.Similarly we find p l p , the maximum error rate for whichthe low p expression holds, using equation (10). In Fig.10 we plot these two bounds, and the regions of validitythat they indicate. Fig. 10 therefore shows the region of( P fail , p ) parameter space for which each of the regimesis expected to give a good approximation to the logicalerror rate. Once the correct regime has been identified,the overhead can be calculated.In the universal scaling region the logical failure rateis P fail = Ae − a ( p − p c ) ν L . By using this to find the latticesize L as a function of P fail and p , and recalling that thereare 2 L physical qubits comprising the toric code, we findthe overhead in the universal scaling regime is given by:Ω ush ( P fail , p ) = 2 a (cid:20) ln (cid:18) − AP fail (cid:19) ( p − p c ) − ν (cid:21) , (11)where the constant a has been determined from fits tothe data in this work, see Sec. V A. The remaining pa-rameters, A , p c and ν , can be determined from a fitto data generated close to threshold, see Appendix A forthis calculation and for their numerical values. p (cid:31) (cid:31) (cid:31) P fail regime scaling Universal
Low p regime .
02 0 .
04 0 .
06 0 . p P f a il − − − − FIG. 10. (color online). The range of validity of each of theregimes is indicated as a function of the independent variables p and P fail . The uncolored part of the plot is the crossoverregion between the two regimes. The analytic expression for the low p regime, equa-tion (8), can be simplified by assuming that (cid:100) L/ (cid:101) = (cid:98) L/ (cid:99) = L/ n ! =( n/e ) n √ πn . Inverting this simplified expression we ob-tain a solution for L that uses the Lambert W function[43]. We can simplify this using the approximate form forthe lower branch of the function [44]. It follows that anapproximate expression for the overhead in this regimeis given by:Ω l p ( P fail , p ) = 2 (cid:34) ln P − ln (cid:0) − ln P (cid:1) ln 4 p (cid:35) . (12) . . P fail p .
02 0 .
04 0 .
06 0 . P h y s i c a l q ub i t s Ω l p Ω ush FIG. 11. (color online). A 3-d plot of the overhead, on alogarithmic scale, in each of the two regimes for 0 ≤ p ≤ − ≤ P fail ≤ − . This plot reveals the gap betweenthe two regimes over the whole region of parameter spaceconsidered. It also reveals drop in overhead as the singlequbit error rate is reduced, which is particularly striking forthe low p regime. Fig. 11 shows a 3-d plot of the overhead as a func-tion of P fail and p . There is a significant gap between(a) . . . . . P fail P h y s i c a l q ub i t s Ω l p Ω ush (b) .
02 0 .
04 0 .
06 0 . p P h y s i c a l q ub i t s Ω l p Ω ush FIG. 12. (color online). (a) The overhead for the toric codecalculated for a physical error rate p = 5% for desired fidelities10 − ≤ P fail ≤ − . (b) The overhead for logical failure rate P fail = 10 − and 0 ≤ p ≤ the two plots for most of parameter space (see Fig. 12)and an increase in overhead is seen as both p and P fail are increased. Allowing a higher logical failure rate willnaturally reduce the overhead required, as will reducingthe single qubit error probability.Fig. 12 shows the difference between the required over-head in the two different regimes. For the range of pa-rameters considered the low p expression always gives anestimate of the overhead that lies below the value givenby the universal scaling hypothesis.The low p expression tends to underestimate the logi-cal failure rate for the range of numerical data simulated.Hence this may be considered to be a practical lowerbound on the overhead required for those parameters.Conversely, the universal scaling hypothesis is an overes-timate of the logical failure rate for most of the numericaldata, and hence can be considered to be a practical upperbound to the resources required. VII. CONCLUSIONS
We have found two distinct operating regimes of thetoric code. In one, the data can be rescaled and an ansatzbased on this scaling and the exponential dependence ofthe failure rate on L can be used to find an empiricalexpression for P fail . In the other, a counting argumentgives rise to an analytic expression for the failure ratein the p → L, p ), heuristicconditions for the range of validity of each expression.The expressions describing the two regimes have beeninverted to calculate the system size required to achievea desired logical success rate for a given single qubit errorrate. We have used the expressions for the logical failurerate to demonstrate techniques to calculate the overhead,Ω( P fail , p ).We expect that the techniques we have demonstratedin this work will be applicable in a wide range of settings.In particular, more physically realistic geometries such asthe planar code, whose logical failure rate is expected tohigher than that of the toric code [29]. Furthermore, weexpect that the methods we have demonstrated can beused to calculate the overhead of a fault-tolerant quan-tum memory, in which the stabilizer measurements areimperfect. Since all topological codes are based on simi-lar principles the techniques outlined in this work can beexpected to be directly applicable despite the fact thatthe numerics in these cases will differ from those pre-sented here.Based on the numerical evidence, we claim that formost practical purposes the two regimes bound the re-quired overhead. The numerical results presented in thiswork are dependent on the choice of the decoder. Similarscaling relationships would be expected for other decod-ing algorithms, particularly renormalization group-baseddecoders such as [22, 37].This work raises several open questions. It has beenshown that the MWPMA decoder has a quadraticallylower logical failure rate than the renormalization groupalgorithm [45]. However, we still believe that a compre-hensive comparison of all existing decoders over the wholeregion of (relevant) parameter space would be interest-ing and worthwhile. A possible scenario is that the sizeof the topological code that can be realized will be fixedby technological limitations. In that case, a compari-son of the analysis presented in this work for all knowndecoders below threshold would reveal which should beimplemented to minimize the logical failure rate.Decoders with high thresholds usually require a longerrunning time than those with more modest thresholds.We expect a tradeoff between time and space resources,suggesting that those decoders with longer running timesmay have smaller physical qubit overheads. This is in-teresting, because although a high threshold is desirable,for practical implementations the running time and phys-ical overhead are also important constraints. Therefore itseems that a balance between these three figures of merit0may be of interest for practical quantum computation.Several of the limitations we faced have been addressedby Bravyi and Vargo in [26] during the preparation of thismanuscript. The first of these addresses the crossover re-gion between the two regimes we have identified. Bravyiand Vargo have constructed a heuristic ansatz that in-terpolates between the dependence on L of the low p regime, P fail ∝ e −(cid:100) L/ (cid:101) , and the dependence expected forlarger physical error rates, P fail ∝ e − L . These functionalforms match the two regimes we have identified so theansatz by Bravyi and Vargo could lead to a method forinterpolating between them.Another benefit of the technique by Bravyi and Vargois that it provides a fit to the numerical data in the smalland moderate p regimes. A significant limitation we facedwas the availability of resources to run the Monte Carlosimulations of the error correction procedure. For exam-ple, it was impossible to obtain data for P fail < − dueto the running time of the decoder. Bravyi and Vargohave discovered a new technique for probing very low er-ror rates on surface codes [26]. Obtaining data for verylow logical error rates using this algorithm would help usto verify the conjecture of the range of validity of the low p expression, particularly for larger lattice sizes than wewere able to test.While heuristic approaches are very flexible, our uni-versal scaling hypothesis has the following advantages. Itaddresses the large L limit and gives particularly goodapproximations to the numerical data for moderatelylarge single qubit error rates. The functional form forthe universal scaling hypothesis, given in equation (4) isderived from the phase transition of the random-bondIsing model, which is a model of statistical physics thatthe toric code error correction can be mapped to, mean-ing that it is not a heuristic expression. It is also easilyinvertible and its pre-factor, A , does not depend on thecode distance.Ultimately the implementation of universal quantumcomputing that is found will set the input parametersthat determine which of the regimes it operates within. Acknowledgements
I would like to thank Tom Stace for many valuablediscussions in the early stages of this work and his ideaof considering universal scaling in such an analysis, aswell as for his careful reading of and comments on thismanuscript. I would like to thank Dan Browne for hishelp in preparing this paper, and thank David Jenningsand Hussain Anwar for useful discussions and helpfulcomments on this manuscript. We acknowledge the Im-perial College High Performance Computing Service forcomputational resources. FHEW was supported by EP-SRC (grant number: EP/G037043/1).
Appendix A: Determining the threshold
In Sec. III we rescaled the numerical data using thevariable x = ( p − p c ) L /ν . In order to do this, we mustfirst establish the values of the threshold, p c , and criticalexponent, ν . The universal scaling hypothesis, equation(4), also relies on knowing the failure rate at thresholdin the large L limit. In this appendix we show how thesequantities are obtained from a fit to data close to thethreshold.The threshold for the stand-alone MWPMA decodinghas been calculated previously as 10 . ± . P fail we numerically sim-ulate the error correction protocol, enhanced minimum-weight perfect matching (PMA), using the same methoddescribed in Sec. III A. We performed N = 10 simu-lations of the error correction procedure for p close to10 .
3% and for odd lattice sizes in the range 5 ≤ L ≤ L limit,so following the method from Wang et al. the fittingansatz was constructed by taking a quadratic expansionin x around the threshold x = 0 and accounting for finite-size effects by adding a single non-universal term that isdependent on the lattice size [30]. The ansatz is: P fail = A + Bx + Cx + DL − /µ , (A1)where A , B and C are expansion coefficients, D is thecoefficient of the non-universal term, and x = ( p − p c ) L /ν . (A2)Here ν is the critical exponent and p c is the thresholderror rate for our PMA decoder.Fig. 5 shows the rescaled data with finite-size effectssubtracted, and the fit to the data. The relevant param-eters were found to be: p c = 0 . ± . ,ν = 1 . ± . ,µ = 1 . ± . ,A = 0 . ± . ,B = 1 . ± . ,C = 2 . ± . ,D = − . ± . . (A3)The threshold for our modified decoding algorithmswas found to be in agreement with the value found byWang et al. for the unmodified MWPMA [30]. Thisdoes not achieve the maximum threshold of p c (cid:39) . ν found here is in agreement withthe value found by Merz and Chalker when calculatingthe optimal threshold value [34], although it does notagree with value found by Wang et al. for the MWPMAdecoder.The analysis presented in this appendix establishesthe validity of the rescaling approach to the analysis forthis choice of decoder by demonstrating that the scalingasatz, equation (A1) provides a good fit to the collapseddata close to the threshold. Appendix B: Deriving the validity conditions
In this appendix we outline the derivation of the va-lidity condition for the universal scaling hypothesis, p ush given in equation (9). The validity condition for the low p expression, p l p given in (10) is not explicitly shown,but can be reproduced using a similar argument.The single qubit errors occur independently and at arate p . The weight of the error that arises, | E | , obeysa binomial distribution with a mean that coincides withthe typical error weight, µ = 2 L p, (B1)and a variance of: σ = 2 L p (1 − p ) . (B2) According to the central limit theorem the binomial dis-tribution can be approximated by a normal distributionfor large enough lattice size.For the universal scaling hypothesis, the condition wehave proposed is that µ , the mean of the probability dis-tribution, is large with respect to (cid:100) L/ (cid:101) . This impliesthat the weight of the error chain that results is largerthan (cid:100) L/ (cid:101) with high probability. We can write this as µ (cid:29) (cid:100) L/ (cid:101) , or µ − n σ > (cid:100) L (cid:101) , (B3)where n is the number of standard deviations above (cid:100) L/ (cid:101) we require the mean to lie. We have chosen n = 2for both the universal scaling hypothesis and correspond-ing condition for the low p expression.Substituting equations B1 and B2 into equation B3 weobtain 2 L p − (cid:112) L p (1 − p ) > (cid:100) L (cid:101) . (B4)Solving for p and taking only the highest order terms, wearrive at the expression for p ush in equation (9).The expression for p l p in equation (10) is obtained sim-ilarly, by requiring µ + σ < (cid:100) L (cid:101) . (B5) [1] K. Chen, C-M. Li, Q. Zhang, Y-A. Chen, A. Goebel,S. Chen, A. Mair, and J-W. Pan, Phys. Rev. Lett. ,120503 (2007).[2] C-Y. Lu, W-B. Gao, O. G¨uhne, X-Q. Zhou, Z-B. Chen,and J-W. Pan, Phys. Rev. Lett. , 030502 (2009).[3] X-C. Yao et al.,
Nature , 489–494 (2012).[4] P. Schindler, J.T. Barreiro, T. Monz, V. Nebendahl, D.Nigg, M. Chwalla, M. Hennrich, and R. Blatt,
Science , 1059–1061 (2011).[5] J. Zhang, D. Gangloff, O. Moussa, and R. Laflamme,
Phys. Rev. A , 034303 (2011).[6] H. Paik et al., Phys. Rev. Lett. , 240501 (2011).[7] C. Rigetti et al.,
Phys. Rev. B , 100506 (2012).[8] S.E. Nigg and S.M. Girvin, Phys. Rev. Lett. , 243604(2013).[9] D.P. DiVincenzo,
Phys. Scripta , 014020 (2009).[10] A.Yu. Kitaev,
Ann. Physics , 2–30 (2003).[11] S.B. Bravyi and A.Yu. Kitaev, arXiv:quant-ph/9811052.[12] R. Raussendorf, J. Harrington, and K. Goyal,
New J.Phys. , 199 (2007).[13] R. Raussendorf and J. Harrington, Phys. Rev. Lett. ,190504 (2007).[14] S.D. Barrett and T.M. Stace, Phys. Rev. Lett. , 200502 (2010).[15] A.G. Fowler, M. Mariantoni, J.M. Martinis, and A.N.Cleland,
Phys. Rev. A , 032324 (2012).[16] E. Dennis, A. Kitaev, A. Landahl, and J. Preskill, J.Math. Phys. , 4452 (2002).[17] T.M. Stace, S.D. Barrett, and A.C. Doherty, Phys. Rev.Lett. , 200501 (2009).[18] D.S. Wang, A.G. Fowler, A.M. Stephens, and L.C.L. Hol-lenberg, arXiv:0905.0531.[19] A. Hutter, J.R. Wootton, and D. Loss, arXiv:1302.2669.[20] A.G. Fowler, arXiv:1310.0863.[21] J.W. Harrington, PhD thesis,
California Institute ofTechnology , (2004).[22] G. Duclos-Cianci and D. Poulin,
Phys. Rev. Lett. ,050504 (2010).[23] G. Duclos-Cianci and D. Poulin,
IEEE ITW
Phys. Rev. X , 021004(2012).[25] J.R. Wootton and D. Loss, Phys. Rev. Lett. , 160503(2012).[26] S. Bravyi and A. Vargo, arXiv:1308.6270.[27] D. Gottesman, arXiv:1310.2984. [28] M. Suchara, A. Faruque, C-Y. Lai, G. Paz, F.T. Chong,and J. Kubiatowicz, arXiv:1312.2316.[29] A.G. Fowler, Phys. Rev. A , 062320 (2013).[30] C. Wang, J. Harrington, and J. Preskill, Ann. Physics , 31–58 (2003).[31] A. Hatcher, Algebraic Topology,
Cambridge UniversityPress (2002).[32] M. Henle, A Combinatorial Introduction to Topology,
Dover (New York) (1994).[33] A. Honecker, M. Picco, and P. Pujol,
Phys. Rev. Lett. , 047201 (2001).[34] F. Merz and J.T. Chalker, Phys. Rev. B , 054425(2002).[35] M. Ohzeki, Phys. Rev. E , 021129 (2009).[36] S.L.A. de Queiroz, Phys. Rev. B , 174408 (2009). [37] S. Bravyi and J. Haah, Phys. Rev. Lett. , 200501(2013).[38] J. Edmonds,
Canad. J. Math. , 449–467 (1965).[39] W. Cook and A. Rohe, INFORMS J. Comput. , 138–148 (1999).[40] T.M. Stace and S.D. Barrett, Phys. Rev. A , 022317(2010).[41] A.G. Fowler, Phys. Rev. Lett. , 180502 (2012).[42] V. Kolmogorov,
Math. Prog. Compu. , 43–67 (2009).[43] R.M. Corless, G.H. Gonnet, D.E.G. Hare, D.J. Jeffrey,and D.E. Knuth, Adv. Comput. Math. , 329–359 (1996).[44] D. Veberic, arXiv:1003.1628.[45] A.G. Fowler, A.C. Whiteside, and L.C.L. Hollenberg, Phys. Rev. Lett.108