This repository contains the code used to produce the results of the publication Reinforcement Learning Based Quantum Circuit Optimization via ZX-Calculus.
-
The data to create the figures of the paper are inside the folder
results/5x60_non_clifford. Thejsondata files were generated withagent_test.py. The code used to generate the figures is in the fileresults.ipynb. The code used to create Table 2 from the paper can be found in the filebenchmark.py. -
The optimized circuits can be found in the
rl-zx/results/circuitspath:- Original: Contains the original circuits.
- gflow-cflow-opt: Contains the optimized circuits using the combination of Staudacher et al. and Holker
- NRSCM: Contains the optimized circuits using the algorithm from Nam et al.
- rl-zx-opt: Contains the optimized circuits using the RL agent presented in this paper.
-
In
rl-zx/results/dataare thejsonfiles used to generate Figure 11.
- The agent architecture can be found in the file
rl_agent. - The environment can be found in
rl-zx/gym-zx/envswith the namezx_env.py
@misc{riu2024reinforcement,
title={Reinforcement Learning Based Quantum Circuit Optimization via ZX-Calculus},
author={Jordi Riu and Jan Nogué and Gerard Vilaplana and Artur Garcia-Saez and Marta P. Estarellas},
year={2024},
eprint={2312.11597},
archivePrefix={arXiv},
primaryClass={quant-ph}
}