Framework for learning agents in quantum environments

Vedran Dunjko, Jacob M. Taylor, Hans J. BriegelarXiv 2015

Abstract

Reinforcement learning (RL) traditionally relies on a sequence of classical interactions between an agent and its environment. In this paper, we introduce a formal framework for RL where these interactions are quantum-mechanical. We identify a fundamental tension: recording a classical history of interactions typically collapses quantum superpositions, negating potential speedups. To resolve this, we propose a "tester" framework and demonstrate that "sporadic" monitoring allows for coherent quantum evolution. We show that in "luck-favoring" environments, such as maze-solving, quantum agents can achieve a quadratic speedup in exploration using Grover-like search. This work provides the first rigorous theoretical foundation for identifying when and how quantum mechanics can accelerate reinforcement learning.

Introduction

Reinforcement learning (RL) is a cornerstone of artificial intelligence, focusing on how agents learn to maximize rewards through environmental interaction. While quantum computing has successfully accelerated supervised and unsupervised learning, its application to RL has been hindered by the "history problem." In classical RL, learning is driven by a history of percepts and actions. However, in a quantum setting, observing these interactions to record a history collapses the quantum state, potentially destroying the very coherence required for a quantum advantage. This paper establishes a formal framework to bridge this gap.

A Formal Quantum RL Framework

The authors extend the classical agent-environment model into the language of quantum information. Percepts ($s_t$) and actions ($a_t$) are represented as orthogonal basis states in Hilbert spaces. Both the agent and the environment are modeled as sequences of Completely Positive Trace-Preserving (CPTP) maps ($M^A$ and $M^E$).

The sequential interaction between a quantum agent and its environment.

In this model, the interaction proceeds in steps. At each step $t$, the environment produces a percept $s_t$, which the agent receives to produce an action $a_t$. This action then influences the environment's next state.

The Monitoring Dilemma and Circuit Representation

A key contribution of this work is the "Tester" framework. A tester is an external entity that monitors the interaction. The authors prove a "No-Go" lemma: a classical tester that records every interaction step effectively reduces the quantum agent to a classical one, eliminating any speedup.

To enable quantum advantages, the authors introduce the sporadic tester, which only observes the system at specific intervals. This allows the agent and environment to evolve in a coherent superposition between observations.

Quantum circuit representations of the agent-environment interaction with different register configurations.

The interaction can be mapped to quantum circuits (as shown above), where registers $R_{\bar{A}}$ and $R_{\bar{E}}$ represent the internal states of the agent and environment, respectively, and $R_C$ (or $R_{I(A)}, R_{I(E)}$) represents the communication interface.

Enabling Quantum Speedups via Oracularization

Standard quantum algorithms like Grover’s search require an "oracle." However, real environments are "embodied" and have memory, making them poor oracles. The authors propose techniques like register hijacking and register scavenging to overcome this. These methods allow an agent to manipulate the environment's memory or communication registers to effectively treat the environment as a controllable quantum oracle.

Results: Quadratic Speedup in Exploration

The framework is evaluated using a Maze-like Game benchmark. In this task, an agent must find a specific "Finish" vertex in a directed graph of $N$ possibilities by discovering a sequence of $M$ moves.

  • Classical Search: Requires $O(N)$ interactions to find the reward.
  • Quantum Search: By utilizing Grover-like search techniques during the exploration phase, the quantum agent finds the reward in $O(\sqrt{N})$ time.

This quadratic speedup is most prominent in "luck-favoring" environments, where finding an early reward significantly boosts future performance. Furthermore, the authors show that model-based agents—those that maintain an internal simulation of the world—can achieve near-generic improvements by applying quantum search to their internal models.

Limitations and Conclusion

While providing a robust theoretical foundation, the framework has limitations. The required "hijacking" of environmental registers assumes a high degree of control that may not be present in all physical systems. Additionally, while exploration is accelerated, the overhead of training internal models in a quantum setting requires further investigation.

In conclusion, this work formalizes the conditions under which quantum RL is possible, highlighting that the frequency of monitoring is the critical factor in preserving quantum speedups. Future research will explore if more advanced algorithms, such as quantum walks, can provide even greater separations in RL performance.

Summary updated

BibTeX
@misc{dunjko2015framework,
  author = {Vedran Dunjko and Jacob M. Taylor and Hans J. Briegel},
  title = {{Framework for learning agents in quantum environments}},
  year = {2015},
  eprint = {1507.08482},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1507.08482},
}
Figure