BCQQ: Batch-Constraint Quantum Q-Learning with Cyclic Data Re-uploading

Maniraman Periyasamy, Marc Hölle, Marco Wiedmann, Daniel D. Scherer, Axel Plinge, Christopher Mutschler

TL;DR

BCQQ introduces a quantum-enhanced approach to offline reinforcement learning by embedding Variational Quantum Circuits (VQCs) into the discrete Batch-Constrained Q-learning framework. By implementing a novel "cyclic data re-uploading" scheme, the algorithm achieves extreme data efficiency, enabling near-optimal performance on benchmark tasks with a fraction of the parameters and data required by classical neural networks.

What Problem Does This Paper Address?

Reinforcement learning (RL) typically relies on an agent interacting dynamically with an environment to learn via trial and error. However, in safety-critical applications like healthcare or robotics, real-time exploration can be dangerous or prohibitively expensive. This necessitates batch (or offline) RL, where an agent learns exclusively from a pre-collected, static dataset.

The main hurdles in offline RL are distributional shift and extrapolation error. Because the agent cannot interact with the environment, it often overestimates the value of unfamiliar states and actions, leading to catastrophic policy failures during deployment. While classical Deep RL algorithms can mitigate this, they require massive datasets to generalize safely. The authors look to quantum computing—specifically Variational Quantum Circuits (VQCs)—to exploit their theoretical data-efficiency advantage and solve offline RL tasks in low-data regimes.

Methods

The authors propose Batch-Constraint Quantum Q-Learning (BCQQ). It builds upon the classical discrete BCQ algorithm, which uses a generative model to restrict the agent's choices to actions well-represented in the training dataset, thereby avoiding distributional shift.

BCQQ replaces both the classical Q-network and the generative model with VQCs. To maximize the expressivity of these quantum circuits, the authors introduce Cyclic Data Re-uploading:

  • Standard Data Re-uploading: To help a VQC approximate complex functions (acting like a Fourier sum), the input data is repeatedly encoded into the circuit before each variational layer.
  • Cyclic Data Re-uploading: Instead of repeating the exact same encoding layout, the input feature vector is cyclically shifted (round-robin style) across the qubits at each layer. This ensures every qubit is exposed to every feature of the input state over the course of the circuit execution, boosting expressivity without adding trainable parameters.
Quantum agent with cyclic data re-uploading strategy

Datasets

The algorithm was evaluated on the standard OpenAI Gym CartPole-v1 environment using two types of offline datasets:

  1. Random Trajectories: Buffers containing $10^2$, $10^4$, and $10^6$ samples generated by a purely random policy to simulate a worst-case data scenario.
  2. Partial Noisy Expert Trajectories: Small buffers of 25, 50, and 100 samples collected from a trained expert policy, artificially corrupted with random actions to mimic imperfect real-world demonstrations.

Key Insights and Ideas

  • Boosting Expressivity via Geometry: By analyzing the empirical Fisher Information Matrix (FIM), the authors demonstrated that cyclically shifting input features increases the model's effective dimension compared to standard re-uploading. This means the circuit can capture a broader class of functions without increasing the parameter count.
  • Extreme Parameter Economy: The quantum agent achieved stable, optimal policies using only 84 trainable parameters ($42 \times 2$). In contrast, classical neural networks required thousands of parameters to achieve comparable stability in offline settings.
  • Algorithmic Robustness to Data Scarcity: Classical networks completely fail to converge when offline training buffers shrink to 100 or 10,000 random samples. The quantum agent, however, remains unaffected by the data bottleneck.
Effective dimension and FIM eigenvalue spectrum analysis

Key Results

  • Random Buffer Performance: BCQQ achieved the maximum possible environment reward of 500 across all buffer sizes, even with just 100 random interactions. Classical BCQ failed on smaller buffers, yielding average rewards as low as 12.88 for a small network and 69.33 for a large network.
  • Noisy Expert Trajectories: In data-scarce expert environments (lengths 25 to 100), the quantum agent exhibited stable convergence matching or exceeding classical networks that possessed 50 to 250 times more parameters.
  • Real Hardware Validation: When deployed on real Noisy Intermediate-Scale Quantum (NISQ) devices (IBMQ), hardware noise initially degraded the reward to around 90. However, by applying Zero Noise Extrapolation (ZNE) error mitigation with 1024 shots, the agent successfully achieved a near-optimal reward of 495.

Limitations and Future Work

While promising, the study is limited to a low-complexity, four-dimensional environment (CartPole-v1). Simulating larger quantum circuits classically is computationally expensive, making it difficult to benchmark BCQQ on high-dimensional, state-of-the-art RL environments. Furthermore, the performance remains highly sensitive to quantum hardware noise, relying heavily on error-mitigation techniques like ZNE.

For future work, the authors plan to investigate how discrete BCQQ scales with more complex VQCs in more challenging environments, and explore whether cyclic data re-uploading can enhance other quantum machine learning applications like classification.

Summary updated

BibTeX
@inproceedings{periyasamy2024bcqq,
  author = {Maniraman Periyasamy and Marc Hölle and Marco Wiedmann and Daniel D. Scherer and Axel Plinge and Christopher Mutschler},
  title = {{BCQQ: Batch-Constraint Quantum Q-Learning with Cyclic Data Re-uploading}},
  booktitle = {IJCNN},
  year = {2024},
  doi = {10.1109/ijcnn60899.2024.10651268},
}
Figure