This repository implements a proof of concept model for using quantum computing embedded in Agent-Based Models.
The model implemented here corresponds to a simple Susceptible-Infected-Susceptible [SIS] Agent-Based Model with a mixing component. The model includes a population distributed between different groups where the contacts are based on the mixing matrix. Furthermore, at the end of each step, groups collectively decide whether to change their contact rates, based on the observed number of infected. To do so, they need to solve an optimization problem of the following form
Where $I = \sum_{g=1}^{|G|} I_g $ is the total number of infected in the system, the vector
- Higher contact rate increases the utility through agents' economic activity.
- Lower contact rate increases the utility through reducing the transmissibility of the disease.
Ultimately, this can be thought as a government deciding what communities to quarantine or not. Closing the economy has negative effects to the society, so it is not always an easy decision.
The SIR model is implemented as a discrete-time ABM where the public health authorities decide what communities will go into a policy reducing contact rate. The model is governed by the probability of transmission
The relevant number here is the way in which contacts are performed. Individuals will, on average, contact
Where
For this exercise, we will be assuming that the contact rates will not change as a function of how many agents are in the set of infected or susceptible agents. In a more standard model, a decreasing number of available agents would affect the contact rates.
The model is implemented in the main.cpp program, with the core class ABM. The corresponding Makefile contains the code for building the program:
# This runs
# g++ -std=c++17 -pedantic -Wall -O2 -g main.cpp -o main.o
make main.oTo execute the program, you don't need to pass any arguments:
./main.o