Effect of Different Encodings and Distance Functions on Quantum Instance-based Classifiers
The repository contains the code to reproduce the experiments presented in Effect of Different Encodings and Distance Functions on Quantum Instance-based Classifier (Berti, A., Bernasconi, A., Del Corso, G. M., & Guidotti, R.)
The repository is organized in three main directories:
- _knn_. It contains the implementations of Amplitude-based QKNN and Basis-based QKNN
- _test_launchers_. It contains the scripts to run the entire set of tests performed
- _utility_. It contains some utilities needed to store the results, encode data into its binary representation and transform data according to amplitude and basis encodings
🏃
How to run experiments
The scripts for experiments are located in the test_launchers directory and are the followings:
- amplitude_launch_tests.py
- amplitude_digits_launch_tests.py
- basis_launch_tests.py
- basis_two_digits_launch_tests.py
- two_digits_launch_tests.py
Follows an example to run the experiments:
Move to the main directory (/quantum_knn) and run:
python3 ./test_launchers/amplitude_launch_tests.py