## 4 Minimum Requirements for Logical Errors  
For any code and decoder, one important benchmark of performance is the minimum number of errors required to cause a logical error. We will use \(\epsilon\) to denote the value of this number realized by an exhaustive decoder, and \(\epsilon^{\prime}\) to denote that for the decoder described above. For the planar code, \(\epsilon=L/2\) for even \(L\) and \((L+1)/2\) for odd \(L\). This is the minimum number of spin flips required to create a pair of anyons such that it takes less flips to pair them with opposite edges than with each other. Ignoring \(O(1)\) corrections, as we will continue to do in the following, we can state this simply as \(\epsilon=L/2\). To find \(\epsilon^{\prime}\) we introduce the following terminology. * A string is a collection of errors such that either an anyon or the edge exists at each endpoint. * A cluster is a collection of strings, and also of their corresponding endpoints. * The width, \(w\), of a cluster is the maximum distance between a pair of its endpoints. * The distance, \(d\), between non-overlapping clusters is the minimum distance between an endpoint from each. The clusters are said to overlap if there exists two endpoints \(i\) and \(j\) from one cluster and \(k\) from the other such that \(d_{ij}>d_{ik}\). * An isolated cluster is one whose width is smaller than the distance to any other cluster or to the edge. * A spanning cluster is one that contains both edges. * A level-\(n+1\) cluster is a collection of level-\(n\) clusters such that each is no further from another than its own width. A level-\(0\) cluster is a single error. Isolated clusters are defined such that no anyon within the cluster must look further than the width of the cluster to find a nearest neighbour before it is annihilated. Also no anyon within the cluster will be considered for pairing by any outside before it is annihilated. The algorithm will therefore annihilate the anyons in isolated clusters with each other (or with the edge if also included) without reference to any others. Given a set of errors, consider all level-\(0\) clusters. Any of these that are isolated clusters can all be ignored without affecting further analysis, because they have no effect on the other anyons. By definition, all level-\(0\) clusters that remain will be part of at least one level-\(1\) cluster. Let us then consider all possible level-\(1\) clusters. Any of these that are isolated will again be dealt with by the algorithm independently of the rest, and so can be ignored. This procedure can repeated for higher level clusters until no errors remain. If no spanning cluster was ever considered, the algorithm will have certainly corrected the errors. The existence of a spanning cluster is therefore a necessary, but not sufficient, condition for a logical error. Determining the minimum number of errors required to create such a spanning cluster will then give a lower bound on \(\epsilon^{\prime}\). For this it is clear that any errors that will end up being ignored before the cluster becomes spanning are superfluous. As such we require a set of errors in which none are ignored. All level-\(0\) clusters (errors) must therefore be part of a level-\(1\) cluster, all level-\(1\) clusters part of a level-\(2\) cluster, and so on. Let us consider the uniform case, where each level-\(n+1\) cluster contains \(m\) level-\(n\) clusters. In order to become spanning as soon as possible, it is clear that the best option is for all errors to be along a single line across the code. To make each level-\(1\) cluster as long as possible there should be as many gaps between the \(m\) errors as possible while maintaining the level-\(1\) cluster. This would correspond to the \(m\) errors being evenly spaced with a gap of one spin without an error between each, and so \(m-1\) gaps in total. The width of each level-\(1\) cluster will then be \(w_{1}=2m-1\). Similarly, to make each level-\(2\) cluster as long as possible there should be \(m-1\) gaps of length \(w_{1}\) on which there are no errors.