Verifier-guided AI scales quantum circuit optimisation to 300 gates

Researchers at Intelligent Quantum Inception Inc., iFLYTEK Research, and Tsinghua University have scaled quantum circuit optimization to 300 gates using a new artificial intelligence method. The team’s GraftQ model jointly encodes both gate-token sequences and simplified ZX diagrams, representing a multimodal approach to the task of reducing costly two-qubit gates and non-Clifford T gates. This work extends training to circuits with up to 300 gates on 5 to 20 qubits, achieving 94.1% equivalence accuracy on 20-100-gate circuits and surpassing the performance of PyZX in two-qubit gate reduction.

GraftQ: Multimodal Encoding of Circuits and ZX Diagrams

GraftQ, a new model developed by researchers, achieves a 94.1% equivalence accuracy (pass@8) on 20-100-gate circuits, as demonstrated by comparisons on 9,000 held-out circuits, and suggests a pathway toward managing the complexity inherent in larger quantum computations. This multimodal encoding, central to GraftQ’s architecture, combines the strengths of two distinct representations. The gate-token sequence provides a standard, sequential description of the circuit, while the ZX diagram offers a graphical representation that simplifies the identification of equivalent circuits.

GraftQ uses a GNN-Transformer to jointly process these inputs, generating optimized circuits autoregressively. The system’s design allows it to learn from a vast dataset of over millions of verified triples, each consisting of a source circuit, its corresponding ZX diagram and a target circuit optimized using the PyZX tool. This reliance on PyZX for generating the training data emphasises a commitment to ensuring the functional equivalence of the optimized circuits.

The training process itself is a two-stage approach, beginning with supervised learning and culminating in reinforcement learning. Initial pretraining on the large dataset of verified triples establishes a foundational understanding of circuit optimization principles. This is then refined through reinforcement learning, where a verifier assesses the validity of each generated circuit, and a reward function quantifies the reduction in gate count relative to the reference circuit.

Experiments compared Group Relative Policy Optimization (GRPO) with Maximum-Likelihood Reinforcement Learning (MaxRL), with the team proposing a Hybrid advantage estimator that combines the benefits of both methods. Further enhancing performance, a size curriculum progressively extends training from shorter circuits, containing 20 to 100 gates, up to the more complex circuits. GraftQ surpasses PyZX in two-qubit gate reduction and nearly matches its T-gate counts.

Supervised Pretraining with Verified Circuit Triples

Supervised learning used millions of verified quantum circuit examples to establish a foundational understanding for the GraftQ model before reinforcement learning refined its performance. This initial pretraining phase used a dataset of paired source circuits, their simplified ZX diagrams, and corresponding target circuits already optimized by the PyZX tool, providing a robust base for subsequent stages. The process focused on replicating the PyZX output directly, allowing the model to learn valid circuit syntax and align gate tokens with the visual structure of ZX spiders.

The scale of this supervised pretraining is notable. The model was initially trained on circuits with 20 to 100 gates before progressing to more complex examples. This approach prioritizes learning the optimization process end-to-end, rather than simply memorizing solutions.

Conditioning on the ZX diagram alongside the source circuit provided GraftQ with both the explicit gate sequence and the simplified graphical structure, enhancing its ability to understand the underlying quantum computation. A size curriculum was then implemented, progressively extending training from shorter circuits to those with increasing complexity, up to 300 gates.

This curriculum was designed to prevent a degradation in performance on simpler circuits while simultaneously enabling the model to generalize to more challenging problems. The corpus of circuits was partitioned into buckets based on gate count, specifically, ranges of 20-100, 101-200, and 201-300 gates, allowing for targeted training at each level of complexity.

Reinforcement Learning with Verifier-Guided Rewards

This scale surpasses previous limitations and suggests a growing capacity to handle increasingly complex quantum algorithms. The researchers achieved this by moving beyond standard maximum-likelihood training, which focuses on token-level cross-entropy rather than the actual equivalence of quantum circuits. This approach penalized alternative, potentially more efficient, implementations and relied on a single-dimensional input sequence. The team addressed these shortcomings by conditioning the model’s encoder on ZX graph structure, a visual representation of quantum circuits that aids in identifying equivalent transformations.

This multimodal encoding, combining the ZX diagram with the gate-token sequence, allows the model to better understand the underlying quantum mechanics and explore a wider range of optimization possibilities. This verifier uses a Haar-random state to confirm equivalence, ensuring the optimized circuit produces the same result as the initial one.

They then proposed a “Hybrid” advantage estimator, designed to combine the strengths of both algorithms. “We consider three advantage estimators (GRPO, MaxRL, and Hybrid), which compute Aj,i from the group mean rj = 1/Gsum_(i = 1)^Grj,i and sample standard deviation σj,” the paper states, outlining the mathematical basis for this combined approach. This hybrid estimator aims to achieve both a high success rate on challenging circuits, a strength of MaxRL, and unattenuated gate-count optimization on circuits that are already solved, a benefit of GRPO.

The reinforcement learning process relies on evaluating batches of candidate circuits, each generated from an input circuit, and assigning rewards based on their gate reduction. The advantage estimator then weighs these rewards to guide the model’s learning process.

Curriculum Training Scales Optimization to 300-Gate Circuits

Reinforcement learning, guided by a circuit verifier, has extended the reach of quantum circuit optimization to circuits containing 300 gates, a substantial increase in scale for this artificial intelligence approach. This advancement demonstrates equivalence accuracy, measured as pass@8, reaching 94.1% on circuits of 20 to 100 gates, a significant improvement from the 67.7% achieved under supervised learning alone.

The model not only optimizes gate count but also approaches the performance of the PyZX tool in minimizing the more complex T-gate operations, important for fault-tolerant quantum computing. The optimization process relies on a carefully constructed “size curriculum” that progressively increases circuit complexity, preventing performance declines on simpler tasks while pushing the boundaries of what the model can handle.

Experiments reveal that this progressive training enables generalization to even deeper, unseen circuits, with the model achieving 7.7% pass@8 on circuits containing 301 to 400 gates. The model, named GraftQ, employs a multimodal approach, jointly encoding a circuit’s gate-token sequence with a simplified ZX diagram. This combination of sequence-based and graph-based representations allows GraftQ to better understand the underlying structure of the quantum circuit. The resulting system demonstrates a capacity to not only reduce gate counts but also to generalize to circuits beyond those used during training, suggesting a robust and adaptable optimization strategy.

Equivalence Accuracy Reaches 94.1% with Verifier-Guided RL

Verifier-guided reinforcement learning has propelled equivalence accuracy to 94.1% on circuits containing 20 to 100 gates, a substantial improvement over the 67.7% achieved with supervised learning alone. This leap in performance demonstrates the efficacy of a new approach to quantum circuit optimization, moving beyond simple imitation of known solutions. The advancement allows for optimization of circuits up to 300 gates while maintaining the ability to generalize to even deeper, previously unseen designs.

The core of this progress lies in a model named GraftQ, which uses a two-stage training process. This pre-training established a foundational understanding of circuit equivalence before the system was refined through reinforcement learning. This approach contrasts with earlier autoregressive models, which struggled with maintaining accuracy as circuit length increased.

The researchers adapted both algorithms to a graded reward system, extending MaxRL’s binary reward objective to continuous non-negative values. “We further propose a Hybrid estimator that applies MaxRL weighting to groups containing incorrect candidates and GRPO normalization to all-correct groups, automatically shifting each input from learning equivalence to reducing gate count as accuracy improves,” the paper details. This allows the system to prioritize both correctness and efficiency in its optimization process.

Beyond algorithmic improvements, a “size curriculum” played a major role in GraftQ’s success. Training began with shorter circuits, those with 20 to 100 gates, before progressively scaling up to the 300-gate benchmark. This gradual increase in complexity allowed the model to build a robust understanding of optimization principles without being overwhelmed by the challenges of larger circuits.

👉 More information
🗞 Multimodal Generative Quantum Circuit Optimization with Verifier-Guided Reinforcement Learning
✍️ Xiaodi Li (Intelligent Quantum Inception Inc., Haidian, Beijing, China); Linghui Chen (iFLYTEK Research, Hefei, China); Tao Zhang (Institute for Advanced Study, Tsinghua University, Beijing, China)
🧠 ArXiv: http://arxiv.org/abs/2611.35822v1

Stay current

See today’s quantum computing news on Quantum Zeitgeist for the latest breakthroughs in qubits, hardware, algorithms, and industry deals.

Avatar of Dr. Donovan

Latest Posts by Dr. Donovan: