LatentRL-QAS: Transfer via Latent Reinforcement Learning for Quantum Architecture Search
Organizations: QuTech and Faculty of Electrical Engineering, Mathematics and Computer Science, Delft University of Technology, Delft, The Netherlands
Abstract
Reinforcement learning (RL) emerges as a prominent approach to quantum architecture search (QAS), the automated design of quantum circuits. However, transferring what an agent has learned from one number of qubits to another is still weakly explored: the state, the action space and the neural network of a state-of-the-art RL-QAS agent all grow with the number of qubits, which makes transfer learning across qubit counts prohibitive. We make this transfer possible by introducing LatentRL-QAS, a latent space transfer and refresh framework for RL-based QAS. At its core, a circuit variational autoencoder encodes a circuit as one token per gate and maps circuits on any number of qubits into the same latent space. An RL agent navigates this space instead of adding gates, so its state, actions and network have the same size at every qubit count. The latent space is periodically refreshed with the agent's new discoveries and, for a larger system, grown from the solutions of the smaller one, so what is transferred is the representation of circuits, not network weights or past experience. To show transfer, we consider absolutely maximally entangled (AME) states, a resource for quantum error correction. LatentRL-QAS discovers the five- and six-qubit AME states without being shown them and prepares them in 89-99% of evaluation episodes, whereas the baseline RL-QAS fails to find them with the same budget, even with a network 10 to 17 times larger. LatentRL-QAS remains robust under depolarizing noise with single-qubit gate errors amplified 10x and two-qubit gate errors 5x compared with IBM quantum hardware. By decoupling the RL agent from the number of qubits, LatentRL-QAS lets quantum architecture search reuse circuit representations learned on smaller problems, providing a foundation for the transferable design of circuits across quantum optimization problems.
Figures & tables
| VAE | Latent agent | Gate-based agent | ||||
|---|---|---|---|---|---|---|
| parameters | obs./actions | parameters | observation | actions | parameters | |
| 2 | 85 842 | 8 / 16 | 2 626 | 84 | 12 | 4 782 |
| 3 | 86 004 | 8 / 16 | 2 626 | 144 | 21 | 6 861 |
| 5 | 86 472 | 8 / 16 | 2 626 | 750 | 45 | 25 785 |
| 6 | 86 714 | 8 / 16 | 2 626 | 1 320 | 60 | 43 350 |
| 8 | 87 134 | 8 / 16 | 2 626 | 2 704 | 96 | 85 986 |
| Target | Episodes | Seeds solved | First solving block | Final success rate | |
|---|---|---|---|---|---|
| 2 | Bell | 10 000 | 10/10 | 1 | 87.4-95.2% |
| 3 | GHZ | 10 000 | 10/10 | 1 | 49.8-77.8% |
| 3 | GHZ (15 blocks) | 15 000 | 10/10 | 1 | 61.4-88.2% |
| 4 ∗ | GHZ(4) | 10 000 | 10/10 | 1 | 67.4-90.8% |
| 5 | AME5 | 15 000 | 10/10 | 3-9 | 88.8-99.0% |
| 6 | AME6 | 15 000 | 10/10 | 1-7 | 96.0-99.0% |
| Noiseless | Noise at | Noise at every level | |||||
|---|---|---|---|---|---|---|---|
| Target | Found | Learned | Found | Learned | Found | Learned | |
| 2 | Bell | 10/10 | 87.4-95.2% | noiseless | 5/5 | 85.6-96.4% | |
| 3 | GHZ | 10/10 | 49.8-77.8% | noiseless | 5/5 | 53.2-79.0% | |
| 5 | AME5 | 10/10 | 88.8-99.0% | 4/5 | 94.8-97.6% | 5/5 | 85.0-100.0% |
| 6 | AME6 | 10/10 | 96.0-99.0% | 5/5 | 96.4-98.8% | 5/5 | 89.6-97.2% |
| AME5 ( ) | AME6 ( ) | |||
|---|---|---|---|---|
| Method | Found | Learned | Found | Learned |
| LatentRL-QAS (full method) | 10/10 | 89-99% | 10/10 | 96-99% |
| LatentRL-QAS, no transfer | 1/5 | 49% | 0/5 | — |
| Gate DDQN, from scratch (3 variants) | 0/15 | — | 0/15 | — |
| Gate DDQN, pool of LatentRL-QAS | 2/5 | 14-35% | 5/5 | |
| Gate DDQN, own ladder | 5/5 | 0-16% | 2/5 | |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Component | Hyperparameter | Value |
| DDQN agent | network | MLP, ReLU activations |
| hidden layers | ||
| optimiser, learning rate | ADAM, | |
| minibatch size | ||
| replay buffer size | ||
| target network update period |
| Changed | Edit | Changed | Edit | Changed | Edit | Changed | Edit | |
| Bonus | Seeds solved | First solving block | Final success rate |
|---|---|---|---|
| 4/5 | 3-7 | 30.0-89.2% | |
| 5/5 | 4-8 | 91.6-96.8% | |
| 5/5 | 3-9 | 88.8-98.4% | |
| 5/5 | 3-10 | 85.8-97.4% |
| Configuration | KL | Reconstruction | Distinct | Most freq. |
|---|---|---|---|---|
| Standard ( , epochs, hidden size , ) | ||||
| epochs | ||||
| Hidden size | ||||
| Hidden size , | ||||
| Gate order | Word dropout | Random circuits | Epochs | KL | Reconstruction | Distinct | |
|---|---|---|---|---|---|---|---|
| Random | |||||||
| Random | |||||||
| Random | |||||||
| Random | |||||||
| Random | |||||||
| Canonical |
| Setting | Target | First solving block | Solutions per run | Noisy fidelity | Gates |
|---|---|---|---|---|---|
| Noise at | AME5 | 5-6 | 297-537 | 0.924-0.941 | 12-14 |
| AME6 | 1 | 468-582 | 0.907 | 17 | |
| Noise at every level | Bell | 1 | 1817-3031 | 0.956-0.992 | 2-7 |
| GHZ | 1 | 861-1173 | 0.958-0.983 | 3-6 | |
| AME5 | 3-10 | 69-1926 | 0.911-0.941 | 12-15 | |
| AME6 | 1 | 398-698 | 0.888-0.920 | 16-19 |