Quantum unitary synthesis addresses the problem of translating abstract quantum algorithms into sequences of hardware-executable quantum gates. Solving this task exactly is infeasible in general due to the exponential growth of the underlying combinatorial search space. Existing approaches suffer from misaligned optimization objectives, substantial training costs and limited generalization across different qubit counts. We mitigate these limitations by using supervised learning to approximate the minimum description length of residual unitaries and combining this estimate with stochastic beam search to identify near optimal gate sequences. Our method relies on a lightweight model with zero-shot generalization, substantially reducing training overhead compared to prior baselines. Across multiple benchmarks, we achieve faster wall-clock synthesis times while exceeding state-of-the-art methods in terms of success rate for complex circuits.
Figures & tables
Figure 1: Fast and Scalable Quantum Circuit Synthesis. Left: Illustration of our synthesis search. We use an MDL predictor with beam search at inference time: candidate circuits are expanded by appending gates (+ T , + CX ). Each node denotes a partial gate sequence ( T , CX , T CX , CX T , T T , CX CX ) and the numbers show the predicted remaining MDL. Green nodes are kept, while red nodes are pruned from the search. Right: Comparison of several distance measures: Hilbert-Schmidt (HS), worst-case, average fidelity and MDL evaluated on representative two-qubit circuits, illustrating how the choice of metric changes the landscape as circuits approach the target.
Figure 2: Success counts (out of 100 targets per T -count, higher is better) for MDL-guided beam search versus the RL baseline of ( Rietsch et al., 2024 ) and annealing algorithm of ( Paradis et al., 2024 ) on 4 and 5-qubit instances. Our method uses beam width B=10 and 8000 trials per instance (avg. ∼ 22s runtime) and declares success when Favg(U(C),U⋆)≥0.9 ( Eq. 1 ). Results for RL at high T-counts are unavailable because they are not reported in ( Rietsch et al., 2024 ) , likely due to the associated computational cost.
Figure 3: QAS-Bench ( Lu et al., 2023 ) QC Regeneration results as heatmaps for six methods. Columns correspond to layer difficulty (1–6) and rows to qubit count (2–5). Each cell shows the number of successful syntheses out of 15 targets (5 RC-S + 10 RC-C) for that (n,layer) bucket. All methods are re-run on the same targets under a budget-controlled per-instance wall-clock budget (22 s for ours, 30 s for brute force and Synthetiq , 60 s for all others); darker cells indicate higher success. Our method uses a single n=5 MDL predictor with padding for n<5 , beam width B=10 and the success criterion Favg(U(C),U⋆)≥0.99 .
Ours
Synthetiq
Brute force
QuantumCircuitOpt
Problem
budget (s) †
gates
time (s)
gates
time (s)
gates
time (s)
gates
4-GHZ state
22
4
1.10
21
0.09
4
timeout
4-linear cluster state
22
7
0.93
20
3.59
7
timeout
4-phase gadget
22
7
1.22
32
28.26
7
timeout
5-GHZ state
22
5
3.82
28
1.05
5
timeout
5-linear cluster state
22
9
132.49
23
331.26
9
timeout
Table 1: Runtime and solution size (lower is better) comparison on common structured circuits. † Ours uses a fixed compute budget of 8000 trials per instance (reported time is 22 s for that budget). For other methods, time is wall-clock to produce the reported solution. timeout indicates exceeding the time limit (1 h). The circuits are explicitly given in Appendix C .
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
Model
Val. loss ↓
MAE ↓
R2↑
Float-tokenizer
241.8
12.1
0.6
Alternative-tokenizer
251.0
12.3
0.6
MLP
67.1
7.7
0.55
Appendix
Table 2: Comparison of three models on the validation set. Lower is better for Loss and MAE; higher is better for R2 .
Figure 4: Canonical structured circuits used in our evaluation: GHZ states, cluster states, phase-gadget constructions and the [[5,1,3]] (perfect) quantum error-correcting code.
Figure 5: Overall success rate as a function of the beam-search trial budget.
Unitary Synthesis, the decomposition of a unitary matrix into a sequence of quantum gates, is a fundamental challenge in quantum compilation. Prevailing reinforcement learning (RL) approaches are often hampered by sparse reward signals, which necessitate complex reward shaping or long training times, and typically converge to a single policy, lacking solution diversity. In this work, we propose QFlowNet, a novel framework that learns efficiently from sparse signals by pairing a Generative Flow Network (GFlowNet) with Transformers. Our approach addresses two key challenges. First, the GFlowNet framework is fundamentally designed to learn a diverse policy that samples solutions proportional to their reward, overcoming the single-solution limitation of RL while offering faster inference than other generative models like diffusion. Second, the Transformers act as a powerful encoder, capturing the non-local structure of unitary matrices and compressing a high-dimensional state into a dense latent representation for the policy network. Our agent achieves an overall success rate of 99.7% on a 3-qubit benchmark(lengths 1-12) and discovers a diverse set of compact circuits, establishing QFlowNet as an efficient and diverse paradigm for unitary synthesis.
Inhoe Koo, Hyunho Cha, Jungwoo Lee
NextQuantum, Seoul National University, Republic of Korea
An important task in quantum computing is unitary circuit synthesis compatible with physical hardware constraints. This problem has a natural hybrid structure as local single-qubit gates are continuous variables on the Lie group SU(2) while the entangling circuit structure is discrete and hardware-dependent. In this work, we use generative models to perform quantum circuit synthesis incorporating both the natural SU(2) manifold geometry of quantum gates and hardware constraints that determine the overall circuit structure. Our model comprises two components: a circuit skeleton selector that chooses an entangling circuit and a diffusion model that generates quantum gates on the given circuit template by performing diffusion on the curved manifold SU(2)≃S3 itself. We demonstrate this approach with unitary compilation of physically motivated three-qubit Hamiltonian simulation targets such as the Transverse Field Ising Model and the Heisenberg-XXZ Model and show that Lie group diffusion outperforms comparable baselines. The synthesised circuits can also be customised subject to constraints, which we demonstrate by producing circuits with large and small gate rotation angles for the same target unitary evolution. We also investigate the fidelity-complexity frontier of the synthesised gates to demonstrate that the circuit selector learns to select circuits that balance fidelity with complexity rather than collapsing onto the most expansive entangling template. These results demonstrate that Lie group diffusion provides a natural generative framework for hardware-aware quantum circuit synthesis.
We consider the problem of synthesizing Clifford quantum circuits for devices with all-to-all qubit connectivity. We approach this task as a reinforcement learning problem in which an agent learns to discover a sequence of elementary Clifford gates that reduces a given symplectic matrix representation of a Clifford circuit to the identity. This formulation permits a simple learning curriculum based on random walks from the identity. We introduce a novel neural network architecture that is equivariant to qubit relabelings of the symplectic matrix representation, and which is size-agnostic, allowing a single learned policy to be applied across different qubit counts without circuit splicing or network reparameterization. On six-qubit Clifford circuits, the largest regime for which optimal references are available, our agent finds circuits within one two-qubit gate of optimality in milliseconds per instance, and finds optimal circuits in 99.2% of instances within seconds per instance. After continued training on ten-qubit instances, the agent scales to unseen Clifford tableaus with up to thirty qubits, including targets generated from circuits with over a thousand Clifford gates, where it achieves lower average two-qubit gate counts than Qiskit's Aaronson-Gottesman and greedy Clifford synthesizers.
Richie Yeung, Aleks Kissinger, Rob Cornish
Department of Computer Science, University of Oxford · Quantinuum · College of Computing and Data Science, Nanyang Technological University, Singapore