NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning to Program Variational Quantum Circuits with Fast Weights

Samuel Yen-Chi Chen · DOI

Abstract

Variational Quantum Circuits (VQCs) are promising for sequential data processing, but training them using Backpropagation-Through-Time (BPTT) is computationally expensive on Noisy Intermediate-Scale Quantum (NISQ) devices. This paper introduces Quantum Fast Weight Programmers (QFWP), a hybrid architecture where a classical "Slow Programmer" neural network dynamically updates the parameters of a quantum "Fast Programmer" VQC at each time step. This approach replaces recurrent connections with a dynamic parameter-update rule, significantly reducing training time and parameter count. Experiments on time-series prediction and reinforcement learning demonstrate that QFWP achieves state-of-the-art performance with up to 18x fewer quantum parameters than Quantum LSTMs.

Introduction

In the pursuit of "quantum advantage," researchers have increasingly applied Variational Quantum Circuits (VQCs) to temporal and sequential tasks, such as stock price prediction or robotic control. While models like Quantum LSTMs (QLSTMs) have shown promise, they are hindered by the computational cost of training on current hardware.

The primary bottleneck is the reliance on Backpropagation-Through-Time (BPTT). In a quantum context, calculating gradients across multiple time steps using the standard "parameter-shift rule" requires an immense number of circuit evaluations. This makes training Quantum Recurrent Neural Networks (QRNNs) agonizingly slow. To address this, the authors propose the QFWP, which captures the "memory" of past events without the architectural baggage of recurrence.

Methodology: The QFWP Architecture

The QFWP framework consists of a hybrid system divided into two functional components: the Slow Programmer and the Fast Programmer.

1. The Slow Programmer (Classical)

The Slow Programmer is a standard classical feed-forward neural network. Its role is to process the input at each time step and generate a set of updates ($\Delta W$) for the quantum circuit. This component acts as the "logic" unit, determining how the quantum state should evolve based on incoming data.

2. The Fast Programmer (Quantum)

The Fast Programmer is a VQC whose parameters ($\theta$) are not fixed after training. Instead, they are updated at every time step according to the rule: $$\theta_{t+1} = \theta_t + \Delta W$$ In this paradigm, the "memory" of the system is stored directly in the physical parameters of the quantum circuit. As the circuit sees more data, it effectively "evolves" its own programming.

The "Outer Product" Trick

To ensure the classical Slow Programmer remains computationally efficient, the authors implement an "outer product trick." Rather than having the classical network output every individual quantum parameter directly, it generates two smaller vectors—one representing the circuit layers and one representing the qubits. The outer product of these vectors creates the full parameter update matrix, allowing a compact classical model to control a complex quantum state.

Experimental Evaluation

The QFWP model was benchmarked against standard QLSTM models across two primary domains:

  • Time-Series Modeling: Tasks included the Damped Simple Harmonic Motion (SHM), the Bessel Function ($J_2$), and the NARMA5/NARMA10 benchmarks, which test a model's ability to remember long-term dependencies.
  • Reinforcement Learning (RL): The model was tested on MiniGrid-Empty (5x5 and 6x6 grids), a sparse-reward navigation task where an agent must find a goal in a grid.

Key Results

The QFWP demonstrated significant advantages over baseline quantum recurrent models in terms of efficiency and performance:

  • Parameter Efficiency: In time-series tasks, the QFWP achieved comparable results using only 16 quantum parameters, whereas QLSTMs required between 144 and 288 parameters.
  • Superior RL Performance: In MiniGrid navigation, the QFWP reached optimal scores faster and with higher stability. For the 5x5 grid, QFWP reached peak performance in roughly half the training episodes required by a 10-layer QLSTM.
  • Eliminating BPTT: Because the quantum component is technically feed-forward (with memory handled by the parameter updates), the authors successfully avoided the deep temporal gradients that make QRNNs slow, leading to a more efficient training regime.

Conclusion and Future Work

The Quantum Fast Weight Programmer represents a significant step toward practical quantum machine learning for sequential tasks. By treating memory as a dynamic parameter state rather than a hidden vector, the QFWP bypasses the most significant training bottlenecks of NISQ-era quantum models.

Future research will focus on evaluating the robustness of these dynamic updates against hardware noise (decoherence and gate errors) and exploring "fully quantum" FWPs where the Slow Programmer is also implemented on a quantum processor.

Summary updated

BibTeX
@inproceedings{chen2024learning,
  author = {Samuel Yen-Chi Chen},
  title = {{Learning to Program Variational Quantum Circuits with Fast Weights}},
  booktitle = {IJCNN},
  year = {2024},
  url = {https://openreview.net/forum?id=G8wyIUzO88},
}
Figure