Learning Quantum Circuits with RL Agents: QisCoin

1 minute read


In this post we present a game developed with my colleague Åvald and submitted to the IBM Quantum Game Challenge. This project exploit the integration of IBM qiskit, a library developed to design, run and simulate quantum circuits, and OpenAI gym, a library developed to define, train and run reinforcement learning agents.

The game is a quantum coin tossing game, where the outcome of tossing a coin is controlled by a quantum circuit. A player is allowed to observe the quantum circuit, and then make his or her own guess at the outcome. The main aim of the game is didactic: a player is expected to improve its knowledge of random circuit, and rely on the final probability amplitudes to make a reasonable guess. Three levels of difficulty are available (corresponding to more complex quantum circuits), as well two modalities of play (against the time, against learned agents).

The game is implemented following the standard OpenAI interface, and we use pre-made reinforcemente learning agents in the stable-baselines library to train agents for playing our quantum game. We observe their behaviour first, and we offer the possibility of challenging them!

Notebooks here at Åvald’s github.