Table of Contents
Fetching ...

QAOA-GPT: Efficient Generation of Adaptive and Regular Quantum Approximate Optimization Algorithm Circuits

Ilya Tyagin, Marwa H. Farag, Kyle Sherbert, Karunya Shirali, Yuri Alexeev, Ilya Safro

TL;DR

QAOA-GPT tackles the scalability bottleneck of quantum approximate optimization by training a decoder-only transformer to synthesize problem-specific quantum circuits directly from graph inputs. The model leverages FEATHER graph embeddings and synthetic training data generated from ADAPT-QAOA to produce compact circuits for weighted MaxCut in a single forward pass, avoiding iterative gradient-based optimization. Experiments show that QAOA-GPT achieves high approximation ratios across graph sizes and densities while delivering substantial speedups in circuit generation compared to traditional QAOA/ADAPT-QAOA pipelines. This work demonstrates a viable path for AI-assisted quantum algorithm design and scalable circuit synthesis on near-term hardware.

Abstract

Quantum computing has the potential to improve our ability to solve certain optimization problems that are computationally difficult for classical computers, by offering new algorithmic approaches that may provide speedups under specific conditions. In this work, we introduce QAOA-GPT, a generative framework that leverages Generative Pretrained Transformers (GPT) to directly synthesize quantum circuits for solving quadratic unconstrained binary optimization problems, and demonstrate it on the MaxCut problem on graphs. To diversify the training circuits and ensure their quality, we have generated a synthetic dataset using the adaptive QAOA approach, a method that incrementally builds and optimizes problem-specific circuits. The experiments conducted on a curated set of graph instances demonstrate that QAOA-GPT, generates high quality quantum circuits for new problem instances unseen in the training as well as successfully parametrizes QAOA. Our results show that using QAOA-GPT to generate quantum circuits will significantly decrease both the computational overhead of classical QAOA and adaptive approaches that often use gradient evaluation to generate the circuit and the classical optimization of the circuit parameters. Our work shows that generative AI could be a promising avenue to generate compact quantum circuits in a scalable way.

QAOA-GPT: Efficient Generation of Adaptive and Regular Quantum Approximate Optimization Algorithm Circuits

TL;DR

QAOA-GPT tackles the scalability bottleneck of quantum approximate optimization by training a decoder-only transformer to synthesize problem-specific quantum circuits directly from graph inputs. The model leverages FEATHER graph embeddings and synthetic training data generated from ADAPT-QAOA to produce compact circuits for weighted MaxCut in a single forward pass, avoiding iterative gradient-based optimization. Experiments show that QAOA-GPT achieves high approximation ratios across graph sizes and densities while delivering substantial speedups in circuit generation compared to traditional QAOA/ADAPT-QAOA pipelines. This work demonstrates a viable path for AI-assisted quantum algorithm design and scalable circuit synthesis on near-term hardware.

Abstract

Quantum computing has the potential to improve our ability to solve certain optimization problems that are computationally difficult for classical computers, by offering new algorithmic approaches that may provide speedups under specific conditions. In this work, we introduce QAOA-GPT, a generative framework that leverages Generative Pretrained Transformers (GPT) to directly synthesize quantum circuits for solving quadratic unconstrained binary optimization problems, and demonstrate it on the MaxCut problem on graphs. To diversify the training circuits and ensure their quality, we have generated a synthetic dataset using the adaptive QAOA approach, a method that incrementally builds and optimizes problem-specific circuits. The experiments conducted on a curated set of graph instances demonstrate that QAOA-GPT, generates high quality quantum circuits for new problem instances unseen in the training as well as successfully parametrizes QAOA. Our results show that using QAOA-GPT to generate quantum circuits will significantly decrease both the computational overhead of classical QAOA and adaptive approaches that often use gradient evaluation to generate the circuit and the classical optimization of the circuit parameters. Our work shows that generative AI could be a promising avenue to generate compact quantum circuits in a scalable way.

Paper Structure

This paper contains 21 sections, 14 equations, 8 figures, 3 tables.

Figures (8)

  • Figure 1: Schematic representation of the QAOA-GPT framework. Random graphs are independently processed by FEATHER to extract graph embeddings and by ADAPT-QAOA to generate optimized quantum circuits. These components form a curated graph–circuit collection, which is then tokenized and transformed into a structured training set used to train the QAOA-GPT model.
  • Figure 2: Proposed use case diagram. Given a user-supplied input graph, the system computes a fixed-length graph embedding and tokenizes the graph structure. Both representations are passed to the QAOA-GPT model, which autoregressively generates a quantum circuit that solves the corresponding QAOA optimization problem.
  • Figure 3: Average approximation ratio (AR) of quantum circuits generated with different QAOA methods for graphs with $n = 10, 12, 14$ nodes across varying densities. Each point represents the mean AR over 50 weighted Erdős–Rényi graphs within a density bin. A total of 1000 random graphs were evaluated for each problem size. Solid curves show mainline methods: QAOA-GPT trained with $\mathcal{P}_{\text{QAOA}}$, ADAPT-QAOA, and standard QAOA (ADAPT.jl). Dashed curves show systems that are included for comparison: QAOA-GPT trained with $\mathcal{P}_{\text{dual}}$ (Eq. \ref{['eq:p_dual_op']}) and Qiskit QAOA. Both average and best (out of 5 runs) ARs are reported for QAOA-GPT models. The horizontal dashed line marks the training threshold $\alpha = 0.97$.
  • Figure 4: QAOA-GPT performance as a function of the target approximation ratio (AR) used during training data generation. The experiment is conducted on graphs with $n = 8$ nodes. Each point represents the average AR achieved on a validation set by a separate QAOA-GPT instance trained with circuits filtered by a given target AR threshold.
  • Figure 5: QAOA-GPT performance over the course of training . The blue curve shows the average AR, and the orange curve shows the fraction of structurally invalid circuits.
  • ...and 3 more figures