Giter Club home page Giter Club logo

hybrid-quantum-classifier's Introduction

On Quantum Hyperparameters Selection in Hybrid Classifiers for Earth Observation Data

Authors: Alessandro Sebastianelli, Maria Pia Del Rosso, Silvia Ullo and Paolo Gamba

Method

Our method involves the use of hybrid quantum convolutional neural networks. In other terms, the model is composed of two blocks, the classical convolutional network made by the layers [Conv-1, Conv-2, Conv-3] and a quantum circuit. There are also two fully connected layer [Fc1] and [Fc2] stacked before and after the quantum circuite. They are used mainly to adapt the input and output of the quantum circuit.

The quantum circuit in the figure above is made by repeating fundaments blocks as better shown in the figure below. More importantly the number of qubits can vary while respecting the gates desposition. The firue shows an example with 4 qubits.

Dataset

The dataset firstly presented in [1], collects 1726 Sentinel-2 images divided in the classes "eruption" and "non eruption". It has implemented to explore the on-board volcanic eruption detection. An example is reported in the figure below.

[1] Del Rosso, Maria P., Alessandro Sebastianelli, Dario Spiller, Pierre P. Mathieu, and Silvia L. Ullo. 2021. "On-Board Volcanic Eruption Detection through CNNs and Satellite Multispectral Imagery" Remote Sensing 13, no. 17: 3479. https://doi.org/10.3390/rs13173479

Please note that in our experiments we used a K-fold cross validation. In order to do that, we split the dataset in K parts (5 in our case) and saved the splits locally in order to have correpsondance in our experiments.

Results

Please read the paper to get a full picture of the results, here are only reported some of them.

Model # parameters # quantum Accuracy
QCNN 6L-7Q 40 k 42 0.94
QCNN 9L-6Q 40 k 54 0.95
QCNN 7L-8Q 40 k 56 0.96
Zaidenberg et Al. 40 k 2 0.82
Sebastianelli et Al. 40 k 8 0.88
Big Model 2 M - 0.85
Small Model 200 k - 0.83
LeNet-5 60 k - 0.68
AlexNet 50 M - 0.83

Installation

  1. Clone this repository

    git clone https://github.com/alessandrosebastianelli/hybrid-quantum-classifier.git

  2. Create a new virtual environment with conda or virtualenv

  3. Activate the virtual environment

  4. Install dependencies listed in requirements.txt

    pip install -r requirements.txt or conda install --file requirements.txt

  5. Run main.py*

    python main.py

[*] Please note that there is a configuration file that must be adapted before running the main.

Configuration file

Before running the main script you must check the config file. This file is organized in thre sections:

  1. Dataset settings: here you have to set the root path of the training and validation set respectively
  2. QCNN settings: here you can modify the quantum cicuit structure by acting on "NUM_QUBITS" and "NUM_LAYERS. You can also modify the path where the model will be saved after the training
  3. CNN settings: as the previous case you can act on some parameters of the two CNNs released within the hybrid QCNNs as well as the path where the models will be saved after the training

Cite our works

To cite this repository please use the 'Cite this repository' option on the right panel. Please also cite the corresponding paper:

@article{sebastianelli2023quantum,
  title={On Quantum Hyperparameters Selection in Hybrid Classifiers for Earth Observation Data},
  author={Sebastianelli, Alessandro and Del Rosso, Maria Pia and Ullo, Silvia Liberata and Gamba, Paolo},
  year={2023},
  publisher={TechRxiv, Submitted to IEEE Geoscience and Remote Sensing Letters}
}

You may find also interesting our other works on Quantum ML4EO

@ARTICLE{9647979,
  author={Sebastianelli, Alessandro and Zaidenberg, Daniela Alessandra and Spiller, Dario and Saux, Bertrand Le and Ullo, Silvia Liberata},
  journal={IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing}, 
  title={On Circuit-Based Hybrid Quantum Neural Networks for Remote Sensing Imagery Classification}, 
  year={2022},
  volume={15},
  number={},
  pages={565-580},
  doi={10.1109/JSTARS.2021.3134785}
}

~

@INPROCEEDINGS{9553133,
  author={Zaidenberg, Daniela A. and Sebastianelli, Alessandro and Spiller, Dario and Le Saux, Bertrand and Ullo, Silvia Liberata},
  booktitle={2021 IEEE International Geoscience and Remote Sensing Symposium IGARSS}, 
  title={Advantages and Bottlenecks of Quantum Machine Learning for Remote Sensing}, 
  year={2021},
  volume={},
  number={},
  pages={5680-5683},
  doi={10.1109/IGARSS47720.2021.9553133}
}

hybrid-quantum-classifier's People

Contributors

alessandrosebastianelli avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

mmvandieren

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.