This repository contains the source code for the article "On the learning abilities of photonic continuous-variable Born machines".
The simulations are executed with Python 3.10.13, and the requirements are found in requirements.txt
.
For executing the scripts, please install requirements with pip install -r requirements.txt
. to ensure that the correct version of piquasso
is used, it is advised to use a virtualenv
. Note also, that matplotlib
uses TeX for the plots.
The data for the 2-mode simulations can be obtained by
python3 d_2_script.py
which saves the data in the data/
folder. The figures in the article can be generated by
python3 d_2_plot.py data/<FILENAME>
Similarly for the 3- and 4-mode simulations.
The gradient estimation script from Fig. 6 can be executed with
python3 gradient_estimation.py
For the benchmark in Fig. 1, execute
python3 benchmark.py
which saves the data in the data/
folder, and execute it with
python3 benchmark_plot.py data/<FILENAME>