Skip to content

A quantum low-density parity-check code, or qLDPC code, has a sparse description: each chosen stabilizer check touches few qubits, and each qubit belongs to few checks. Sparsity can reduce the work needed to measure a syndrome and update a decoder. It does not by itself guarantee high encoding rate, large distance, short-range hardware connections, or a correct measurement schedule.

The most useful way to learn the subject is to separate three questions. What quantum code do the sparse matrices define? How do its parameters scale as the block grows? How can its checks and logical operations be implemented with noisy devices? We begin with a small matrix example, then construct hypergraph-product codes and examine the additional circuit constraints.

Required background. Why QEC Is Possible explains how checks preserve logical information. Stabilizer Formalism supplies commutation and distance, while Common Noise Models distinguishes independent errors from correlated faults.

Helpful background. CSS Codes explains the binary matrices used below.

For a family of stabilizer codes, let wnw_n be the maximum weight of a chosen generator and Δn\Delta_n the maximum number of those generators containing one qubit. The qLDPC requirement is

sup⁡nwn<∞,sup⁡nΔn<∞.\sup_n w_n<\infty, \qquad \sup_n\Delta_n<\infty.

Both bounds must be independent of block length nn. A finite matrix alone does not establish an asymptotic family. The requirement is that a sparse generating presentation exists; multiplying generators together can make a dense presentation of the same code.

For CSS codes, rows of HXH_X and HZH_Z specify positive XX and ZZ checks. Their orthogonality condition and dimension are

HXHZT=0(mod2),k=n−rank⁡HX−rank⁡HZ.\begin{aligned} H_XH_Z^{\mathsf T}&=0\pmod2,\\ k&=n-\operatorname{rank}H_X -\operatorname{rank}H_Z. \end{aligned}

Commutation requires even overlap between every opposite-type pair. The ranks count independent constraints; the number of measured rows can be larger. When defining Δn\Delta_n, count incidences from both Pauli sectors.

A Tanner graph draws one node for each check and one for each qubit, joining them whenever the matrix entry is one. Check weight is a check-node degree. Qubit participation is a qubit-node degree. For example, use the same matrix in both sectors:

HX=HZ=M,M=(111100000011110000001111).\begin{aligned} H_X&=H_Z=M,\\ M&= \begin{pmatrix} 1&1&1&1&0&0&0&0\\ 0&0&1&1&1&1&0&0\\ 0&0&0&0&1&1&1&1 \end{pmatrix}. \end{aligned}

Every row has weight four, distinct rows overlap on zero or two positions, and MMT=0MM^{\mathsf T}=0. The rank is three, so this block encodes 8−3−3=28-3-3=2 qubits. The largest total qubit degree is four: a middle qubit participates in two XX and two ZZ checks.

Three sparse check nodes connected to eight qubits, with the first two qubits highlighted because their columns are identical

One Tanner graph for the matrix MM; the same supports are used in both Pauli sectors. Squares are checks, circles are qubits. Qubits 1 and 2 have identical columns, so a Z1Z2Z_1Z_2 error has zero XX-check syndrome. Here it is a nontrivial logical operator: the sparse block has distance two. A sparse drawing alone is not a distance guarantee.

The first two columns coincide, so Z1Z2Z_1Z_2 commutes with all checks. Its support is not in the row space of MM, making it a nontrivial logical operator. No single-qubit Pauli commutes with every check because every column is nonzero in both sectors. Hence the block has parameters [[8,2,2]][[8,2,2]]. Repeating disjoint copies would produce a constant-rate qLDPC family with distance still two, illustrating why sparsity and protection must be tested separately.

Sparsity nevertheless has concrete benefits. There are O(n)O(n) check–qubit edges, so a local message-passing iteration can take O(n)O(n) work. A weight-ww check needs only ww data–ancilla interactions in a basic extraction circuit. Neither statement bounds the number of decoding iterations, routing time, or correlated errors produced by a faulty ancilla.

For parameters [[n,k,d]][[n,k,d]], the rate is Rn=k/nR_n=k/n and the relative distance is δn=d/n\delta_n=d/n. A family is asymptotically good when both remain bounded away from zero, equivalently k=Θ(n)k=\Theta(n) and d=Θ(n)d=\Theta(n). This is stronger than constant rate alone.

Family parameters Rate Relative distance
[[2L2,2,L]][[2L^2,2,L]] 1/L21/L^2 1/(2L)1/(2L)
[[n,n/5,n]][[n,n/5,\sqrt n]] 1/51/5 1/n1/\sqrt n
[[n,n/5,n/20]][[n,n/5,n/20]] 1/51/5 1/201/20

Assume compatible block lengths and bounded check degrees in the last two schematic examples. The first is the toric family; the second has constant rate but vanishing relative distance; the third is asymptotically good. The existence of asymptotically good qLDPC families is an established theorem, proved by Panteleev and Kalachev using lifted products. It is not a claim that every finite block in those constructions has favorable practical constants.

The quantum Singleton bound gives n−k≥2(d−1)n-k\ge2(d-1). Thus, when rate and relative distance have limits, R+2δ≤1R+2\delta\le1. Increasing one limits the other even before sparse-check or hardware constraints are imposed.

The two-dimensional locality tradeoff, kd2≤Cnkd^2\le Cn, is stronger but has additional assumptions: bounded local dimension, spatial density, and interaction range in a Euclidean plane, with commuting-projector constraints. It is not a bound on every sparse graph. High-rate codes with growing distance must use connectivity or other structure outside those assumptions. A few distant qubits still form a low-weight check; their geometric separation remains a physical cost.

Tillich and Zémor’s hypergraph product builds commuting quantum checks from two classical binary matrices, without requiring the seeds to be mutually orthogonal. Let HiH_i have rir_i rows and nin_i columns. There are two groups of quantum coordinates, of sizes n1n2n_1n_2 and r1r2r_1r_2.

Define the two blocks of each check matrix by

AX=H1⊗In2,BX=Ir1⊗H2T,AZ=In1⊗H2,BZ=H1T⊗Ir2.\begin{aligned} A_X&=H_1\otimes I_{n_2},\\ B_X&=I_{r_1}\otimes H_2^{\mathsf T},\\ A_Z&=I_{n_1}\otimes H_2,\\ B_Z&=H_1^{\mathsf T}\otimes I_{r_2}. \end{aligned}

Then HX=[AX∣BX]H_X=[A_X\mid B_X] and HZ=[AZ∣BZ]H_Z=[A_Z\mid B_Z]. The tensor product replicates each seed incidence while keeping track of the coordinate in the other seed. The two contributions to the commutator agree and cancel over F2\mathbb F_2:

HXHZT=H1⊗H2T+H1⊗H2T=0.H_XH_Z^{\mathsf T} =H_1\otimes H_2^{\mathsf T} +H_1\otimes H_2^{\mathsf T}=0.

Write ki=dim⁡ker⁡Hik_i=\dim\ker H_i and kiT=dim⁡ker⁡HiTk_i^T=\dim\ker H_i^{\mathsf T}. The latter counts independent relations among seed rows. The resulting quantum parameters satisfy

n=n1n2+r1r2,k=k1k2+k1Tk2T.\begin{aligned} n&=n_1n_2+r_1r_2,\\ k&=k_1k_2+k_1^Tk_2^T. \end{aligned}

The transpose term matters when both seeds have redundant rows. This is one reason replacing a seed by an equivalent classical parity-check matrix need not leave its quantum product unchanged: the product uses the matrix and its transpose, not only the classical kernel.

Let did_i and diTd_i^T be the minimum nonzero weights in the two seed kernels, setting the distance to infinity for a zero-dimensional kernel. The general product bound is

d≥min⁡(d1,d2,d1T,d2T).d\ge\min(d_1,d_2,d_1^T,d_2^T).

With full-row-rank seeds that both encode nonzero classical dimensions, the transpose kernels vanish and equality gives d=min⁡(d1,d2)d=\min(d_1,d_2). Suitable bounded-degree seeds with constant classical rate and distance proportional to their length yield quantum constant rate and distance proportional to n\sqrt n.

Choose identical repetition seeds

H1=H2=(110011).H_1=H_2=\begin{pmatrix}1&1&0\\0&1&1\end{pmatrix}.

Their kernels are {000,111}\{000,111\}, their ranks are two, and their transpose kernels are trivial. Hence the product gives

[[n,k,d]]=[[13,1,3]].[[n,k,d]]=[[13,1,3]].

An XX-check row has weight two from H1H_1 plus one or two from a column of H2H_2, so its weight is three or four. The same holds in the other sector. Each quantum coordinate participates in at most four checks total. The resulting 12 rows are independent; their rank is 12, not an assumed consequence of merely counting them.

For a geometric family, instead use the cyclic repetition matrix I+PLI+P_L, where PLP_L shifts a length-LL bit string by one position and L≥3L\ge3. Its kernel and transpose kernel each have dimension one and distance LL. The product gives [[2L2,2,L]][[2L^2,2,L]], recovering the toric family. The extra transpose contribution is exactly the second logical qubit.

Other Constructions and What Their Theorems Say

Section titled “Other Constructions and What Their Theorems Say”

The hypergraph product is a useful starting point, not a ceiling on qLDPC distance. Quantum expander codes use suitable seed expansion to obtain provable decoding guarantees. Lifted-product and quantum Tanner constructions achieve constant rate and linear distance under their respective algebraic and local-code conditions. The proofs concern whole families and specified decoders; their constants and required block sizes still matter in applications.

Quasi-cyclic constructions give compact finite matrices using sparse shift operators. For commuting square binary matrices A,BA,B, the form

HX=[A∣B],HZ=[BT∣AT]\begin{aligned} H_X&=[A\mid B],\\ H_Z&=[B^{\mathsf T}\mid A^{\mathsf T}] \end{aligned}

commutes because HXHZT=AB+BA=0H_XH_Z^{\mathsf T}=AB+BA=0. Bivariate-bicycle codes take structured polynomials in two commuting cyclic shifts. Choosing a fixed number of shift terms bounds row and column weights, but does not alone prove distance.

Bravyi and collaborators’ circuit-level study includes a [[144,12,12]][[144,12,12]] block with weight-six checks and a proposed circuit using 144 data qubits plus 144 measurement ancillas. The code’s data rate is 1/121/12; including those ancillas gives 24 physical qubits per encoded qubit. These counts describe that design. They do not include every routing, control, or logical-operation cost and are not themselves an experimental threshold. Dated hardware and scaling comparisons are discussed in Quantum LDPC and High-Rate Codes.

For a ZZ-error vector eZe_Z, the perfect XX-check syndrome is sX=HXeZTs_X=H_Xe_Z^{\mathsf T}. Successful recovery needs rZ+eZr_Z+e_Z in the row space of HZH_Z, not necessarily rZ=eZr_Z=e_Z. Stabilizers make different microscopic errors equivalent on encoded states. The analogous statement holds for XX errors.

The maximum-likelihood objective therefore sums probabilities within each compatible logical class. A class containing the most likely individual error need not have the largest total probability. Conversely, two large probabilities in one class cannot settle the comparison if the other class’s remaining probability is unknown. Exercise 6 makes that missing-information issue explicit.

Belief propagation passes local probability messages on a Tanner graph. On a tree, the usual messages can yield exact marginals. Quantum check commutation introduces overlapping supports; in the combined X/ZX/Z graph, a shared pair of qubits gives a four-cycle. Individual-sector graphs may have different cycles. Messages on loopy graphs are correlated and can stall or produce a syndrome-inconsistent estimate. Quantum degeneracy creates an additional challenge beyond ordinary classical decoding.

Roffe and collaborators study belief propagation with ordered-statistics post-processing: reliability estimates guide a subsequent syndrome-solving search. This can repair a failed message-passing result, at additional computational cost. Linear work per iteration does not imply linear total runtime if iteration counts or post-processing grow. For a real-time memory, runtime tails and missed deadlines matter alongside logical failure probability.

With measurement errors, a simplified report is s~=HeT+η\widetilde s=He^{\mathsf T}+\eta, where η\eta is readout noise. If a binary row-relation matrix DD satisfies DH=0DH=0, then

Ds~=Dη.D\widetilde s=D\eta.

The relation can reveal an inconsistent report, but need not identify the bad bit. One parity relation detects an odd number of flipped reports and misses even patterns. More redundancy is not automatically single-shot correction. In a single-shot scheme, a bounded number of noisy measurement rounds leads to controlled residual data noise under the stated model, so correction can be repeated reliably as the code grows. That stronger property needs a specific construction and decoder; Bombín’s single-shot work is one such mechanism.

A Sparse Schedule Must Measure the Right Observables

Section titled “A Sparse Schedule Must Measure the Right Observables”

Attach a distinct ancilla to every simultaneously measured check. The check–data incidence graph is bipartite. If its maximum degree is Dmax⁡=max⁡(w,Δ)D_{\max}=\max(w,\Delta), bipartite edge coloring partitions its interactions into Dmax⁡D_{\max} layers with no shared-qubit collision. This is a statement about available gate slots, not yet about the implemented measurement.

The distinction appears even with two data qubits. To measure X1X2X_1X_2, prepare ancilla aa in ∣+⟩|+\rangle, apply CNOTs a→1a\to1 and a→2a\to2, and measure XaX_a. To measure Z1Z2Z_1Z_2, prepare bb in ∣0⟩|0\rangle, apply 1→b1\to b and 2→b2\to b, and measure ZbZ_b. The two observables commute. But their component CNOTs can fail to commute when interleaved.

Two collision-free check schedules: an incorrect two-layer interleaving and a correct three-layer order for measuring XX and ZZ

Both schedules contain the same four CNOTs and avoid shared-qubit gate collisions. The upper order does not jointly measure X1X2X_1X_2 and Z1Z2Z_1Z_2 as intended. For data in ∣Φ+⟩|\Phi^+\rangle, it entangles the two ancillas and produces all four outcome pairs equally often. The lower order gives the correct deterministic (+,+)(+,+) outcomes. Preparation and readout are fixed as labeled; the comparison concerns ideal gate ordering before any noise is added.

The incorrect order places a→1a\to1 before 1→b1\to b, but 2→b2\to b before a→2a\to2. The contributions through the shared data qubits no longer cancel, leaving an unwanted ancilla coupling. The three-layer order keeps the XX-ancilla interaction before the ZZ-ancilla interaction on both shared data qubits. Exercise 5 verifies the output states directly.

For one Pauli sector, the basic CNOTs commute, so edge coloring does give a valid ideal interaction schedule. Measuring all XX checks and then all ZZ checks supplies a simple constant-layer baseline when both degree bounds are fixed and every required edge is available. More efficient interleaving must preserve the complete measurement instrument. Fault-tolerant scheduling imposes further conditions on ancilla-error propagation, verification or flags, and repeated-round detectors. The explicit bivariate-bicycle schedules in Bravyi and collaborators’ study illustrate this extra circuit design.

Routing, shuttling, long-range couplers, preparation, reset, leakage handling, and limited parallel control can add time beyond this ideal graph calculation. Code distance counts data-Pauli support; circuit distance counts the smallest allowed fault set causing an undetected logical effect in the chosen circuit and temporal boundaries. Bounded check weight does not make those distances equal.

A high-rate block stores several logical qubits whose errors may be correlated. In a stochastic logical-Pauli model, let PblockP_{\rm block} be the probability of any nonidentity logical action and pjp_j the marginal probability of a nonidentity action on logical qubit jj. Then

max⁡jpj≤Pblock≤∑jpj.\max_j p_j\le P_{\rm block}\le\sum_j p_j.

Dividing block failure by kk does not generally recover a marginal error probability. Independent rare failures and simultaneous block-wide failures can have identical marginals but very different block probabilities. Coherent logical channels additionally require channel-based metrics rather than an assumed classical failure distribution.

Resource comparisons should include the full extraction and logical-operation procedure. Data rate can improve while ancilla count, cycle time, communication, or decoding cost increases. Many-qubit blocks also need a way to initialize, address, entangle, and measure selected logical qubits; a memory simulation alone does not supply a universal gate set. Resource Estimation explains how to compare those costs for a specified computation.

Distance values also have different strengths. A found nontrivial logical operator proves an upper bound on distance. A lower-bound theorem excludes all smaller logicals. An exhaustive search or matching upper and lower bounds can establish the exact distance. A fitted logical-error exponent under one decoder is not a substitute for these algebraic statements.

Find w,Δ,k,dw,\Delta,k,d for the eight-qubit matrix MM, then repeat independent copies. What happens to rate and distance?

Solution

The rows have weight four, and middle columns have weight two in each sector, so w=4w=4 and total Δ=4\Delta=4. The three rows are independent, giving k=2k=2. Every column is nonzero, excluding weight-one logical Paulis. The vector 1100000011000000 has zero syndrome but is not in the row space, so Z1Z2Z_1Z_2 is a logical operator and d=2d=2. With bb copies, parameters are [[8b,2b,2]][[8b,2b,2]]. The rate stays 1/41/4 while relative distance tends to zero.

2. Count a product without assuming distance

Section titled “2. Count a product without assuming distance”

Let H1H_1 be 6×106\times10 of rank six and H2H_2 be 4×74\times7 of rank four. Find n,kn,k. What can be concluded about distance from these facts alone?

Solution

The product length is 10(7)+6(4)=9410(7)+6(4)=94. Seed kernel dimensions are four and three, and both transpose kernels vanish, giving k=4(3)=12k=4(3)=12. The exact distance is the smaller of the two seed distances in this full-row-rank, nonzero-kernel case. Shapes and ranks alone do not determine those distances. Full row rank does not exclude a zero column and a weight-one seed codeword.

3. Redundant seed checks change the product

Section titled “3. Redundant seed checks change the product”

Compare identical length-three repetition seeds chosen as the 2×32\times3 open-chain matrix above or the 3×33\times3 cyclic matrix I+P3I+P_3. Both define the classical kernel {000,111}\{000,111\}. Find their quantum product parameters.

Solution

The open-chain seed has rank two, kernel dimension one, and transpose-kernel dimension zero. Its product has n=9+4=13n=9+4=13, k=1k=1, and d=3d=3. The cyclic seed also has rank two and the same kernel, but its three rows have one relation. Both kernel dimensions are now one, giving n=9+9=18n=9+9=18, k=1+1=2k=1+1=2, and d=3d=3. The product construction depends on the full seed complex, including relations among rows.

Three measured binary checks satisfy s1+s2+s3=0s_1+s_2+s_3=0. For reported bits s~=s+η\widetilde s=s+\eta, what is learned from their parity? Can it locate one wrong report?

Solution

The observed parity is η1+η2+η3\eta_1+\eta_2+\eta_3. A single wrong report gives one, so it is detected, but all three possible locations give the same result. Two wrong reports give zero and evade this test. The single relation alone therefore neither corrects arbitrary readout errors nor establishes single-shot quantum correction.

Use data ∣Φ+⟩=(∣00⟩+∣11⟩)/2|\Phi^+\rangle=(|00\rangle+|11\rangle)/\sqrt2 and ancillas a=∣+⟩,b=∣0⟩a=|+\rangle,b=|0\rangle. Calculate the final state before ancilla readout for each schedule in the figure.

Solution

Write the initial computational values as a=ua=u, 1=2=t1=2=t, b=0b=0, with a uniform coherent sum over u,t∈{0,1}u,t\in\{0,1\}. The two-layer schedule gives 1=2=t+u1=2=t+u and b=ub=u, with addition modulo two. Changing variable to t+ut+u shows that the final state factors as

∣Φ+⟩12⊗∣Φ+⟩ab.|\Phi^+\rangle_{12}\otimes|\Phi^+\rangle_{ab}.

Measuring XaX_a and ZbZ_b on this ancilla Bell pair gives each sign pair with probability 1/41/4, although both data checks equal +1+1. In the lower schedule, both data interactions with aa precede their interactions with bb. Thus b=(t+u)+(t+u)=0b=(t+u)+(t+u)=0, and the state is

∣Φ+⟩12⊗∣+⟩a∣0⟩b.|\Phi^+\rangle_{12}\otimes|+\rangle_a|0\rangle_b.

The outcomes are deterministically (+,+)(+,+). Avoiding simultaneous gate collisions was necessary but insufficient.

6. Incomplete probabilities do not rank logical classes

Section titled “6. Incomplete probabilities do not rank logical classes”

Two stabilizer-equivalent errors in class AA have conditional probabilities 0.150.15 and 0.120.12. One error in another class BB has probability 0.200.20. Can these facts alone determine which class is more likely? Give two complete distributions with opposite answers.

Solution

Only lower bounds are known: P(A∣s)≥0.27P(A\mid s)\ge0.27 and P(B∣s)≥0.20P(B\mid s)\ge0.20. There is 0.530.53 unassigned probability. Assign it to four additional distinct errors of probability 0.13250.1325 each in AA; then the class totals are (0.80,0.20)(0.80,0.20). Assign those four errors instead to BB; the totals become (0.27,0.73)(0.27,0.73). Other compatible errors can have zero probability in these toy distributions, and the classes are assumed large enough to contain the listed errors. In both cases the 0.200.20 error remains the largest individual term, but its class wins only in the second distribution.

In a stochastic logical model, each of 12 logical qubits has marginal failure probability p=0.001p=0.001. Compare independent failures with perfectly correlated failures of all 12 together.

Solution

Independence gives Pblock=1−(1−p)12≈0.01193P_{\rm block}=1-(1-p)^{12}\approx0.01193. A single common event flipping all 12 gives Pblock=p=0.001P_{\rm block}=p=0.001. Both have the same marginal pp, and both satisfy p≤Pblock≤12pp\le P_{\rm block}\le12p. Dividing the correlated block probability by 12 would understate every marginal by a factor of 12. The joint logical distribution matters.

  • N. P. Breuckmann and J. N. Eberhardt, “Quantum low-density parity-check codes,” PRX Quantum 2, 040101 (2021), doi:10.1103/PRXQuantum.2.040101 — an introduction to sparse-code constructions; its historical survey predates the asymptotically good constructions cited above.