Manuscript Offprint

arXiv:2609.31066

Modeling quantum neural network gradient with reinforcement learning

Nhan Trong Luu, Duong Trung Luu, Nam Ngoc Pham, Thang Cong Truong

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Training quantum neural networks (QNNs) on near-term hardware remains hampered by two compounding difficulties: the exponential vanishing of gradient variance known as the barren plateau, and the O(L⋅2n)\mathcal{O}(L \cdot 2^n) time and memory cost of differentiating through an nn-qubit, LL-layer circuit. We propose RLQ-Grad, a reinforcement-learning-based optimizer in which a classical policy πϕ\pi_\phi (a spectrally-normalized PPO agent) learns to propose parameter updates directly, conditioned on the QNN's current parameters, loss, accuracy, and previous update. Because the surrogate gradient is emitted by a classical network rather than obtained by differentiating through the unitary U(θ)U(\theta), its variance is not constrained by the barren plateau concentration bound, and its cost scales with the number of trainable parameters rather than the Hilbert-space dimension. We prove these properties formally and verify them on a hardware-efficient ansatz across four supervised benchmarks with up to n=20n = 20 qubits. RLQ-Grad preserves a near-flat gradient-variance curve where backpropagation, parameter-shift, and adjoint differentiation decay by 1 to 2 orders of magnitude. Accounting for the full training pipeline (PPO rollouts, actor-critic updates, and optimizer states), RLQ-Grad needs under 2 MB of memory and runs 2490×2490\times, 7876×7876\times, and 673×673\times faster per iteration than these three methods at n=20n = 20. It improves top-1 accuracy by up to +10%+10\% over gradient-based baselines on circuits of up to 12 qubits, and matches dedicated barren plateau mitigation methods on CIFAR-10 at 14 to 20 qubits, where evolutionary and gradient-free optimizers collapse to chance.

1 Introduction

The emergence of Noisy Intermediate-Scale Quantum (NISQ) devices has established variational quantum algorithms (VQAs) as a leading paradigm for achieving practical quantum advantage [1, 2, 3]. These hybrid quantum-classical frameworks, which include Quantum Neural Networks (QNNs), rely on the iterative optimization of parameterized quantum circuits (PQCs) to minimize a problem-specific cost function [1, 4, 5]. However, the optimization landscape of QNNs is notoriously challenging due to non-convexity, the presence of low-quality local optima, the "barren plateau" phenomenon [6], and the high computational cost of circuit evaluations [7, 1, 8]. To address these hurdles, a burgeoning body of research has explored the application of reinforcement learning (RL) to automate and enhance the optimization of both the variational parameters and the underlying circuit architectures.

Initial efforts in this domain focused on utilizing RL to find optimal variational parameters for fixed-structure circuits, such as the Quantum Approximate Optimization Algorithm (QAOA) [8, 7] which formulated parameter optimization as a learning task, where objective is to train RL policy

*Corresponding author. Email: luutn@ctu.edu.vn.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

networks on small problem instances to exploit geometrical regularities that generalize to larger, unseen instances. Similarly, [1] introduced a "learning to learn" framework using classical recurrent neural networks (RNNs) as black-box controllers to propose parameter updates for QAOA and Variational Quantum Eigensolvers (VQE), eventually highlights the potential for meta-learning to identify problem-class-specific heuristics that significantly reduce the number of optimization iterations required. Further advancing this theme, [9] proposed an RL scheme for feedback quantum control, demonstrating that an agent can learn smooth, optimal adiabatic schedules for quantum Ising chains that are successfully transferable across system sizes.

Parallel to parameter optimization, some research has shifted toward Quantum Architecture Search (QAS) and circuit optimization, where RL agents autonomously design or refine the circuit structure itself. [10] demonstrated that deep RL could learn generic strategies to reduce circuit depth and gate count by selecting sequences of logically equivalent transformations. For building circuits from scratch, [11] proposed a DRL framework to search for gate sequences that synthesize specific quantum states without prior physical knowledge. [3] and [5] also further refined QAS for chemistry applications, employing feedback-driven curriculum learning to adapt problem complexity and discover gate-efficient ansatzes for molecules like LiH.

Recent advancements have focused on improving the scalability and robustness of these RL-based methods. [12] evaluated SAC-based optimizers capable of minimizing loss across random circuits of varying sizes and objectives. To tackle the prohibitive simulation costs of large systems, [5] introduced TensorRL-QAS, which warm-starts the RL search using tensor network approximations to narrow the search space and accelerate convergence. Additionally, specialized architectures for machine learning tasks have been explored, such as [13] (RL-QMLAS) aim to perform QAS for QAOA problems and [4] (RLVQC), which discovered novel "Ryz-connected" ansatz families for combinatorial optimization. Finally, [2] have systematically investigated the impact of specific techniques (such as data re-uploading [14], output scaling, and metaheuristic strategies [15]) to stabilize training and reduce the parameter count of VQCs within RL environments.

While RL has driven notable advances in QNN research, its integration into supervised learning for QNNs remains largely underexplored. Early efforts framing RL as an exhaustive parameter search over QNN configurations prove fundamentally ill-suited to larger-scale problems [12]. Motivated by these limitations, we make the following contributions:

• A novel RL-based optimizer for QNNs: We introduce RLQ-Grad, an RL-based optimizer in which an agent learns to accurately approximate QNN gradients during training, rather than performing exhaustive parameter search or act as a complete replacement of traditional optimizer. Across a range of benchmarks, RLQ-Grad consistently outperforms conventional gradient-based optimizers in classification accuracy.

• Memory reduction and accelerated computation: Beyond accuracy, RLQ-Grad circumvents the gradient variance decay caused by the barren plateau phenomenon, while replacing the 2n2^n dependence of gradient computation time and memory with a cost that grows only linearly in the number of trainable QNN parameters. RLQ-Grad maintains an approximately flat gradient-variance profile, whereas backpropagation, parameter-shift, and adjoint differentiation exhibit declines of 1 to 2 orders of magnitude. Under full-pipeline accounting (actor, critic, gradient buffers, and Adam states), RLQ-Grad requires 1.95 MB at n=20n = 20 qubits (versus 6174 MB for backpropagation) and achieves per-iteration CPU speedups of ∼2490×\sim 2490\times, ∼7876×\sim 7876\times, and ∼673×\sim 673\times over backpropagation, parameter-shift, and adjoint differentiation, respectively, while also transferring directly to GPU execution.

• Scaling to 20 qubits against stronger baselines: RLQ-Grad improves top-1 accuracy by up to +10% over the strongest gradient-based baseline from 2 to 12 qubits. On CIFAR-10 extended to 20 qubits ( PQNN=600P_{QNN} = 600), it keeps improving where backpropagation stagnates, matches dedicated barren plateau mitigation (layerwise learning [16] and Gaussian initialization [17]), and clearly outperforms evolutionary and gradient-free optimizers (CMA-ES, sep-CMA-ES, SPSA), which collapse to chance.

To the best of our knowledge, this work is the first to successfully employ a reinforcement learning agent as a gradient-based optimizer for QNNs, reducing the memory complexity of gradient computation to linear scaling while remaining acceleratable using modern GPU. 2^{2}

2^{2}The source code for our paper is available on Zenodo at https://doi.org/10.5281/zenodo.22956233.

Figure

Figure 1: Illustration of a n-qubit l-depth HEA circuit utilized in the majority of our experiments.

References (54)