Get it
LuWu Quantum Compiler
on GitHub
LLM agents evolved a compiler that edits circuits only with exact ZX-calculus rules. On 130 large benchmark circuits it cuts 7.3× more than Qiskit O3, 7.1× faster. If it holds, large circuits get much leaner with no verifier.
Going deeper
Think of a quantum program as a very long instruction booklet for a machine. Shorter booklets with fewer awkward steps run better. A compiler is an editor that shortens the booklet without changing what the machine ends up doing.
One kind of editor only looks at a few neighbouring steps at a time, so it misses steps that cancel far apart. Another tears the whole booklet into loose notes, finds lots to cut, then struggles to bind the notes back in order, often making the booklet longer. This paper's editor takes out a few pages, rearranges them using only swaps known to give the same result, and binds them straight back in, again and again.
The editing habits were worked out by a team of AI assistants practising on short booklets, then frozen into a fixed editor. The authors report it trims booklets of up to 8,192 qubits far more than a standard editor, and faster. It does not yet know which workshop, meaning which hardware, the booklet is for.
The abstract, word for word, with the six densest phrases unpacked.
Efficient quantum circuit compilation is essential for both near-term and fault-tolerant quantum computing. However, existing compilers struggle to simultaneously achieve universality, scalability, and high optimization performance. Here, we present a quantum compilation algorithm LuWu based on the ZX-calculus, discovered through a human-AI collaboration1. By operating directly in the ZX-calculus, the compiler guarantees exact equivalence without requiring circuit verification2 and applies universally to arbitrary quantum circuits. Its runtime scales nearly linearly with the number of qubits3, enabling scalability to large circuits. On benchmarks reaching 8,192 qubits, it achieves 7.3 × higher composite optimization performance than Qiskit O34 while running 7.1 × faster. Moreover, optimization rules discovered on small circuits generalize directly to large-scale circuits5. Our compiler further extends naturally to non-unitary and dynamic quantum circuits6. The design principles underlying this compilation algorithm are also discussed.
Three lines of work lead here. Each stop says what it showed and what this paper uses it for.
The paper is one short letter. Read it in this order.
Skip the opening survey paragraphs if you know ZX compilers and Qiskit.
If the lead is smaller than it looks, these places show why. Each is short.
Figure 4(a) tracks the number of completed circuits versus the per-circuit timeout cutoff. LuWu completes all 131 circuits within 47.9s per circuit, whereas every competing compiler falls short of full completion and enters a clear plateau where extending the cutoff further yields almost no additional finished circuits. We set the evaluation cutoff well inside this plateau. Under the first protocol, Fig. 4(b) shows the resulting full-dataset composite reduction Qagg with unfinished runs counted as 0% reduction. LuWu maintains a substantial lead over all five baselines, while the global ZX-extraction compilers (PyZX FullReduce and QuiZX) suffer net gate growth. Because all curves flatten out well before the end of the evaluation window, choosing a longer cutoff would not change this conclusion.
Under the second protocol, Figs. 4(c)–4(d) compare all four individual metrics strictly on the subset of circuits each baseline successfully completes, eliminating timeout penalties completely. Across both circuit-preserving optimizers [Fig. 4(c)] and global ZX-extraction compilers [Fig. 4(d)], the competing compilers match LuWu on only a few individual metrics, namely the T -gate reductions of the ZX-based baselines, and LuWu outperforms them substantially on all remaining metrics. In particular, LuWu beats Qiskit O3 and TKET on every metric, achieves the same T -gate reduction as PyZX Teleport, PyZX FullReduce, and QuiZX while delivering far stronger two-qubit, total-gate, and depth reductions, and avoids the severe circuit-extraction overhead in two-qubit gates and depth incurred by PyZX FullReduce and QuiZX.
In what follows, we use Qagg together with its four individual components as our primary metrics for evaluating compiler performance. Complete formal definitions, benchmark tables, evaluation protocols, and verification details are provided in the companion technical appendix and repository [37].
Nothing on this page was recomputed. Every claim points to the paper so you can check it.
Here we report a verification-free and scalable quantum compiler developed through a human-AI collaboration involving a team of LLM agents. The most important human contribution is the idea of evolving a deterministic compiler restricted to a fixed library of elementary ZX-calculus axioms, rather than generating arbitrary circuits and verifying unitary equivalence afterward. Since every elementary axiom preserves the underlying linear map exactly, exact unitary equivalence is guaranteed by construction, without an equivalence verifier or the exponential cost of state simulation. To maintain linear scalability without stalling at the optimization barriers, the compiler makes brief, bounded excursions into non-circuit ZX diagrams and then converts each excursion back into a directly readable circuit. In this way, it captures nonlocal cancellations while avoiding global graph extraction altogether. On 130 unseen large-scale benchmarks reaching 8,192 qubits, our compiler reduces T gates on average by ∼57%, two-qubit gates by ∼29%, and circuit depth by ∼49%. Moreover, optimization rules discovered solely on 81 small circuits of at most 28 qubits generalize directly to the 131 unseen circuits up to 8,192 qubits. Thus, our compiler, called LuWu [23], strikes a balance among efficiency, universality, and scalability.
More latest news
Read all