Skip to content

Latest commit

 

History

History
25 lines (22 loc) · 1.08 KB

README.md

File metadata and controls

25 lines (22 loc) · 1.08 KB

Quantum Image Classification

This project leverages quantum neural network alongside classical model to classify the images. It features the classification of CIFAR10 and MNIST dataset using a hybrid classical-quantum neural network.

Run an example

To run the code, first clone the repository onto a local folder, then follow the following steps.

  1. Create a virtual environment inside the cloned repository
python -m venv venv
  1. Activate the virtual environment
source venv/bin/activate
  1. Install all the dependencies required (all the required packages are listed in the setup.py file)
pip install .
  1. The cifar10 and mnist folders have the respective models that you can train using different quantum circuits or ansatz. As an example we will be training the MNIST dataset with the 1_ry_qubit ansatz. (each ansatz is a folder in the respective dataset folder).
python mnist/1_ry_qubit/train.py

You can modify the attributes in the config.py file while writing your training code, to change the hyperparameters or the location of your data to be save at.