Phase transition of computational power in the resource states for one-way quantum computation

We study how heralded qubit losses during the preparation of a two-dimensional cluster state, a universal resource state for one-way quantum computation, affect its computational power. Above the percolation threshold, we present a polynomial-time algorithm that concentrates a universal cluster state, using resources that scale optimally in the size of the original lattice. On the other hand, below the percolation threshold, we show that single qubit measurements on the faulty lattice can be efficiently simulated classically. We observe a phase transition at the threshold when the amount of entanglement in the faulty lattice directly relevant to the computational power changes exponentially.


I. INTRODUCTION
The one-way model for quantum computation [1], or measurement-based quantum computation (MBQC), is an alternative to the standard circuit model [2], providing another possible route towards practical quantum information processing.In this scheme, quantum computation proceeds by adaptive single-qubit measurement on an entangled universal resource state.Particular physical implementations, however, may necessitate modifying the original scheme, which used a cluster state [3] on the 2-dimensional square lattice as its universal resource.Other resource states that have been identified as universal under this measurement-based scheme include the cluster state corresponding to a 2-dimensional hexagonal lattice [4,5], and, in addition, other extended measurement-based schemes have been proposed [6].In this paper, rather than searching for classes of universal states, we consider the impact of possible experimental imperfections on the resource states to see if universal MBQC can be achieved.We also show that our model exhibits a phase transition in the computational power of the resource state, in the sense that its potential for universal quantum computation is lost suddenly at a particular critical degree of imperfection.The notion of universality we use throughout is that of efficient universality (in the sense of Ref. [5]) i.e. that any quantum computation can be implemented with only a polynomial overhead in spatial resources and time 1 , as efficiency is a crucial aspect of computational power.
Typically, one imagines a cluster state as being prepared by placing qubits in an L × L lattice and then entangling the qubits with an Ising type interaction between nearest neighbours.The model we consider in this paper is one in which there is only a finite probability p that there was initially an atom in any given lattice site.The value of p is independent and identical for each lattice site.We could imagine this situation arising when we fill an optical lattice with atoms from a Mott-insulator with some sub-unital filling factor [7,8,9].We assume there is only at most one atom per site, and furthermore that the atom positions are heralded.The resulting state looks like a regular lattice graph state, but with some vertices and their incident edges removed.
Percolation is the widely-known phenomenon that in lattices with imperfect filling there exists a unique giant connected cluster of size O(N ) (where N = L 2 ), when the filling factor lies above a certain percolation threshold (in the so-called supercritical phase).One might naively think it is obvious that above this threshold the corresponding state in our model would be universal as a resource of MBQC.However, a connected graph state of size O(N ) is generally not sufficient to be a universal resource.For example, a 1D chain (i.e., 1D cluster state) of O(N ) is not universal, nor is any O(N ) tree structure nor even the complete graph on N vertices [4].In this paper, we show that the faulty lattice is indeed universal by showing explicitly how to convert the supercritical resource state into the regular 2D cluster state with constant overhead (dependent only on p) and polynomialtime classical processing.
Finally, we interpret the transition to universality at the percolation threshold as a phase transition, with the entanglement of the faulty lattice as an order parameter.Specifically, we use an entanglement measure called the entanglement width [4,5] which is well suited as an entanglement measure for states being used in MBQC.We show that the scaling exponent of the entanglement width of the faulty lattice goes through a discontinuity at the critical probability p c in the large N limit.
It should be noted that in this paper all statistical statements, such as discussion of phase transitions, should be interpreted in the following way.We consider properties that hold true almost surely (more precisely, with probability exponentially close to one in the thermodynamic limit), for all the possible realizations of the configuration of holes with a given p.This paper does not directly consider mixed states, although clearly the mixed state corresponding to a mixture of states weighted according to their probability for a given p, would reduce to the same ensemble of pure states under a non-demolition site-occupation number measurement.
We briefly mention the literature which utilized the idea of percolation theory for the quantum information processing.A simple modification of the situation above is to consider the effect when all lattice sites are filled with an atom but the entangling gate fails with some probability, leading to a graph state with missing edges instead of vertices.This is the model considered in Ref. [10], motivated by linear optical implementations of quantum computation.In that paper the authors consider an initial faulty resource of size L 1+ × L 1+ × L , a 3-dimensional resource, and show that above the edge percolation threshold for a 3D lattice, it is possible to concentrate an O(L)×O(L) hexagonal cluster state.The approach used in Refs.[10,11] is derived from renormalization theory and is applicable to a wide variety of lattice geometries, and may also be adapted to work with vertex defects, rather than edge defects.We note that in the context of quantum networks, on the other hand, classical percolation methods were not found to be optimal [12].

II. PRELIMINARIES
Because this paper relies on results from rather distinct disciplines, this section provides the necessary background for readers who may be unfamiliar with one or more topics.

A. Graph theory
See Ref. [13].A graph G is a set of points, called vertices, along with a set of pairs of vertices which are called edges.Vertices are usually labeled with numbers, such as vertex j, and edges are usually labeled by the vertices they connect, such as edge {j, k} that connects vertices j and k.The vertices j and k are sometimes said to be the endpoints of the edge, or be connected by the edge, and also sometimes the edge is said to be incident on vertices j and k.A graph is represented pictorially with dots rep- resenting vertices and lines connecting the dots representing edges.Two vertices connected by an edge are said to be neighbors, and the number of neighbors of a vertex is dubbed its degree.The neighborhood of vertex j, denoted as N (j), is the set of vertices that are neighbors of vertex j.The neighborhood of a set of vertices is the union of the neighborhoods of the vertices in the set (excluding the vertices themselves).A path in G is an ordered set of vertices and their connecting edges, {v 1 , v 2 , . . ., v k } and {{v 1 , v 2 }, {v 2 , v 3 }, . . ., {v k−1 , v k }}, and each vertex and edge appear exactly once.Thus, paths have no "dangling" edges and cannot self-intersect.The first and last vertices in the path are the starting and ending vertices, respectively.

Definition of minor
There are two more important concepts we need to define: graph minors and topological minors.These are illustrated in Figure 1.A graph minor , or simply minor, is obtained by first partitioning the vertices into disjoint connected sets, and then considering the graph between these sets, while disregarding any self-loops or parallel edges; see Figure 1(a).A topological minor is a special case of a graph minor where the resulting minor has the same topology as the original graph.More precisely, if we view the original graph as a topological space, a topological minor is homeomorphic to the original graph.This is illustrated in Figure 1(b).For a rigorous definition of these concepts, see [13].

B. Graph states, cluster states, and Pauli measurements
The universal resource states we address are called graph states [14] and are defined in terms of a graph G as follows.Let X j , Y j , and Z j denote the Pauli operators on the j-th qubit.For each vertex j of the graph G, prepare a qubit initially in the +1 eigenstate of X j .Then apply the controlled-Z operator between each pair of qubits who are neighbors in G.For a connected graph, what results is an entangled pure quantum state that is well represented by the underlying graph G.The class of graph states resulting from 2D regular lattices are called cluster states.The two lattices that we use are the square lattice and the hexagonal lattice.Both have been shown to be universal for one-way quantum computation [1,4].
The effects of Pauli measurements on graph states are given in Ref. [15].For simplicity, we describe here the effect of Pauli measurements on graph states for the two cases we need.If a measurement of Z j is made on a graph state represented by a graph G, then the resulting state is local unitarily equivalent to a graph state with graph G , which results from G by removing all edges incident on vertex j.We refer to this process as disconnecting qubit j.On the other hand, if a measurement of Y j is made on the state represented by G, and if vertex j has degree 2, the resulting graph G is obtained from G by connecting the two neighbors of vertex j before disconnecting vertex j from the graph.We refer to this process as contracting the line containing qubit j.Note that this process preserves the topology of the initial graph.These two processes are illustrated in Figure 2. The post-measurement state depends on the measurement outcome, but the two possible states are equivalent to graph states up to known local Clifford operations.These do not need to be actively corrected.They can be recorded and incorporated into the choice of bases for later measurements.
In this paper, we need only to disconnect qubits and contract lines in order to concentrate a perfect lattice from a faulty one.While it could be that other measurement configurations might improve the efficiency of this process, they could only do so by a constant factor since we already achieve the optimal scaling.Moreover, other measurement configurations tend to result in very complicated graph transformations, so this possibility seems unlikely.

C. Percolation theory
Percolation theory is the study of simple lattice models with defects.In site percolation, we consider a regular lattice, say a square lattice, having a site occupied with probability p, and unoccupied with probability 1 − p.We then imagine that nearest neighbors on the lattice are connected by edges if both neighbors are occupied.A particular instantiation of a 30 × 30 square lattice for various values of p is shown in Figure 3.
We are interested in statistical properties of this ensemble for lattices of finite extent, say L × L, but in the limit of large L. One such property is the existence of a crossing.An H-crossing (short for horizontal crossing) is a path through neighboring occupied sites from the lefthand boundary to the right-hand boundary.Similarly, a V-crossing traverses the graph from bottom to top.
Does there exist a critical value p = p c above which we are guaranteed to find a crossing in the large L limit?The answer is yes [16], and this is the central result in percolation theory.The value p c , called the threshold , depends on the lattice geometry.Since we only concern ourselves in this paper with site percolation on the square lattice, it is appropriate to specialize to this case; there the threshold is p c ≈ .592746.There are then three distinct phases in the model: the subcritical phase where p < p c , the critical phase where p = p c , and the supercritical phase where p > p c .These three phases are illustrated in Figure 3.
In the supercritical phase, there exists at least one Hcrossing (or V-crossing), but how many are there?As discussed in the Appendix, there are O(L) vertex-disjoint crossings almost surely.

III. RESULTS
In this section we first show that in the subcritical phase the faulty cluster is not a universal resource for one-way quantum computation.Next we overview our algorithm that concentrates a perfect cluster state from a faulty cluster in the supercritical phase and discuss the efficiency of this algorithm, finding that it scales optimally.Finally, we show that the entanglement width [4,5] is an order parameter for this phase transition in computational power.

A. Non-universality and classical simulatability in the subcritical phase
In the subcritical phase (i.e., p < p c ), the computational power of the resource state is not universal (see the proof by an entanglement criterion in Sec.III C), and indeed any one-way quantum computation on it can be simulated efficiently by classical methods.The key observation is that in the subcritical phase, the largest connected component in the graph is almost surely O(log N ) and its standard deviation is known to be smaller than O(log log N ) and conjectured to be O(1) [17].Since there are at most O(N ) components, the computational subspace has dimension bounded by poly(N ) and therefore can be simulated classically.
Note that efficiency is a crucial issue here, as the size of the largest connected component still grows unboundedly with N , so that with an exponential overhead in  and (c) is supercritical with p = .9.The occupied sites are colored black.The same random seed was used for each phase to facilitate comparison.For (a), which is deep in the subcritical phase, there is no crossing.Similarly, (c) is deep in the supercritical phase and there are many crossings.In (b), we are at the percolation threshold, and there is no vertical crossing, but there are two horizontal crossings.
the resource size, and an exponentially long time to locate the largest component (from the list of holes), we may still be able to implement any quantum computation.However, we only consider a family of resources to be universal if they can be used to generate the output of any quantum computation with polynomial spatial and temporal overhead.

B. Universality in the supercritical phase
In this section, we describe our algorithm for turning a faulty cluster state in the supercritical phase into a perfect hexagonal cluster state.Additionally, we look at the efficiency of this procedure and show that it achieves the optimal scaling (that is, linear in N ).We therefore show that in the supercritical phase the faulty cluster state is a universal resource for quantum computation.

Overview of the algorithm
Our algorithm has two distinct components.First there is a classical processing stage where we identify a subset of qubits in the faulty square lattice whose topological minor is a regular hexagonal lattice.Second, we apply a sequence of quantum measurements to concentrate a true hexagonal lattice state from the identified subset.
It is easiest to explain the quantum part of this algorithm first.Assuming that the classical part of the algorithm has identified a valid subset of qubits, the first step is to simply measure Z on all the qubits outside of this subset, thus disconnecting them from the graph.Now since what is left has a hexagonal lattice for a topological minor, we can measure Y on all the degree-2 vertices in our remaining graph to topologically contract it into a perfect hexagonal lattice, up to outcome-dependent local unitaries.
To construct the classical algorithm, we recall that although Z measurements allow us to remove vertices, we have no way to remove edges between members of our subset.Therefore neighboring qubits in the identified subset cannot have edges that break the topological properties of our subgraph.Because we cannot tolerate such rogue edges, we need to be careful about which qubits we decide to keep in our subset.With these complications in mind, we subdivide the classical part of the algorithm into three parts: path identification, error localization, and correction of local errors.In the first step, we identify O(L) disjoint paths across the lattice, both horizontally and vertically, and ensure that they don't interfere with themselves or their neighbors.Next we ensure that the global topology is that of a hexagonal lattice, modulo local errors that might occur near where horizontal and vertical paths meet.Finally, we eliminate all the remaining local errors.
In summary, our algorithm proceeds as follows: Lattice Each of these steps is elaborated rigorously in the appendix and illustrated in Figure 4, but it is worthwhile to give an informal description of the classical part (steps C.1 -C.3) here.
To identify the O(L) horizontal and vertical paths in step C.1, we use a right-handed wall follower algorithm.Intuitively, this is the method of solving a maze where the person walking through the maze keeps their hand on the right-hand wall at all times.This method finds the right-most (boundary) path in a given faulty lattice, and through successive applications finds a maximal set of disjoint paths which, according to percolation theory, must be size O(L).For practical reasons, we use only a constant fraction of these paths, which can be seen in Figure 4(b).
At this point in the algorithm (C.2) we may have extra edges we don't want in our subgraph.In order to localize these errors to the regions where horizontal and vertical paths intersect, we start by making what is called a bridge decomposition, as in Figure 4(c).Informally, a bridge is a piece of a vertical path that connects adjacent horizontal paths such that it only enters the vicinity of each horizontal path at one point.By throwing away every other bridge we ensure the global topology is that of a hexagonal lattice except for the intersection regions, as seen in Figure 4(d).
Finally in stage C.3 we correct local errors by taking the shortest horizontal path across the local intersection region; see Figure 4(e).It can be shown that this takes care of all remaining superfluous edges.

Efficiency
As mentioned in Section II C, there are almost surely O(L) crossings in both the horizontal and vertical directions.Stage C.1 of our algorithm identifies all of these crossings, and subsequent stages keep, in the worse case, 1/3 of these.This factor of 1/3 comes from the necessity of keeping neighboring paths sufficiently far apart that they don't interfere with each other, as discussed in detail in the appendix.Thus, our final lattice is O(L) × O(L) in spacial extent, which is obviously optimal up to a constant factor.
The expected size of the final perfect lattice depends on how far above the percolation threshold p is.This introduces an overhead which is constant with respect to L, but increases as p − p c approaches zero.We numerically estimated this overhead for all p in Figure 5.
Our algorithm also runs in O(N ) time steps; a careful discussion of this scaling is deferred to the appendix.

C. Phase transition in entanglement width
We would like to characterize the transition to universality as a phase transition, since clearly one occurs Expected number of vertex-disjoint horizontal crossings normalized by the linear size of the lattice L as a function of the site occupation probability p.This is for site percolation on the square lattice in the large L limit.The ideal expected overhead is therefore the inverse of this number, but squared to account for the vertical crossings as well.Due to practical concerns in our algorithm, the actual overhead may differ by a small additional constant factor, as discussed in the text.
at the percolation threshold, but we wish to find an order parameter that has an operational meaning in terms of quantum computation.A likely candidate for such a function is an entanglement measure due to the relationship between entanglement and quantum computation.
We utilize the entanglement width E wd , introduced in Refs.[4,5], to evaluate the amount of entanglement in a resource state.The entanglement width is an entanglement measure that does not increase during a oneway quantum computation (more precisely, it is a type II entanglement monotone in the terminology of Ref. [5]).Basically, it is the bipartite entanglement entropy maximized over all possible partitions induced by a subcubic tree, and then minimized over all such trees.We can take the bipartite Schmidt rank instead of the bipartite entropy as the base of the entanlgement width, since both are equivalent for graph states.
It was shown in Ref. [5] that, in order for a family of Nqubit states to be efficiently universal for one-way quantum computation, it must have an entanglement width that scales faster than polylogarithmic in N .Indeed, the entanglement width behaves as E wd ≥ O( √ N ) for the 2D cluster state or the 2D hexagonal lattice state of total size N , which are efficiently universal 2 .Furthermore, for any state of N qubits the entanglement width has the same upper bound as the entanglement entropy, namely O(N ).A key property of the entanglement width relevant to our analysis is that, for a product state of the whole system, In other words, we need only consider the most entangled connected component to evaluate the total entanlgement.In the subcritical phase, as noted in Sec.III A, the largest connected component is of size O(log N ).Therefore the entanglement width for this component cannot scale greater than O(log N ), and hence this upper bounds the scaling for the entire faulty lattice.On the other hand, in the supercritical phase, our concentration algorithm essentially performs a one-way computation that produces a perfect 2D cluster state of size O(N ), whose entanglement width is lower bounded by O( √ N ).Since the entanglement width is an entanglement monotone which cannot increase during a one-way quantum computation, we have shown that the entanglement width of the original faulty resource state is lower bounded by O( √ N ), as well.Namely, the constant overhead of our algorithm does not reduce the scaling of the lower bound.
The fact that in the subcritical phase E wd ≤ O(log N ) and in the supercritical phase E wd ≥ O( √ N ) indicates that the entanglement width is a proper continuous function that can be taken as an order parameter for the phase transition to universality.The amount of entanglement relevant to the computational power of the resource state drops exponentially at the threshold, and actually below the threshold any measurement-based computation on the resource is found to be simulatable efficiently by classical computers as seen in Section III A.
This phenomenon is surprising, since one might expect the amount of entanglement, or the value of the resource state for computation, degrades gradually according to the imperfection.In this respect, our observation is reminiscent of a classic paper by Aharonov [19] on a quantumto-classical transition in a mixed quantum computer in which an "entanglement length" was shown to change bound of the entanglement width of the 2D cluster state, which was obtained in Ref. [5] using graph theory.The proof consists of two steps.First, it is readily shown that the so-called planar code state can be obtained by local measurements and classical communication with a constant overhead from the 2D cluster state.Second, it has been shown in Ref. [18] that the entanglement width of the planar code state of size N = L × L is lower bounded by √ N , by taking advantage of the recent intensive study on the area law of entanglement.Thus, the lower bound of O( √ N ) holds true for the 2D cluster state, since the entanglement width is an entanglement monotone.This concludes the proof.Note however that this planar code state is an example which illustrates the entanglement criterion is necessary but is not sufficient in general, since measurement-based computation on it was shown to be classically simulatable efficiently [18].
from being infinite to finite at not lower than some percolation threshold (see also [20]).The quantum-to-classical transition in Refs.[19,20] can be seen as a phase transition at a finite temperature, in which the noise destroys quantum coherence making the quantum state highly mixed and therefore useless for quantum computation.
By contrast, our work views the phase transition in light of an operational order parameter which is motivated by quantum computing [4,5], and we consider only pure states.The infinite entanglement-length condition employed in the previous works does not necessarily guarantee the capability of universal quantum computation, despite guaranteeing non-classical states.While our order parameter is also insufficient for guaranteeing universality in general, it has a clear operational meaning, and our algorithm enables us to prove universality explicitly in our model, thanks to its optimal resource scaling.
We note that in order to observe a phase transition in the computational power of the resource states, the selection of a proper entanglement measure was crucial.One might wonder whether other kinds of continuous entanglement measures that are useful in forming necessary criteria for universal resource states can also be used as order parameters.For example, the geometric measure, among the type II measures considered in Ref. [5], is a multipartite entanglement measure widely studied in the literature.It gives the maximum value N 2 for the 2D cluster state of N qubits, as shown in [21].However, this measure is shown to be extensive for the product of graph states; namely E( j |G j ) = j E(|G j ), so that the entanglement in small connected components contributes to the total entanglement.Thus we do not see a drastic change in this measure in the vicinity of the threshold.This is similar to the way the non-universality of the 1D cluster state of N qubits is detected by the entanglement width but not the geometric measure [4].

IV. CONCLUSION
Starting from a faulty L × L cluster state which contains heralded hole defects with probability 1 − p, we showed how to concentrate a perfect O(L) × O(L) cluster state in the supercritical percolation phase using only a polynomial amount of preprocessing.We also showed that quantum computation in the subcritical phase admits an efficient classical simulation.We gave an interpretation of these results by using the entanglement width as an order parameter for the phase transition to universality, occurring at the percolation threshold when the amount of entanglement relevant to the computational power changes exponentially for the system size.
It would be very interesting to consider generalizing our algorithm to include other lattice geometries, in both 2 and 3 dimensions, as well as bond percolation models.While extensions to other 2D geometries seem possible, extensions to 3D might require substantial new ideas because our proof relies heavily on the planarity of the un-derlying lattice.
In closing, we offer the following quote as a poetic description of our algorithm for the supercritical phase.
"In every block of marble I see a statue as plain as though it stood before me, shaped and perfect in attitude and action.I have only to hew away the rough walls that imprison the lovely apparition to reveal it to the other eyes as mine see it."-Michelangelo Legend FIG.6: Illustration of the basic definitions from Section 1.
proper for a hexagonal lattice.A lattice error happens when the global topology is not that of a regular hexagonal lattice.Additionally, the first two error classes are subdivided according to what type of paths or degrees are involved, as explained below.
Closeness errors are subdivided as follows.
• Self-H errors, where a single horizontal path gets too close to itself.Similarly, there are Self-V errors.
• H-H errors, where a horizontal path gets too close to another disjoint horizontal path.Similarly, there are V-V errors.
• H-V errors, where a horizontal path gets too close to a vertical path, except for a single intersection.
Note that valid H-paths have no Self-H or H-H errors (and similar for V-paths).
Degree errors are also subdivided.At the end of the entire algorithm, we want every vertex to be degree 3 (except on the boundary of the lattice, which is dealt with separately).Thus, we need to eliminate vertices of degrees 1,2 and 4. Degree 1 errors correspond to "dangling" qubits while Degree 2 errors correspond to "wires", both of which can be contracted by measuring Y .While these are handled in the quantum stage of the algorithm, Degree 4 errors are handled in the classical stage.By choosing a bridge decomposition, all the closeness errors are localized to the regions near where the vertical and horizontal paths cross.As shown in the text, except for those regions, the global topology is that of a regular square lattice.

Proof for the classical part
As discussed in Section III B 1, the classical part of our algorithm proceeds in three main stages: path identification, error localization, and correction of local errors.After this is complete, we will have identified a subset of the qubits whose topology is that of a hexagonal lattice, and the quantum part of the algorithm (discussed in the next subsection) will contract this lattice into a hexagonal lattice cluster state.
As discussed in subsection 5, we know that there exists O(L) vertex-disjoint H-and V-paths.The wall follower algorithm defined above will necessarily find all these paths since it finds boundary paths [22].For the H-paths, we use the 2-local version of RHWF and for the V-paths, we use RHWF, but keep only every third path 3 .Clearly then we do not have H-H or V-V errors.To eliminate self errors we simply find the shortest path amongst the original vertices and their accompanying internal edge sets, which can only contain degree 1 and 2 vertices and hence no self errors.Taking the shortest path also cannot introduce any closeness errors because we do not add any vertices, we only delete them.Thus we have shown that after stage C.1 of the algorithm we have identified O(L) valid H-and V-paths.
Once this is done, we can find the complete bridge decomposition as defined above.Since we do this by removing vertices while preserving connectivity, this process clearly does not introduce any new closeness errors.This step also localizes H-V errors to the region near the abutments as in Fig. 7.
The next step is to take an alternating bridge decomposition, which is defined as follows.In a j-stripe we can Total order FIG.8: Schematic diagram showing the possible ways that the closures of abutments might intersect.The red line is the horizontal path H j , while the blue lines are the bridges incident on H j for two vertical paths, V k and V k .The solid blue line is associated with the index k, while the dashed line is associated with k .Closures of upper and lower abutments are denoted by black circles.In (a) and (b), we assume the closures of the upper and lower abutments are disjoint, but that the total abutments overlap.In case (c), we treat the possibility that the upper or lower abutment closures themselves overlap.Note that, while the case of complete containment is not illustrated as a sub-case of (c), it is still treated in the text.
delete the bridges B j,k such that j + k has odd parity, which is alternating in the sense that we take alternating bridges as indexed by j and k.We want to show that the alternating bridge decomposition is also alternating in a stronger, topological sense.We do this by showing below that the natural partial ordering on the abutments is actually a total ordering; that is, each pair of abutments along an H-path can be compared.Intuitively, then, the global topology of the lattice is that of a square lattice except for possible errors localized to the abutments.Taking alternating bridges will then clearly give a hexagonal lattice.This intuition is illustated in Fig. 7.
Showing that abutments are totally ordered (as sets) follows from showing that closures of abutments are disjoint.We show that they are disjoint by considering the various ways they might overlap and showing that each cannot occur.This leaves several configurations, as illustrated in Fig. 8.
The cases in Fig. 8( right cannot go any lower without creating a new, further right, bridge.The next furthest V-path must lie along the middle H-path, because if it went any lower, then RHWF would have found that lower path when identifying the middle H-path.(This isn't an issue for the furthest right V-path because it enters the 2-neighborhood of the lowest H-path.)The last existing V-path cannot intersect the others, and so must remain at least as high as shown in Figure 9. Therefore this configuration is exhaustive.
We now show that the configuration in Figure 9 leads to a contradiction, and so case (b.2) cannot occur.Since in stage C.1 of the algorithm, we take every third path, the two black vertical paths necessarily exist and don't contribute bridges.To obtain a diagram like that in Fig. 8(b.2),we would need a fourth vertical path, the assumed dashed blue line, that has the following property: its bridge in the lower stripe must lie to left of the lower blue bridge, while its bridge in the upper stripe must lie to the right of that same lower blue bridge.To form a bridge in the appropriate place in the upper stripe, this assumed fourth path would need to pass through the neighborhood of the middle H-path.But since V-paths aren't allowed to cross, this neighborhood is blocked by one of the deleted (black) V-paths.Therefore, case (b.2) cannot occur.
Figure 8(c.1)breaks into the three non-trivial cases in Figure 10.They are enumerated by the length of the closure of the lower abutment for the solid blue bridge.For case 10(a), where = 1, there is a clear contradiction with the requirement of keeping every third V-path.Likewise for case 10(b), where = 3.For case 10(c), which cover all cases with > 3, it becomes slightly more complicated.The argument that this can't happen is very similar to that discussed above for Figure 8(b.2).The essential point is that keeping every third V-path doesn't leave enough space for this kind of error.Thus, the case depicted in Figure 8(c.1)doesn't happen either.
Finally, we have case (c.2).Since we have kept only every third vertical path, neighborhoods of identified V- In configuration (a), where = 1, there is a clear violation of the requirement that we have kept every third path.In (b), where = 3, regardless of which dashed path is chosen there is again not enough room for two more Vpaths.Finally, in case (c), which covers all > 3, we have the dreaded octopus configuration.paths cannot overlap.For case (c.2) to occur, the horizontal path would have to enter the neighborhood of the dashed blue bridge, then leave it before entering the neighborhood of the solid blue bridge.But in order to create an error like (c.2), it would have to re-enter the neighborhood of the dashed blue bridge.This is a contradiction, since then the H-path would either have to cross itself (eliminated in stage C.1) or a bridge (not possible by the definition of a bridge).
Thus we conclude that the closures of the abutments are indeed disjoint and taking alternating bridges gives a hexagonal lattice structure, up to errors localized to the abutments.In other words, the graph minor achieved by collapsing the region near the abutment has a topological minor which is exactly a regular hexagonal lattice.Thus, if we can transform these regions to have exactly the topology of a single local vertex in a hexagonal lattice, then the quantum part of the algorithm will succeed.Now the only step left for the classical stage is to fix the local H-V errors in the region of the abutments.To do this, we can actually enumerate the possibilities.First observe that all vertices in an abutment are degree 3, other vertices in an H-path are degree 2, and the endpoint (or starting point) of a bridge, e (or s) is either degree 2, 3, or 4.There is no lattice error if there is one vertex in the region near an abutment of degree 3 and the rest are degree 2. Therefore if e has degree 2 there is no problem; the only degree 3 vertex in this local region is the single vertex belonging to the abutment.
In the other cases, where e has degree 3 or 4, we can eliminate the errors in the following manner.First delete everything in the H-path that lies in the closure of the abutment except for the endpoints of the abutment.Then, by adding the endpoint of the bridge to the remaining vertices, we once again have a valid H-path, which additionally has no H-V errors, since the only degree 3 vertex is now the endpoint of the bridge, which is now considered as part of the H-path.
Although we have done this procedure for the endpoints, we can also do it for the starting points.Both of these points can be done separately, since bridges always have distinct starting and ending vertices as a consequence of using the 2-local RHWF.One final subtle point is that, when the reconfiguration is done for both the start and end of the bridge, this might result in an H-H error.Because of the restricted nature of these H-H errors, these errors do not affect the global topology; in fact, an example of this subtlety is present in Fig. 4.

The quantum part of the algorithm
The quantum part of the algorithm is straightforward compared to the classical part.As stated before, we simply measure Z on vertices that were not identified in the classical part, thus disconnecting them.Then we measure Y on the remaining degree 1 or 2 vertices, which will topologically contract the lattice.The only delicate part is the boundary, where we should leave one additional vertex present between each bridge in the H-paths, so that we have a true hexagonal lattice.A valid vertex is always available because we take every third V-path.
We note that these measurements must be performed sequentially, together with conditional single qubit rotations on the neighboring qubits in order to preserve the graph state [15].

The existance of O(L) vertex-disjoint crossings
We argue that we can expect O(L) vertex-disjoint crossings in both the horizontal and vertical directions.Let us consider the event (increasing with respect to p) that there exists a path between the one side and the opposite side in the 2D square grid.Denote by m L the maximal number of vertex-disjoint paths crossing the 2D square grid of size N = L 2 from one side to the other.
According to a basic result in independent percolation, in the supercritical phase p > p c , the event such that at least a single crossing path exists happens with probability P p (m L ≥ 1) ≥ 1 − e −α(p)L , for some α(p) > 0, that is, almost surely in the thermodynamic limit.
The existence of a crossing is stable with respect to changes in any r or fewer sites if there exists at least r + 1 vertex-disjoint crossings.In order to show that the stability is r = O(L) with probability close to one in the thermodynamic limit, we utilize an argument for the stability of an event from Section 2.6 of Ref. [16], in which the following inequality is proved in the bond percolation setting, but is easily adapted to site percolation, as discussed in Section 5 of Ref. [23].We first write r = βL with some spatial overhead β > 0. Then the existence of r + 1 vertex-disjoint crossings is still expected with probability close to one given by

Details of efficiency
In this section we show that each step in the algorithm runs in time at most O(N ).First, RHWF runs O(L) times to find O(L) paths.Each time it finds a path, it will visit any given vertex at most 4 times, since this is the maximum degree of a vertex.Furthermore, each time RHWF is called, it can only visit vertices that are distinct from those visited by any previous call.Since the most number of vertices possible is N , all of the RHWF calls will visit no more than 4N vertices, which is O(N ).The bridge and alternating bridge decompositions again visit at most O(N ) vertices, this time only once, since there is no backtracking.Reconfiguring the regions near the abutments requires only O(N ) steps as well, since it only checks the degrees of the bridge start and end points.Thus, the entire classical part of the algorithm has run time O(N ).The quantum part only requires O(N ) measurements, so the O(N ) scaling holds for the entire algorithm.

FIG. 1 :
FIG. 1: (a) Example of a graph minor; (b) example of a topological minor.Y and Z measurements

FIG. 3 :
FIG.3: Example of site percolation on a 30 × 30 lattice for site probabilities in each of the three phases: (a) is subcritical with p = .3,(b) is approximately critical with p = .592746≈ pc, and (c) is supercritical with p = .9.The occupied sites are colored black.The same random seed was used for each phase to facilitate comparison.For (a), which is deep in the subcritical phase, there is no crossing.Similarly, (c) is deep in the supercritical phase and there are many crossings.In (b), we are at the percolation threshold, and there is no vertical crossing, but there are two horizontal crossings.
FIG. 4: Summary of the algorithm, illustrated for p = .85.Part (a) shows the initial computational resource: a faulty square lattice in the supercritical phase.Lost qubits are left blank, while available qubits are yellow.Part (b) shows the identification of the horizontal (in red) and vertical (in blue) crossings by using a wall-following algorithm, as computed in stage C.1 of the algorithm.Overlapping crossings are in purple.Part (c) demonstrates the bridge decomposition, and (d) the alternating bridge decomposition for these crossings, which comprises stage C.2 of the algorithm.At this point, all of the remaining obstacles to obtaining a perfect hexagonal lattice are localized to the neighborhood where the bridges (in blue) meet the horizontal crossings.Part (e) corrects the remaining local errors; this is stage C.3.Finally, part (f) show stages Q.1 and Q.2, where the identified vertices are isolated by performing local quantum measurements on the remaining vertices.These are either deleted or contracted, until the final state is a hexagonal lattice cluster state.
FIG.5: Expected number of vertex-disjoint horizontal crossings normalized by the linear size of the lattice L as a function of the site occupation probability p.This is for site percolation on the square lattice in the large L limit.The ideal expected overhead is therefore the inverse of this number, but squared to account for the vertical crossings as well.Due to practical concerns in our algorithm, the actual overhead may differ by a small additional constant factor, as discussed in the text.

FIG. 7 :
FIG. 7: Localization of errors, as in part C.2 of the algorithm.By choosing a bridge decomposition, all the closeness errors are localized to the regions near where the vertical and horizontal paths cross.As shown in the text, except for those regions, the global topology is that of a regular square lattice.

FIG. 9 :
FIG. 9: Detailed examination of case (b.2) from Figure 8. Horizontal paths are colored red, and their 1-and 2-neighborhoods are colored different shades of yellow.(We only highlight neighborhoods that are used in the proof.)Vertical paths are denoted by black and/or blue.Stage C.1 of the algorithm keeps only the vertical path with the blue bridges, and stage C.2 keeps only the bridges from this path.There is no room for the dashed line to create a bridge in the upper stripe that would result in an error of the form depicted in Figure 8(b.2).

FIG. 10 :
FIG. 10: Illustration of the configurations that lead to Figure 8(c.1).In configuration (a), where = 1, there is a clear violation of the requirement that we have kept every third path.In (b), where = 3, regardless of which dashed path is chosen there is again not enough room for two more Vpaths.Finally, in case (c), which covers all > 3, we have the dreaded octopus configuration.

P
p (m L ≥ βL) ≥ 1 − e −γ (p)L , (A.5) as long as the reduced exponentγ (p) = α(p c + ) − β log p p − p c − (A.6)is positive and p − p c > > 0. Namely, for a given p in the supercritical phase, we can almost surely expect m L is O(L) with a spatial overhead depending only on p, since β can be chosen optimally over the range of .