OOn Quantum Weight Reduction
M. B. Hastings
1, 2 Station Q, Microsoft Research, Santa Barbara, CA 93106-6105, USA Microsoft Quantum and Microsoft Research, Redmond, WA 98052, USA
We give a general procedure for weight reducing quantum codes. This corrects a previouswork[Has17], and introduces a new technique that we call “coning” to effectively induce high weightstabilizers in an LDPC code. As one application, any LDPC code (with arbitrary O (1) stabilizerweights) may be turned into a code where all stabilizers have weight at most 5 at the cost of at mosta constant factor increase in number of physical qubits and constant factor reduction in distance.Also, by applying this technique to a quantum code whose X -stabilizers are derived from a classicallog-weight random code and whose Z -stabilizers have linear weight, we construct an LDPC quantumcode with distance ˜Ω( N / ) and ˜Ω( N / ) logical qubits. An LDPC quantum code is a code (more precisely, a family of codes) in which every stabilizer acts on O (1)qubits and every qubit participates in O (1) stabilizers. A natural goal is to construct LDPC quantum codes withlinear distance and rate; classical codes with such properties are called “good” and many constructions of themare known. For quantum LDPC codes, there are several constructions achieving distance N / polylog( N ) basedon ideas from topology [FML02] and higher-dimensional expanders [EKZ20a, KT20]. Finally the N / polylog( N )barrier was broken. A construction based on fiber bundles[HHO20] achieved distance Ω( N / / polylog( N )). Then,another construction gave linear distance up to polylogs with logarithmically many logical qubits[PK20], allowingconstruction of codes with distance N − α/ up to logs and N α logical qubits for any α ∈ [0 , N − α/ and N α logical qubits, at least for α ∈ [4 / , ω ( N / ) have fairly high weight stabilizers: while the weights are O (1), the actual numbers are quitelarge. By weight reduction, we can construct new codes with stabilizer weights bounded by some universal quantitieswhich are small O (1) numbers, paying only a constant factor multiplicative cost in rate and number of physicalqubits . Second, in this paper we give a construction of a code with distance N − α/ and N α logical qubits (upto polylogs) for α ∈ [2 / , X -stabilizers and high weight Z -stabilizers. It is perhaps rather surprising that such a different constructiongives similar scaling as those constructions above, which are instead based on (generalized) products of complexes.This similarity could perhaps be interpreted as evidence that there is some fundamental limit to distance and rate ofquantum LDPC codes and that these codes are reaching this limit; alternatively, it could be interpreted optimistically,that further improvements may be possible. A third conjectural application is to other constructions of good quantumcodes which are almost, but not quite, LDPC. As an example, consider the homological product codes of [BH14]; thesecodes have linear distance and rate and square-root weight stabilizers and are constructed by a homological product oftwo random codes. If one could change them into linear distance and rate codes on N qubits in which every stabilizerhas weight O ( N β ) (and every qubit participates in O ( N β ) stabilizers) by taking a homological product of a largernumber of codes, then for some sufficiently small β this would imply code with record breaking properties of distanceand rate. A fourth application is to implementing logical Clifford operations on existing high distance codes. While,for example, the toric code with logical qubits encoded using punctures has a well-defined methodology to implementlogical operations by measuring products of logical qubits by operators which encircle multiple punctures, we do nothave a general procedure to do logical Clifford operations on arbitrary codes. We will see that weight reduction allowsthis.From one point of view, it is perhaps not surprising that some kind of weight reducing technique should exist. Thereis a general procedure to turn quantum codes into manifolds, first hinted at in [BH14] and then later fully developedin [FH]. This procedure uses the stabilizers of the quantum code to define a chain complex, and then reverse engineers However, constructions based on products and twisted products of classical codes including [HHO20, PK20, BE20] as well as [TZ14]can be weight reduced more simply using the classical weight reduction of [HHO20] which has the further advantage of being a chainhomotopy equivalence with bounded Lipschitz constants. a r X i v : . [ qu a n t - ph ] F e b some scheme for attaching handles using that chain complex. This gives a cell decomposition of some manifold, andthe manifold can be given a metric. If the quantum code is LDPC, then the resulting cell decomposition has a boundedgeometry: every cell attaches to O (1) other cells. If the quantum code is not LDPC, then every code attaches tomany cells; however, one might expect that one could refine the cellulation, decomposing each cell into many smallercells, so that every cell only attaches to O (1) other cells, and then define an LDPC quantum code from the resultingrefinement of the cellulation. One might hope that if the initial code is close to LDPC (so that, for example, thepower β in the above paragraph is close to 0), then the qubit overhead entailed by the refinement would not be toolarge.However, to put this abstract idea into practice encounters some obstacles. For one thing, the procedure to turn acode into a manifold requires a “lifting”[FH] of the code to a chain complex over Z , and we do not know how such alifting might change the appropriate norm of the rows and columns of the boundary operator: a close that is “almostLDPC” might lift to some very non-sparse chain complex. For another thing, this idea is fairly abstract, and forpurposes of weight reducing a code, we would like a concrete procedure: the refinement needed would depend greatlyon the geometry used to attach the various cells in the procedure of [FH]. Finally, we would like to do the weightreduction in as optimal a way as possible.At the same time, there is one key factor working in our favor, namely, while we can draw inspiration from geometricideas like “refining a cellulation”, we have no obligation to do the weight reduction in a way that makes sensetopologically. Roughly speaking, all we care about is that our various manipulations do the right thing homologicallyon certain chain complexes, without any need that those chain complexes come from cellulations of a manifold.A previous paper that I wrote on weight reduction[Has17] claimed to give a procedure for weight reduction, butZ¨emor has pointed out an error in one of the lemmas. This paper corrects the error in that lemma; other lemmasin that paper are correct, including distance balancing and the operation described here as thickening. With theerror corrected, the techniques of that paper do not suffice to do weight reduction, but we introduce a new techniquethat makes weight reduction possible. Using this technique and a more careful analysis, we further find that wecan apply weight reduction to a very simple code, a code whose X -stabilizers are low weight, being chosen as the X -stabilizers of a classical (logarithmic) density parity check code, and whose Z -stabilizers are high weight, beingchosen uniformly at random from operators that commute with the given X -stabilizers, to obtain an LDPC code withdistance ˜Ω( N / ) and ˜Ω( N / ) logical qubits. By tensoring our code with hypergraph product codes[TZ14] (i.e., bydistance “unbalancing” and then balancing), we can attain (up to polylogs) the scaling of distance and rate givenabove for any α ∈ [2 / , A. Notation and Definitions
Throughout when we say quantum code, we mean a CSS code.Let us define some parameters of a quantum code. We consider a quantum code with N qubits, and N X , N Z X -and Z -type stabilizers; when we refer to “stabilizers” throughout, we mean generators of the stabilizer group. Let K be the number of logical qubits.Assume each qubit participates in at most q X X -stabilizers and at most q Z Z -stabilizers. Let w X denote themaximum weight of an X -stabilizer, i.e., the maximum number of Pauli operators in such a stabilizer. Let w Z denotethe maximum weight of a Z -stabilizer. Let d X , d Z denote the X and Z distances of the code, i.e., the minimal weightof the least weight X -type and Z -type logical operator.We will assume that all parameters w X , q X , w Z , q Z are ≥
1, as if any of these parameters is 0 then we have aclassical code.In the language of chain complexes, we have a 2-complex with three vector spaces A , A , A over F , with preferredbases, with basis elements (called cells) corresponding to Z -stabilizers, qubits, and X -stabilizers, and with boundaryoperators ∂ , ∂ where ∂ j is a linear map from A j to A j − . All chain complexes in this paper are over F ; we usethe term 2-complex to indicate that it has 0-, 1-, 2-cells, but this is a purely algebraic construction, rather thantopological; no assumption is made, for example, that a 1-cell has two 0-cells in it boundary.We sometimes say that a 1-chain (we do not distinguish between chains and cochains) corresponds to a certain Z -type or X -type operator. This is done in the obvious way: it is the product of Pauli Z or X on qubits whichwhose coefficient in that chain is equal to 1. We will freely switch between the terminology of chains and operators,depending on what is most natural.The column weight of ∂ is bounded by q X and the row weight is bounded by w X . Similarly, the row weight of ∂ is bounded by q Z and the column weight is bounded by w Z . Every nontrivial representative of H has weight at least d Z and every nontrivial representative of H has weight at least d X .The construction is simplest in the particular case of a code that has the property of being reasonable . To definethis, for every subset Q of qubits of the code, let G Q be the bipartite graph with left vertices corresponding to qubitsin Q and right vertices corresponding to stabilizers with support on a qubit in Q , with edges if a stabilizer acts on agiven qubitLet supp( · ) denote the support of an operator.Then, a code is reasonable if, for every stabilizer S , the graph G supp( S ) has the property that, for every connectedcomponent of the graph, the product of Pauli Z -operators over qubits corresponding to left vertices of the componentis in the stabilizer group.A code has the stronger property of being connected if, for every stabilizer S , G supp( S ) is connected.Given a reasonable code, we can choose different stabilizers (i.e., different generators of the same stabilizer group)to make the code connected: replace each stabilizer S with one stabilizer for each connected component of G supp( S ) .Then, remove redundant stabilizers S for which G supp( S ) is not connected. Indeed, this can only help reduce w Z ; thiscannot increase w Z or q Z . For example, if a code on two qubits has stabilizers Z and Z Z it is reasonable but notconnected; however, we can replace the stabilizers with Z and Z to get a reasonable code with the same stabilizergroup.Being reasonable is a natural property. Indeed, if it does not hold, then there is some Z -logical operator whosesupport is contained in the support of some Z -stabilizer. So, if the Z distance is grater than or equal to the largeststabilizer weight, then the code is reasonable.There is one interesting possible application of “unreasonable” codes. Suppose one has some code encoding severallogical qubits. Then suppose one wishes to impose some additional constraint on those logical qubits, say ˜ Z ˜ Z ,without separately imposing ˜ Z or ˜ Z , and one wishes to do it by adding low weight stabilizers rather than directlyadding some high weight logical operator. This might be useful for preparing some interesting resource state. Wediscuss this further later. B. Outline
We are going to give a “toolkit” for weight reduction, comprised of several different ways of transforming a code.The first two we call “copying” and “gauging”. Despite our use of the term “gauging”, this has nothing to do withgauge qubits in subsystem codes; it does involve introducing extra physical qubits to split stabilizers, but all codes arestabilizer, not subsystem. We handle these two together, as implementing them in the same step can reduce overhead.The others are called “thickening” and “coning”.Copying and gauging are, at their heart, operations on a classical code. We illustrate them by their action on the X -stabilizers, but of course they can be done dually on the Z -stabilizers. They can reduce q X , w X to O (1), but theyunfortunately increase w Z , and may impact the distance. The gauging operation was in lemma 1 of [Has17]; this wasthe lemma with an error in it, corrected here.Thickening was already introduced in [Has17], under the name Z -type qubit splitting. This is an operation thatreduces q Z (or, dually, q X ). This has the advantage that it reduces q Z without impacting the other parameters w Z , w X , q X (to be precise, a large q X on the code input to thickening can lead to a large w Z on the output code, butotherwise the impact on other parameters is minimal). Indeed, thickening increases d X , though it does this at thecost of increasing N .Coning is a new operation. It can reduce w Z , again with minimal impact on other parameters. This coningoperation is an essential part of weight reduction. It is the main conceptual contribution of the weight reductionof this paper. This general construction uses two new key ideas, first the mapping cone from topology as a way toeffectively induce stabilizers, and second, a way of adding additional relations to kill unwanted homology using recentresults on cycle bases in graphs. We explain an example using the toric code where this coning process reduces toa familiar geometric construction of “filling in holes”. The mapping cone in a sense gives us a way to “fill in holes”even when there is no obvious geometry for general codes.Coning is a general procedure to weight reduce Z -stabilizers, but this can also be thought of as adding additional“nonlocal” operators to a code. That is, suppose one has some code that is already LDPC, and one wishes to add astabilizer that is one of the logical operators of the code (thus, forcing a logical qubit to take a certain value); coninggives one a procedure to do this by adding some extra qubits and low weight stabilizers. Thus, this may have someapplication in measuring logical operators in arbitrary LDPC quantum codes; we leave this for future work.In Section IV, we will show that given these operations, any code can be weight reduced to an LDPC, with anincrease in N and decrease in distance by a factor polynomial in w X , w Z , q X , q Z . However, we give all the tools here,as it seems difficult to say in advance what may be the most effective way to weight reduce a given code. One mightuse the various tools in different sequences.In Section V, we apply this weight reduction procedure to construct an LDPC code with distance ˜Ω( N / ).In Section VI, we show how to improve the “coning” construction, so that one of the important parameters of thatconstruction (called “soundness”) can be improved, which in turns can improve the distance of the resulting code.This is not needed for Section V, but is given if it may be useful later. Further, as we remark in Section VI, theimproving soundness procedure allows a partial derandomization of the construction of Section V. I. COPYING AND GAUGING
Copying is a simple technique to reduce q X (or, dually, q Z ). We sketch this briefly, since we will give a detailedexplanation later when combining it with gauging. Simply concatenate a code with a repetition code on q X qubits inthe X -basis, where the repetition code has stabilizers X X , X X , . . . , X q X − X q X . This increases the Z -distance ofthe concatenated code, while leaving the X -distance unchanged, and increases the number of qubits. Unfortunately,it increases the Z -stabilizer weight, because Z -operators of the original code get replaced by logical Z -operators ofthe repetition code, i.e., products of Z over q X qubits. However, it can reduce q X : for each qubit of the original code,for each X -stabilizer acting on that qubit, we can choose a distinct representative of the logical X -operator. In thiscase, a representative of logical X in the repetition code is simply X on a single qubit. Thus, this reduces q X to atmost 3: one stabilizer of the original code, plus at most two stabilizers of the repetition code.By combining copying and “gauging” we can get a new code with w X , q X ≤ X -stabilizers in Section I A, and then explain how tochange the Z -stabilizers in Section I B. The operation on the X -stabilizers is essentially the same as weight reducing aclassical code[HHO20]. The operation on the X -stabilizers will increase the number of qubits and increase the weightof the Z -stabilizers.Throughout this section, the “original code” is the code before weight reducing, and the “ X -reduced code” is thecode constructed in this section. We will then in subsequent sections apply additional operations to the X -reducedcode to get a final weight reduced code. A. New X -Stabilizers The procedure to reduce q X can be understood intuitively as making several copies of each qubit in the X -basis,adding X -stabilizers to enforce that they are copies, and having different copies participate in different X -stabilizers,,while the procedure to reduce w X can be understood as the dual.For each qubit q of the original code, the X -reduced code will have q X qubits, labeled by a pair ( q, j ) where j ∈ { , . . . , q X } . Similarly, for each X -stabilizer s of the original code, if the stabilizer acts on d s ≤ w X bits, the X -reduced code will have d s X -stabilizers, labelled by a pair ( s, k ) where k ∈ { , . . . , d s } . We add also q X − X -stabilizers for each qubit q ; label these additional stabilizers by a pair [ q, j ] for j ∈ { , . . . , q X − } . Further, add d s − X -stabilizer s ; label these additional qubits by a pair [ s, k ].We will call qubits and X -stabilizers labelled by pairs [ s, k ] and [ q, j ] the “new” qubits and stabilizers. The otherqubits and X -stabilizers are labelled by pairs ( q, j ) and ( s, k ), and are called the “copied” qubits and stabilizers. Wesay that ( q, j ) and [ q, j ] are “associated” with q and ( s, k ) and [ s, k ] are “associated” with s .Thus, if the original code has N qubits and N X X -stabilizers, the X -reduced code has O ( N + N q X ) = O ( N q X )qubits and O ( N + N q X ) = O ( N q X ) X -stabilizers.We now specify the X -stabilizers. Each stabilizer [ q, j ] is a product X ( q,j ) X ( q,j +1) . Each stabilizer ( s, k ) is as follows. Suppose stabilizer s was a product X q X q . . . X q ds . Then, we have( s,
1) = X [ s, X ( q ,j s, ) (1)1 < k < d s → ( s, k ) = X [ s,k − X [ s,k ] X ( q k ,j s,k ) ( s, d s ) = X [ s,d s − X ( q ds ,j s,ds ) . We choose the sequences j s,k so that each qubit is in at most 3 stabilizers: at most 2 new stabilizers, plus one other.We can explain this in the language of boundaries also. The stabilizer [ q, j ] has qubits ( q, j ) and ( q, j + 1) in itscoboundary. Similarly, the qubit [ s, k ] has boundary ( s, k ) + ( s, k + 1) for each k . Finally, for each qubit q and eachstabilizer s , such that s was in the boundary of q , we pick some j ∈ { , . . . , q X } and some k ∈ { , . . . , d s } and then( s, k ) will be in the boundary of ( q, j ), choosing j, k so that each qubit has at most 3 stabilizers in its boundary andeach stabilizer has at most 3 qubits in its coboundary. B. New Z -Stabilizers We now explain how to choose the Z -stabilizers of the X -reduced code. For each Z -stabilizer S of the original code,there will be some Z -stabilizer ˜ S of the X -reduced code, and these will be the only Z -stabilizers of the X -reducedcode.We now specify ˜ S . Let S be some given Z -stabilizer of the original code, with S = Z q Z q . . . Z q w for some w . Forevery qubit q of the original code, define ˜ Z q = q X (cid:89) j =1 Z ( q,j ) . (2)To motivate this, recall that we have, in the previous subsection, “copied” each qubit in the X -basis, and this ˜ Z is alogical operator of a repetition code.Let ˜ S = ˜ Z q ˜ Z q . . . ˜ Z q w G, (3)where we next define the operator G so that ˜ S commutes with all stabilizers.We now define G . Each qubit Q a that S acts on may in turn also be in some X -stabilizers. Let X ( S ) denote theset of X stabilizers which are in the boundary of some qubit which is in the boundary of S . Let G = (cid:89) s ∈ X ( S ) G s , where G s is as follows. Since s commutes with S by assumption, there are an even number of qubits which are inthe support of both S and s . Denote these qubits by q s, , q s, , . . . Each of these qubits is in the coboundary of somestabilizer of the X -reduced code which is associated with s . Let q s,a be in the coboundary of stabilizer ( s, j a ). Orderthese qubits so that j < j < . . . . For each pair of successive qubits, q s, n +1 , q s, n +1 for n = 0 , , . . . , define a “string”which is a product of operators Z [ s,j n ] Z [ s,j n +1] . . . Z [ s,j n +1 − . Let G s be the product of these strings.Then, indeed, the Z -stabilizers of the X -reduced code commute with all the X -stabilizers. C. X -Reduced Code Properties Let parameters with a tilde (such as ˜ w X , ˜ d X , . . . ) denote the corresponding parameters of the X -reduced code.The following lemma corrects lemma 1 of [Has17]. In particular, item 5 corrects an error in that one.Also, lemma 1 of [Has17] only did the “gauging” part of this construction, not the copying. We have combinedthem here: while copying does increase w Z (due to the need to replace Z operators of the original code by higherweight logical Z operators of the concatenated code), this weight increase is negligible compared to weight increasesthat are caused by the gauging operations. So, there is no reason not to do both at once. Lemma 1.
The X -reduced code has the following parameters:1. ˜ N = O ( N q X ) .2. ˜ K = K .3. ˜ w X , ˜ q X = O (1) .4. ˜ q Z ≤ max( q Z , w X q Z ) .5. ˜ w Z ≤ q Z q X (1 + w X ) . ˜ d Z ≥ d Z q X .7. ˜ d X ≥ d X Ω(1 /w X ) .Proof.
1. Shown previously.2. We have increased the number of qubits but also increased the rank of the X -stabilizer group by the sameamount.3. Immediate from construction of the code.4. For any copied qubit of the X -reduced code, a Z -stabilizer acts on that qubit iff the corresponding Z -stabilizerof the original code acts on the qubit of the original code associated to that copied qubit. Hence, the maximumnumber of Z -stabilizers acting on those qubits is bounded by q Z . For any new qubit [ s, k ] of the X -reducedcode, a Z -stabilizer ˜ S of the X -reduced code can only act on that qubit if s is in X ( S ). Hence, the maximumnumber of Z -stabilizers acting on those qubits is bounded by w X q Z . Hence, ˜ q Z ≤ max( q Z , w X q Z ).5. The weight of each ˜ Z equals q X , so the weight of ˜ Z q ˜ Z q . . . ˜ Z q w is bounded by w Z q X . The weight of G is equalto the sum over s ∈ X ( S ) of the weight of G s , which in turn is bounded by w X . The cardinality of X ( S ) isbounded by w Z q X . So, the weight of G is bounded by w Z q X w X . So, ˜ w Z ≤ w Z q X (1 + w X ) .
6. It is useful to define two additional stabilizer groups. First, consider the subgroup of the X -stabilizer group(of the X -reduced code) consisting of all stabilizers supported on the copied qubits. Call this group G XS , thesubscript standing for “shortened”, in analogy to the idea of a shortened code in coding theory. Second, considerthe group G ZP (the subscript stands for “punctured”) of products of Z -operators acting on the copied qubitsobtained by “forgetting” the action of Z -stabilizers on the new qubits, i.e., an operator is in G ZP iff it can bemultiplied some product of Z -operators on the new qubits such that the product is in the Z -stabilizer group.Note that G ZP and G XS commute with each other; further, they are the stabilizer group of the original codeconcatenated with a repetition code in the X -basis. Consider any Z -logical operator L . This operator is aproduct of two operators L C L N where L C acts only on the copied qubits and L N acts only on the new qubits.If L C is the identity, then L N must be also. Note that L C must commute with G XS . Further, we can multiply L C by any element of G ZP , changing L N in some way, and the result is a multiplication of L by an element ofthe stabilizer group. Hence, if L is nontrivial, then L C must be a nontrivial logical operator of the concatenatedcode. Hence, the weight of ˜ L must be at least d Z q X .7. Consider any nontrivial Z -logical operator. This operator is a product of two operators L C L N where L C actsonly on the copied qubits and L N acts only on the new qubits.If L N is the identity, it is easy to see that the weight of L C must be at least d X . We can multiply L by anelement of G XS , which leaves L N equal to the identity but changes L C . The operator L C must commute with G ZP . Hence, L C must be a nontrivial logical operator of the concatenated code and so must have weight at least d X .Suppose instead L N is not equal to the identity. However, by multiplying L by a product of copied stabilizers,we can turn L N into the identity, increasing the weight of L by a factor of at most w X . II. THICKENING
We now explain how to reduce q Z . This is the same as in [Has17], and we mostly reproduce the results there, withsome added discussion. A. Thickening Construction
This step is done in two substeps. In the first step, we take some code C (in this case, C is the code obtainedfrom the previous section after reducing the X -stabilizers). We write that code as a chain complex C , associating X -stabilizers with 0-cells, qubits with 1-cells, and Z -stabilizers with 2-cells (this shifts the dimension by 1 from theconvention used in [Has17], where qubits were associated with 2-cells). We take the homological product of thiscomplex C with a chain complex E corresponding to a cellulation of an interval; E has only 0-cells and 1-cells in itschain complex. This step may be geometrically interpreted as “thickening” the complex, by taking its product withan interval. The resulting product complex is called D and the product code is called D .In the second step, we observe that there is a large redundancy among the Z -type stabilizers of D : Z -type stabilizersat different values of the coordinate in the direction of the interval differ only by a product of other stabilizers. Letus call this coordinate in the interval direction the “height”. This can be understood as a result of the homologicalproduct: the chain complex E has 1-cells, and as a result the product C ⊗ E has 3-cells which encode redundanciesamong the Z -stabilizers of D . This allows us to remove many of the stabilizers in D and obtain a code ˜ C withsmaller q Z . Geometrically, one may view this as follows: since the complex has been thickened, we can attach thecells corresponding to stabilizers at different heights, to avoid attaching too many to any given cell.To define E , fix an integer integer, (cid:96) >
1. Define chain complex E ∂ E → E , where dim( E ) = (cid:96) and dim( E ) = (cid:96) − ∂ E =
11 11 1 . .. .. . . (4)This chain complex can be interpreted geometrically as a cellulation of an interval, with (cid:96) (cid:96) −
1) 1-cells.We have b ( E ) = 0 , b ( E ) = 1.By the K¨unneth formula, this code D has the same number of logical qubits as C does. This code has N l + n X ( (cid:96) − (cid:96)n X X -type stabilizers.We now define the code ˜ C . This code ˜ C will have the same number of qubits and X -type stabilizers as D does.This code will be obtained by taking a subset of the Z -type stabilizers of the stabilizers of D , while taking all of the X -type stabilizers. What we will show is that although we take only a subset of the Z -type stabilizers, the code ˜ C will have the same stabilizer group as D .Recall that the Z -type stablizers are in one-to-one correspondence with basis elements of D = C ⊗ E ⊕ C ⊗ E .We keep all Z -type stabilizers corresponding to basis elements of C ⊗ E . However, for each, basis elements of C , wekeep only one Z -type stabilizer in C ⊗ E . Let w , . . . , w (cid:96) be basis vectors for E in the standard basis. For each basiselement v ∈ C in the standard basis, we pick one integer k , with 1 ≤ k ≤ (cid:96) , and we keep the stabilizer correspondingto v ⊗ w k .In the following lemma, ˜ K refers to the number of logical qubits of ˜ C , while various ˜ w X , ˜ w Z , ˜ q X , ˜ q Z refer to theappropriate parameters of ˜ C .Note item 7, showing that the distance increases by a factor of (cid:96) . This increase in distance is the same as that fromdistance balancing in [Has17].Remark: this thickening technique is essentially the same as the distance balancing in [Has17], using an extra trickof “choosing heights” to reduce q Z . It improves X -distance while increasing number of physical qubits and worseningrate since the number of logical qubits in unchanged. So, the reader might wonder whether we can do thickening in away more similar to [EKZ20b], that would reduce q Z while leaving the rate unchanged. We do not see any way to dothis, however: the reduction in q Z depends on a particular form of redundancy among the Z -stabilizers which wouldnot be present in the distance balancing of [EKZ20b]. However, we leave this as an open problem. Lemma 2.
The code ˜ C has the following properties:1. All stabilizers commute with each other. ˜ N = N l + n X ( (cid:96) − and ˜ n Z = n Z + ( (cid:96) − N and ˜ n X = (cid:96)n X .2. Codes ˜ C and D have the same stabilizer group. Explicitly, for each Z -type stabilizer of the form Z q Z q . . . Z q w in C , the stabilizer group of ˜ C contains Z ( q ,m ) Z ( q ,m ) . . . Z ( q w ,m ) for all ≤ m ≤ (cid:96) .3. ˜ K = K .4. ˜ w X = w X + 2 if (cid:96) ≥ and ˜ w X = w X + 1 if (cid:96) = 2 .5. ˜ w Z = max( w Z , q X ) .6. ˜ q X = max( q X , .7. ˜ d X = (cid:96)d X .8. ˜ d Z = d Z .Proof. This is lemma 2 in [Has17].
B. Choosing Heights
The value of ˜ q Z will depend on which stabilizers Z ( q ,k ) Z ( q ,k ) . . . Z ( q w ,k ) we choose to include. If we keep the same k for all Z -type stabilizers of C , then we have no improvement in ˜ q Z . However, if we choose different k for differentstabilizers then we can reduce ˜ q Z by making different stabilizers act on different qubits ( q, k ). As shown in [Has17],for any desired ˜ q Z , we can attain a code with that ˜ q Z by choosing large enough (cid:96) . The following lemma gives upperbounds on how big an (cid:96) is needed. Lemma 3.
Let w be any positive integer. For (cid:96) sufficiently large that e (cid:18) q Z w + 1 (cid:19) ( 1 (cid:96) ) w +1 min( q Z w Z , N ) (cid:96) ≤ , (5) there is a choice of k for each Z -type stabilizer of C such that ˜ q Z ≤ max( w + 2 , w X ) . (6) Proof.
This is lemma 3 in [Has17].The relation between ˜ q Z and w is as follows: the lemma shows that there is a choice of k for each Z -type stabilizerof C such that each qubit corresponding to basis element of C ⊗ E is in at most w different stabilizers correspondingto basis elements of C ⊗ E . Additionally, each qubit a corresponding to basis element of C ⊗ E is in at most 2stabilizers corresponding to basis elements of C ⊗ cE . There are also qubits corresponding to basis elements of C ⊗ E . These are in at most w X stabilizers corresponding to basis elements of C ⊗ E .Let us make some comments on this lemma. First, note that one might have guessed that it would suffices to take (cid:96) proportional to q Z in order to attain ˜ q Z = O (1). The reasoning behind this would be, roughly: “if each qubitsparticipates in at most q Z different stabilizers, then if I thicken by an amount (cid:96) ∼ q Z , I can put each stabilizer at adifferent position.” Unfortunately, the lemma is slightly weaker than this, and this rough reasoning is not correct.However, the lemma is not much weaker. Fix any ˜ q Z = O (1). Assume that the code C that is input to thisprocedure has already been copied and gauged so that w X = 3. So, one may take (cid:96) = O ( q w +1 w Z min( q Z w Z , N ) /w ) , with w = ˜ q Z −
2. Hence, we have
Lemma 4.
For any (cid:15) > , we can pick ˜ q Z = O (1) with (cid:96) = O ( q (cid:15)Z min( q Z w Z , N ) O ( (cid:15) ) ) . Also we have
Lemma 5.
We can pick ˜ q Z = O (1) with (cid:96) = q Z w Z + 1 .Proof. This follows from a relationship with graph coloring. Considering a graph with vertices corresponding tostabilizers, with two vertices neighboring if share a qubit in their support. This graph has degree ≤ q Z w Z and so canbe colored with at most q Z w Z + 1 colors.The proof of lemma 3 is probabilistic. It relies on the Lovasz local lemma. If one is willing to accept a constantfactor increase in (cid:96) , then there are efficient algorithms to find the needed choice[MT10].Also, if one is will to work with the slightly weaker result that such a choice of k for each Z -type stabilizer existswhenever (cid:0) q Z w +1 (cid:1) ( (cid:96) ) w +1 N (cid:96) < O (1) , then the proof of the lemma shows that choosing the k independently and uniformlyat random will work with probability Ω(1).We also remark that lemma 3 can be understood in terms of a variant of a standard problem in graph theory,called “strong hypergraph coloring”[AH04]. In graph coloring, one has a graph, and one must color each vertex fromsome number of colors so that for every edge, both vertices attached to that edge have different colors. In hypergraphcoloring, a hyperedge may have more than two vertices, and so there are several possible coloring problems. In stronghypergraph coloring, the requirement is that every vertex in a hyperedge must have different colors.To relate these, consider a hypergraph, where hyperedges correspond to qubits of C and vertices correspond to Z -stabilizers of C . The vertices in each hyperedge are the set of Z -stabilizers acting on that qubit. Then, a coloringwith at most (cid:96) different colors corresponds to a choice of k for each Z -stabilizer of C . The case w = 1 correspondsto a strong hypergraph coloring. It is possible[str] that such a strong hypergraph coloring can require a number ofcolors of order the vertex degree times the hyperedge degree, i.e., (cid:96) = Θ( w Z q Z ). However, what we see is that fromlemma 4 is that by considering colorings in which, for every hyperedge, no color in that hyperedge is repeated morethan w times, we can use a number of colors that is closer to q Z . III. CONING
We mostly consider the case of reasonable codes as that is the simplest and most important one. In Section III C,we consider the case of “unreasonable” codes.In Section III B, we give an illustration of the procedure here in a simple case related to the toric code. This mayhelp clarify it. We also give some geometric interpretation.At this point, we need some definitions from homological algebra. Throughout this section, all chain complexes willbe over F . First we need: Definition 1.
Given two chain complexes A , B , with corresponding boundary operators ∂ A , ∂ B , a linear map f : B →A is called a chain map if it commutes with the boundary: ∂ A ◦ f = f ◦ ∂ B . We recall the definition of the mapping cone of a chain map. Here the chain map is assumed to preserve degrees,so that it maps B j to A j . Definition 2.
Given a chain map f : B → A , the cone of f , written Cone( f ) , is the following chain complex. Thevector space Cone( f ) j is defined to be A j ⊕ B j − , and the boundary operator is defined by ∂ ≡ (cid:18) ∂ A f ∂ B (cid:19) . (7)One useful example of a cone is when A = B and the map f is the identity map. In this case, all homology groupsof Cone( f ) are trivial. To see this, consider some j -chain u = x j ⊕ y j where x j ∈ A j and y j ∈ B j − . Then if ∂u = 0,we have ∂y j = 0 and ∂x j = y j . This implies that u is a boundary: it is the boundary of the ( j + 1)-chain given by0 ⊕ x j . This is a special case of a more general result: if the map f induces an isomorphism on all homology groups,then all homology groups of Cone( f ) are trivial[ncl].We now describe the construction to reduce Z -stabilizer weight using a cone. We first construct a code we callthe “cone code”; this code will have reduced Z -stabilizer weight but unfortunately doing this may create large X -stabilizer weight and q X While this may seem to merely delay the problem, the particular way in which the code codeis constructed means that it will be easy to reduce the weight of those X -stabilizers by a process explained later.Consider some quantum code C . Let C (cid:48) be some code that contains the same qubits as C , and contains the same X -stabilizers as C , but has only some subset of the Z -stabilizers. These will, in most applications, be stabilizers of C which are already low weight, and do not need to be weight reduced. We will call these the “direct stabilizers”. Theconing construction will be used to “induce” the remaining stabilizers.Let A be the chain complex corresponding to C (cid:48) We now construct a complex B . The complex has − B as describing aclassical code with the 0-cells being checks, the 1-cells being bits, and the − B is given by B = ⊕B i . Before defining the B i , we define some complexes B i from which the B i are constructed.The chain complex B i has 0-cells and 1-cells (no − B i defined later is given by adding additional − B , while constructing some boundary operator ∂ ; this is done to kill the zeroth homology of B i . Definition of B i : Let Q , Q , . . . , Q m , for some integer m , be some sequence of sets of qubits of the given code.If we are using the code constructed after a previous “thickening” step, we will often choose the Q i to be subsets ofqubits corresponding to basis elements of C ⊗ E rather than C ⊗ E , simply because there may be no need to weightreduce the other elements.Choose these sets Q i such that, for every i , the product of Pauli Z operators on all qubits in set Q i commutes withall X -stabilizers of the code. The chain complex B i will have 1-cells labeled by elements of Q i .For each set Q i , define a set S i as follows. Each S i will be the set of X -stabilizers of the quantum code which havesupport on at least one qubit in Q i . Each stabilizer in S i must in fact have support on an even number of qubits of Q i by assumption. If we have weight reduced those stabilizers so that they have weight 3, then indeed each stabilizerin S i must have support on two qubits of Q i . If we have not weight reduced in this way, then we need to make onemore set of choice: for each stabilizer in S i , “pair off” the qubits in Q i on which that stabilizer has support in someway. That is, if some stabilizer has support on k qubits in Q i , we find k/ B i will be in one-to-one correspondence with a tuple consisting of, first, an element of S i , and,second, one of these pairs; we write such a tuple ( S, j ) where S ∈ S i and j labels a pair.The boundary operator of the chain complex B i will be the obvious one: the boundary of a given 1-cell consists ofall tuples ( S, j ) such that the corresponding qubit is in the given pair.0This chain complex then corresponds to a classical code, with bits corresponding to 1-cells, and with checks corre-sponding to 0-cells, such that every check acts on two bits.If B i has trivial zeroth homology, then we take B i = B i . While the case that B i does not have trivial zerothhomology is the most interesting one, the reader may, on first reading, want to skip the definition of B i and simplyassume that B i does have zeroth homology, in order to understand in the simplest case how the coning constructiongives the desired result.Let us sketch what this “desired result” is. For each i , the complex B i has some first homology. By assumption,the sum of all 1-cells is an element of first homology, but there may be other elements. Each such element of firsthomology corresponds to some subset of qubits of the code C . The coning construction will “effectively” induce, foreach such subset, Z -type stabilizer given by the product of Pauli Z -operators on that subset.Remark: assuming that the code is reasonable, we then choose, for each Z -stabilizer of the code, one set Q i equal tothe support of that stabilizer. If the code is not reasonable, then potentially this choice will not produce the originalcode but rather will increase the stabilizer group by adding some Z -logical operators to the stabilizer group.We define B i to have 1-cells corresponding to qubits in Q i , 0-cells corresponding to X -stabilizers in S i , and theboundary operator is defined in the obvious way from the quantum code: the matrix element of the boundary operatorof B i from the cell corresponding to a qubit q ∈ Q i to a cell corresponding to an X -stabilizer x ∈ S i is equal to thematrix element of the boundary operator of A from the cell corresponding to q to the cell corresponding to x . Wedefine B i to have some set of − ∂ mapping 0-chains to − − ∂ will be given later. We however assume that the boundaryoperator is such that B i has trivial 0-th homology. Choice of Chain Map
Define, for each i , a chain map f i : B i → A in the obvious way: it maps each j -cell in B i for j ∈ { , } to the corresponding j -cell in A i . If we have, for some stabilizer in S i , more than one pair, we map alltuples ( S, i ) for S ∈ S i , to the 0-cell corresponding to S .Define a chain map f i : B i → A = f i ◦ Π i , where Π i : B i → B i maps every 0-cell or 1-cell in B i to the correspondingcell in B i and vanishes on − B = ⊕ i cB i , and define a chain map f : B → A by f = f i f . . .f m . Definition 3.
The cone code for the given Q , . . . , Q m , and S , . . . , S m , B i , and C is the code corresponding to Cone( f ) . We will compare this cone code to another code.
Definition 4.
The induced code for the given choices of sets Q i , of pairings, and of C , is a code with the same qubitsand X -stabilizers as C , and with the set of Z -stabilizers given by the Z -stabilizers of (cid:48) as well as, for every element offirst homology of each B i , the product of Pauli Z -operators over qubits corresponding to that element of first homology.For each i , we say that the stabilizers induced by B i are those given by elements of first homology of B i .We call the Z -stabilizers of the induced which correspond to Z -stabilizers of C (cid:48) the direct Z -stabilizers and we callthe other Z -stabilizers the induced Z -stabilizers. The cone code is not necessarily LDPC, but it may have some improved properties of Z -stabilizer weight, dependingon C . We ater apply y a further transformation to the cone code, defining a “reduced cone code”, so that the resultis LDPC assuming certain properties of C . Construction of B i : We now construct the B i . As mentioned, the reader may wish to skip this on first readingand proceed to lemma 8, taking every occurrence of B i in that lemma to be B i and assuming that B i has trivial firsthomology. For notational simplicity, fix some i , and let F = B i . We will construct some F and let B i = F . Write S = S i and Q = Q i .From F , construct a graph G i as follows. Each edge corresponds to a 0-cell in B i each vertex corresponds to a1-cell in B i . An edge attaches two vertices when the corresponding 0-cell is in the boundary of the two corresponding1-cells.The induced code can then be expressed very simply in terms of these graphs: for each connected component ofthe graph G i , the product of Pauli Z operators over all qubits in that component is a Z -stabilizer of the inducedcode, and those are the only stabilizers induced. We next show in Lemma 6 that we can make a choice so that thereis one induced stabilizer for each connected component of the graph G Q defined at the start of this paper, with thatstabilizer being the product of Pauli Z -operators over qubits corresponding to left vertices of that component. Wewill always make such a choice.1For notational simplicity, we will refer to G i simply as G in this part of the construction, and refer to Q i as Q .The following lemma guarantees the existence of pairings with certain properties. We always make such a choice. Lemma 6.
It is possible to choose the pairing so that the graph G has the same number of connected componentsas the graph G Q . Putting the connected components into one-to-one correspondence, we can choose the vertices ofa given connected component of G to correspond to the same qubits as the vertices of the corresponding connectedcomponent of G Q Proof.
For brevity, we identify vertices of G with vertices of G Q that correspond to the same qubits, i.e., we say that G, G Q have the same vertex sets but different edge sets. Pick any pairing. All the vertices in a given connectedcomponent of G must be in the same connected component of G Q . Pick any connected component C of G Q . Supposethat corresponds to more than one connected component of G , called D , D , . . . Then, there must be two differentconnected components of G , called D, D (cid:48) , with vertices v ∈ D and v (cid:48) ∈ D (cid:48) such that some stabilizer has support onboth v and v (cid:48) . Modify the pairing, by pairing v, v (cid:48) with each other on that stabilizer (and pairing the vertex that waspaired with v with the one that was paired with v (cid:48) ). This reduces the number of connected components of G . Repeatuntil the conclusions of the lemma hold.Elements of zeroth cohomology of F correspond to closed 1-chains on this graph G .By the decongestion lemma[FH], we can find a basis of simple cycles for the zeroth cohomology of F of weight O ( n log( n )) where n = | Q i | . Further, each edge appears in the basis at most O (log( n ) ) times.We construct B i by adding a − B i for each cycle in such a basis. The coboundary of the given − Geometric Interpretation of Added − -cells: We can give a geometric interpretation of the added − G i , we can extend that graph to a 2-complex we call S i with trivial first homology by attaching a2-disc to each cycle in the basis. Then, vertices, edges, and faces of that 2-complex become 1-, 0-, and − B i respectively. When constructing the cone code, these get shifted in dimension by 1 to become 2-, 1, and 0-cells. Thus,in a sense the dimensions appear “upside down”: the j -cells of S i become (2 − j )-cells in the cone code. A crucialproperty for use later is that each 1-cell in S i has exactly two 0-cells in its boundary. Reducing the Cone Code:
There is no upper bound on the length of a cycle other than the trivial upper boundthat it has length at most | Q i | ; indeed, if the graph G is a cycle graph, then this is the length of a cycle on that graph.This means that the coboundary of a − B i may have weight | Q i | , and hence we may produce X -stabilizers ofthe cone code with weight up to | w Z | (of course, there may also already have been some high weight X -stabilizers incode the induced code).Further, it is possible that a given edge in G i attaches to polylogarithmically many 2-discs in S i if that edge appearsin many cycles in the cycle basis. This can lead to a 1-cell in the cone code having polylogarithmically many 0-cellsin its boundary.However, both these problems can be solved. We describe the procedure to solve them. The result we call the“reduced cone code”.To solve the second problem, let us say an “added j -cell” of the cone code is a j -cell corresponding to ( j − B i . Thicken the cone code (dually, i.e., interchanging X and Z ), and then choose heights for the added0-cells so that at most one such added 0-cell attaches to each 1-cell. Here we are using thickening only to reduce thenumber of added 0-cells which attach to 1-cells, and we are not concerned with the number of other 0-cells attachingto a 1-cell. So, for any (cid:15) >
0, this can (by the same argument as Lemma 4) be done by thickening by an amountΘ(log( | w Z | ) (cid:15) | w Z | (cid:15) ); that is, here | w Z | plays the role of N in lemma Lemma 4.To solve the first problem, consider the subcomplex consisting just of a single added 0-cell of the cone code, theadded 1-cells in its coboundary, and the added 2-cells in their coboundary. Call that subcomplex D . Consider a singlecycle in some graph G i . Consider the cycle graph containing just the edges in that cycle. Regard that graph as a1-complex and attach a 2-disc whose boundary is that cycle; call the result E . Then, D and E are the same complex,up to a change in the dimension of cells, so that j -cells in E corresponding to (2 − j )-cells in D , and up to transposingthe boundary operator. However, it is easy to see geometrically how to make E sparse, so that every cell in E hasonly O (1)-cells in its boundary and coboundary: simply cellulate the added 2-disc. For example, labeling the vertices0 , , , . . . , w − j and w − j for all j with 0 < j < w − j . A. Comparison of Reduced Cone Code and Induced Code
We now compare the reduced cone code and the induced code.2Finally, let us define a soundness factor λ i . Since each B i has trivial zeroth homology, any closed 0-chain u ∈ B i equals ∂v for some 1-chain v ∈ B i . Define λ i by λ i = max u ∈ ( B i ) ,u (cid:54) =0 (cid:16) min v ∈B i ,u = ∂v | u || v (cid:48) | (cid:17) , where | · | denotes Hamming weight, and where v (cid:48) is the projection of v into B i .The soundness factor λ i can be lower bounded in terms of the Cheeger constant of the graph G i . If a graph G isconnected, define Let h ( G ) = min w, < | w |≤| V | / | ∂ T w || w | , where the minimum is over all vertex chains w with Hamming weight > | V | /
2, where V is the set ofvertices of the graph G . This is the usual definition of a Cheeger constant: the ratio is the familiar ratio of numberof edges which are adjacent to one vertex in w to the number of vertices in w , except we have used ∂ T rather that ∂ (as is more common notation in graph theory) to be consistent with notation in terms of complexes.If the graph G is not connected, we define its Cheeger constant to be the minimum of the Cheeger constants of itsconnected components.Then: Lemma 7. λ i ≥ h ( G i ) . (8) Proof.
Let v be some choice of 1-chain in the definition of λ i , with v (cid:48) the projection of v on B i . Without loss ofgenerality, assuming | v (cid:48) | ≤ | V i | /
2, where V i is the vertex set of G i ; if | v (cid:48) | > | V i | >
2, add the sum of all 1-cells to v ,which does not change ∂v .Suppose for some edge of G i , v vanishes on one vertex attached to that edge, but is nonvanishing on the othervertex attached to that edge. Then ∂v equals 1 on the 0-cell corresponding to the given edge. Let w be the vertexchain on the graph corresponding to v (cid:48) so | w | = | v (cid:48) | ; then | ∂ T w | is lower bounded by h ( G i ) | w | and | u | ≥ | ∂ T w | .We have Lemma 8.
Let (cid:15) > . Let (cid:96) = Θ(log( | w Z | ) (cid:15) | w Z | (cid:15) ) . Let parameters without a tilde denote parameters of the inducedcode. Let parameters with a tilde denote parameters of the reduced cone code. Let w (cid:48) Z denote parameters of code C (cid:48) .Then,1. ˜ N ≤ O ( N + (cid:80) i | Q i | q X ) (cid:96) .2. ˜ K = K .3. ˜ w Z ≤ q X + 1 + w (cid:48) Z + O (1) .4. ˜ q Z ≤ q Z + O (1) .5. ˜ w X = max( w X , O (1)) .6. ˜ q X = max( q X , O (1)) .7. ˜ d X ≥ d X .8. ˜ d Z ≥ d Z λ(cid:96) , where λ = min(1 , min i λ i ) ≥ min(1 , min i h ( G i )) . Here, by vertex chain, we mean a 0-chain on the graph. We use the term vertex chain because we want to refer to 0-cells of the graphas vertices. Proof.
It is convenient to consider two more codes. In each complex S i , cellulate all the added 2-discs at once, (usingthe same cellulation as done for each individual disc when defining the reduced cone code) to define some complexwe call ˆ B i . Then, define ˆ B = ⊕ i ˆ B i and define a code by coning with the obvious chain map from ˆ B to A . Call theresulting code the celled code. Thicken the celled code by the same amount as in defining the reduced cone code, andcall the result the thick celled code.Thus, one can think of the thick celled code as having, for every cellulated 2-disc in the reduced cone code, manycopies of that cellulated 2-disc. Let d label various discs in the reduced cone code, and let d , d , . . . denote thecorresponding copies of that disc in the thick celled code. For any 1-chain in the thick celled code, for any disc d , wecan add boundaries or coboundaries to push the chain off all the cells in the interior of all but one copy d a . In thisway, the chain can be turned into a chain that vanishes except on cells in the reduced cone code. Hence the thickcelled code has the same number of logical qubits as the reduced cone code and the distance of the reduced cone codeis at least as large as the of the distance of the thick celled code, as every chain in the cone code defines in an obviousway a chain in the thick celled code. In turn, the X -distance of the thick celled code is that same that of the celledcode, while the Z -distance is increased proportional to the amount (cid:96) we thicken.So, in all proofs of distance, we will prove distance of the celled code, and the result for the reduced cone code willfollow.For notational convenience, let Q i denote the space ( B i ) ), let X i denote the space ( B i ) . Let ˆ Q i denote the space( ˆ B i ) ), let ˆ X i denote the space ( ˆ B i ) , and let ˆ R i denote the space ( ˆ B i ) − , where Q, X, R refer to “qubit, X , relation”.Let Q ⊥ i , X ⊥ i denote the subspaces of ˆ Q i , ˆ X i which vanish on Q i , X i , so ˆ Q i = Q i ⊕ Q ⊥ i and similarly for ˆ X i .Given a space such as Q i , we write Q [ −
1] to denote the space in Cone( f ) corresponding to Q , and similarly for allother spaces defined in the paragraph above. Here the − D , define the complex D [ −
1] to have its ( j + 1)-cells in one-to-one correspondence with j -cells of D , and withthe boundary operator defined in the obvious way.We have:1. There are N A . Each graph G i has at most | Q i || q X | edges giving a total of N + (cid:80) i | Q i | q x ) 1-cells,which gets multiplied by (cid:96) after thickening. We must also account for cells in the interior of each attached disc.This weight is at most O ( | Q i | log( | Q i | )) and does not get multiplied by (cid:96) because every such disc gets attachedat only one height.2. This follows from the proof of item 7 below.3. Each Z -stabilizer in B i corresponds to some qubit q in some set Q i , as well as some height along the intervalused to thicken. The cells in its boundary comprise three possibilities. First, the 1-cell in A corresponding tothat qubit q at the given height. Second, any 1-cells in B i corresponding to X -stabilizers in the boundary of thatqubit q at the corresponding height, and there are at most q X such X -stabilizers. Third, if a disc is attachedat the given height, possibly some 1-cells in the interior of that disc, but there are only O (1) such 1-cells. Thedirect Z -stabilizers have weight bounded by w (cid:48) Z .4. By construction of the cellulation of the disc, every edge in the cellulation has one O (1)-vertices in its boundary.Every qubit in the cone code corresponding to some 1-cell of A is in its at most q Z stabilizers of the cone code.5. All X -stabilizers correspond either to X -stabilizers of A , which have weight bounded by w X , or − B i ,which are constructed to have weight O (1).6. By construction, same as item 5.7. Consider the celled code. Any 1-chain u in Cone( f ) is a sum of a 1-chain q in A and some 0-chains in ˆ X i . This1-chain q has an obvious projection q i onto Q i . For each i , for the coboundary of u to vanish, there must besome chain v in X i such that ∂ T v is equal to q i . To see this, note that there is some chain v in ˆ X i such that ∂ T v = q i . If the coboundary of u vanishes on Q ⊥ i , we can add a coboundary of a chain in R i to v so that theresult is supported in X i . To see this, regard v as an edge chain . This edge chain v may have some support onedges of graph G in the interior of the attached disc which themselves attach to vertices in G i . However, if thechain is closed in the interior of the discs, we can add boundaries of faces of G i to remove its support on thoseedges, pushing the chain off the discs. Then, for the coboundary of u to vanish on Q i , indeed there must besome chain v in X i such that ∂ T v is equal to q i . An edge chain is our term for a 1-chain on S . q must correspond also to a coclosed chain in the chain complex corresponding to the induced code,i.e., an X -logical operator of the induced code. Conversely, if q is a coclosed chain in the chain complex of theinduced code, then such a chain v does exist. Further, such a chain v is unique up to adding coboundaries of achain in R i because each B i has trivial zeroth homology.By adding coboundaries of elements of A , we can shift q by X -stabilizers of the induced code. This shows˜ K = K : given q , u is unique up to coboundaries, by adding coboundaries in the cone code, q can be shiftedby coboundaries in the chain complex of the induced code, and q must be coclosed in the chain complex of theinduced code.Further, if u is nontrivial, then q is nontrivial, and so in that case | u | ≥ d X .8. Consider the celled code. Let u be any closed 1-chain in Cone( f ), u = u q + (cid:80) i u x , where u q is in A and u xi ∈ B i [ − . By assumption that B i has trivial zeroth homology, we can add a boundary of some v qi ∈ B i [ − to u , giving some chain u (cid:48) whose projection onto B i [ − vanishes. We can choose further | v qi | ≤ | V i | /
2, as ifnot, simply add the sum of all cells to v qi . By assumption on soundness, | u (cid:48) | ≤ | u | /λ .So, u (cid:48) must correspond to a closed chain of the induced code. Further, by adding a boundary of v qi , where v qi isthe sum of all 2 cells in B i [ − u (cid:48) by a stabilizer of the induced code. Hence, if | u (cid:48) | ≤ d Z , we canadd stabilizers to make u (cid:48) = 0. Hence, if u is a nontrivial logical, | u | ≥ d Z λ . B. Examples With Toric Code and Geometric Interpretation
Let us give a simple example of coning. We emphasize to the reader that this example may be too simple . It showshow coning works, and it shows how in this particular example coning corresponds to a familiar construction with thetoric code; however, the reader should not be misled into thinking that in general coning has such a simple geometricinterpretation.Consider a toric code, i.e., a code defined by some cellulation of a surface, with X -stabilizers, qubits, and Z -stabilizers associated with 0-, 1-, and 2-cells, respectively. Suppose we choose, however, a strange cellulation of thesurface in which one of the faces is a polygon with n -sides for some very large n . We wish to induce this stabilizer,with other Z -stabilizers being direct Z -stabilizers. Label qubits corresponding to edges on the boundary of this faceby integers j ∈ { , . . . , n − } . There are n X -stabilizers of the form X j X j +1 . . . , where the index j is taken to beperiodic in n so that X n = X , and the dots . . . indicates other qubits in the support of the stabilizer, other thanthose which correspond to edges of this face. We wish to induce the Z -stabilizer Z Z . . . Z n − . See Fig. 1, A.Let Q be the set of qubits correspoding to edges of this polygon. The complex B has nontrivial first homologygroup. Indeed, the sum of all 1-cells has vanishing boundary. So, to follow the construction above, we need toconstruct B . Suppose, however, that we did not do this, and used B rather than B to construct the mapping cone.Let us see what goes wrong.We will find that we have now an additional n qubits, one for each vertex on the polygon. Label these addedqubits by j for j ∈ { , . . . , n − } . Then, the stabilizers X j X j +1 . . . are replaced by X j X j +1 X j . . . in the cone code.Additionally, we have Z -stabilizers Z j Z j +1 Z j +1 for each j .This is a familiar result: it is a puncture in a toric code with so-called “rough” boundary conditions around thepuncture. This may increase the degeneracy of the ground state: if we create more than one such puncture, it willincrease the degeneracy, but a single such puncture does not. See Fig. 1, B.So, indeed we must construct B . In this case, we have a single redundancy in X -stabilizers of B . Adding thisredundancy, we find that the cone code adds one more X -stabilizer: (cid:81) j X j . See Fig. 1, C.The result is again a toric code, but now with a large X -stabilizer weight. This weight can be reduced in weight bycellulating the added disc in S . It is a nice exercise to see that (because of the interchange j ↔ (2 − j ) of dimensionof cells between S i and the cone code) the cellulation of a disc in S means that the reduced cone code is a toric codewith the dual cellulation (in the of a dual graph) used to resolve the high weight X -stabilizer. See Fig. 1, D.This example also shows the importance of the soundness factor λ . In this case, the soundness factor λ is of order1 /n . To give an example where this factor correctly estimates the effect on distance, consider a toric code given by acellulation of an L -by- L torus (so that there are K = 2) logical qubits, using the usual cellulation with square 2-cells.Remove an m -by- m patch of squares (including removing the edges inside the patch), and replace that patch with asingle large face, i.e., adding the product of Pauli Z operators on edges around that patch as a Z -stabilizer. This is ourdesired induced code. Then, this is precisely the situation considered above, with m ∝ n . The toric code with squarecells has distance L . Removing that patch and replacing it with a single face can reduce the distance d X because acoclosed 1-chain can take a “shortcut” going directly across the patch; indeed, if we had many such patches, we could5 A)C) B) D) FIG. 1: A : part of a cellulation of a toric code. We show a polygon representing a high weight Z -stabilizer. B : The resultwith “rough” boundary conditions if we use B rather than B in the cone construction. Solid lines represent qubits, verticesrepresent X -stabilizer. There are Z -stabilizers on triples of lines inside the polygon, corresponding to two neighboring edgesentering the polygon and one edge in the polygon between those edges. The dashed line shows the graph G . The edges ofthis graph correspond to 0-cells of B and the vertices (shown as solid circles) correspond to 1-cells. C: Cone code with oneadditional high weight X -stabilizer. Note the relation with a dual cellulation of B: the dashed line of B bounds the attached2-cell in S , which dually becomes a 0-cell in C. D : Reduced cone code. Dashed lines show the cellulation of complex S . Theresulting stabilizers in the reduced cone code are on the dual cellulation. potentially reduce the distance by a factor proportional to m . However the distance d Z is not reduced because aclosed 1-chain must “go around” the patch without any shortcut. However, in the reduced cone code, the distance d Z may also be reduced since closed 1-chains can now also take a “shortcut” across the patch, and if we had many suchpatches, the reduction in distance could also be proportional to m , i.e., the distance may be multiplied by somethingproportional to λ . C. Unreasonable Codes
We now consider the case of unreasonable codes. We call the procedure “connecting”.Suppose we have some code C that includes a stabilizer S i which is the product of Pauli Z -operators on some set ofqubits Q i such that the graph G Q i has two connected components (the generalization to more connected componentswill be obvious, and will be given below), so that the procedure above does not work.For notational simplicity, first consider the case of a single such stabilizer.Define the “connected code” to be the following code: it has a new qubit, called r . Instead of using the procedureabove, do the following: pick one qubit from each of the two connected components of G Q i . Call these qubits q , q .We modify the X -stabilizers, by multiplying every X -stabilizer of C that has support on q or q by X r , i.e., theboundary of the cell corresponding to r is the sum of boundaries of the cells corresponding to q and q . Let theconnected code have the same stabilizers as C , except add the stabilizer Z q Z q Z r and replace S with SZ Z Z r .Now, on the connected code, rather than inducing the stabilizer on set Q i , induce a stabilizer on ( Q i \{ q , q } ) ∪{ r } ,i.e., induce SZ Z r . Let this set ( Q i \{ q , q } ) ∪{ r } be denoted Q (cid:48) i . For the connected code, the graph G Q (cid:48) i is connected,so coning works.If G Q i has k > q (cid:48) , q and q (cid:48) , q and so on, up to q (cid:48) k − q k , with q j , q (cid:48) j in the j -th connected component. Note that wehave written the first pair as q (cid:48) , q , rather than q , q . Then, add qubits r , r , . . . , r k − and stabilizers Z q (cid:48) a Z q a +1 Z r a foreach a ∈ { , . . . , k − } . Every X -stabilizer with support on q (cid:48) a or q a +1 will act also on r a . Finally, induce Z -stabilizeron Q i \ { q (cid:48) , q (cid:48) , . . . , q , q , . . . } ∪ { r , r , . . . } . Again, the graph corresponding to this stabilizer for the connected codeis now connected.If there are several Z -stabilizers S i with corresponding graphs G Q i which have more than one connected component,we do this same procedure for each such stabilizer to define the connected code. For each such stabilizer S i , we add k − r or r , r , . . . above. Call theseadded qubits the “connecting qubits”.Let us explain why this works. One may see that if we considers elements of the stabilizer group of the connected6code which are supported on qubits other than the connecting qubits, then the resulting group is precisely thestabilizer group of C as desired. Further, given any 1-chain, we can add a boundary or boundary to make it vanishon all connecting qubits; indeed, for each connecting qubit there is an X -type stabilizer and a Z -stabilizer, both ofwhich have support on that connecting qubit (and no other connecting qubits). Now consider the effect on distance.Consider any Z -logical operator of the connected code. If it has support on r , we can multiply by stabilizer Z q Z q Z r to make it not have support on r . Similarly, for any X -logical operator, if it has support on r , we can multiply byany X -stabilizer acting on q (or q ), so that the result does not have support on r . This multiplication can changethe weight, but it increases the weight of a Z -logical operator by at most an O (1) multiplicative factor and increasesthe weight of an X -logical operator by an at most w X multiplicative factor. So, d X is reduced by an at most O ( w X )factor and d Z is reduced by an at most O (1) factor.So, we may induce stabilizers even in unreasonable codes. Indeed: Lemma 9.
The connected code has the same number of logical qubits as C . The number of physical qubits of theconnected code is O ( N ) . The X - and Z -distances of the connected code are Ω( d X ) , Ω( d Z ) respectively. To give some intuition for this connecting procedure, consider a toric code again. Suppose the toric code is on aplane with several punctures with some boundary conditions on each puncture. Suppose boundary conditions for thepunctures are chosen in some way so that the product of Pauli Z around each puncture is a logical operator. For k ≥ , , . . . , k , let L , L , . . . , L k be the corresponding products of Pauli Z -operators. Suppose furtherthat we wish to induce the product L L . . . L k as a Z -stabilizer, without separately inducing any other stabilizers.One natural way to do this is to attach a k -punctured sphere to those k -punctures. This doesn’t quite work, butlet’s delve into this further. Suppose k = 2, so we want to attach a twice punctured sphere. We can imagine doingthis in two steps: first use a “pair of pants” to turn the two punctures into a single puncture, then close the pair ofpants with a disc. One simple version of a pair of pants is the following: let e be an edge in one puncture, and e be an edge in the other. Add two new edges f, g so that e , e , f, g make a plaquette (this means that the edges f, g are not drawn in the plane!). This plaquettes means that we add a Z -stabilizer Z e Z e Z f Z g . There is now a singleclosed loop obtained by taking the two boundaries of the punctures, cutting out edges e , e from the punctures, andadding in edges f, g and we can attach a disk to this loop. Unfortunately, while this pair of pants operation turns thetwo punctures into a single puncture, the result adds unwanted first homology. Consider for example the toric codeon a sphere, with two punctures, each puncture consisting of a single plaquette. This code has a single logical qubit(we have removed two Z -stabilizers from the sphere, but one of them is redundant). Adding in the product of Pauli Z -operators around both punctures does not change the stabilizer group in this case, so there should still be a singlelogical qubit. However, the above pair of pants procedure instead produces a torus which has two logical qubits. Thetrouble is indeed this added extra loop. In [FH], a similar issue was considered (see discussion in section 1.3); theresolution there was roughly to consider higher dimensional toric codes. Here our resolution is even simpler, replacing f, g with a single qubit. This can be understood (very heuristically) in two different ways. One is to think of thispair of pants construction but restrict to the subspace with X f = X g which removes this unwanted first homology.The other (even more heuristically, and perhaps this will not be useful to the reader) is to think that it correspondsto considering higher dimensional codes similar to the construction in [FH].Now let us discuss the application of connecting to implementing logical Clifford operations which are composedof elementary logical CNOTs (i.e., logical Clifford which map Pauli Z operators to products of Pauli Z ) on somearbitrary LDPC CSS stabilizer code C . First, as well-known, given two copies of some code, the CNOT gate can beimplemented transversally. Suppose we have three or more copies of a code, labelled 1 , , , . . . . If we start with amaximally entangled state between copies 2 and 3, given by preparing the logical qubits of 2,3 in Bell pairs and thenapplying an arbitrary Clifford U to 3, we can then apply a transversal CNOT from 1 to 2, measure all qubits of 1 inthe X basis (hence measuring all the logical X operators of X in a fault tolerant way) and measure all qubits of 2 inthe Z basis to teleport the state from 1 to 3, while applying the Clifford U . The teleportation is up to some Paulicorrection on the logical qubits of 3, which can be implemented by a product of Paulis on the physical bits. Thisreduces the task of implementing logical Cliffords to the task of preparing appropriate entangled states between 2 and3. However, such an entangled state, for the given Cliffords, is the unique code state of a code C ent with no logicalqubits: this code C ent is given by taking two copies of the given stabilizer code and adding some additional stabilizerswhich are products of logical operators between the copies; these additional stabilizers include both X - and Z -typestabilizers and so we need to induce both such. We can use the combining procedure to implement these additionalstabilizers by constructing some reduced cone code for C ent . Using the methods of Section VI, we will see that wecan assume that the soundness of C ent is Ω(1). Remark: it would be interesting also to induce stabilizers which areproducts of Pauli X in one copy with Pauli Z in another to allow performing additional logical operations; we suspectthat this is possible but leave it open.This leaves a few details to consider, which we only sketch here. First, the added stabilizers to define the code C ent are not only high weight (which we deal with using combining and coning as explained here) but may also lead to a7large q Z . Indeed, q Z may potentially be as large as the number of logical qubits of the code. So, it may be necessaryto thicken the code throughout to reduce q Z to O (1).Second, what we prepare is not the code state of C ent , but rather of some reduced cone code. This reduced conecode is given by some further thickening of two copies of C , with some added qubits and added stabilizers, and alsosome modification of the X -stabilizers of the thickened copies so that they involve also the added qubits. Let us callthe qubits of the reduced cone code either “original” or “added”. We can then measure all the added qubits in the X -basis, so that then the remaining original qubits are stabilized by the thickened C ent , up to some Pauli correction,depending on the outcome of the measurement. So, this measurement produces the desired entangled state on twothickened copies of C , so we should work with thickened copies of C throughout, rather than C . From here on wewill simply refer to C and C ent for brevity, rather than constantly repeating that the codes are thickened.A third detail is that one might also like to be able to measure some set of the logical qubits of some code, whileleaving the others unaffected. We can do this by a generalization of the above procedure. Use four copies, 1 , , , C and 2 , , C with some of the logical qubits of 2 in Bell pairswith the corresponding logical qubits of 3 and the other logical qubits of 2 in Bell pairs with the corresponding logicalqubits of 4 (the logical qubits of 3,4 which are not in Bell pairs with logical qubits of 2 may be taken to be in thelogical Z = +1 state). Then, again CNOT from 1 to 2, and measure 1 and 2 as before, thus teleporting some qubits of1 to 3 and the other qubits of 1 to 4. Finally, one may measure are physical qubits of 4 in the Z -basis (or X -basis) tomeasure some subset of the logical qubits of the initial state of 1 in the Z -basis (or X -basis) while leaving the othersintact by teleporting them to 3.The most important question is whether this procedure is fault tolerant. One model to analyze fault tolerance in issome kind of circuit model where qubits are subject to noise while stabilizers are repeatedly measured, possibly withnoisy measurement of stabilizers. Of course, we do not have even an analysis of fault tolerance for the code C itself,much less C ent : all we know is that C is a large distance code. So we may consider a simpler question: suppose weprepare the reduced cone code assuming perfect syndrome measurement, and then some number of errors are appliedto the qubits of the reduced cone code, and next we measure the added qubits of the reduced cone code in the X -basis.We finally measure the stabilizers of the two copies of C (we cannot measure the additional stabilizers of C ent becausethose are high weight). Errors applied to original qubits of the reduced cone code correspond simply to errors on thetwo copies of C , and so these errors can be corrected after the final stabilizer measurement if the number of themis small enough compared to distance. X -errors on the added qubits of the reduced cone code have no effect sincewe measure those qubits in the Z -basis. What we must consider are Z -errors on the added qubits of the reducedcone code. However, up to boundaries, these Z -errors on the added qubits of the reduced cone code are equivalent to Z -errors on the original qubits, with the total weight of the error on the original qubits being at most multiplied bythe inverse soundness factor. Since we may assume that the soundness is Ω(1), this bounds the error weight on theoriginal qubits, so those errors can also be corrected after the final stabilizer measurement if the number of errors onthe added qubits was sufficiently small compared to distance. IV. PUTTING IT TOGETHER
We claim:
Theorem 1.
Let C be any code, with some given parameters, w X , w Z , q X , q Z . Let poly(dev) refer to a quantity thatis polynomial in w X , w Z , q X , q Z , where “dev” is shorthand for “deviation from LDPC”. Then there is an LDPC code,whose parameters we will denote with a tilde, such that ˜ K = K , and with ˜ N bounded by N times poly(dev)polylog( N ) and with ˜ d X , ˜ d Z lower bounded by d X , d Z divided by poly(dev)polylog( N ) .If the input code is LDPC, with arbitrary w Z , w X , q X , q Z = O (1) , we may choose the tilde code to have w X ≤ , q X ≤ , w Z ≤ , and q Z ≤ . We do this by using copying, gauging, thickening, and coning. We will not write tildes above parameters becausewe will be applying several different transformations to the code, and it would then necessitate write multiple tildesto keep track of all these steps. Instead, we write parameters without tilde through, but we describe the parameters“before” and “after” various steps.First, we copy and gauge to reduce q X , w X to O (1). Then thicken to reduce q Z to O (1). Note that since q X , w X are both O (1) after copying and gauging, after thickening all parameters q X , w X , q Z are all O (1); it was useful to docopying and gauging first, as if we thicken a code with w X = ω (1), then the resulting code will not have w Z = O (1).Finally, construct the reduced cone code to reduce w Z to O (1). Stabilizers corresponding to elements of C ⊗ E can be direct if desired.Let us track the parameters in detail, assuming that the input code is LDPC (but with some large parameters).After copying and gauging we have w X , q X ≤
3. After thickening we have w X ≤ q X ≤
3. From Lemma 3, if8the input code is LDPC so that q Z w Z = O (1), we may take any w > (cid:96) = O (1). Taking w = 3 we geta code with q Z ≤
5; there is no point in taking smaller w . For the reduced cone code, we may cellulate the discs withpentagons so that still w X ≤ q X ≤ q Z ≤
5. We pick code C (cid:48) to have no Z -stabilizers.Then, the reduced cone code may be constructed to have w Z ≤
5; see item 3 of Lemma 8, where the O (1) constantmay be taken to be 1.Importantly, the soundness parameter λ of some code, when applying coning, is in worst case 1 /w Z , where here, w Z refers to the parameter for the code input to the coning step, which O (poly(dev)). In many applications λ maybe larger: see the next section.An interesting question is to what extent the operations we have described are homotopy equivalences of chainconstants with bounded Lipchitz constants[HHO20]. Such a result could be used to show efficient decoding algorithmsfor these weight reduced codes. V. CODING APPLICATIONS: WEIGHT REDUCING A LINEAR DISTANCE CODE
We consider the following construction. We choose X -stabilizers to be random, of average weight ∆ = β log( N ) on N bits, for some constant β . We choose there to be N/ N/ dN for some d ∈ (0 , X -stabilizers is an N/ N matrix, and each entry is chosen independently at random, chosen to be 1 with probability∆ /N and 0 otherwise.Remark: it is possible that we could instead start with X -stabilizers of weight O (1), by using some constructionof a good classical LDPC code. We choose the logarithmic weight as it simplifies some estimates. However, startingwith an LDPC classical code might improve the final distance estimates by some logarithmic factors.We will then add Z -stabilizers below, and use coning to weight reduce those stabilizers.We will pick β so that the conclusions of various lemmas below follow. A. A linear distance code with w X , q X = O (log( N )) , but w Z , q X = Θ( N ) : We begin by constructing a code with these properties and then use thickening and coning to reduce Z -stabilizerweight. Lemma 10.
For sufficiently large β , with high probability this classical code has distance Θ( N ) .Proof. This is the essentially same proof prop 3.5 of [HHO20], which as noted there is related to a standard propertyof LDPC codes, that they achieve the Gilbert-Varshamov bound as degree → ∞ . We need β large enough to ensurethat, with high probability, all vertices have large degree.Regard this classical code as a 1-complex A . So, the homology group H ( A ) has rank ≥ N/ N/ X -stabilizers. The rank may be larger if there are linear dependencies among these stabilizers. Let b j ( A ) denote therank of H j ( A ). We have Lemma 11.
For large enough β , with high probability, b ( A ) = N/ . More strongly, the expectation value of b ( A ) − N/ equals O (1 /N ) .Proof. The number of 0-chains in A with vanishing coboundary equals 2 b ( A ) . By prop 3.4 of [HHO20], this numberequals 1 + O (1 /N ); this result is not in the statement of the lemma, but follows from the proof which counts thenumber of nonzero chains with nonvanishing coboundary. Remark: [HHO20] instead used (3 / N stabilizers ratherthan N/
2; the exact fraction of stabilizers is unimportant so long as β is large enough.However, b ( A ) − N/ b ( A ), by Euler characteristic.Choose N/ H ( A ) independently and uniformly at random (one can choose to include the trivialelement or not; it only is chosen with probability o (2 − N/ ) so it does not matter if we include it or not). Thecorresponding Z -type operators will be the Z -stabilizers of the induced code. Lemma 12.
With high probability these Z -stabilizers are linearly independent.Proof. H ( A ) has rank k ≥ (1 − d ) N ). So, we can write the Z -stabilizers in terms of a k -by- N/ F .Columns of this matrix are chosen independently and uniformly at random (including the all 0s column if we includethe trivial element of H ( A )). So, we must show that this matrix is full rank. The ( j + 1)-st column is linearlydependent on the first j columns with probability ≤ − ( k − j ) ≤ − N/ . By a union bound, the lemma follows.9 Lemma 13.
With high probability, this code has distances d X , d Z = Θ( N ) .Proof. The lower bound on d Z follows immediately from lemma 10. That is, every product of Pauli Z -operators thatcommutes with the X -stabilizers has high weight.Lower bounding d X is slightly different because it is not the case that every product of Pauli X -operators thatcommutes with all Z -stabilizers has high weight. Indeed, any X -stabilizer is a logarithmic weight operator thatcommutes with all Z -stabilizers. So, we need to use the fact that a logical X -operator is not a product of X -stabilizers, i.e., it corresponds to a 1-chain u that represents a nontrivial element of H ( A ). We now use an easyfirst moment argument. Fix A . Fix u , and then choose the Z -stabilizers. For each Z -stabilizer, we have chosen someelement of H ( A ) at random, and, since u represents a nontrivial element of H ( A ), with probability 1 / u has nonvanishing inner product with the given element of H ( A ). So, the probability that u has vanishing coboundaryis 2 − N/ . The number of elements of H ( A ) with weight at most w is bounded by the number of vectors of Hammingweight at most w . So, the expected number of u with weight at most w is ≤ − N/ (cid:80) wj =0 (cid:0) Nw (cid:1) . For w sufficiently smallcompared to N , this is exponentially smaller. B. Thickening and Coning
Thicken to reduce q Z . By Lemma 4, we can, for any (cid:15) >
0, reduce q Z to O (1), while increasing from N qubits to O ( N (cid:15) ) qubits, keeping d Z = Θ( N ) and making d X = Θ( N (cid:15) ). We will see that this suffices at the end of theconstruction to get a code on n qubits with distance Ω n / − (cid:15) ) for every (cid:15) >
0. In order to ultimately get distance˜Ω( n / ), we instead reduce q Z to O (log( N )) bu taking (cid:96) = Θ( N ).We then apply coning to reduce w Z . Surprisingly, the soundness parameters are all Ω(∆): Lemma 14.
For large enough β , with high probability, there is a choice of pairing such that the graphs G i areconnected (and hence with high probability the code is connected), and with high probability there is a choice of pairingsuch that the graphs G i are expanders, so that h ( G i ) = Ω(∆) Proof.
We will show that, for any given Z -stabilizer, there is a choice of pairing such that the desired properties ofthe corresponding graph G i hold with probability at least 1 − o (1 /N ). Further, we will show that a random pairingsuffices. Then, by a union bound, the lemma follows.Consider a Z -stabilizer. This is chosen to be a random element of H ( A ), i.e., we chose A at random, and thenchose an N bit vector v uniformly at random, such that ∂v = 0, and then this vector was the desired element of H ( A ). For given A , number of v with ∂v = 0 is 2 b ( A ) .So, the probability distribution on pairs v, A is as follows: the probability is nonvanishing iff ∂v = 0, in which casethe probability is 2 − b ( A ) , multiplied by the a priori distribution on A . Call that a priori distribution ρ ( A ).Suppose instead we had chosen a different a priori probability distribution for A . Suppose that we had chosenthe probability distribution ρ (cid:48) ( A ) defined to be proportional to 2 b ( A ) ρ ( A ). We will show that the desired expansionoccurs with high probability given this a priori distribution ρ (cid:48) ( A ). This will then imply the lemma: by lemma 11,with high probability for distribution ρ (cid:48) ( A ) we have b ( A ) = N/ − O (1 /N ) and so the totalvariation distance between ρ, ρ (cid:48) is O (1 /N ).In the second step, consider the probability distribution on pairs v, A given that A was chosen from ρ (cid:48) ( A ). Wenow find that the probability is nonvanishing iff ∂v = 0, in which case the probability equal ρ ( A ). Fix some nonzero v . Choose a random pairing. This induces a random graph, with vertices corresponding to nonzero entries of v .This random graph depends on only on a submatrix of the boundary operator, the submatrix containing columnscorresponding to nonzero entries of v . These entries of the submatrix are chosen independently, with each entry chosento equal 1 with probability ∆ /N , and then conditioned on there being an even number of 1s in each row. Each rowthen adds a number of edges to the graph equal to one half the number of 1s in that row, and, for given number of 1s,the edges are added between uniformly random pairs of vertices subject to the requirement that all edges added by agiven row are between distinct vertices. However, different rows can add edges between the same vertices. Thus, thisis almost, but not quite the same as the model of an Erd¨os-Renyi random graph, due to the possibility of multi-edgesand due to some correlation between edges added in a given row. Nevertheless, it is a standard argument that theresulting graph has the given edge expansion properties with high probability, indeed with probability o (1 /N ) forlarge enough β .We give this argument for completeness. We restrict to the case that | v | = Θ( N ) for simplicity, since with highprobability all v with ∂v = 0 have that. Let w ≤ v , with 0 < | w | ≤ | v | / v , i.e., those in the support of v . For anyrow, let n ⊥ denote the number of 1s in columns in v − w , and let n denote the number of 1s in columns in w . Then,with probability 1 − o (1 /N ), every row of the given submatrix has n ⊥ = ∆Θ(1). Consider two cases, | w | > | v | / | w | ≤ | v | / β , with probability 1 − O (1 /N ) every row also has n = ∆Θ(1),and with probability 1 − O (1 /N ), there are ∆Θ(1) pairs from a column in w to a column in v − w . Hence, thereare ∆ N Θ(1) edges from vertices in w to those in v − w , showing the result in this case.If instead | w | ≤ | v | / w , pair it randomly(possibly with a vertex in v − w or in w ). Pick the next unpaired vertex (in some arbitrary order) in w , pair itrandomly, and continue until all vertices in w are paired. The pairing of any remaining vertices in v − w does notmatter but can be done in the same way. Then, the probability that on a given step we pair a vertex in w withanother vertex in w is strictly smaller than 1; in our case it is at most 1 /
99. Imagine a counter that starts at 0 and isincremented by 2 every time we pair vertices in w , so that it counts the number of vertices in w paired with a vertexin v If we consider instead a model in which for each vertex in w with a 1 in the given row, the counter is incrementedby 2 with probability 1 /
99, the probability that the counter is incremented is at least as large whenever we considera previously unpaired vertex, plus in this second model the counter may be incremented when considering verticeswhich have already been paired. That is, in the first model if the counter has some given probability of reaching somegiven count c , in the second model, the probability of reaching that count is at least as large. This second model makesthe counter easier to estimate as events become uncorrelated. However, in this model, with probability O (1 /N ),the total number of pairings of vertices in w , summed over all rows, is at most ∆ | w | times a constant much smallerthan 1. On the other hand, with probability O (1 /N ), the total number of 1s over all rows, in a column in w , is atleast 0 . | w | . So, there must be at least Θ(1)∆ | w | pairings between a vertex in w and one not in w .So, we have Theorem 2.
There is a family of LDPC quantum codes on N qubits with distances d X , d Z = ˜Ω( N / ) and ˜Θ( N / ) logical qubits.Proof. Let’s first go through the construction in the case that we had thickened (see start of Section V B) by (cid:96) =Θ( N (cid:15) ). Then we will see that we can slightly improve this by thickening only by (cid:96) = Θ( N ).Thickening by (cid:96) = Θ( N (cid:15) ), the reduced cone code has dev = O (log( N )). It has N = ˜ O ( N (cid:15) ); note that (cid:80) i | Q i | q X is ˜ O ( N (cid:15) ). The reduced cone code has distance d X = ˜Ω( N (cid:15) ) and d Z = ˜Ω( N ) and K = Θ( N ). The increase indistance d X comes from the thickening by (cid:96) ; see lemma 2. The reduced cone code can be reduced to an LDPCcode by Theorem 1 at the cost of a polylogarithmic increase in N and polylogarithmic reduction in d X , d Z . Applydistance balancing to obtain a code on ˜ O ( N (cid:15) ) qubits with both distances d X , d Z = ˜Ω( N (cid:15) ). The original distancebalancing of [Has17] does not increase the number of logical qubits; the distance balancing of [EKZ20a] improves therate, giving Θ( N (cid:15) ) logical qubits.So, this gives a distance scaling as the 2 / − (cid:15) power of the number of physical qubits, for any (cid:15) > / (cid:96) = Θ( N ). Then, again the reduced cone code has dev = O (log( N )) but N = ˜ O ( N )and d X = ˜Ω( N ) and d Z = ˜Ω( N ). Reduce to an LDPC code by Theorem 1, and apply distance balancing to getfinally distance d X , d Z = ˜Ω( N / ). The reason that the reduced thickening helps here is that when we thickened thefirst time, we had w Z = Θ( N ). However, after constructing the reduced cone code, the thickenings used in Theorem 1had only w Z = O (log( N )). VI. IMPROVING SOUNDNESS
Much of the work in the above section was devoted to showing that the soundness factors h ( G ) were not small.That relied on a random construction of the code. In this section, we describe a procedure to increase the soundnessfactor to Ω(1), at the cost of at most a constant factor increase in number of physical qubits and constant factorreduction in distance. If the code is not reasonable, one should first apply the construction of Section III C to definethe connected code, and then apply this construction here to the connected code.We call the procedure here “improving soundness”. Consider a reasonable code C . For each i , construct B i asbefore in coning. Define graph G i as before. Then, define a new complex B (cid:48) i and new graph G (cid:48) i as follows. Thegraph G (cid:48) i is defined by adding edges to G i ; the graphs G (cid:48) i and G i have the same vertex set and every edge of G i isan edge of G (cid:48) i . Edges are added only between vertices in the same connected component. We add these edges so that h ( G (cid:48) i ) = Ω(1). By standard constructions of expanders, this can be done by increasing the degree of each vertex by O (1).The complex B (cid:48) i has the same set of 1-cells as does B i , but it has some added 0-cells, corresponding to the addededges. The complex B (cid:48) i is defined from G (cid:48) i in the obvious way. 0-cells of B (cid:48) i correspond to edges of G (cid:48) i and 1-cellscorrespond to vertices of G (cid:48) i , with a 0-cell in the boundary of a 1-cell if the corresponding edge has the corresponding1vertex in its boundary. Define a chain map f (cid:48) i : B (cid:48) i → A so that f (cid:48) i vanishes on the added 0-cells and otherwise agreeswith f i .Then, proceed as before, with complexes replaced with their primed version: construct B (cid:48) i from B (cid:48) i , construct f (cid:48) i from f i , and so on.In this way, we obtain a reduced cone code with the same properties as Lemma 8, except the soundness factor isΩ(1).Remark: this procedure allows a simplification of the construction of the previous section, as there is no need toworry about bounding the soundness of the various graphs as in Lemma 14. However, I did not discover this improvingsoundness construction until after doing the construction of the previous section, so I leave it as is.Remark: further, this procedure allows a partial derandomization of the construction of the previous section andallows an improvement in the polylogs in the distance, as the code defining A can be chosen to be any good classicalLDPC code.Remark: this procedure adds some number of extra qubits to the reduced cone code, corresponding to edges addedto each G (cid:48) i . However, this procedure adds also X -stabilizers, as the complex B (cid:48) i will have a larger zeroth homologygroup than B i does. Acknowledgments—
I thank M. Freedman, J. Haah, and G. Z´emor for useful discussions. [AH04] Geir Agnarsson and Magn´us M Halld´orsson. Strong colorings of hypergraphs. In
International Workshop on Approxi-mation and Online Algorithms , pages 253–266. Springer, 2004.[BE20] N. Breuckman and J. Eberhardt. Balanced product quantum codes. arXiv preprint arXiv:2012.09271 , 2020.[BH14] Sergey Bravyi and Matthew B Hastings. Homological product codes. In
Proceedings of the forty-sixth annual ACMsymposium on Theory of computing , pages 273–282, 2014.[EKZ20a] Shai Evra, Tali Kaufman, and Gilles Z´emor. Decodable quantum LDPC codes beyond the √ n distance barrier usinghigh dimensional expanders. Technical Report 2004.07935, arXiv, 2020.[EKZ20b] Shai Evra, Tali Kaufman, and Gilles Z´emor. Decodable quantum ldpc codes beyond the √ n distance barrier usinghigh dimensional expanders. arXiv preprint arXiv:2004.07935 , 2020.[FH] M. H. Freedman and M. B. Hastings. Building manifolds from quantum codes.[FML02] Michael H. Freedman, David A. Meyer, and Feng Luo. Z -systolic freedom and quantum codes. In Mathematics ofquantum computation , Comput. Math. Ser., pages 287–320. Chapman & Hall/CRC, Boca Raton, FL, 2002.[Has17] Mathew B Hastings. Weight reduction for quantum codes.
Quantum Information & Computation , 17(15-16):1307–1334,2017. arXiv:1611.03790.[HHO20] Matthew B Hastings, Jeongwan Haah, and Ryan O’Donnell. Fiber bundle codes: Breaking the N / polylog( N )barrier for quantum ldpc codes. arXiv preprint arXiv:2009.03921 , 2020.[KT20] Tali Kaufman and Ran J. Tessler. Quantum LDPC codes with Ω( √ n log k n ) distance, for any k . Technical Report2008.09495, arXiv, 2020.[MT10] Robin A Moser and G´abor Tardos. A constructive proof of the general lov´asz local lemma. Journal of the ACM(JACM) , 57(2):1–15, 2010.[ncl] https://ncatlab.org/nlab/show/quasi-isomorphism .[PK20] Pavel Panteleev and Gleb Kalachev. Quantum ldpc codes with almost linear distance. arXiv preprint arXiv:2012.04068 ,2020.[str] https://mathoverflow.net/questions/38853/bounds-on-strong-vertex-colourings-of-regular-hypergraphs.[TZ14] Jean-Pierre Tillich and Gilles Z´emor. Quantum LDPC codes with positive rate and minimum distance proportional tothe square root of the blocklength.