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:

  1. _knn_. It contains the implementations of Amplitude-based QKNN and Basis-based QKNN
  2. _test_launchers_. It contains the scripts to run the entire set of tests performed
  3. _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:

  1. amplitude_launch_tests.py
  2. amplitude_digits_launch_tests.py
  3. basis_launch_tests.py
  4. basis_two_digits_launch_tests.py
  5. 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