This repository contains software and data associated with the publication Integer Programming from Quantum Annealing and Open Quantum Systems [2009.11970].
It contains Python code for mapping Integer Linear Programming problems, notably the Minimum Dominating Set Problem, to QUBOs or Ising Hamiltonians utilized as input for Quantum Annealers. It furthermore contains code that simulates the quantum hardware.
This repository contains two modules:
qlpused for computations andqlpdbfor accessing and storing computation data
The qlp module can be installed via pip:
cd qlp
pip install [--user] .To interface with the publication data, you also have to install the data module qlpdb
cd qlpdb
pip install [--user] .The module qlp contains the submodule mds which was used to map the Minimum Dominating Set Problem to annealing Hardware:
```python
from qlp.mds.graph_tools as generate_nn_graph
from qlp.mds.qubo import get_mds_qubo
# generate line graph of length 4: o-o-o-o
graph, tag = gt.generate_nn_graph(4)
# Generate mds qubo
qubo = get_mds_qubo(
graph, # The graph as a set of edges
directed=False, # no directed edges
penalty=2 # strength of penalty term
)
```
The solution to the MDS problem is given by the bit vector `psi`, which minimizes
```python
E = psi.T@qubo@psi
```
The QUBO serves as input for the annealing hardware.
qlpdb is an (ORM) framework for mapping database structures to Python objects using EspressoDB / Django.
Once the database is appropriately set up, you can launch a local web server for inspecting data and browsing the documentation (viewable in any browser)
cd qlpdb
python manage.py runserverand query data in Python code
from qlpdb.tdse.models import Tdse
...
solutions = Tdse.objects.filter(
graph__tag=graph_params["tag"],
offset__contains=convert_params(offset_params),
ising__contains=convert_params(ising_params),
solver__contains=solver_params,
wave__contains=wave_params,
)Feel free to reach out for questions.
BSD 3-Clause License. See also the LICENSE file.