Skip to content

simoneroncallo/hybrid-multinomial-classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hybrid multinomial classifier

This repository contains the simulation code for a hybrid multinomial classifier which consists of multiple quantum binary models, combined using post-processing techniques such as one-vs-one, one-vs-rest and a binary decision tree. As a quantum model, we consider a quantum optical shallow network based on the Hong-Ou-Mandel effect. Previously implemented from scratch (see quantum-optical-network), here we consider a full PyTorch implementation, that leverages its mathematical equivalence with a shallow neural network (with neurons subject to the L2 and L1 normalization constraints).

Contributors: Angela Rosy Morgillo @MorgilloR and Simone Roncallo @simoneroncallo
Reference: In Preparation (2026)

Installation

The Python environment can be configured in rootless Docker container, by running the script scripts/build.sh or

sudo docker build -t multinomial-classifier .
./scripts/jupyterlab.sh

The simulation code is contained in main.py. See tests/ for further investigations.

Structure

The repository has the following structure

mltclass
   ├── classical.py # Neural network (PyTorch)
   ├── neuron.py # Quantum optical neuron (PyTorch)
   ├── shallow.py # Quantum optical shallow network (PyTorch)
   └── utils
       ├── dataset.py # Dataset preparation
       ├── metrics.py # Classification performance metrics
       ├── tree.py # Decision tree generation and evaluation
       └── visualize.py 

scripts
   ├── build.sh # Build the Docker image
   ├── getdata.py # Download the dataset
   ├── jupyterlab.sh # Run the container with Jupyter
   └── run.sh

main.py # Simulation code
requirements.txt # Python dependencies

About

Hybrid protocols for multinomial classification with binary models.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors