This repository contains the code to reproduce all results and numerical figures/plots of the paper "Here comes the SU(N): multivariate quantum gates and gradients" by Roeland Wiersema, Dylan Lewis, David Wierichs, Juan Carrasquilla and Nathan Killoran.
The repository is structured as follows:
requirements.txt
: All required Python packages to run the programs. We used Python 3.10. The file can be used viapip install -r requirements.txt
run_single_qubit.py
: Execute this file to produce the data and plots for the toy example on a single qubit (Figs. 3, 4, E1)run_vqe.py
: Execute this file to produce the data and plots for the 10-qubit VQE optimization example (Figs. 7, 8)single_qubit.py
: Additional functions used inrun_single_qubit.py
vqe.py
: Additional functions used inrun_vqe.py
figures/
: All produced figures are stored heredata/
: All prodcued data is stored here
(Note that no code is provided (yet) to create Figs. 5 and 6.)
In general, the programs are written such that pre-computed data is loaded if possible, in order to allow quick changes to the figures
and to save computation efforts. If you want to reproduce the data from scratch (randomness seeds are fixed almost everywhere),
just move or delete the data locally and execute run_vqe.py
or run_single_qubit.py
.