Skip to content

DarkStarQuantumLab/EpiQ

Repository files navigation

EpiQ - Epidemiological Solutions with Quantum Annealing and Quantum Machine Learning

As COVID-19 exemplified, the impact of a pandemic on global socioeconomics can be dramatic. This project uses first generation quantum processors, in particular, quantum annealers, in the design of a phase-wise, optimal lockdown schedule among cities during a pandemic so that some of cities can stay open while minimizing the rate of deaths and maximizing the number of beds available in hospitals. It is observed that the lock-down schedule proposed by the quantum annealer is better than the one proposed by a classical one.

The cutting edge tool used in this project is the Quantum Support Vector Machine, an instance of a Quantum Machine Learning (QSVM) algorithm that can be implemented on a quantum processor.

Installation

For a local installation, ideally in a virtual environment, run:

pip install -r requirements.txt

Epidemiological Models

The following epidemiological models are available:

  • SIR
  • SIRD
  • SEIR
  • SEIRD
  • SEIivlcvRDVIm

Lockdown Management (Knapsack Problem)

The recommendation upon which a cities is recommended for lockdown is given by the solution of the knapsack problem. The algorithm takes into the consideration such parameters as the number of population in the city, the number of infected population, GDP of the city, the number of available places in hospitals. The knapsack could be solved on a classical computer (CPU), on the physical quantum hardware (QPU) available via DWave Leap cloud services, or as the simulated annealing algorithm.

An example the lockdown recommendation is depicted below.

City // Days Elapsed 0 5 10
city 1 open closed closed
city 2 open closed closed
city 3 open closed closed

Infection Prediction (Quantum Support Vector Machine)

The QSVM makes predictions infected/uninfected based on the symptomes and patient's age.

The QSVM could be executed on a physical quantum annealing device or as the simulated annealing algorithm locally.

Data

A sample of data points for training is available in the data subdirectory.

  • Covid_Sym2.csv is a file with COVID-19 symptomes for the QSVM trainig.
  • data.csv contains data points about cities (population, infected, recovered, GDP, etc.)
  • distance.csv is the distances between cities.

Examples

Some tutorial to get started with lockdown management.

Epidemiology Models

Knapsack

QSVM

Disclamer

The code in this repository is distributed on an "AS IS" basis, without any warranties or conditions of any kind.

The code was tested on a classical CPU and DWave Quantum Anealer hardwares available via AWS Braket prior to November 18th 2022. To submit the code to a quantum hardware after November 18th 2022, a DWave's cloud API is required. More information could be found in the dwave-cloud-client resource.

To submit problems to Leap solvers, use a dwave-systemsolver. More details can be found in the Ocean documentation.

License

This work is licensed under the Apache 2 License and is owned by DarkStarQuantumLab, Inc..