TRANSMISSION // 2612.04231v1
A quantum compiler takes a middle path through circuit diagrams
Source published
LuWu uses ZX-calculus rewrites to simplify quantum circuits while keeping them readable as gate sequences. Its authors report lower circuit costs and faster compilation on large benchmarks than Qiskit O3, with results limited to the tested cases and described in a preprint.

Quantum compilers can make circuits cheaper to run, but broad optimization and practical scaling are hard to achieve together. A preprint introduces LuWu, which rewrites circuits using a graphical framework called ZX-calculus and reports results on large benchmark sets.
Quantum algorithms are written as sequences of operations, but those sequences may contain work that can be removed or reorganized. A quantum compiler searches for a more efficient circuit while preserving what it does. The challenge is to improve costs such as two-qubit gates, non-Clifford T gates and circuit depth without making compilation impractical as circuits grow.
Tao Zhang, Linghui Chen and Hui Zhai present LuWu, a compiler built around ZX-calculus, a graphical language for describing quantum operations. Their preprint asks whether this broader graphical view can reveal optimizations that ordinary gate-by-gate rewrites miss, while still scaling to large circuits and producing a gate sequence at the end.
Rewriting without losing the circuit
Many optimizers make local changes while keeping every intermediate result in circuit form. That can make it difficult to expose cancellations between operations far apart. At the other extreme, a ZX-calculus simplifier can transform a circuit into a graph that is difficult to turn back into gates.
LuWu aims for a middle path. It translates an input circuit into a ZX diagram, then applies a fixed set of 17 rewrite rules. The authors say the rules preserve the represented quantum operation exactly, so the method does not need a separate equivalence check after each rewrite. The compiler makes bounded excursions into diagrams that are not directly readable as circuits, then returns to a circuit-like form rather than extracting gates from a heavily transformed global graph.
The paper describes an offline evolutionary rule-discovery process involving four specialized AI agents. It separately reports that optimization rules discovered using 81 circuits of at most 28 qubits were tested on larger, unseen circuits; it does not specify that those circuits were the agents’ direct inputs. After discovery, LuWu runs deterministically, without language-model calls during compilation.
What the benchmarks report
The study draws on 212 public benchmark circuits from nine collections. The authors divide them into 81 smaller discovery circuits and 131 unseen circuits, reaching 8,192 qubits. For five circuit families, they fit compilation runtime against qubit count and report scaling exponents from 1.03 to 1.20, which they describe as nearly linear growth.
The headline comparison with Qiskit’s optimization level 3 (O3) uses 130 large unseen circuits that Qiskit O3 completes—not all 131 large circuits. On that selected set, the authors report a composite reduction score of 46% for LuWu and 6.4% for Qiskit O3, with LuWu compiling 7.1 times faster. The score equally combines percentage reductions in T-gate count, two-qubit-gate count, total gate count and circuit depth. It is an aggregate benchmark measure, not a single physical performance result.
Across those 130 circuits, the paper reports aggregate reductions of about 57% in T gates, 29% in two-qubit gates and 49% in circuit depth. These reductions are calculated from summed metric totals across the benchmark set, not as an unweighted average of each circuit’s percentage change. The authors also report that rules developed from the smaller circuits generalize to the separate large set.
Other compilers did not finish every large benchmark within the study’s timeout. The authors therefore present both a full-dataset comparison, assigning unfinished runs zero reduction, and comparisons limited to circuits each compiler completed. These different protocols affect how rankings should be read.
The paper also describes an extension to non-unitary and dynamic circuits, which may involve measurements during computation, resets and classical feedforward. For 64 general linear-map benchmarks up to 1,024 qubits, the authors report 100% compilation success and a 70% composite gate-and-depth reduction. That is a result on this benchmark set, not a guarantee of success on all non-unitary or dynamic circuits. These tests are compiler benchmarks, not demonstrations of improved performance on quantum hardware.
What remains uncertain
The authors say LuWu’s optimization does not yet account for hardware-specific information. A circuit that looks efficient by gate counts or depth may not be best for a particular device, where connectivity and parallel operations influence execution costs. Results also depend on the chosen benchmarks, comparison settings and a score that weights four metrics equally; the study does not establish that the same gains will hold for every workload or device.
This article is based on an arXiv preprint, not a peer-reviewed publication. The paper points to public code, benchmark data and a technical appendix, but the reported comparisons remain the authors’ evaluation rather than independent confirmation. LuWu offers a way to balance graphical optimization with practical circuit extraction; whether it works as well across other workloads and hardware targets remains open.
- quantum computing
- quantum compiler
- ZX-calculus
- quantum circuits
- LuWu
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
A smarter schedule for fault-tolerant quantum circuits
Source published
Shared keywords: quantum compiler, quantum computing
A quantum compiler adds verified block-encoding methods
Source published
Shared keywords: quantum compiler, quantum computing
qSink aims to hide quantum decoder delays
Source published
Shared keywords: quantum compiler
A graphical calculus for fermionic tensors
Source published
Shared keywords: zx calculus
A New Approach to Noisy Quantum Circuits
Source published
Shared keywords: quantum circuits, quantum computing