# Scaling functions for the logical error rate of the surface code

I'm trying to understand where the common expression $$P_L=A\left(\frac{p}{p_{th}}\right)^{\lceil \frac d 2 \rceil}$$ comes from. When estimating the logical error rate of the surface code, people seem to fit to a few different functions.

1. If you fix the distance $$d$$ of the code, and consider the small-$$p$$ limit, one can prove without too much work that $$P_L=Ap^{\lceil \frac{d}{2}\rceil}$$. For example, this is discussed in Eq. 10 here and also seems to be the overall approach to estimating low-$$p$$ error rates here. 1. On the other hand, if $$p$$ is below threshold, one can fix $$p$$ and examine the scaling of the logical error rate with $$d$$. People usually talk about $$P_L=Ae^{-\alpha d}$$ for some $$A,\alpha$$ that depend on $$p$$. This scaling form comes from intuition about percolation transitions.

2. Finally, near threshold, one uses statistical mechanics and universality arguments to say that the logical error rate should be a function only of the ratio of the system size to the correlation length $$\eta\sim |p-p_{th}|^{-\nu_0}$$, so that defining the dimensionless variable $$x := (p-p_{th})d^{1/\nu_0}$$, for small $$x$$ we should have $$P_L\approx A+Bx+Cx^2$$. This form is used to find thresholds, most notably here. None of these forms seem to tell you that the overall dependence of $$P_L$$ on $$d$$ and $$p$$ should be $$P_L=A\left(\frac{p}{p_{th}}\right)^{\lceil \frac d 2 \rceil}$$. This dependence is consistent with the method (1) and with method (2), but is more stringent than either one, and since method (1) and (2) are asymptotic expression that apply in distinct asymptotic regimes, it doesn't seem to make sense to combine them. More worrying, this expression seems inconsistent with the scaling form given in method (3) near threshold.

Where does this expression come from, and is there a general way to understand all of these different scaling forms in a unified way?

• Hi. Are you talking about surface code with perfect syndromes (because the first paper you cite for instance is assuming it is the case)? May 12 at 20:46
• @MarcoFellous-Asiani I think these general scaling forms apply to both cases, so I'd be happy for an answer that addressed either case. But I think the first paper I cited doesn't assume perfect syndrome measurement, because they're getting a threshold $<1$%. May 13 at 13:33
• You are right. What confused me is when you said "simple derivation". If it refers to the "statistical derivation" they do, there, they assume perfect syndromes. However, in their numerical simulations, the syndromes are also noisy. About your question, I am not an expert on the surface code to know the answer (so take what I say with a pinch of salt), but the models allowing for an intuitive understanding are almost always assuming perfect syndromes. In general, when everything is noisy it typically comes from brute force simulations [...] May 13 at 13:54
• [...] Also, (it comes from informal discussions with researchers simulating the surface code), in some cases there is actually not a threshold in the rigorous sense, in the sense that $p_{thr}$ actually depends on $d$ and is not lower bounded by some constant. I don't know how general this is (maybe it is for "weird" noise models), but this is at least something that you can notice in some simulations. For all those reasons I am not sure that there exists a clean explanation for what you ask apart from "look at simulations in such specific case". Again, to take with a pinch of salt. May 13 at 13:56
• @MarcoFellous-Asiani I think even with noisy syndromes it is straightforward to prove that scaling at low-$p$ is $~p^{\lceil d/2\rceil}$. The only requirement is that you measure the syndromes enough times that the "timelike" error distance is more than $d$, so the spacelike distance-$d$ logical errors are still the dominant source of errors. I think the proportionality constant probably needs some numerical simulation, though! May 14 at 15:40