Overview
A graph is a set of points with some pairs joined by edges. Graphs appear in quantum information wherever there is a pattern of who interacts with whom: which qubits a hardware coupler connects, which bits a parity check reads (the Tanner graph of a code), which syndrome defects a decoder pairs up (a matching problem), and which qubits are entangled by controlled- gates in a graph state. Two parts of graph theory carry most of the weight. Spectral graph theory relates how well connected a graph is to the eigenvalues of its adjacency matrix; its central objects, expander graphs, are the raw material of good classical and quantum LDPC codes. Matching theory says when vertices can be paired along edges and how to find a cheapest pairing; it is the basis of the most widely used surface-code decoder.
The standard text for the combinatorics is Diestel; for expanders and their spectra, the survey of Hoory, Linial and Wigderson.
Intuition
Imagine pouring water onto one vertex and letting it flow along edges. In a long cycle it creeps slowly around; in a well-connected graph it spreads everywhere in a few steps. The speed of spreading is governed by the gap between the largest eigenvalue of the adjacency matrix (the degree , for a -regular graph) and the second largest, . A large gap means that every set of vertices, unless it is more than half the graph, has many edges leaving it — the graph has no bottleneck. Graphs with this property and few edges per vertex are expanders: they are sparse like a lattice but connected like a complete graph.
For codes, sparsity means cheap checks, and expansion means that a small error cannot hide: any small set of flipped bits touches many checks, many of them uniquely. Lattices fail the second requirement (a long string of errors only triggers checks at its ends), which is why surface codes need distance growing with the lattice size, while codes built on expanders can have distance and rate both proportional to the length.
Prerequisites
Symmetric matrices and their eigen-decomposition, the variational characterisation of eigenvalues; see linear algebra. For the coding applications, parity-check matrices from classical error-correcting codes.
Mathematical Definitions
A (simple, undirected, finite) graph is a finite set of vertices and a set of two-element subsets , the edges. A multigraph also allows loops and repeated edges. Vertices are adjacent, , if ; the neighbourhood is the set of vertices adjacent to and the degree is . is -regular if every vertex has degree .
A path is a sequence of distinct vertices with consecutive ones adjacent; is connected if every two vertices are joined by a path, and the maximal connected subgraphs are its connected components. is bipartite if with every edge joining to . For write for the number of pairs with , and for the size of the edge boundary of .
With , the adjacency matrix is the symmetric 0/1 matrix with exactly when , and the Laplacian is with . For every ,
so is positive semidefinite; , and the multiplicity of the eigenvalue 0 of equals the number of connected components. For a -regular graph , and the eigenvalues of , ordered , satisfy: if and only if is connected, and if and only if some connected component is bipartite. The difference is the spectral gap.
The incidence matrix over , with rows indexed by vertices and columns by edges and a 1 where a vertex lies on an edge, is the boundary map of the graph viewed as a one-dimensional chain complex. Standard terminology follows Diestel; the spectral facts are in section 2 of Hoory, Linial and Wigderson.
Let be an parity-check matrix of a binary linear code. Its Tanner graph is the bipartite graph with variable nodes (the columns, one per code bit), check nodes (the rows), and an edge between check and variable exactly when . A word is a codeword if and only if, at every check node, the bits on the neighbouring variable nodes sum to zero.
A family of codes with parity-check matrices of growing length is a low-density parity-check (LDPC) family if there is a constant , independent of , such that every row and every column of every has at most ones; equivalently, the Tanner graphs have bounded degree. The family is -regular if every variable node has degree and every check node degree . Counting edges gives , so the rate is at least the design rate , with equality when the rows of are independent.
Sparsity is a property of the matrix , not of the code: the same code has many parity-check matrices, most of them dense, and the performance of iterative decoders depends on which one is used. "LDPC" is meaningful only for a family, since any single matrix has bounded weights.
LDPC codes were introduced by Gallager together with iterative decoding; the graph description is due to Tanner. A modern account is Richardson and Urbanke. The quantum counterpart, where two sparse check matrices must also be orthogonal, is the subject of quantum LDPC codes.
Let be a finite graph with vertices.
- The edge expansion (Cheeger constant) is , where is the set of edges leaving .
- For a -regular graph with adjacency eigenvalues , put , the largest absolute value of a nontrivial eigenvalue. is an -graph if .
- A sequence of -regular graphs with and fixed is a family of expanders if for some and all ; equivalently (by the Cheeger inequalities) if for some .
- A -regular graph is Ramanujan if every nontrivial eigenvalue satisfies ; by the Alon–Boppana bound this is asymptotically the best possible spectral expansion.
- For a bipartite graph with left side of left degree , the set has vertex expansion . The graph is a lossless (or unique-neighbour) expander, in the sense used for codes, when every with has with close to 1.
The point of the definition is the combination of bounded degree with expansion bounded away from zero: complete graphs expand trivially but are dense. That such families exist follows from a counting argument for random regular graphs, and explicit constructions include the Ramanujan graphs of Lubotzky, Phillips and Sarnak. All the notions above and their relations are surveyed by Hoory, Linial and Wigderson.
Let be a graph. A matching is a set of edges, no two of which share an endpoint. A vertex is covered (or saturated) by if it lies on an edge of . is maximum if no matching has more edges and perfect if it covers every vertex, so a perfect matching has edges and requires even.
Given , an augmenting path is a path whose end vertices are both uncovered and whose edges alternate between and ; exchanging the matched and unmatched edges along it gives a matching with one more edge. A matching is maximum if and only if it has no augmenting path (Berge's theorem).
With a weight function , a minimum-weight perfect matching is a perfect matching minimising . Edmonds gave a polynomial-time algorithm for maximum matching in general (not necessarily bipartite) graphs by contracting odd cycles, "blossoms"; its weighted extension solves the minimum-weight perfect matching problem in polynomial time. In surface-code decoding the vertices are syndrome defects (plus boundary vertices), the weights are of error probabilities along shortest paths, and a minimum-weight perfect matching pairs the defects according to a most likely error consistent with the syndrome; see the matching decoder. Matching terminology follows chapter 2 of Diestel.
Let be a simple undirected graph with , and write for the set of neighbours of a vertex . The graph state of is
where on qubits . The CZ gates commute, so the order does not matter. Equivalently, is the unique (up to phase) state with
Indeed , and conjugating by the CZ gates uses for each edge at , while operators commute with CZ. The operators commute and are independent, so they generate a stabilizer group with a one-dimensional joint eigenspace. In the computational basis, .
A cluster state is the graph state of a regular lattice: a path (linear cluster), the square lattice (2D cluster) or the cubic lattice (3D cluster). Cluster states were introduced as the states generated from product states by an Ising-type interaction by Briegel and Raussendorf; the general graph-state formalism is in Hein, Eisert and Briegel and the review Hein et al..
Theorems
Expansion and eigenvalues
In particular, a family of -regular graphs has edge expansion bounded away from zero if and only if its spectral gaps are bounded away from zero, which is why expansion can be certified by computing one eigenvalue. The lower bound is the "easy" direction; the upper bound, the discrete analogue of Cheeger's inequality for manifolds, needs a rounding argument on the second eigenvector. The inequalities were proved by Dodziuk (1984) and independently by Alon and Milman and Alon; the form stated here is the one in section 4 of Hoory, Linial and Wigderson.
- is a finite -regular graph with second-largest adjacency eigenvalue and edge expansion as in the definition of an expander graph.
Proof · Proof of the lower Cheeger bound (spectral gap implies expansion)
This record proves the lower bound in full. The upper bound is not proved here; see section 4 of Hoory, Linial and Wigderson.
Let be the Laplacian. Its eigenvalues are , the smallest is 0 with eigenvector , and by the variational (Courant–Fischer) characterisation the next smallest is
Fix with and define . Then . An edge inside or inside its complement contributes 0 to , and an edge across contributes , so
The variational bound gives , i.e.
using . Minimising over gives .
For all subsets ,
A slightly sharper form replaces the right side by . The quantity is the expected count in a random graph of the same density, so a small means that the edges of are spread almost uniformly over every pair of large sets. The lemma was observed by several researchers and appeared in print in Alon and Chung; it is proved in section 2 of Hoory, Linial and Wigderson.
- is a -regular graph on vertices with adjacency eigenvalues and .
- counts ordered pairs with , so an edge inside is counted twice.
Proof · Proof of the expander mixing lemma
Let be indicator vectors. Then .
Since is -regular, , and is real symmetric, so it has an orthonormal eigenbasis with . Decompose
The subspace is spanned by and is invariant under , so the cross terms vanish: and likewise . Hence
Expanding and ,
by Cauchy–Schwarz. Finally , and similarly for , which gives both the sharper and the stated bound. This is the argument of section 2 of Hoory, Linial and Wigderson.
The number is the spectral radius of the infinite -regular tree, which every large -regular graph locally resembles. The bound is attributed to Alon and Boppana; a short proof is given by Nilli, and a textbook account is in section 5 of Hoory, Linial and Wigderson. Graphs meeting for all nontrivial eigenvalues are Ramanujan graphs, and infinite families of them exist, for instance the explicit Cayley graphs of Lubotzky, Phillips and Sarnak.
- ranges over -regular graphs on vertices with fixed; as , uniformly over such graphs.
Matchings
There is a matching covering every vertex of if and only if
Consequences: a bipartite graph with satisfying the condition has a perfect matching; every -regular bipartite graph with has a perfect matching (each sends edges into , which can absorb at most ), and by removing it and repeating, its edges split into perfect matchings. The theorem is due to Hall, phrased as the existence of distinct representatives for a family of sets; a textbook proof is in chapter 2 of Diestel.
- A finite bipartite graph with parts and ; is the set of vertices adjacent to at least one vertex of .
Proof · Proof of Hall's marriage theorem
Necessity. If covers , the partners under of the vertices of are distinct vertices of .
Sufficiency. Induction on . If , the condition gives the single vertex a neighbour, and that edge is the matching. Let and assume the statement for smaller .
Case 1: for every nonempty . Pick any and any neighbour of (one exists since ). Delete and . In the remaining graph, every nonempty has lost at most the one neighbour , so it still has at least neighbours. By induction can be matched in the remaining graph; adding the edge matches .
Case 2: some nonempty has . The subgraph induced on satisfies Hall's condition for (neighbourhoods of subsets of lie inside ), so by induction it has a matching covering , which uses all of . Now consider the subgraph induced on . For , its neighbourhood in is , and
So satisfies Hall's condition and, by induction (), has a matching covering . The two matchings use disjoint vertex sets, and covers .
This is a standard inductive proof; chapter 2 of Diestel discusses Hall's theorem and its proofs.
Graph states
Two graph states are related by single-qubit Clifford gates exactly when the graphs are related by local complementations:
For a vertex of , the local complement is the graph obtained by replacing the subgraph induced on the neighbourhood by its complement (edges between neighbours of are removed, non-edges are added) and keeping everything else. Then
a product of single-qubit Clifford gates, and two graph states , satisfy with all Clifford if and only if is obtained from by a finite sequence of local complementations (Van den Nest, Dehaene and De Moor). In addition, every stabilizer state is local-Clifford equivalent to some graph state. The formula above is the form given in the review of Hein et al..
A consequence used throughout measurement-based computing: measuring a vertex of a graph state in a Pauli basis leaves the other qubits in a graph state of a modified graph, up to known local Clifford gates. A measurement deletes the vertex; a measurement deletes it after locally complementing at it; an measurement gives for a chosen neighbour of .
- Simple undirected graphs; equalities up to global phase.
Worked Examples
The complete graph
is 3-regular with adjacency matrix ( the all-ones matrix), so its eigenvalues are and (three times); and the spectral gap is 4. Edge expansion: a single vertex has 3 leaving edges, a pair of vertices has , so . The Cheeger bounds give : the lower bound is attained.
The cycle is not an expander
is 2-regular with eigenvalues , , so and the gap is . For even , cutting the cycle into two arcs of vertices crosses 2 edges, so . Both quantities tend to 0: the cycle — the Tanner graph shape of the repetition code — has a bottleneck, and in the same way the distance of a lattice code grows only with its linear size.
The Petersen graph is Ramanujan
The Petersen graph (outer 5-cycle, inner pentagram, five spokes) is 3-regular on 10 vertices with eigenvalues , (five times) and (four times). So , and the graph is Ramanujan. Its edge expansion is (attained by the outer 5-cycle, which has 5 spokes leaving it), equal to the Cheeger lower bound . Mixing lemma check with the outer cycle: (five edges, each counted in both directions), the random prediction is , and the deviation is within the sharper bound . The eigenvalues and were checked by direct computation.
Hall's condition on a check–qubit graph
Take checks , , as the left side and qubits on the right. Every set of checks touches at least qubits (one check: 2; two checks: 3; three: 3), so Hall's theorem gives a matching assigning each check its own qubit, e.g. . Adding a fourth check breaks the condition for (4 checks, 3 qubits), so no such assignment exists — and indeed four checks on three bits must be linearly dependent.
Applications
- Classical and quantum LDPC codes. Codes defined on the Tanner graph of a sparse parity-check matrix (Tanner) are decoded by message passing along its edges. Sipser and Spielman showed that expansion of the Tanner graph yields asymptotically good codes with linear-time decoding. Quantum analogues built from expanding complexes and Cayley graphs give asymptotically good quantum LDPC codes (Panteleev and Kalachev; Leverrier and Zémor); see good quantum LDPC codes exist.
- Matching decoders. For the toric and surface codes, decoding independent or errors reduces to minimum-weight perfect matching on the graph of syndrome defects (Dennis, Kitaev, Landahl and Preskill), solved with Edmonds' blossom algorithm (Edmonds); see the matching decoder and why it finds a most likely error.
- Graph states and measurement-based computation. Graph states, their entanglement and their local-Clifford equivalence classes are reviewed by Hein et al.; see measurement-based quantum computing.
- Hardware connectivity and compilation. The coupling map of a device is a graph, and routing two-qubit gates on it is a graph problem; see the qubit connectivity graph.
- Combinatorial optimisation. MaxCut on a graph is the standard benchmark of QAOA (lesson); the Goemans–Williamson approximation algorithm for it rounds the solution of a semidefinite program, see optimization theory.
Limitations and Common Pitfalls
- Which expansion? Edge expansion, vertex expansion, spectral expansion of and two-sided spectral expansion are different quantities. A bipartite graph has , so it is never a two-sided spectral expander, yet it can have excellent one-sided and vertex expansion. Code constructions use specific versions; check which one a theorem needs.
- Expansion of a family, not a graph. Every connected finite graph has ; "expander" only has content for an infinite family with bounded degree and expansion bounded below.
- Spectral expansion does not give lossless vertex expansion. Spectral methods certify vertex expansion of about half the degree, not the near-full expansion that some decoding arguments for expander codes require (Hoory, Linial and Wigderson).
- Counting conventions. in the mixing lemma counts ordered pairs; edges inside are counted twice.
- Matching weights. A minimum-weight perfect matching is a most likely error, not a most likely error class; for degenerate quantum codes the two can differ.
- Graph isomorphism of states. Different graphs can give locally equivalent graph states; entanglement properties are invariants of the local-complementation orbit, not of the graph.
Related Research
The chain-complex viewpoint, in which a graph is a one-dimensional complex and codes come from two-dimensional ones, is developed in topology and homology; the algebra of Cayley graphs is part of group theory; and the decoders that run on Tanner and matching graphs are collected under quantum decoders.