Quantum circuit optimization replaces a circuit with an equivalent one using fewer costly operations: two-qubit gates, which dominate error on noisy hardware, and non-Clifford $T$ gates, which dominate fault-tolerant overhead. We formulate this task as graph-conditioned sequence-to-sequence generation and introduce \method{} (Graph-Augmented Fusion Transformer for Quantum circuit optimization), a multimodal GNN-Transformer that jointly encodes a source circuit's gate-token sequence and simplified ZX diagram in a Transformer encoder and autoregressively generates an optimized circuit. The model is first pretrained by supervised learning on millions of verified triples of a random source circuit, its simplified ZX diagram, and a target circuit optimized by PyZX. It is then fine-tuned by reinforcement learning: a verifier checks whether each generated circuit is equivalent to the reference circuit, and a reward function scores its gate-count reduction relative to that reference. We compare Group Relative Policy Optimization (GRPO) with Maximum-Likelihood Reinforcement Learning (MaxRL), whose binary-reward objective we generalize to continuous non-negative rewards, and propose a Hybrid advantage estimator that combines the strengths of both. A size curriculum further extends training from short (20--100-gate) circuits up to 300 gates on 5--20 qubits. On held-out benchmarks, verifier-guided RL with curriculum training raises equivalence accuracy (pass@8) on 20--100-gate circuits from $67.7\%$ under supervised learning to $94.1\%$ while surpassing PyZX in two-qubit gate reduction and nearly matching its $T$-gate counts, and scales optimization to 300-gate circuits while generalizing to deeper unseen circuits.
翻译:暂无翻译