Replication code and experiment result data for training Quantum Neural Networks with entangled data using one-dimensional projectors as observables.
This is the version of the code that was used to generate the experiment results in the related publication.
Experiments:
- exp_inf_coeffvariation.py: Trains QNNs using training samples of varying Schmidt rank with fixed vector as Schmidt basis state. Varies the associated Schmidt coefficient.
- exp_inf_random.py: Trains QNNs using random training data.
Experiment results:
- exp_inf_coeffvariation.zip and exp_inf_random.zip contain the raw experiment results for both experiments.
- For each combination of controlled variables there is one directory containing the result of all 20 runs of the training process.
- The results for each run are comprised of 3 files:
- [id]_losses.npy: The loss during the training process
- [id]_params.npy: The parameters of the QNN after the training process.
- [id]_V.npy: The trained QNN exported as a 2^4 * 2^4 unitary matrix.
Analysis of data (data_extraction.py):
- Computes means and standard deviation of various risk measures and saves the results
Plots (plot_obs_risk.py):
- Plots the risk w.r.t. the observable for both experiments based on the analysed data obtained from data_extraction.py.
- Generates plot_coeffvariation.pdf and plot_random.pdf.