RESEARCH NOTE /
QFlowNet: Fast, Diverse, and Efficient Unitary Synthesis with Generative Flow Networks [Accepted in IEEE QCNC 2026]

“Finding not just one solution, but a diverse landscape of compact quantum circuits.”
1. The Problem: The Compilation Challenge
Decomposing a target unitary U into a sequence of gates (Unitary Synthesis) is a combinatorial problem with a search space growing as G^l (Gate set size to the power of length). Existing ML approaches face a critical trade-off:
- RL (e.g., AlphaZero): Suffers from sparse rewards (fidelity is a “cliff”) and converges to a single deterministic policy, lacking diversity.
- Diffusion Models: Provide diversity but require slow, iterative inference, making them impractical for on-the-fly compilation.
2. Key Innovation: GFlowNets + Transformers
I developed QFlowNet, a framework pairing Generative Flow Networks (GFlowNets) with Transformers to learn a policy that samples circuit candidates proportional to their reward.
We reframe synthesis as a path-finding problem to a universal goal:
State t = U V^† → Action → State t+1 … → Terminal → I
- Universal Goal: Instead of learning a target-specific function, the agent learns to reduce the “unitary residual” to the Identity matrix (
I). This allows a single trained policy to synthesize any target unitary. - Transformer Encoder: Captures the non-local structure of the unitary matrix, compressing high-dimensional states into dense latent representations for the policy.
3. Why It Matters
QFlowNet establishes a new standard for efficient and diverse synthesis.
- Diversity & Compactness: Unlike RL, it generates a diverse set of high-fidelity candidates, often discovering circuits more compact than standard compilers.
- Speed: It overcomes the slow inference of diffusion models while handling the sparse reward landscape effectively.
- Performance: Achieved a 99.7% success rate on 3-qubit benchmarks for circuit lengths 1–12.