Quantum LDPC Codes
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.
Sparse Checks and Tanner Graphs
Section titled “Sparse Checks and Tanner Graphs”For a family of stabilizer codes, let be the maximum weight of a chosen generator and the maximum number of those generators containing one qubit. The qLDPC requirement is
Both bounds must be independent of block length . 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 and specify positive and checks. Their orthogonality condition and dimension are
Commutation requires even overlap between every opposite-type pair. The ranks count independent constraints; the number of measured rows can be larger. When defining , 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:
Every row has weight four, distinct rows overlap on zero or two positions, and . The rank is three, so this block encodes qubits. The largest total qubit degree is four: a middle qubit participates in two and two checks.
One Tanner graph for the matrix ; the same supports are used in both Pauli sectors. Squares are checks, circles are qubits. Qubits 1 and 2 have identical columns, so a error has zero -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 commutes with all checks. Its support is not in the row space of , 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 . 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 check–qubit edges, so a local message-passing iteration can take work. A weight- check needs only 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.
Rate and Distance as the Block Grows
Section titled “Rate and Distance as the Block Grows”For parameters , the rate is and the relative distance is . A family is asymptotically good when both remain bounded away from zero, equivalently and . This is stronger than constant rate alone.
| Family parameters | Rate | Relative distance |
|---|---|---|
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 . Thus, when rate and relative distance have limits, . Increasing one limits the other even before sparse-check or hardware constraints are imposed.
The two-dimensional locality tradeoff, , 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.
Building a Hypergraph-Product Code
Section titled “Building a Hypergraph-Product Code”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 have rows and columns. There are two groups of quantum coordinates, of sizes and .
Define the two blocks of each check matrix by
Then and . 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 :
Write and . The latter counts independent relations among seed rows. The resulting quantum parameters satisfy
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 and 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
With full-row-rank seeds that both encode nonzero classical dimensions, the transpose kernels vanish and equality gives . Suitable bounded-degree seeds with constant classical rate and distance proportional to their length yield quantum constant rate and distance proportional to .
A product small enough to verify
Section titled “A product small enough to verify”Choose identical repetition seeds
Their kernels are , their ranks are two, and their transpose kernels are trivial. Hence the product gives
An -check row has weight two from plus one or two from a column of , 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 , where shifts a length- bit string by one position and . Its kernel and transpose kernel each have dimension one and distance . The product gives , 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 , the form
commutes because . 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 block with weight-six checks and a proposed circuit using 144 data qubits plus 144 measurement ancillas. The code’s data rate is ; 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.
Decoding and Noisy Check Outcomes
Section titled “Decoding and Noisy Check Outcomes”For a -error vector , the perfect -check syndrome is . Successful recovery needs in the row space of , not necessarily . Stabilizers make different microscopic errors equivalent on encoded states. The analogous statement holds for 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 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 , where is readout noise. If a binary row-relation matrix satisfies , then
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 , bipartite edge coloring partitions its interactions into 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 , prepare ancilla in , apply CNOTs and , and measure . To measure , prepare in , apply and , and measure . The two observables commute. But their component CNOTs can fail to commute when interleaved.
Both schedules contain the same four CNOTs and avoid shared-qubit gate collisions. The upper order does not jointly measure and as intended. For data in , 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 before , but before . The contributions through the shared data qubits no longer cancel, leaving an unwanted ancilla coupling. The three-layer order keeps the -ancilla interaction before the -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 checks and then all 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.
Comparing Encoded Blocks
Section titled “Comparing Encoded Blocks”A high-rate block stores several logical qubits whose errors may be correlated. In a stochastic logical-Pauli model, let be the probability of any nonidentity logical action and the marginal probability of a nonidentity action on logical qubit . Then
Dividing block failure by 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.
Exercises
Section titled “Exercises”1. Sparse does not imply growing distance
Section titled “1. Sparse does not imply growing distance”Find for the eight-qubit matrix , 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 and total . The three rows are independent, giving . Every column is nonzero, excluding weight-one logical Paulis. The vector has zero syndrome but is not in the row space, so is a logical operator and . With copies, parameters are . The rate stays while relative distance tends to zero.
2. Count a product without assuming distance
Section titled “2. Count a product without assuming distance”Let be of rank six and be of rank four. Find . What can be concluded about distance from these facts alone?
Solution
The product length is . Seed kernel dimensions are four and three, and both transpose kernels vanish, giving . 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 open-chain matrix above or the cyclic matrix . Both define the classical kernel . Find their quantum product parameters.
Solution
The open-chain seed has rank two, kernel dimension one, and transpose-kernel dimension zero. Its product has , , and . 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 , , and . The product construction depends on the full seed complex, including relations among rows.
4. What one syndrome relation can reveal
Section titled “4. What one syndrome relation can reveal”Three measured binary checks satisfy . For reported bits , what is learned from their parity? Can it locate one wrong report?
Solution
The observed parity is . 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.
5. Test the two gate orders
Section titled “5. Test the two gate orders”Use data and ancillas . Calculate the final state before ancilla readout for each schedule in the figure.
Solution
Write the initial computational values as , , , with a uniform coherent sum over . The two-layer schedule gives and , with addition modulo two. Changing variable to shows that the final state factors as
Measuring and on this ancilla Bell pair gives each sign pair with probability , although both data checks equal . In the lower schedule, both data interactions with precede their interactions with . Thus , and the state is
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 have conditional probabilities and . One error in another class has probability . Can these facts alone determine which class is more likely? Give two complete distributions with opposite answers.
Solution
Only lower bounds are known: and . There is unassigned probability. Assign it to four additional distinct errors of probability each in ; then the class totals are . Assign those four errors instead to ; the totals become . 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 error remains the largest individual term, but its class wins only in the second distribution.
7. Marginal and block failure
Section titled “7. Marginal and block failure”In a stochastic logical model, each of 12 logical qubits has marginal failure probability . Compare independent failures with perfectly correlated failures of all 12 together.
Solution
Independence gives . A single common event flipping all 12 gives . Both have the same marginal , and both satisfy . Dividing the correlated block probability by 12 would understate every marginal by a factor of 12. The joint logical distribution matters.
References
Section titled “References”- H. Bombín, “Single-shot fault-tolerant quantum error correction,” Physical Review X 5, 031043 (2015), doi:10.1103/PhysRevX.5.031043, arXiv:1404.5504.
- S. Bravyi et al., “High-threshold and low-overhead fault-tolerant quantum memory,” Nature 627, 778–782 (2024), doi:10.1038/s41586-024-07107-7, arXiv:2308.07915.
- A. Leverrier, J.-P. Tillich, and G. Zémor, “Quantum expander codes,” in 2015 IEEE 56th Annual Symposium on Foundations of Computer Science, 810–824 (2015), doi:10.1109/FOCS.2015.55, arXiv:1504.00822.
- A. Leverrier and G. Zémor, “Quantum Tanner codes,” in 2022 IEEE 63rd Annual Symposium on Foundations of Computer Science, 872–883 (2022), doi:10.1109/FOCS54457.2022.00117, arXiv:2202.13641.
- P. Panteleev and G. Kalachev, “Asymptotically good quantum and locally testable classical LDPC codes,” in Proceedings of STOC 2022, 375–388 (2022), doi:10.1145/3519935.3520017, arXiv:2111.03654.
- J. Roffe, D. R. White, S. Burton, and E. T. Campbell, “Decoding across the quantum low-density parity-check code landscape,” Physical Review Research 2, 043423 (2020), doi:10.1103/PhysRevResearch.2.043423, arXiv:2005.07016.
- J.-P. Tillich and G. Zémor, “Quantum LDPC codes with positive rate and minimum distance proportional to the square root of the blocklength,” IEEE Transactions on Information Theory 60, 1193–1202 (2014), doi:10.1109/TIT.2013.2292061, arXiv:0903.0566.
Further Reading
Section titled “Further Reading”- 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.