Abstract
Quantum reinforcement learning utilizes quantum layers to process information within a machine learning model. However, both pure and hybrid quantum reinforcement learning face challenges such as data encoding and the use of quantum computers during the inference stage. We apply the Quantum-Train method to reinforcement learning tasks, called QTRL, training the classical policy network model using a quantum machine learning model with polylogarithmic parameter reduction. This QTRL approach eliminates the data encoding issues of conventional quantum machine learning and reduces the training parameters of the corresponding classical policy network. Most importantly, the training result of the QTRL is a classical model, meaning the inference stage only requires a classical computer. This is extremely practical and cost-efficient for reinforcement learning tasks, where low-latency feedback from the policy model is essential.
Introduction
Reinforcement Learning (RL) agents often require massive neural networks to solve complex tasks, leading to a high parameter count that is expensive to train. While Quantum Reinforcement Learning (QRL) promises more efficient processing through quantum superposition and entanglement, it faces significant practical hurdles:
- Data Encoding Bottleneck: Converting classical environment data into quantum states is computationally expensive and slow.
- Inference Latency: Standard QRL requires a quantum computer for every action decision, which is impractical for real-time applications like robotics.
- Hardware Accessibility: Quantum hardware remains scarce and expensive.
QTRL (Quantum-Train Reinforcement Learning) addresses these issues by using a quantum neural network (QNN) to generate weights for a classical policy model, enabling quantum-enhanced training with classical-speed execution.
Methods
The core of QTRL is the Quantum-Train (QT) approach. Instead of the QNN acting as the policy itself, it serves as a parameter generator.
An $n$-qubit quantum state lives in a Hilbert space of size $2^n$. By measuring the qubits, the system generates $2^n$ distinct probabilities. These are fed into a small classical mapping model ($M_\beta$) that transforms them into the weights ($\theta$) of a classical neural network. This classical network then interacts with the environment. During training, policy gradients update both the quantum parameters ($\phi$) and the mapping parameters ($\beta$). This allows $O(poly(n))$ quantum parameters to control a classical model with $2^n$ parameters, achieving a polylogarithmic reduction in trainable variables.
Experimental Results
QTRL was evaluated on two standard RL benchmarks: CartPole-v1 (a control problem) and MiniGrid-Empty-5x5-v0 (a navigation task). Simulations were performed using the TorchQuantum package.
Experiments demonstrate that QTRL performs on par with or better than purely classical methods while using significantly fewer parameters. In CartPole-v1, a classical model with 898 parameters achieved a reward of 436.3. A QTRL model (QTRL-5) with only 651 parameters (a ~27% reduction) outperformed it with a reward of 493.8. In MiniGrid, the classical model required 4,835 parameters for a reward of 0.916, while QTRL achieved 0.900 using only 2,529 parameters—nearly halving the parameter count. Furthermore, increasing the quantum circuit depth ($L$) directly correlated with improved agent performance.
Discussion and Conclusion
QTRL successfully decouples quantum training from classical inference. By using the QNN only for weight generation, the final product is a standard classical model deployable on edge devices without quantum hardware. This approach also eliminates the need for complex data encoding, as the QNN never directly processes environment states. Future work will focus on reducing the training cost and scaling the method to more complex, real-world robotics datasets.
Summary updated