Methodology for bus layout for topological quantum error correcting codes

Most quantum computing architectures can be realized as two-dimensional lattices of qubits that interact with each other. We take transmon qubits and transmission line resonators as promising candidates for qubits and couplers; we use them as basic building elements of a quantum code. We then propose a simple framework to determine the optimal experimental layout to realize quantum codes. We show that this engineering optimization problem can be reduced to the solution of standard binary linear programs. While solving such programs is a NP-hard problem, we propose a way to find scalable optimal architectures that require solving the linear program for a restricted number of qubits and couplers. We apply our methods to two celebrated quantum codes, namely the surface code and the Fibonacci code.


I. INTRODUCTION
Since the theoretical demonstration of fault-tolerant quantum information processing, a holy grail of modern physics has been to realize fault-tolerant quantum computing architectures in the lab.While this still remains a very challenging task, many experimental advances have been achieved.Arguably, one can hope to see the first small-size implementations in a near future.
Among the most promising quantum computing platforms, one finds so called topological quantum codes. 1 The main idea is to encode quantum information (in the form of logical qubits) using a large number of physical qubits.The additional degrees of freedom introduced in the Hilbert space then allow the extraction of some information about the errors induced by the environment (the error syndrome) and to correct them without collapsing the stored logical qubit.Furthermore, topological codes are, by definition, immune to local and static perturbations. 1 Most of the topological quantum codes are realizable as a lattice of qubits (some of them might require qudits instead) that are coupled to each other.Depending on the specifics of the quantum code, one qubit might be coupled to several other qubits in its neighborood.In this work, we present a general framework to determine the optimal architecture to couple the qubits of a quantum code.Here we assume that couplers can be introduced between qubits and we identify the coupling architecture that minimizes the total length of the couplers, rendering the physical implementation more practical.Our analysis is valid for any quantum code and we show that this set of optimization problems are identical to well-known binary linear programs.
We apply our formalism to two celebrated quantum codes, namely the surface code 2,3 and the Fibonacci Levin-Wen code. 4,5The former one is a planar version of Kitaev's toric code 6 that is among the most promising quantum computing platforms because of its simplicity and its surprisingly high error threshold of about 1%.The former code is more involved but supports Fibonacci anyons that are universal for topological quantum computation; in other terms every quantum gate can be approximated to any accuracy by braiding Fibonacci anyons.
We think that our work on the surface code is particularly timely since the first set of experiments to build small fragments surface code (with 9 data qubits) have now started. 7It is thus interesting to understand what architecture is optimal and could be realized in the lab.Finally we compare our results for the surface code with previously suggested architectures. 8,9he paper is organized as follows.In Sec.II A we present the physical model under consideration for a generic quantum code as well as the formalization of the optimization problem.In particular, we show that the optimal architecture is found by solving binary linear programs.In Sec.III A we apply the formalism developed in Sec.II A in order to find an optimal architecture for the Fibonacci code.In particular, we present a methodology to find scalable architectures by solving tractable binary linear programs.Section III B finally contains our results for the surface code.

II. CONNECTING QUBITS OPTIMALLY
In this work, we consider Transmon Qubits (TQs) and Transmission Line Resonators (TLRs) as the prototypical examples of physical qubits and moderate distance couplers. 10,11[14][15][16][17][18] A. Model Consider a set of N TQs q 1 , . . ., q N that lie on a twodimensional plane at positions x 1 , . . ., x N .Depending on the specific quantum codes that one wants to realize, see Secs.III for examples, several TQs must interact with each other and thus be coupled through TLRs.As any quantum circuit can be reduced to a succession of singleand two-qubit operations, 19 the most straightforward approach is to introduce TLRs containing each exactly two arXiv:1510.03064v1[cond-mat.mes-hall]11 Oct 2015 TQs; in this way TLRs realize the set P of all two-qubit couplings necessary to implement a given quantum circuit, see Fig. 1.
However, using a new TLR for each pair of qubits that should be coupled to participate in two-qubit gate operations might not be the most optimal approach to this engineering problem.In fact TLRs are able to couple to more than two TQs and we assume that m individual TQs can reside inside the resonant cavity provided by the TLR.Each of the TQs can be controlled separately and coupled to any of the other m − 1 TQs through the TLR.Following recent experimental progress, 20 we find that m 5 is a realistic upper bound.Also, it seems natural to restrict the number p of TLRs that are connected to a single TQ; here we choose p = 5. 21e call an unordered sequence of sites i k ∈ {1, . . ., N } a string S = {i 1 , i 2 , . . ., i m }.The length |S| of a string is defined by the number of sites it contains.To each string S, we associate a number κ S = 0, 1; if κ S = 1, then a TLR is present and hosts the m TQs q i1 , . . ., q im , otherwise no single TLR hosts all those specific m qubits.We denote by S m the set of all strings S with |S| m.We call the vector a TLR scheme.We say that a TLR corresponding to a string S is included in a TLR scheme W m if κ S is one of the elements of the vector W m .We say that a TLR scheme W m contains a TLR associated with string S if it is included and κ S = 1.
In order to formalize the concept of optimal TLR scheme, we introduce a cost C S ∈ R associated with each string S ∈ S m .The cost vector of the scheme W m is then ( Using this notation, the total cost of a given TLR scheme The goal of this work is to determine one TLR scheme W m that minimizes the cost and realizes the set P of two-qubit couplings.In Secs.III we present concrete examples of cost functions for the surface code and for the Levin-Wen model.The problem of finding the TLR scheme W m that has minimal cost is solved by using standard binary linear optimization methods.The problem is formalized as follows: Given a set of two-qubit connections P, and given two integers m and p, find the TLR scheme W m that minimizes the cost C(W m ) T •W m such that 1.For all i j ∈ {1, 2, . . ., N }, 2. W m realizes every two-qubit coupling of P. The solid lines going through the qubits are TLRs.The squares at the end of the solid lines specify the starting and the ending points of the corresponding TLRs.a) Set P of two-qubit couplings required in a given quantum circuit.b) TLR scheme that realizes every two-qubit coupling of a).The two TLRs each contain more than two TQs.
It is worth pointing out again that the maximal number m of qubits per TLR, as well as the maximal number p of TLR per qubit, is fixed.
It is now clear why we call this a binary linear program; every component of the vector W m is either 0 or 1. Solving such a binary linear program is generally very difficult and is in fact an NP-hard problem.However, specific instances of such problems can be tractable, and we give explicit examples below.As a side remark, note that when all the numbers in the program are allowed to be real, then the situation is dramatically simplified and the optimization problem can be solved in polynomial time.
In this work, we use the free software lpsolve, available at http://lpsolve.sourceforge.net/5.5/, to find the optimal solution to the binary linear program defined above.In order to simplify the program, we leave out all the superfluous TLRs.We call a TLR superfluous if it can be replaced by two (or more) TLRs that host no common qubits such that the same set of required twoqubit couplings is realized; one can thus always replace a superfluous TLR by two TLRs that will have a lower overall cost.
As mentioned in the Introduction, we aim to find the optimal architectures for two important quantum error correcting codes, namely the surface code and the Levin-Wen model.We find interesting that such quantum technological problems can be turned into standard optimization problems.

III. APPLICATION TO QUANTUM ERROR CORRECTING CODES
A. Fibonacci Levin-Wen model Levin-Wen models are a class of spin systems defined on trivalent lattices whose excitations realize any consistent (abelian or non-abelian) anyonic theory. 22Here we focus on a particular Levin-Wen model, namely the Fibonacci Levin-Wen model. 4,5Its name takes its origin in the nature of the excitations above the ground states; indeed they are Fibonacci anyons with topological charge τ and fusion rules Here 1 represents the vacuum topological charge.
Considering a trivalent lattice with each edge carrying a spin-1/2 particle, we define the Fibonacci Levin-Wen Hamiltonian, 4,5 where Q v and B p are operators that are respectively associated with vertex v and plaquette p of the lattice, see Fig. 2.
The vertex operator Q v acts on the three qubits residing on the edges that meet at vertex v.If the states of the three qubits on theses edges are |i , |j , and |k , then we have with The plaquette operators are more complicated and involve 12-qubit interactions.Consider the twelve qubits a 1−6 and i 1−6 around a given plaquette p, see Fig. 2b).The plaquette operators are then defined through the golden ratio and where s = 1, τ and For the Fibonacci theory we have 23 The Fibonacci Levin-Wen model is defined on a trivalent lattice.Each edge hosts a spin-1/2 particle (a so-called data qubit) depicted here by a black dot.a) Vertex v where three edges of the lattice meet.The state of the three qubits at the vertex v is |ijk .b) Twelve data qubits (black dots) needed to define the plaquette operator Bp on the trivalent lattice.In order to perform non-demolition measurements of vertex and plaquette operators, one introduces ancillary qubits (green squares).Here α0 is used to measure Bp, while the remaining ancillary qubits α1−6 are used to measure the six vertex operators.This number of additional qubits is appropriate for the plaquette reduction method of Ref. 5.
and all other F 's are trivial.One can then show that the Levin-Wen plaquette and star operators satisfy We define the Fibonacci code 4 F (an example of a stabilizer code) as the ground-state subspace of Hamiltonian (5), namely On a surface with nontrivial topology this ground-state subspace of Hamiltonian ( 5) is degenerate and one uses this set of states to encode logical qubits.A nontrivial operation (a logical error) applied to the logical qubit is implemented by creating pairs of τ -excitations, braiding them, and annihilating them.The logical operation does not depend on the details of the braiding process, but only on its topology; this is in fact the main idea of topological quantum computation. 24Importantly, Fibonacci anyons are universal for quantum computation and any quantum gate can thus be performed in a topologically protected fashion.
Recently, Ref. 5 has shown how to explicitly construct quantum circuits that measure plaquette and vertex operators of the Fibonacci Levin-Wen model; this is required to measure the error syndrome of F and to decide how to perform error correction.Here we go one step further and determine the optimal qubit-coupler architecture to realize those quantum circuits.It is not the goal of the present work to review in detail how vertex and plaquette quantum circuits are constructed.But these circuits indicate which qubits must be coupled and this indicates the binary linear program of Sec.II that is to be solved to obtain the optimal architecture.For the sake of completeness in Fig. 3  We note here that ancillary qubits are needed to perform non-demolition measurements of Q v and B p .According to the plaquette reduction method of Ref. 5, in Fig. 2 the ancillary qubit α 0 is used to measure B p , while the ancillary qubits α 1−6 are used to measure the six vertex operators Q v .
Here we choose the cost function C S that measures the geometric length of the TLR corresponding to where σ is a permutation of m elements.Said differently, C S is the geometric length of the shortest path going through all the TQs specified in the string S. In this work we thus look for the TLR scheme that minimizes the total length of the TLR wires.
Following the plaquette reduction method of Ref. 5 and using the notation of Fig. 2, we present in Table I the set P reduction of two-qubit couplings that are necessary to measure the six vertex operators and the single plaquette operator of Fig. 2.
Having in hand P reduction , we can solve the binary linear program of Sec.II and determine the optimal TLR scheme.The result is summarized in Table II and a pictorial representation is given in Fig. 4.
For completeness, we also investigate the plaquette swapping method of Ref. 25 to measure plaquette operators.In this case, more ancillary qubits are required, see Fig. 5.The set P swapping of two-qubit couplings required by the plaquette swapping method is summarized in Table III.Again, we solve the binary linear program and find the optimal architecture of Table IV; here we have again chosen m = p = 5.As the pictorial representation would be too crowded, we refrain from drawing the TLRs corresponding to Table IV.

Scaling
While binary linear programs can be solved rapidly for a small number of qubits, as is the case for the 12 data qubits of Figs. 2 and 5, the problem becomes rapidly unsolvable when we increase the number of qubits.This seems to be problematic as one wants to find the optimal    II.In a) we show the TLRs that contain five TQs.The length of the arbitrary unit (a.u.) is depicted by the dashed arrow.In b) we show the TLRs that contain three and two TQs.

FIG. 4. Pictorial representation of the optimal architecture of Table
is a lot of redundancy in the problem in the sense that a fundamental circuit unit can be identified and translated over the whole lattice.In fact, if one wants for example to measure all the vertex and plaquette operators of a large Fibonacci Levin-Wen model, the circuit will look the same around any plaquette of the lattice.In such a scenario, it is possible to identify a small number of qubits that we couple optimally and that we translate to cover the whole lattice.The aim of this section is thus to introduce a simple method to optimally solve a given unit cell of the model that can be scaled up by simple translation to build a large two-dimensional lattice, see Fig. 7.For the sake of simplicity, we just focus here on the plaquette swapping method of Ref. 25.In Table V we present the set P 0 swapping of two-qubit couplings that are required between the qubits of unit cell 0, see Fig. 7, and the remaining qubits of the lattice.If one would now straightforwardly solve the binary linear program for the unit cell, as we did in Sec.III A, then one would encounter the problem of equivalent connections, i.e., connections that are doubled due to the shifting of the unit cell.As an explicit example, let us consider the connection between qubits i 0,6 and i 2,5 as well as the connection between qubits i 0,5 and i 5,6 , see Fig. 7.It is straightforward to see that after translating unit cell 0 onto unit cell 5, a TLR will be doubled.In order to avoid such doublings, one needs to slightly modify the algorithm as follows.
• Consider the set P 0 swapping of two-qubit couplings that contains at least one qubit in the unit cell 0.
• Define W as the set of TLR schemes that include all TLRs that are not superfluous with respect to P 0 swapping and all their equivalent TLRs.
Unit Cell k The lattice is obtained by translating the unit cell 0 by the unit vectors v1 and v2.For example, the unit cell 1 is obtained by translating unit cell 0 by −v2.For the sake of clarity, we do not represent all the qubits of the lattice.Instead, we draw and label the data dots) and ancillary (green squares) qubits of a given unit cell k.This qubit layout is appropriate for the plaquette swapping method. 25Out of every set of equivalent TLRs, choose one unique representative TLR.For each TLR scheme W m ∈ W, define an associated TLR scheme B m .This scheme B m includes the same TLRs as W m but contains the following TLRs: All TLRs that do not have an equivalent TLR and are contained in W m as well as all representatives for which W m contains at least one equivalent TLR.We call this new set of TLR schemes B.
• For each TLR scheme B m ∈ B, define a new TLR scheme V m that includes the same TLRs as B m and contains all the TLRs that are contained in B m as well as all equivalent TLRs.
• Perform the linear optimization over B to find a TLR scheme B m that minimizes the cost C(B m ) t • B m such that 1. V m realizes every two-qubit coupling of P 0 swapping .2. For all i j ∈ {1, 2, . . ., N }, Following the above algorithm, we find the scalable optimal architectures presented in Table VI and Fig. 8.

B. Surface Code
The surface code 1 is a planar version of Kitaev's toric code 6 and represents arguably the most promising quantum computing architecture.It is thus justified to determine its optimal architecture using the simple formalism developed in this work, in particular because experimental groups are nowadays starting to build small fragments of the surface code.
Consider a square lattice with a spin-1/2 particle on each vertex, see Fig. 9.We define the star operators A s and plaquette operators B p of the surface code as where s and p label respectively light and dark squares of the lattice, see Fig. 9.Note that plaquette and star operators at the boundaries are products of three qubit operators and not four as is the case in the bulk.Similar to the Fibonacci code, we define the surface code S as 1 a.u.
FIG. 8. Pictorial representation of the optimal scalable solution of Table VI.The TLRs couple qubits inside unit cell 0 to the rest of the lattice.This architecture can be translated to cover the whole lattice without generating doubled TLRs.The TLRs are represented by solid and dashed lines for clarity when they traverse the same path.The squares denote the starting and ending points of TLRs.Note that the four qubit TLR, that contains qubits α0,8, α0,7, α1,4, i0,1 has not be drawn, but instead we have drawn it translated (yellow, dashed) for the sake of a clear figure.
With the boundary conditions represented in Fig. 9, the surface code is twofold degenerate and can thus encode a logical qubit. 1 Similar to the Fibonacci code, the surface code is a topological code and it is thus protected against local (static) perturbations.Its most striking property is its surprisingly high error threshold of about 1%, see Ref. 1 for a detailed review on this subject.
Here we do not review the construction of quantum circuits to measure star and plaquette operators of the surface code, rather, using the notation of Fig. 9, in Table VII we show the set P 0 surface of two-qubit couplings required to measure the eigenvalues of A s and B p in a scalable manner. 26As was the case for the Fibonacci code, we need to introduce ancillary qubits to measure plaquette and star operators non-destructively.
Solving the binary linear optimization problem with m = 5, we find the scalable optimal TLR scheme reported in Fig. 10.The result is that each bulk TLR hosts four TQs and each bulk TQ is hosted by two TLRs.Interestingly, this result is the one originally proposed in Ref. 8, see also Ref. 9. We point out that the optimal architecture of Fig. 10 is clearly valid for the smallest possible surface code (consisting of 13 data qubits and 12 ancillary qubits) able to detect and correct a single  9. Pictorial representation of the surface code.Data qubits reside on the vertices of the lattice and are here depicted by black dots.Products of data qubits around dark (light) squares correspond to plaquette (star) operators.The green squares are ancillary qubits necessary to measure plaquette and star operators in a non-demolition fashion.We choose the unit cell 0 (dashed square) to generate the whole lattice by translations.The two data qubits and the two ancillary qubits of a unit cell are labeled as shown in the figure.This choice of boundary conditions leads to a twofold degeneracy of the surface code S in Eq. ( 18).

Distance 5 surface code
As a final relevant explicit example, we consider a surface code that can correct two physical errors.While the surface code depicted in Fig. 9 would contain 41 data qubits and 40 ancillary qubits in order to detect and cure two physical errors, there are simple methods to reduce the number of qubits while keeping the distance the same. 27Such modifications are important for small-scale implementations of surface codes in a near future; indeed FIG. 10.Optimal scalable TLR scheme for the surface code.The problem is first solved for the couplings between qubits of unit cell 0 and the rest of the lattice, and then we have translated the result to cover the whole lattice.This results is equivalent to the one originally proposed in Ref. 8. The TLRs are represented by solid lines and the squares denote the starting and ending points of TLRs.Note that rotating each individual four-qubit TLR by 90 degrees leads obviously to another optimal solution.The two-qubit TLRs on the edges and the three-qubit TLRs on the corners (purple) have been put by hand, since a full optimization solution of a smaller surface code lead to such a pattern of boundary two-and three-qubit TLRs.Indeed, it seems clear that that this solution at the boundaries remains optimal for a larger surface code.
there is clearly an intention to realize a quantum code that requires the smallest possible amount of resource.Here we follow the approach of Ref. 27 and consider the rotated surface code of Fig. 11.The qubits that are part of the rotated code reside inside the black square and some of the boundary ancillary qubits are also incorporated to measure the boundary stabilizers.As was shown in Ref. 27, such rotated surface code can correct two logical qubit errors although it possesses many fewer than 41 data qubits, in fact it consists only of 25 data qubits and 24 ancillary qubits.Furthermore, one can do slightly better by requiring not each stabilizer to have its individual ancillary qubit but instead by re-using an ancillary qubit to measure several stabilizer operators.We thus remove the 14 ancillary qubits with a (yellow) cross in Fig. 11.
We can now solve the linear binary program and find the optimal architecture given in Fig. 12.The black dots represent data qubits and the green squares ancillary qubits.The rotated surface code 27 contains all the qubits inside the solid square as well as the ancillary qubits surrounded by a black line.In this case, the rotated surface code contains 25 data qubits and 24 ancillary qubits; each ancillary qubit is used to measure exactly one stabilizer.However, one can slightly improve the resource needed by re-using ancillary qubits; we associate many of the ancillary qubits to more than one plaquette and star operator measurements.We thus remove the ancillary qubits with a yellow cross.Here we list which qubits replace the crossed qubits in the syndromecomputation circuit: qubit 2 is replaced by qubit 3, qubit 5 is replaced by qubit 6, qubit 7 is replaced by qubit 8, qubit 10 is replaced by qubit 11, qubit 13 is replaced by qubit 14, qubit 15 is replaced by qubit 16, qubit 17 is replaced by qubit 1, qubit 18 is replaced by qubit 3, qubit 19 is replaced by qubit 4, qubit 20 is replaced by qubit 12, qubit 21 is replaced by qubit 16, qubit 22 is replaced by qubit 14, qubit 23 is replaced by qubit 14, qubit 24 is replaced by qubit 6.

IV. CONCLUSIONS
In this work we have developed a methodology to find optimal architectures for quantum codes.Our starting point is to consider a two-dimensional lattice of transmon qubits that interact with each others over moderate dis-tances by coupling them to transmission line resonators.For each layout, we define a cost that allows to designate an optimal scheme.We show that finding such optimal scheme reduces to solve standard binary programs.What optimal means here depends obviously on the choice of a cost function.While we decided to choose to optimize over the total length of transmission line resonators for the Fibonacci and surface codes, our formalism is general enough to be straightforwardly applicable to many other codes and cost functions.In particular, we show how to apply our method to a restricted set of qubit and couplers that can be scaled up to a large two-dimensional structure.
FIG. 12. Optimal TLR scheme for the rotated surface code of Fig. 11, able to detect and correct two physical qubit errors.The TLRs are represented by solid lines with starting and ending points depicted by squares.

V. ACKNOWLEDGMENTS
We are happy to thank N. Breuckmann and B. Criger for useful discussions.We are grateful for support from the Alexander von Humboldt foundation and QALGO.

FIG. 1 .
FIG.1.Two-dimensional lattice of qubits (black dots).The dashed lines between qubits represent two-qubit couplings.The solid lines going through the qubits are TLRs.The squares at the end of the solid lines specify the starting and the ending points of the corresponding TLRs.a) Set P of two-qubit couplings required in a given quantum circuit.b) TLR scheme that realizes every two-qubit coupling of a).The two TLRs each contain more than two TQs.

FIG. 3 .
FIG. 3. Figure reproduced with permission from Ref. 5: Quantum circuit for the plaquette reduction method.a) Full circuit for the plaquette reduction method to calculate the value of the plaquette operator Bp.The numbering of the qubits is that of Fig. 2b).The individual gates of the circuit are detailed in b).b) Each element of the circuit in a) is reduced to X-gates, S-gates, single qubit rotations R(ρ ŷ) by an angle ρ along the y-axis, controlled-X gates, controlled-S gates, and Toffoli gates.

9 FIG. 6 .
FIG. 6. Figure reproduced with permission from Ref.25.Quantum circuit for the plaquette swapping method of Ref. 25.The qubits labeling is the one of Fig. 5.The individual elements of the circuits can be found in Fig. 3.

6 FIG. 7 .
FIG.7.Trivalent lattice on which the Levin-Wen model is defined.The lattice is obtained by translating the unit cell 0 by the unit vectors v1 and v2.For example, the unit cell 1 is obtained by translating unit cell 0 by −v2.For the sake of clarity, we do not represent all the qubits of the lattice.Instead, we draw and label the data dots) and ancillary (green squares) qubits of a given unit cell k.This qubit layout is appropriate for the plaquette swapping method.25

24 FIG. 11 .
FIG. 11.Pictorial representation of the rotated surface code.The black dots represent data qubits and the green squares ancillary qubits.The rotated surface code 27 contains all the qubits inside the solid square as well as the ancillary qubits surrounded by a black line.In this case, the rotated surface code contains 25 data qubits and 24 ancillary qubits; each ancillary qubit is used to measure exactly one stabilizer.However, one can slightly improve the resource needed by re-using ancillary qubits; we associate many of the ancillary qubits to more than one plaquette and star operator measurements.We thus remove the ancillary qubits with a yellow cross.Here we list which qubits replace the crossed qubits in the syndromecomputation circuit: qubit 2 is replaced by qubit 3, qubit 5 is replaced by qubit 6, qubit 7 is replaced by qubit 8, qubit 10 is replaced by qubit 11, qubit 13 is replaced by qubit 14, qubit 15 is replaced by qubit 16, qubit 17 is replaced by qubit 1, qubit 18 is replaced by qubit 3, qubit 19 is replaced by qubit 4, qubit 20 is replaced by qubit 12, qubit 21 is replaced by qubit 16, qubit 22 is replaced by qubit 14, qubit 23 is replaced by qubit 14, qubit 24 is replaced by qubit 6.
Length of the TLR wire Qubits contained inside the TLR wire 2.52 a.u.

TABLE II .
Information about the optimal TLR scheme obtained by solving the binary linear program for the measurement of the plaquette operator Bp and the six vertex operators Qv of Fig.2, following the plaquette reduction method of Ref.5.In particular, all the two-qubit couplings of P reduction in Table I are realized: there are no more than five TQs in each TLR, and each TQ couples to maximally four TLRs.A pictorial representation of this TLR scheme and of the arbitrary unit (a.u.) is given in Fig.4.

TABLE III
The data qubits of the Fibonacci Levin-Wen model are represented by black dots.This qubit layout is appropriate for the plaquette swapping method of Ref.25.The ancillary qubits, necessary to perform non-demolition measurements of plaquette and vertex operators, are represented by green squares.

TABLE IV .
The optimal TLR scheme obtained by solving the binary linear program for the measurement of the plaquette operator Bp and the six vertex operators Qv of Fig.5, following the plaquette swapping method of Ref.25.In particular, all the two-qubit couplings of Pswapping in TableIIIare realized: there are no more than five TQs in each TLR, and each TQ couples to maximally four TLRs.