All publications & toolsVisualising Quantum Product Codes
Research2025arXiv

Visualising Quantum Product Codes

Uses Tanner-graph layouts and geometric diagrams to relate quantum product-code constructions to qubits, stabilizer checks, logical operators, and code parameters.

1 publication

Visualization labels

03 / Visualization
01Publication · 2025

Visualising Quantum Product Codes

Tom Scruby

The source PDF has no explicitly labeled abstract. It begins with an outline and disclaimer in Section 1, "Some Things."

From the survey collection

Visualising Quantum Product Codes

Background and purpose

Tom Scruby presents graphical explanations for classical linear codes, quantum hypergraph product codes, lifted product codes, and balanced product codes. The central purpose is to relate the algebra defining these constructions to the geometry of their Tanner graphs, so that a reader can reason about the resulting qubits, stabiliser checks, logical operators, and code parameters. The document is a set of mathematical and pedagogical notes, with each main construction divided into a visual explanation and a justification of the correspondence between that drawing and the underlying definition. It does not introduce an interactive visualization system or report an empirical study of how readers use the diagrams.

The problem is an existing one: product constructions provide ways to build quantum error-correcting codes, but their properties can be difficult to understand directly from tensor products, matrix blocks, lifts, and group quotients. The notes reuse the familiar two-dimensional picture of hypergraph products as a starting point and refer to the original hypergraph, lifted, and balanced product papers. They also connect the discussion to previous logical-gate constructions based on symmetries, folding, and puncturing. The proposed contribution is a common graphical perspective, especially for lifted and balanced products, together with an explanation of which intuitions from the simpler hypergraph product survive and which fail. Scruby qualifies the novelty claim: to his knowledge these perspectives on lifted and balanced products had not previously been publicly described, while they may already have been known within the community.

Visual vocabulary and the hypergraph product

The starting representation places the check vertices of a classical Tanner graph on the left of a line and its bit vertices on the right. For a parity-check matrix with mm rows and nn columns, these two regions have sizes mm and nn. The notes further distinguish the kk information positions associated with a systematic basis from the remaining n−kn-k positions, preparing the drawing for reasoning about logical operators. This arrangement is deliberately simple: its purpose is to make the product structure visible rather than improve the drawing of a single classical code.

Taking the Cartesian product of two such Tanner graphs produces a two-dimensional layout with four regions. The bit-bit region Q1Q_1 and check-check region Q2Q_2 contain qubits, represented by circular nodes. The check-bit region contains XX checks, represented by filled squares, and the bit-check region contains ZZ checks, represented by empty squares. Connections along each row and column reproduce the connectivity of one classical input graph. The paper alternates between explicit node-link examples and rectangular diagrams that aggregate these four regions; selected rows, columns, and shaded areas reveal the part of the construction relevant to an argument. Red denotes Pauli ZZ support, blue denotes Pauli XX support, and green denotes Pauli YY, including the overlap of displayed XX and ZZ operators. These are static explanatory drawings, with only selected edges shown to reduce clutter.

The retained illustration is the unnumbered example in Section 3.1 on page 2 of the paper. It shows how the two input graphs determine the product's rows and columns, rather than a screenshot of implemented software.

The rectangular representation explains commutation by pairing intersections: if an XX check and a ZZ check share a qubit in Q1Q_1, the repeated row and column connectivity supplies a second shared qubit in Q2Q_2. Their overlap therefore has even parity, as required for commuting CSS stabilisers. Classical codewords also supply the support of candidate logical operators, and systematic bases identify a canonical set of anticommuting logical pairs. Writing kik_i for the dimension of the classical code defined by HiH_i and kiTk_i^T for the dimension defined by HiTH_i^T, the notes recover the logical-qubit count

k=k1k2+k1Tk2T.k=k_1k_2+k_1^Tk_2^T.

The corresponding physical-qubit count is n1n2+m1m2n_1n_2+m_1m_2. For distance, the notes revisit the original hypergraph-product puncturing argument: a ZZ operator with weight below min⁡(d1,d2T)\min(d_1,d_2^T) cannot support a nontrivial logical operator in the restricted product, so an operator of that weight commuting with the XX checks must be a stabiliser. The discussion of logical gates is contextual rather than a new gate construction: a canonical logical basis makes it possible to state the logical action of operations developed in earlier work.

The algebraic justification derives the layout from the block structures of H⊗IH\otimes I and I⊗HI\otimes H. Matrix row and column indices are mapped to spatial coordinates using quotients and remainders. This establishes that fixed-coordinate rows or columns really are copies of the input Tanner graph. The layouts obtained separately from the XX- and ZZ-check matrices are then translated and rearranged so that their qubit coordinates coincide while the two check sets occupy different regions.

Lifted products and a shared third coordinate

For a graph lift, vertices that map to the same base vertex are placed in a vertical column. An ll-lift therefore gives a two-dimensional representation with ll positions along the lift direction. The lifted product combines two such drawings into a three-dimensional structure in which each xzxz plane reproduces the first lifted input and each yzyz plane reproduces the second. The third coordinate is shared between the inputs, rather than independently duplicated as it would be in their ordinary Cartesian product. Qubits and checks retain the same bit-bit, check-check, check-bit, and bit-check assignments as in the hypergraph product.

This geometry makes the size reduction explicit. If the two base graphs have nin_i bits and mim_i checks, the lifted product contains l(n1n2+m1m2)l(n_1n_2+m_1m_2) qubits, whereas the ordinary hypergraph product of the two lifted classical graphs contains l2(n1n2+m1m2)l^2(n_1n_2+m_1m_2) qubits. The reduction is a factor of ll for this comparison. The notes justify the drawing by representing entries of a ring that is a finite-dimensional F2\mathbb{F}_2-algebra as binary l×ll\times l matrices. The lifted-product check matrices have the hypergraph-product form over this ring, using conjugate transposes, and their binary block structure yields the three-dimensional coordinate assignment. Fixing one planar coordinate recovers a full lifted input Tanner graph, providing the algebraic basis for the planar interpretation.

The shared coordinate also exposes why the hypergraph-product arguments cannot simply be reused. In the unnumbered diagrams on page 9, two red and two blue planes represent repeated input connectivity. An XX check and a ZZ check that meet in Q1Q_1 need not acquire a second common qubit in Q2Q_2; matching connectivity within the planes is insufficient to force that intersection. The unrestricted graphical product therefore requires additional structure to produce commuting checks, such as the elementwise commuting matrices used in the cited lifted-product construction. An arbitrary pair of lifted inputs is not automatically a valid quantum stabiliser code.

The examples on pages 10 and 11 explain two further failures of direct generalization. First, two operators associated with classical codewords can overlap twice along the lift direction, so a qubit in a shaded candidate information region need not identify an anticommuting logical pair. Moreover, permuting classical vertices into a convenient systematic arrangement can destroy the lift structure on which commutation depends. Second, puncturing entire planes need not remove enough of the lifted code to reproduce the hypergraph-product distance argument, while puncturing only selected lines can itself destroy commutation. These observations explain why the visualization does not provide a general logical-dimension or distance formula for lifted products and why logical-gate techniques relying on a canonical basis or puncturing need additional analysis.

The scaling discussion is explicitly conditional on obtaining suitable classical families and a quantum product with the assumed favorable parameters. Under those assumptions, the simplified quantum parameters are written as [[O(n2l),O(n2l),O(nl)]][[O(n^2l),O(n^2l),O(nl)]]. Increasing the base size nn with fixed ll gives square-root distance scaling in the total block length, whereas increasing ll with a fixed-size base can give the desired linear scaling. This is an explanation of the consequences of the assumed parameters, not a new existence proof or a numerical demonstration of an asymptotically good code family.

Balanced products as quotients

The balanced-product explanation replaces the covering-map organization with equivalence classes under a group action. A group acts on two graphs AA and BB; in the setup described, its action on AA must be free and AA must have no edge joining vertices in the same group orbit. The action on BB need not be free. For Tanner graphs, the actions must preserve the distinction between bits and checks. Choosing a basepoint in each orbit determines the two-dimensional arrangement of an input graph, with orbit classes in columns and group-related positions in rows.

The resulting three-dimensional picture again has planes carrying copies of the input graphs, but non-free orbits in BB change one family of planes. If a subgroup SS fixes the chosen vertex of an orbit, the corresponding plane contains a quotient A/SA/S rather than a full copy of AA. The worked Z3\mathbb{Z}_3 example on pages 16 and 17 includes both a three-vertex orbit and a fixed vertex in BB, making this difference visible. The irregular upper boundary of the aggregated code drawing represents differing orbit sizes; it is schematic geometry for the graph structure, not a physical device layout.

The mathematical justification uses the definition

A×GB=(A×B)/G,A\times_G B=(A\times B)/G,

where GG denotes the acting group. The numbered graph on page 19 shows how vertices of a Cartesian product are identified into quotient classes. The subsequent argument matches the quotient's vertex representatives and edges with the proposed planar construction. Because the action on AA is free, the action on the full Cartesian product is also free, so the counts of qubits and check vertices are those of the corresponding hypergraph product divided by ∣G∣|G|. The diagrams on page 18 then trace the paired intersections of an XX and a ZZ check through the quotient to explain why the balanced-product construction described here preserves commutation.

The notes also identify an overlap between the balanced and lifted descriptions: they coincide when the quotient maps of both inputs can serve as covering maps. However, the author does not settle whether every lifted product with commuting checks can be represented as a balanced product under a shared symmetry group. The difficulties with extracting general logical-qubit counts and distance bounds from the hypergraph-product picture are stated to persist for balanced products.

Contributions, evidence, and open questions

The main contribution is a unified visual explanation of three related quantum-code constructions, supported by matrix-index derivations for hypergraph and lifted products and a quotient-graph argument for balanced products. The examples explain both the savings obtained by sharing a product coordinate and the additional conditions needed for the resulting checks to commute. They also show why a persuasive picture of an information region does not by itself establish a logical basis or a distance bound. The evidence consists of worked examples, graphical arguments, and mathematical derivations. There are no user studies, performance benchmarks, decoder experiments, or hardware demonstrations, so the notes do not establish improved comprehension, computational speed, or error-correction performance through empirical evaluation.

The final section asks whether there are other useful restrictions on input graphs that make this three-dimensional product commute, beyond the lifted and balanced constructions discussed. It also considers sharing two coordinates in a four-dimensional product. The geometric counting argument observes that these coordinates can be combined into a single enlarged shared coordinate, producing the same size saving as the three-dimensional picture. This is a limited observation about the proposed dimensional construction, not a proof that three-dimensional visualization is universally optimal or that no better code construction exists. Together with the unresolved relationship between valid lifted and balanced products, these questions define the notes' future directions while retaining their explanatory scope.

Download .bib
@misc{scruby2025visualisingquantumproductcodes,
  author = {Scruby, Tom},
  url = {https://arxiv.org/abs/2507.11577},
  eprint = {2507.11577},
  eprintclass = {quant-ph},
  eprinttype = {arXiv},
  title = {Visualising Quantum Product Codes},
  year = {2025},
}