Tensor-Network Contraction and Quantum Advantage Benchmarks
A quantum circuit looks impossible to a classical computer: qubits span a Hilbert space of dimension , and qubits already demand complex amplitudes — more numbers than a supercomputer can hold. Yet that count is a red herring. A circuit is, read literally, a tensor network: each -qubit gate is a rank- tensor, each wire an index, and the amplitude of an output bitstring is the sum over all the internal indices — the contraction of the network. The cost is fixed not by but by the order in which indices are eliminated, because every partial sum builds an intermediate whose size is exponential only in the bonds it straddles. The largest such intermediate, minimized over all orders, has a name from graph theory: the treewidth of the circuit's line graph. This one reframing turned the debate over quantum computational advantage into a quantitative contest with a shared scoreboard. When Google's Sycamore ran a random circuit sampling task in 2019 and estimated years of classical effort, the counter-attack was not a bigger supercomputer but a better contraction order plus slicing — cutting a handful of bonds to trade an unaffordable memory footprint for embarrassingly parallel time, dropping the estimate to days then hours. The referee is cross-entropy benchmarking, whose fidelity is itself computed by contracting tensor networks — benchmark and attack run the same engine, which is why contraction complexity is the currency of the field.
- A quantum circuit's amplitudes are exactly the contraction of a tensor network whose tensors are the gates; the classical cost is governed not by the qubit count but by the treewidth of the interaction graph, which sets the largest intermediate tensor.
- Finding a good contraction order is NP-hard; simulators approximate it with hypergraph partitioning, tree decompositions, and simulated-annealing path search, reaching time .
- Slicing fixes bonds to constants, splitting one contraction into independent subproblems — cutting peak memory by up to and giving perfect parallelism at a price of at most in work.
- For a grid of depth the treewidth is , so shallow 2D supremacy circuits are exponentially hard but with a slow exponent — the loophole classical simulators exploit.
- Linear cross-entropy benchmarking, , scores how strongly samples concentrate on high-probability Porter–Thomas bitstrings: ideal gives , uniform noise , and a real device sits at its global fidelity ( for Sycamore).
- Key idea: the classical hardness of simulating a quantum circuit is set by the treewidth of its interaction graph, not its qubit count — contraction time scales as , and slicing converts memory into parallel time, so the quantum-versus-classical frontier is fixed by how large a treewidth current hardware can generate against current contraction algorithms.
The classical hardness of simulating a quantum circuit is controlled by the treewidth of its interaction graph, not by its qubit count: contraction time scales as , and slicing converts an unaffordable memory footprint into parallel time, so the quantum-versus-classical frontier is fixed by how large a treewidth current hardware can generate against current contraction algorithms.
Where this lives today
Both attack and defense are live research. On the classical side, hyper-optimized contraction is a mature software stack: cotengra and quimb search vast spaces of paths with hypergraph partitioning (KaHyPar) and annealing, and Pan and Zhang's 2022 result reproduced the full Sycamore sampling distribution in roughly hours on GPUs — a task Google had estimated at millennia — with later work pushing XEB spoofing to seconds. On the quantum side, hardware answered by inflating treewidth: China's Zuchongzhi processors (2021) reached – qubits, and Google's 2024 "beyond-classical" sampling used – qubits at greater depth, pushing the treewidth into a regime where the best known contractions would take astronomically long. The open frontier is verification itself: computing for the newest experiments requires the same expensive contractions they are meant to outrun, so the field now asks whether XEB can even be validated where it certifies advantage. Contraction complexity — how large a treewidth hardware can make against how clever the contraction gets — remains the single number the contest is scored on.
The physical picture
Draw the circuit as a graph in space and time: qubit wires run left to right, gates sit where two wires meet, and the whole diagram is a tensor network waiting to be summed. Contracting it collapses the graph one bond at a time, and each merge inflates a tensor whose storage cost is its surface area — the legs it still dangles into the rest of the network. A clever order keeps every intermediate small; a careless order inflates one monstrous balloon and you are back to full state-vector simulation. The first figure shows the correspondence and the quantity that decides the cost: the open bonds a contraction front cuts.
Slicing is the second idea, the one that actually fit supremacy-scale contractions onto real hardware. It works like a hard integral you cannot store: freeze a few variables to fixed values, solve the many easy sub-integrals, and add the answers. Pinning bonds replaces one impossible sum with smaller, independent contractions — at most a factor in work but up to less peak memory, and because the slices never talk, a thousand GPUs each chew their own slice. Geometry decides how much you need: a 1D chain has treewidth (MPS territory, polynomial cost), a shallow 2D grid , and a deep all-to-all circuit (as hard as brute force). Advantage designers push depth and connectivity to inflate the treewidth while staying inside the coherence budget. The second figure is the scoreboard those choices are measured on.
The core equations
The starting point is an identity, not an approximation: the amplitude is literally a tensor contraction. Insert a resolution of the identity on every wire between layers, and the unitary factorizes into gate tensors tied by summed indices:
where: — the full unitary, factored into gates ; — the tensor for gate (a array for a two-qubit gate); — wire indices (bonds), summed over ; — the output bitstring fixing the open legs. Reading: the edges are the summed indices; the amplitude is what remains once every edge is eliminated. The cost depends entirely on the order. Each pairwise contraction is a matrix multiply whose flop count is the product of the bond dimensions it touches; memory is set by the widest intermediate:
where: — the open bonds on the intermediate built at step ; — the dimension of bond ( for qubits); — the maximum open-bond count over the order, the contraction width. Reading: memory grows as , so the whole game is to keep small. The width is not free: minimized over all orders it equals a fixed graph invariant — the Markov–Shi theorem:
where: — the optimal contraction width; — the line graph of the network ; — treewidth, the width of the best tree decomposition. Reading: simulation is fixed-parameter tractable in treewidth — cheap when is small, hopeless when , and alone does not tell you which. Even with an optimal order, peak memory may exceed any machine. Slicing rescues it by pinning a chosen set of bonds to constants and summing afterward — an exponential memory cut for an at-most-exponential time cost, with perfect parallelism.
where: — the number of slices (product of sliced bond dimensions); — the sliced bond count; — the cost of one slice; — the unsliced memory. Reading: memory falls by with certainty, work rises by at most (usually far less, since slicing also lowers the width), and the slices run with zero communication. To score the contest you need a figure of merit. Linear cross-entropy benchmarking measures how strongly a sample set concentrates on the ideal distribution's high-probability bitstrings:
where: — the ideal probability of bitstring (itself a contraction); — the average over sampled strings; — the qubit count. Reading: ideal, uniform noise, and the device's global fidelity in between. That fidelity is not free either — it is the product of the survival probability of every gate, startlingly small for a supremacy circuit:
where: — the error rate of gate ; the product runs over all gates plus readout. Reading: hundreds of gates at sub-percent error leave fidelity near — the target a spoofer must match. Finally, the geometry tying it together — the treewidth of the experiments' grids:
where: — the linear grid dimension; — the number of two-qubit layers. Reading: for shallow depth the treewidth grows like , so cost is — exponential, but with an exponent growing only as , which is why 53 qubits was contestable.
The goal is the central complexity statement of the subject: with the best contraction order, the time to simulate a circuit is times a polynomial, where is the treewidth of the line graph — so classical cost is a property not of the qubit count but of a graph invariant. We build the bridge both ways: a tree decomposition of width yields an order of the same width, and any order yields a decomposition, so the minimum over orders is exactly the treewidth, and the per-step cost then gives the exponential.
Step 1. Take a tree decomposition of : each node carries a bag of edges of , the bags cover every edge, and for each edge the bags containing it form a connected subtree; the width is . Why: the bag tracks which indices are simultaneously alive, and connectivity forbids an index from being resurrected after it is summed.
Step 2. Turn the tree into an order: process leaves to root, contracting at each node every index confined to its subtree. The indices still open lie in the bag, so the intermediate has at most legs. Why: the bag literally bounds the open-bond count, so bag size and contraction width are the same quantity.
Step 3. Bound the per-step cost: each contraction touches at most dimension-2 bonds, costing at most multiply-adds. Why: this is where the exponential enters — the width sits in the exponent, while appears only through the polynomial step count.
Step 4. Sum over the nodes: , and minimizing over decompositions replaces by . Why: the prefactor is harmless; the treewidth in the exponent is the whole story.
Step 5. Prove optimality: any order induces a tree decomposition of equal width, so no order beats the treewidth — the bound is tight up to the additive constant. Why: the converse turns an upper bound into the exact classical cost, making it a fair scoreboard. *Why this works end-to-end: contraction is fixed-parameter tractable in treewidth with time , and the bag size equals the maximum open-bond count at every step — so the two quantities are the same thing measured from opposite sides.*
Go deeper · Derivation B · 2 minSlicing converts memory into parallel time
The aim is to show that cutting bonds shrinks peak memory by while inflating total work by at most , with zero communication between subproblems — the maneuver that broke terabyte-scale intermediates into GPU-sized pieces and made supremacy-scale contractions runnable on existing clusters. We split the grand sum over all internal indices into an outer sum over a chosen set of bonds and an inner contraction that no longer contains them.
Step 1. Choose slice bonds and pin each to a definite value rather than summing it: . Why: the outer sum is a plain sum of numbers, so the pieces couple only through the final addition of their scalar results.
Step 2. For each , form by deleting the sliced edges (their values absorbed into adjacent tensors); the subnetworks are identical and independent. Why: this buys perfect parallelism — a thousand workers each take a batch of values and never exchange a byte until the end.
Step 3. Track memory: the sliced bonds no longer appear in any intermediate of , so the width drops from to and per-slice memory is . Why: choosing which bonds to slice is the art — a good choice removes the bonds forcing the widest intermediate, so the memory cut is large.
Step 4. Track time: worst case, but the lowered width shrinks each slice so the real overhead is modest. Why: because slicing also reduces , the product is often barely above — you pay little and gain parallelism.
Step 5. The payoff at Sycamore scale: slicing a few dozen bonds took intermediates from terabytes to gigabytes and turned one monster contraction into millions of independent jobs. Why: this is why the estimate fell from years to hours with no new hardware — the same flops, re-organized to fit and parallelize. *Why the accounting closes: deleting sliced bonds lowers the maximal bag size, and the slice count is exactly — so both the memory reduction and the parallelism factor are precisely .*
Go deeper · Derivation C · 1 minCross-entropy fidelity of ideal versus uniform sampling
The objective is to derive the two anchors that make linear XEB meaningful — for ideal Porter–Thomas sampling and for uniform noise — from the statistics of Haar-random amplitudes, and to see why a noisy device interpolates linearly at its global fidelity. Deep random circuits scramble the input so thoroughly that each output probability behaves like the squared modulus of a random complex Gaussian, making the probabilities exponentially distributed and collapsing every average to a ratio of moments.
Step 1. For a Haar-random each probability is exponentially distributed with mean , : the density is (Porter–Thomas). Why: the exponential tail means a few bitstrings are much likelier than average — the signal XEB detects.
Step 2. The moments are and . Why: the second moment is twice the square of the first, and that factor is the entire origin of the ideal .
Step 3. Ideal sampling weights each string by an extra : , giving . Why: importance sampling by turns the average into a ratio of consecutive moments, which Porter–Thomas fixes at .
Step 4. Uniform sampling gives the plain mean , so ; a depolarizing channel of fidelity mixes -ideal with -uniform, so . Why: this linearity lets read out the device fidelity, and it is exactly what a spoofer must match — a small number, not the full distribution. *Why the anchors are exact: the moment ratio follows directly from the exponential (Porter–Thomas) density, and it is precisely this ratio that fixes for ideal sampling and for uniform noise.*
Limiting cases
Contraction cost sweeps from polynomial to intractable as the geometry changes, each regime set by the treewidth it produces:
| Case | Result | Meaning |
|---|---|---|
| 1D shallow (MPS regime) | bond dimension bounded by entanglement ; area-law states have , polynomial cost — DMRG territory | |
| 2D grid, depth | treewidth set by the smaller of depth and lateral cut; supremacy circuits — exponential but slow exponent | |
| Deep all-to-all | treewidth ; no better than full state-vector — the genuine worst case | |
| Amplitude vs. sampling | spoofing at fidelity is far cheaper than one exact amplitude |
Worked examples
1 · Memory of a supremacy-scale contraction, and how much to slice
A random circuit runs on the Sycamore geometry: qubits on a grid, depth . Estimate the peak memory of an optimal single-amplitude contraction, then find how many bonds to slice so each subproblem fits a 16 GB GPU.
Step 1. Estimate the treewidth. With and depth , equation (7) gives . Geometry sets the optimal width to — the largest intermediate carries about 53 open bonds.
Step 2. Convert width to memory. A tensor of open bonds holds complex numbers; at bytes each, peak memory is . Unsliced, the contraction needs bytes — beyond any single machine.
Step 3. Slice to fit. A 16 GB GPU holds complex numbers, so each slice may carry width . That needs sliced bonds, giving slices. Slicing ~23 bonds turns one 130 PB contraction into GPU-sized jobs — the essence of how the estimate fell to cluster-hours.
Step 4. Sanity-check the time. Work rises by at most , but because those 23 bonds were forcing the widest intermediate, each slice's inner width falls below the naive , so realistic runs pay far less than the worst case — landing near tens of hours, not centuries. The factor is a loose bound; width-lowering slices recover most of it, and every slice runs in parallel.
2 · The XEB fidelity of Sycamore from its error budget
Sycamore ran two-qubit gates at , single-qubit gates at , and readouts at . Estimate the global using equation (6).
Step 1. Two-qubit contribution: , so surviving weight is . The two-qubit gates alone drop fidelity to about .
Step 2. Single-qubit contribution: , giving .
Step 3. Readout contribution: , giving . Readout costs a factor — comparable to the gates, which is why measurement fidelity matters.
Step 4. Multiply the independent survival factors: , matching the reported value. The device is right about two times in a thousand — and a classical sampler only has to match that , not the full ideal distribution, which is the entire leverage behind frugal spoofing.
Physics of the portrait
Tensor-network contraction is where quantum information theory, graph theory, and high-performance computing meet in a single number. It has no lone inventor — a synthesis assembled over half a century, from Penrose's picture-language, through a theorem tying it to treewidth, to the GPU clusters that made it the referee of quantum advantage.
Origins · 1 mintensor-network contraction and how this was discovered
The idea that a network of tensors can be summed by collapsing it edge by edge goes back to Roger Penrose, who in 1971 introduced a diagrammatic notation in which tensors are blobs, indices are legs, and contraction is the joining of legs — making the shape of a computation visible. For decades this lived in mathematical physics and, through matrix product states and DMRG, in 1D condensed-matter simulation. The decisive turn came in 2008, when Igor Markov and Yaoyun Shi proved that contraction cost is controlled by the treewidth of the line graph — making circuit simulation fixed-parameter tractable in a graph invariant rather than exponential in the qubit count. That theorem sat quietly until 2019, when Sycamore made it urgent: was years real, or an artifact of a bad algorithm? Johnnie Gray and Stefanos Kourtis built hyper-optimized path finders (cotengra, quimb), and Feng Pan and Pan Zhang, with slicing and secondary-storage staging, drove the estimate to hours on GPU clusters. What Penrose drew as a picture became the arbiter of the most-watched claim in modern computing.
Going further
References. Markov & Shi, "Simulating quantum computation by contracting tensor networks," SIAM J. Comput. 38, 963 (2008) · Arute et al. (Google), "Quantum supremacy using a programmable superconducting processor," Nature 574, 505 (2019) · Boixo et al., "Characterizing quantum supremacy in near-term devices," Nature Physics 14, 595 (2018) · Gray & Kourtis, "Hyper-optimized tensor network contraction," Quantum 5, 410 (2021) · Huang et al., "Classical simulation of quantum supremacy circuits," arXiv:2005.06787 (2020) · Pan, Chen & Zhang, "Solving the sampling problem of the Sycamore quantum circuits," Phys. Rev. Lett. 129, 090502 (2022) · Preskill, "Quantum computing in the NISQ era and beyond," Quantum 2, 79 (2018). Standard textbook grounding: Nielsen & Chuang, Quantum Computation and Quantum Information; Preskill, Lecture Notes on Quantum Computation; Watrous, The Theory of Quantum Information; Kitaev, Shen & Vyalyi, Classical and Quantum Computation. Key numerical anchors used throughout: the amplitude-as-contraction identity (obtained by inserting basis resolutions); the width = treewidth statement and scaling; the slicing trade-off and slice count ; the Porter–Thomas moments , and the anchors ; the Sycamore parameters (, depth , two-qubit gates, ) and revised classical runtimes. Grid treewidth follows standard planar-separator theory.
Prerequisites. Quantum circuit model and universal gate sets · Entanglement entropy and Schmidt decomposition · Computational complexity (P, NP, #P) · Graph theory: treewidth and tree decompositions. Leads to. Random circuit sampling and supremacy protocols · Matrix Product States and DMRG · Quantum Approximate Optimization Algorithm · Quantum Machine Learning Models.
Ask the tutor: Ask me to walk a small circuit through an explicit contraction order and count the open bonds at each step, or to work out how many bonds you would have to slice to fit a given circuit on your hardware.
Isn't simulating n qubits always exponential in n?
Only in the worst case. The cost is where is the treewidth of the interaction graph, and treewidth equals only for deep, all-to-all circuits. Shallow or local circuits have much smaller treewidth — a 2D grid of depth gives — so their largest intermediate is far below and they contract without ever forming the full state vector. The exponent is the treewidth, not the qubit count; the two coincide only in the hardest geometry.
What exactly is a "contraction order" and why does it matter so much?
A contraction order is the sequence in which you sum out the network's internal indices — equivalently the order in which you multiply pairs of tensors. It matters because every intermediate costs memory in the number of bonds it still touches, and different orders produce wildly different peak widths: the same network can cost or depending only on the order. Finding the best order is NP-hard, so simulators use hypergraph partitioning, greedy and Boltzmann-greedy heuristics, and simulated-annealing refinement to approach the treewidth-optimal width.
How does slicing avoid an exponential blow-up in time?
Slicing pins bonds to fixed values, creating independent subproblems summed at the end. Worst case this multiplies work by — but the bonds are chosen precisely because removing them lowers the contraction width. Since per-slice memory and time both fall as the width drops, the product of " more slices" and "each slice much cheaper" is often barely above the original cost. You gain a guaranteed memory cut and perfect parallelism for only a modest time overhead — that asymmetry is the whole trick.
Why is cross-entropy benchmarking the figure of merit rather than exact simulation?
Because reproducing a supremacy experiment means producing samples whose statistics match the device — not recomputing every amplitude — and the device is very noisy, at . Linear XEB measures how strongly a sample set concentrates on high-probability Porter–Thomas bitstrings: ideal, uniform noise, and the global fidelity in between. It degrades linearly with noise and can be estimated from a feasible number of samples — but computing it still requires contractions, the field's central tension.
Did classical simulation "disprove" quantum supremacy?
No — it re-grounded it. The original -year figure assumed Schrödinger–Feynman state-vector methods; tensor-network contraction with optimized ordering and slicing showed the real cost was days, then hours. That did not erase a quantum advantage, it quantified one and moved the line, forcing the next experiments to use more qubits and depth to push the treewidth back out of classical reach. The pattern is a ratchet: each hardware advance raises the treewidth, each algorithmic advance lowers the cost of a given treewidth, and the frontier is wherever the two currently cross.
Where do matrix product states fit into this picture?
Matrix product states (MPS) are the special case with 1D chain topology, where treewidth is essentially constant and the one relevant parameter is the bond dimension set by the entanglement entropy across a cut. For area-law states stays bounded and contraction is polynomial — the regime DMRG exploits. Supremacy circuits deliberately leave it by using 2D connectivity and enough depth to drive entanglement up, so no low-treewidth MPS description survives.