I asked some question about surface code properties and I recommended following research paper from what I asked before. Research paper : https://journals.aps.org/pra/pdf/10.1103/PhysRevA.86.032324

In section VII in this paper, they mentioned about error correction by using Edmond's minimum-weight perfect-matching algorithm. Also they mentioned that it worked perfectly for sufficiently sparse errors, but begins to fail as the error density increases and as the length of the error chains increases. In this sentences, I really wants to know how much degree (numerically) of each of them should be to make this surface code as defected code that cannot be used anymore even error correction is worked.

1. sparse errors

2. error density increase

3. length of error chain

  • $\begingroup$ There are multiple questions here and not all of them are clear. I think it's clearer to open a different question for each individual question. $\endgroup$
    – Peter-Jan
    Jan 18, 2023 at 8:48
  • $\begingroup$ The question in the title is a bit confusing. The unit of a codes threshold is the probability that an error occures. $\endgroup$
    – Peter-Jan
    Jan 18, 2023 at 8:50
  • $\begingroup$ I will modify it and open question for you. Thank you for your comments $\endgroup$
    – 김동민
    Jan 18, 2023 at 9:41

1 Answer 1


In order for you to know the dependence of the probability threshold with respect to the number of qubits for the planar code, which is the one considered in Fowler's review, which I will be refering in this answer, it is important to understand the concept of distance $d$.

As seen in FIG. 3, a number of $X$ operators in a horizontal line moving through the entire surface code yield a logical $X$ operator in the surface code. For the case of the figure, the minimum number of $X$ and $Z$ operators required for such an operation is 5, thus the distance of the code is 5. A distance of a code defines that it can corrects all errors of weight $(d-1)/2$ or lower. For the case of the MWPM decoding method, an example is provided in FIG. 5, where for a distance-4 repetition code, a syndrome can correspond to two weight two physical errors.

Given these definitions it may seem that increasing the number of physical qubits of the squared surface code and thus, increasing its distance, will always yield a better performance. Unfortunately, that is not the case. Increasing the size of the code will also increase the average number of errors within the code, if the physical error probability is high enough or above the critical probability threshold, increasing the size of the code will be detrimental to its performance, defying the necessity of the code itself.

For surface code decoders such as MWPM or the Union Find decoder, which seek to join non-trivial syndrome elements, having a sparse error means having non-trivial syndrome elements close together, which facilitates their matching and consequent decoding. Sparse errors are probable at low physical probabilities, as the physical probability increases, longer chains become more probable difficulting the correct decoding of the syndrome.

Up to my knowledge, the best way to find probability thresholds under arbitrary conditions (biases in noise models, planar/rotatedplanar/toric code, different decoders...) is to run simulations numerically. Choose a number of distances and compute their average probability of code error with respect to several physical error probabilities. The point where the curves cross will indicate the maximum probability at which increasing the size of the code improves its performance, that is, the probability threshold. If you are interested in computing said simulations I would recommend you David K. Tuckett's QECSIM package for data qubit errors. If you want to go to a deeper level considering circuit level noise, Craig Gidney's STIM package for noise simulation joined with Oscar Higgott's Pymatching will be more useful.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.