Paper commentary
Variational Quantum Circuits for Deep Reinforcement Learning
- Problem Deep Q-learning needs networks that current NISQ hardware cannot run faithfully, and sequential decision-making had not been studied on such devices.
- Method Encodes each state as a computational basis state, scores actions with per-qubit expectation values of a shallow variational circuit, and trains it with experience replay and a separate target parameter set.
- Results Frozen-lake layout (a) reached total reward 0.9 at iteration 198, and the cognitive-radio agents with 2 and 5 channels reached total reward 100 within several iterations.

FIGURE 4 : Overview of variational quantum circuits for DRL. In this work, we study the capability of variational quantum circuits in performing DRL tasks. This DRL agent includes a quantum part and a classical part. Under cur- rent limitations on the scale of quantum machines and the capabilities of quantum simulations, we select frozen-lake and cognitive-radio environments for the proof-of-principle study. The proposed framework is rather general and is ex- pected to solve complicated tasks when larger-scale quantum machines are available.
Original paper · CC BY 4.0 · Samuel Yen-Chi Chen, Chao-Han Huck Yang, Jun Qi, Pin-Yu Chen, Xiaoli Ma, Hsi-Sheng Goan · Variational Quantum Circuits for Deep Reinforcement Learning · Original paper figure · Extracted the figure area from page 5 of the original PDF.Why deep Q-learning is hard on NISQ hardware
Deep Q-learning approximates the action-value function with a neural network, and a replay memory and a target network keep its training stable. Without quantum error correction, large circuits cannot be run faithfully on today's machines. The question is whether a shallow variational circuit, trained by a classical optimizer, can take over the role of that network.
Earlier variational-circuit work on NISQ machines covered classification, clustering and generative adversarial networks. Decision-making and policy selection with deep networks had not been addressed on those machines.
The study therefore uses two small environments that a classical simulator can handle: a frozen-lake maze and a cognitive-radio channel-selection task. Both are proof-of-principle tests, and the authors describe the framework as general enough for larger quantum machines.
A variational circuit as the action-value model
The agent is hybrid: a quantum part evaluates the circuit, and a classical computer adjusts its tunable parameters over repeated iterations. The circuit stands in for the action-value model \(Q(s,a;\theta)\), so each action receives a score from the circuit output. The overview figure marks the quantum part and the classical optimization that together form the agent.
Each environment state is numbered and written in binary, and each bit sets one qubit to |0⟩ or |1⟩ through single-qubit rotations. The frozen lake has 16 states, so four qubits are enough to hold all of them. Each bit \(b_i\) sets the angles through \(\theta_i=\pi\times b_i\) and \(\phi_i=\pi\times b_i\), applied as Rx and Rz rotations on the initial |0⟩ state.
For the state 11, the binary form 1011 gives angles of π, 0, π and π, so the qubits start in |1011⟩. These state-preparation angles are fixed and are not optimized during training.
After encoding, each qubit passes through a general single-qubit gate \(R(\alpha,\beta,\gamma)=R_z(\alpha)R_y(\beta)R_z(\gamma)\), and CNOT gates entangle the qubits. The angles α, β and γ are the trainable parameters. The layer of CNOT gates and general gates is repeated twice, which the authors describe as a strongly entangling, low-depth design suited to NISQ machines.
With four qubits and three angles per qubit over two repetitions, the circuit has 24 parameters, and a bias vector with one entry per qubit adds 4 more. That gives 28 trainable parameters in the frozen-lake experiment and in the four-channel cognitive-radio experiment.
Each qubit is measured repeatedly, and its expectation value is the average of the measured outcomes. The chosen action is the index of the qubit with the largest expectation value, so wires 0 to 3 correspond to LEFT, DOWN, RIGHT and UP in the frozen lake. In cognitive radio, wires 0 to n−1 correspond to channels 1 to n, and wire 1 selects channel 2.
A simulator computes expectation values analytically and deterministically, whereas a real device estimates them from samples, which the authors expect to approximate the simulator values.
Replay, target parameters and the loss
Each transition is stored as \((s_t,a_t,r_t,s_{t+1})\) in a replay memory. Training draws a random minibatch from that memory, which lowers the correlation between the training inputs. The memory holds 80 transitions for the frozen lake and 1000 for cognitive radio, and the batch size is 5 in every environment.
Two circuits share one architecture: the main circuit is updated at every step, and the target circuit is refreshed every 20 steps. The loss is the mean square error between the main-circuit prediction and a target built from the target parameters. \[L(\theta)=\mathbb{E}\left[\left(r_t+\gamma\max_{a'}Q(s_{t+1},a';\theta^-)-Q(s_t,a_t;\theta)\right)^2\right]\] Algorithm 1 writes the target with θ rather than θ−, so the listing does not show the separate target parameters that the text describes.
Gradients of the circuit expectation values are obtained by running the same circuit architecture with slightly different parameters. Exploration uses an ϵ-greedy rule that starts at ϵ = 1.0, decays per episode in the frozen lake and per step in cognitive radio.
Frozen lake and cognitive radio as test problems
The frozen lake is a 4 by 4 grid in which the agent moves from S to G while avoiding holes H. Three layouts are used for training, and each move carries a small penalty. Rewards are +1.0 for reaching the goal, −0.2 for stepping into a hole and −0.01 per step, and the lake is non-slippery. The observation is a record of all time steps, and the four actions are LEFT, DOWN, RIGHT and UP.
In cognitive radio the secondary user picks one of n channels per step, while a primary user occupies a channel that sweeps periodically through all n channels. A free channel gives +1, a collision with the primary user gives −1, and the episode ends after three failed selections or after more than 100 steps. The maximum achievable score is 100.
Three cognitive-radio configurations are defined, with configurations (b) and (c) tested only for four channels.
Frozen-lake learning curves
On layout (a), the authors report that the agent reached the optimal policy with a total reward of 0.9 at iteration 198.
The learned policy became more stable after the 301st iteration. Layouts (b) and (c) are described as showing a similar pattern, but the text gives no numerical values for them.
Cognitive-radio learning across 2 to 5 channels
On configuration (a), the authors report total reward 100 for 2 and 5 channels within only several iterations. The 3- and 4-channel cases reach near-optimal policies at similarly early iterations. Averages are taken over the past 100 episodes, and the policy becomes more stable after around 100 iterations in all four cases.
Configurations (b) and (c), tested with four channels, are described as comparable to configuration (a). The authors read this as evidence that the framework trains across different scenarios.
Robustness under IBM noise models
The noise study reruns the 2-channel and 4-channel cognitive-radio settings in Qiskit-Aer, which can include noise models from IBM quantum computers. The noise data come from the IBM Q 20-qubit machine ibmq-poughkeepsie, covering relaxation time T1, dephasing time T2, qubit frequency, gate error and gate length.
Under noise, the agents reach scores very close to 100 in fewer than 10 iterations. That comparison uses a figure from a different study, so it is not a matched experiment.
Parameter counts against classical models
The memory advantage the authors claim refers to the number of parameters, since fewer trainable parameters need less memory. Smaller circuits also matter because NISQ machines cannot run deep architectures.
For the frozen lake, the VQ-DQL model has 28 parameters, while tabular Q-learning stores 16 × 4 = 64 values. Table 2 lists the counts for 2 to 5 channels alongside the frozen-lake case.
For cognitive radio with n channels, the VQ-DQN count is \(n\times(3\times 2+1)\), while the neural RL model of the ns3-gym study has \(2\times n^2+2\times n\) parameters. Tabular Q-learning grows with \(n^3\) and DQN with \(n^2\), according to the authors. Table 5 summarizes these complexity classes and includes an amplitude-encoding variant at O(log n), which the study does not implement.
Limitations
All experiments are small classical simulations with several qubits, which a classical simulator can handle. The authors note that a 100-qubit machine would be needed for a case that cannot be simulated classically.
Scaling comparisons are limited to cognitive radio with n ≤ 5, so no general scaling behaviour is shown. The classical baselines are tabular Q-learning and one neural network architecture taken from the ns3 study. The authors also state that there is no guarantee that these comparisons hold as problem complexity grows.
Amplitude encoding could reduce parameters to poly(log n), but no known efficient algorithm prepares classical vectors in quantum registers, so it is left as future work. Hardware inference is expected to need about 1024 measurement samples, possibly fixed as qubit counts grow, but the text gives no test of this beyond the small circuits studied.
The circuit's CNOT count grows linearly with n and it includes gates outside the Clifford group, so the authors consider it not obviously classically simulable for large n, a question left for theoretical study.
Paper info
- Authors
- Samuel Yen-Chi Chen, Chao-Han Huck Yang, Jun Qi, Pin-Yu Chen, Xiaoli Ma, Hsi-Sheng Goan
- Venue
- arXiv · Preprint
- First published
- 2019-6-30
- Added
- 2026-11-6
- Updated
- 2020-7-20
- Version
- v3
- arXiv
- 1907.00397
- Category
- cs.LG · cs.AI · quant-ph · stat.ML
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
The state-of-the-art machine learning approaches are based on classical von Neumann computing architectures and have been widely used in many industrial and academic domains. With the recent development of quantum computing, researchers and tech-giants have attempted new quantum circuits for machine learning tasks. However, the existing quantum computing platforms are hard to simulate classical deep learning models or problems because of the intractability of deep quantum circuits. Thus, it is necessary to design feasible quantum algorithms for quantum machine learning for noisy intermediate scale quantum (NISQ) devices. This work explores variational quantum circuits for deep reinforcement learning. Specifically, we reshape classical deep reinforcement learning algorithms like experience replay and target network into a representation of variational quantum circuits. Moreover, we use a quantum information encoding scheme to reduce the number of model parameters compared to classical neural networks. To the best of our knowledge, this work is the first proof-of-principle demonstration of variational quantum circuits to approximate the deep $Q$-value function for decision-making and policy-selection reinforcement learning with experience replay and target network. Besides, our variational quantum circuits can be deployed in many near-term NISQ machines.
Quote from the paper
Samuel Yen-Chi Chen, Chao-Han Huck Yang, Jun Qi, Pin-Yu Chen, Xiaoli Ma, Hsi-Sheng Goan (2019). Variational Quantum Circuits for Deep Reinforcement Learning. arXiv:1907.00397v3. https://arxiv.org/abs/1907.00397v3
BibTeX
@misc{chen2019variational,
title = {{Variational Quantum Circuits for Deep Reinforcement Learning}},
author = {Samuel Yen-Chi Chen and Chao-Han Huck Yang and Jun Qi and Pin-Yu Chen and Xiaoli Ma and Hsi-Sheng Goan},
year = {2019},
eprint = {1907.00397},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1907.00397v3}
}