Abstract: This paper investigates the integration of quantum computing into offline reinforcement learning and the deployment of the resulting quantum policy in a real-time control hardware realization of the cart-pole system. Variational Quantum Circuits (VQCs) are used to represent the policy. Classical model-based offline policy search was applied, in which a pure VQC with trainable input-output weights is used as a policy network instead of a classical multilayer perceptron. The goal is to evaluate the potential of deploying quantum architectures in real-world industrial control problems. The experimental results show that the investigated model-based offline policy search is able to generate quantum policies that can balance the hardware cart-pole. A latency analysis reveals that while local simulated execution meets real-time requirements, cloud-based quantum processing remains too slow for closed-loop control.
Introduction
Quantum Reinforcement Learning (QRL) has largely remained a theoretical pursuit, often confined to idealized simulations. This research bridges the gap between theory and practice by exploring whether a "pure" quantum policy—one where the core logic resides entirely within a quantum circuit—can handle the split-second demands of a physical cart-pole system. The study addresses two primary hurdles: the extreme latency requirements of real-time control and the architectural "purity" of the quantum model.
The QMOOSE Framework
To develop the policy, the authors introduced QMOOSE (Quantum MOdel-based Offline policy Search with Ensembles). This approach evolves classical model-based RL by replacing the standard neural network policy with an 8-qubit Variational Quantum Circuit (VQC).
As shown in the architecture above, the VQC utilizes "Strongly Entangling Layers." To avoid relying on heavy classical "sandwich" layers, the researchers integrated trainable scaling factors directly into the quantum gates. Input features are scaled during encoding ($R_X(w_i x_i)$), and the final measurement is scaled by a trainable $w_{out}$. This design allows the quantum circuit to learn the necessary "amplitude" for physical actions while keeping the trainable parameters within the quantum domain.
Methodology and Training
The policy was trained using an offline dataset collected directly from a physical cart-pole rig. This dataset contained sequences of state transitions (position, velocity, angle, and angular velocity) and rewards.
Instead of risky real-time training on hardware, the authors used an ensemble of classical neural networks to create a "surrogate environment." The quantum policy was optimized against this ensemble using synthetic rollouts. This offline approach ensures that the policy is robust before it is ever deployed to the physical motor.
Real-Time Hardware Implementation
The final control loop utilized a Raspberry Pi 5 to host the simulated VQC (via the TensorCircuit framework), which communicated with an Arduino board responsible for sensor data and motor control.
A critical finding was the latency bottleneck. To maintain stability, the system required a control loop of 20ms, meaning the policy had to execute in under 15ms. Local simulation on the Pi 5 achieved this (~5ms), but testing against the IBM Cloud QPU resulted in latencies of approximately 3,700ms—far too slow for real-time applications. This highlights that for the near future, quantum control at the edge must rely on local simulation or specialized hardware.
Key Results and Insights
- Stability and Robustness: The QMOOSE policy successfully balanced the physical cart-pole for over 200 consecutive steps, handling real-world sensor noise and mechanical imperfections effectively.
- Quantum Smoothness: Interestingly, the quantum policy exhibited smoother control dynamics than its classical counterparts. While classical neural networks often produced "jittery" corrective actions, the VQC-based policy provided more fluid trajectories.
- The Necessity of Scaling: The study found that the "pure" VQC could not achieve stability without the trainable input/output weights. This suggests that the interface between classical data and the quantum Hilbert space is as vital as the entanglement within the circuit itself.
Conclusion
This research demonstrates that VQC-based policies are not just theoretical curiosities but are capable of managing real-world, real-time physical systems. While cloud-based quantum hardware is currently too slow for closed-loop control, the success of simulated VQCs at the edge paves the way for future integrated quantum controllers. Subsequent work will look toward mitigating noise on actual NISQ hardware and using automated architecture search to further optimize these quantum policies.
Summary updated