mqt.problemsolver 0.1.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mqt.problemsolver-0.3.0/.git_archival.txt +4 -0
- mqt.problemsolver-0.3.0/.gitattributes +1 -0
- {mqt.problemsolver-0.1.0 → mqt.problemsolver-0.3.0}/.github/codecov.yml +3 -0
- mqt.problemsolver-0.3.0/.github/release-drafter.yml +49 -0
- {mqt.problemsolver-0.1.0 → mqt.problemsolver-0.3.0}/.github/workflows/coverage.yml +6 -5
- {mqt.problemsolver-0.1.0 → mqt.problemsolver-0.3.0}/.github/workflows/deploy.yml +1 -1
- mqt.problemsolver-0.3.0/.github/workflows/mypy.yml +25 -0
- mqt.problemsolver-0.3.0/.github/workflows/release-drafter.yml +24 -0
- {mqt.problemsolver-0.1.0 → mqt.problemsolver-0.3.0}/.pre-commit-config.yaml +40 -58
- mqt.problemsolver-0.3.0/PKG-INFO +229 -0
- mqt.problemsolver-0.3.0/README.md +185 -0
- mqt.problemsolver-0.3.0/img/erc_dark.svg +1120 -0
- mqt.problemsolver-0.3.0/img/erc_light.svg +1125 -0
- mqt.problemsolver-0.3.0/img/logo-bavaria.svg +60 -0
- mqt.problemsolver-0.3.0/img/logo-mqv.svg +2 -0
- mqt.problemsolver-0.3.0/img/mqt_dark.png +0 -0
- mqt.problemsolver-0.3.0/img/mqt_light.png +0 -0
- mqt.problemsolver-0.3.0/img/satellite_mission_planning_problem.png +0 -0
- mqt.problemsolver-0.3.0/img/tum_dark.svg +130 -0
- mqt.problemsolver-0.3.0/img/tum_light.svg +130 -0
- mqt.problemsolver-0.3.0/img/workflow_new.png +0 -0
- mqt.problemsolver-0.3.0/img/workflow_old.png +0 -0
- mqt.problemsolver-0.3.0/notebooks/csp_example.ipynb +143 -0
- mqt.problemsolver-0.3.0/notebooks/precompilation/evaluation.ipynb +291 -0
- mqt.problemsolver-0.3.0/notebooks/precompilation/precompilation_example.ipynb +135 -0
- mqt.problemsolver-0.3.0/notebooks/precompilation/precompilation_paper_figures.ipynb +105 -0
- mqt.problemsolver-0.3.0/notebooks/precompilation/res_qaoa.csv +81 -0
- mqt.problemsolver-0.3.0/notebooks/precompilation/res_satellite.csv +21 -0
- mqt.problemsolver-0.3.0/notebooks/problemsolver_paper_figures.ipynb +122 -0
- mqt.problemsolver-0.3.0/notebooks/satellitesolver/evaluation.ipynb +138 -0
- mqt.problemsolver-0.3.0/notebooks/satellitesolver/res_satellite_solver.csv +20 -0
- mqt.problemsolver-0.3.0/notebooks/satellitesolver/res_satellite_solver_noisy.csv +13 -0
- mqt.problemsolver-0.3.0/notebooks/satellitesolver/satellitesolver_example.ipynb +145 -0
- mqt.problemsolver-0.3.0/notebooks/tsp_example.ipynb +162 -0
- mqt.problemsolver-0.3.0/pyproject.toml +149 -0
- {mqt.problemsolver-0.1.0 → mqt.problemsolver-0.3.0}/src/mqt/problemsolver/csp.py +103 -80
- mqt.problemsolver-0.3.0/src/mqt/problemsolver/partialcompiler/evaluator.py +123 -0
- mqt.problemsolver-0.3.0/src/mqt/problemsolver/partialcompiler/qaoa.py +190 -0
- mqt.problemsolver-0.3.0/src/mqt/problemsolver/satellitesolver/ImagingLocation.py +84 -0
- mqt.problemsolver-0.3.0/src/mqt/problemsolver/satellitesolver/__init__.py +0 -0
- mqt.problemsolver-0.3.0/src/mqt/problemsolver/satellitesolver/algorithms.py +136 -0
- mqt.problemsolver-0.3.0/src/mqt/problemsolver/satellitesolver/evaluator.py +146 -0
- mqt.problemsolver-0.3.0/src/mqt/problemsolver/satellitesolver/utils.py +189 -0
- {mqt.problemsolver-0.1.0 → mqt.problemsolver-0.3.0}/src/mqt/problemsolver/tsp.py +59 -98
- mqt.problemsolver-0.3.0/src/mqt.problemsolver.egg-info/PKG-INFO +229 -0
- mqt.problemsolver-0.3.0/src/mqt.problemsolver.egg-info/SOURCES.txt +57 -0
- {mqt.problemsolver-0.1.0 → mqt.problemsolver-0.3.0}/src/mqt.problemsolver.egg-info/requires.txt +9 -6
- {mqt.problemsolver-0.1.0 → mqt.problemsolver-0.3.0}/tests/test_csp.py +5 -7
- mqt.problemsolver-0.3.0/tests/test_qaoa.py +51 -0
- mqt.problemsolver-0.3.0/tests/test_satellitesolver.py +53 -0
- mqt.problemsolver-0.3.0/tests/test_tsp.py +13 -0
- mqt.problemsolver-0.1.0/.flake8 +0 -18
- mqt.problemsolver-0.1.0/.github/workflows/linter.yml +0 -14
- mqt.problemsolver-0.1.0/PKG-INFO +0 -91
- mqt.problemsolver-0.1.0/README.md +0 -61
- mqt.problemsolver-0.1.0/paper_figures.ipynb +0 -171
- mqt.problemsolver-0.1.0/pyproject.toml +0 -58
- mqt.problemsolver-0.1.0/setup.py +0 -3
- mqt.problemsolver-0.1.0/src/mqt/problemsolver/csp_example.ipynb +0 -237
- mqt.problemsolver-0.1.0/src/mqt/problemsolver/tsp_example.ipynb +0 -217
- mqt.problemsolver-0.1.0/src/mqt.problemsolver.egg-info/PKG-INFO +0 -91
- mqt.problemsolver-0.1.0/src/mqt.problemsolver.egg-info/SOURCES.txt +0 -26
- mqt.problemsolver-0.1.0/tests/test_tsp.py +0 -11
- {mqt.problemsolver-0.1.0 → mqt.problemsolver-0.3.0}/.gitignore +0 -0
- {mqt.problemsolver-0.1.0 → mqt.problemsolver-0.3.0}/img/framework.png +0 -0
- {mqt.problemsolver-0.1.0 → mqt.problemsolver-0.3.0}/img/kakuro.png +0 -0
- {mqt.problemsolver-0.1.0 → mqt.problemsolver-0.3.0}/img/tsp.png +0 -0
- {mqt.problemsolver-0.1.0 → mqt.problemsolver-0.3.0}/setup.cfg +0 -0
- {mqt.problemsolver-0.1.0 → mqt.problemsolver-0.3.0}/src/mqt/problemsolver/__init__.py +0 -0
- {mqt.problemsolver-0.1.0 → mqt.problemsolver-0.3.0}/src/mqt.problemsolver.egg-info/dependency_links.txt +0 -0
- {mqt.problemsolver-0.1.0 → mqt.problemsolver-0.3.0}/src/mqt.problemsolver.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.git_archival.txt export-subst
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name-template: "MQT ProblemSolver $RESOLVED_VERSION Release"
|
|
2
|
+
tag-template: "v$RESOLVED_VERSION"
|
|
3
|
+
categories:
|
|
4
|
+
- title: "🚀 Features and Enhancements"
|
|
5
|
+
labels:
|
|
6
|
+
- "feature"
|
|
7
|
+
- "usability"
|
|
8
|
+
- title: "🐛 Bug Fixes"
|
|
9
|
+
labels:
|
|
10
|
+
- "bug"
|
|
11
|
+
- title: "📄 Documentation"
|
|
12
|
+
labels:
|
|
13
|
+
- "documentation"
|
|
14
|
+
- title: "🤖 CI"
|
|
15
|
+
labels:
|
|
16
|
+
- "continuous integration"
|
|
17
|
+
- title: "📦 Packaging"
|
|
18
|
+
labels:
|
|
19
|
+
- "packaging"
|
|
20
|
+
- title: "⬆️ Dependencies"
|
|
21
|
+
collapse-after: 5
|
|
22
|
+
labels:
|
|
23
|
+
- "dependencies"
|
|
24
|
+
- "submodules"
|
|
25
|
+
- "github_actions"
|
|
26
|
+
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
|
|
27
|
+
change-title-escapes: '\<*_&'
|
|
28
|
+
version-resolver:
|
|
29
|
+
major:
|
|
30
|
+
labels:
|
|
31
|
+
- "major"
|
|
32
|
+
minor:
|
|
33
|
+
labels:
|
|
34
|
+
- "minor"
|
|
35
|
+
patch:
|
|
36
|
+
labels:
|
|
37
|
+
- "patch"
|
|
38
|
+
default: patch
|
|
39
|
+
autolabeler:
|
|
40
|
+
- label: "dependencies"
|
|
41
|
+
title:
|
|
42
|
+
- "/update pre-commit hooks/i"
|
|
43
|
+
|
|
44
|
+
template: |
|
|
45
|
+
## What Changed 👀
|
|
46
|
+
|
|
47
|
+
$CHANGES
|
|
48
|
+
|
|
49
|
+
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
|
|
@@ -19,8 +19,9 @@ jobs:
|
|
|
19
19
|
- name: Install MQT ProblemSolver
|
|
20
20
|
run: pip install .[coverage]
|
|
21
21
|
- name: Generate Report
|
|
22
|
-
run: pytest -v --cov
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
run: pytest -v --cov --cov-config=pyproject.toml --cov-report=xml
|
|
23
|
+
- name: Upload coverage to Codecov
|
|
24
|
+
uses: codecov/codecov-action@v3
|
|
25
|
+
with:
|
|
26
|
+
fail_ci_if_error: true
|
|
27
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: mypy
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
lint:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
name: Run my[py] linter
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v3
|
|
20
|
+
- uses: actions/setup-python@v4
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.10"
|
|
23
|
+
- uses: pre-commit/action@v3.0.0
|
|
24
|
+
with:
|
|
25
|
+
extra_args: mypy --all-files
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Release Drafter
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
types: [opened, reopened, synchronize]
|
|
9
|
+
pull_request_target:
|
|
10
|
+
types: [opened, reopened, synchronize]
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
update_release_draft:
|
|
17
|
+
permissions:
|
|
18
|
+
contents: write
|
|
19
|
+
pull-requests: write
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- uses: release-drafter/release-drafter@v5
|
|
23
|
+
env:
|
|
24
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -10,11 +10,12 @@
|
|
|
10
10
|
ci:
|
|
11
11
|
autoupdate_commit_msg: "⬆️🪝 update pre-commit hooks"
|
|
12
12
|
autofix_commit_msg: "🎨 pre-commit fixes"
|
|
13
|
+
skip: [mypy]
|
|
13
14
|
|
|
14
15
|
repos:
|
|
15
16
|
# Standard hooks
|
|
16
17
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
17
|
-
rev: "v4.
|
|
18
|
+
rev: "v4.5.0"
|
|
18
19
|
hooks:
|
|
19
20
|
- id: check-added-large-files
|
|
20
21
|
- id: check-case-conflict
|
|
@@ -31,68 +32,14 @@ repos:
|
|
|
31
32
|
|
|
32
33
|
# Handling unwanted unicode characters
|
|
33
34
|
- repo: https://github.com/sirosen/texthooks
|
|
34
|
-
rev: "0.
|
|
35
|
+
rev: "0.6.3"
|
|
35
36
|
hooks:
|
|
36
37
|
- id: fix-ligatures
|
|
37
38
|
- id: fix-smartquotes
|
|
38
39
|
|
|
39
|
-
# Sort includes
|
|
40
|
-
- repo: https://github.com/pycqa/isort
|
|
41
|
-
rev: 5.10.1
|
|
42
|
-
hooks:
|
|
43
|
-
- id: isort
|
|
44
|
-
args: ["--profile", "black", "--filter-files"]
|
|
45
|
-
|
|
46
|
-
# Upgrade old Python syntax
|
|
47
|
-
- repo: https://github.com/asottile/pyupgrade
|
|
48
|
-
rev: "v2.37.3"
|
|
49
|
-
hooks:
|
|
50
|
-
- id: pyupgrade
|
|
51
|
-
args: ["--py37-plus"]
|
|
52
|
-
|
|
53
|
-
# Run code formatting with Black
|
|
54
|
-
- repo: https://github.com/psf/black
|
|
55
|
-
rev: "22.8.0" # Keep in sync with blacken-docs
|
|
56
|
-
hooks:
|
|
57
|
-
- id: black
|
|
58
|
-
|
|
59
|
-
# Also run Black on examples in the documentation
|
|
60
|
-
- repo: https://github.com/asottile/blacken-docs
|
|
61
|
-
rev: "v1.12.1"
|
|
62
|
-
hooks:
|
|
63
|
-
- id: blacken-docs
|
|
64
|
-
additional_dependencies:
|
|
65
|
-
- black==22.8.0 # keep in sync with black hook
|
|
66
|
-
|
|
67
|
-
# Check for common mistakes
|
|
68
|
-
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
69
|
-
rev: "v1.9.0"
|
|
70
|
-
hooks:
|
|
71
|
-
- id: python-check-blanket-noqa
|
|
72
|
-
- id: python-check-blanket-type-ignore
|
|
73
|
-
- id: python-no-log-warn
|
|
74
|
-
- id: python-no-eval
|
|
75
|
-
- id: python-use-type-annotations
|
|
76
|
-
- id: rst-backticks
|
|
77
|
-
- id: rst-directive-colons
|
|
78
|
-
- id: rst-inline-touching-normal
|
|
79
|
-
|
|
80
|
-
# Run Flake8 checks
|
|
81
|
-
- repo: https://github.com/PyCQA/flake8
|
|
82
|
-
rev: "5.0.4"
|
|
83
|
-
hooks:
|
|
84
|
-
- id: flake8
|
|
85
|
-
additional_dependencies:
|
|
86
|
-
- flake8-bugbear
|
|
87
|
-
- flake8-comprehensions
|
|
88
|
-
- flake8-future-annotations
|
|
89
|
-
- flake8-new-union-types
|
|
90
|
-
- flake8-simplify
|
|
91
|
-
- flake8-2020
|
|
92
|
-
|
|
93
40
|
# Check for spelling
|
|
94
41
|
- repo: https://github.com/codespell-project/codespell
|
|
95
|
-
rev: "v2.2.
|
|
42
|
+
rev: "v2.2.6"
|
|
96
43
|
hooks:
|
|
97
44
|
- id: codespell
|
|
98
45
|
args: ["-L", "wille,linz"]
|
|
@@ -103,7 +50,42 @@ repos:
|
|
|
103
50
|
|
|
104
51
|
# Format configuration files with prettier
|
|
105
52
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
106
|
-
rev: "
|
|
53
|
+
rev: "v4.0.0-alpha.8"
|
|
107
54
|
hooks:
|
|
108
55
|
- id: prettier
|
|
109
56
|
types_or: [yaml, markdown, html, css, javascript, json]
|
|
57
|
+
|
|
58
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
59
|
+
rev: v0.1.13
|
|
60
|
+
hooks:
|
|
61
|
+
- id: ruff
|
|
62
|
+
args: ["--fix", "--show-fixes"]
|
|
63
|
+
types_or: [python, pyi, jupyter]
|
|
64
|
+
- id: ruff-format
|
|
65
|
+
types_or: [python, pyi, jupyter]
|
|
66
|
+
|
|
67
|
+
# Also run Black on examples in the documentation
|
|
68
|
+
- repo: https://github.com/adamchainz/blacken-docs
|
|
69
|
+
rev: 1.16.0
|
|
70
|
+
hooks:
|
|
71
|
+
- id: blacken-docs
|
|
72
|
+
additional_dependencies: [black==23.*]
|
|
73
|
+
|
|
74
|
+
# Clean jupyter notebooks
|
|
75
|
+
- repo: https://github.com/srstevenson/nb-clean
|
|
76
|
+
rev: "3.2.0"
|
|
77
|
+
hooks:
|
|
78
|
+
- id: nb-clean
|
|
79
|
+
|
|
80
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
81
|
+
rev: v1.8.0
|
|
82
|
+
hooks:
|
|
83
|
+
- id: mypy
|
|
84
|
+
files: ^(src|tests|setup.py)
|
|
85
|
+
args: []
|
|
86
|
+
additional_dependencies:
|
|
87
|
+
- types-setuptools
|
|
88
|
+
- python_tsp
|
|
89
|
+
- networkx
|
|
90
|
+
- mqt.ddsim
|
|
91
|
+
- pytest
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: mqt.problemsolver
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: MQT ProblemSolver - A MQT tool for Solving Problems Using Quantum Computing
|
|
5
|
+
Author-email: Nils Quetschlich <nils.quetschlich@tum.de>, Lukas Burgholzer <lukas.burgholzer@jku.at>
|
|
6
|
+
Project-URL: Homepage, https://github.com/cda-tum/mqtproblemsolver
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/cda-tum/mqtproblemsolver/issues
|
|
8
|
+
Project-URL: Discussions, https://github.com/cda-tum/mqtproblemsolver/discussions
|
|
9
|
+
Project-URL: Research, https://www.cda.cit.tum.de/research/quantum/
|
|
10
|
+
Keywords: MQT,quantum computing
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
15
|
+
Classifier: Operating System :: MacOS
|
|
16
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Intended Audience :: Science/Research
|
|
23
|
+
Classifier: Natural Language :: English
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
|
|
25
|
+
Requires-Python: >=3.8
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
Requires-Dist: qiskit<0.42.0,>=0.36.0
|
|
28
|
+
Requires-Dist: joblib
|
|
29
|
+
Requires-Dist: numpy
|
|
30
|
+
Requires-Dist: matplotlib
|
|
31
|
+
Requires-Dist: mqt.ddsim
|
|
32
|
+
Requires-Dist: networkx
|
|
33
|
+
Requires-Dist: python_tsp
|
|
34
|
+
Requires-Dist: docplex
|
|
35
|
+
Requires-Dist: qiskit_optimization
|
|
36
|
+
Provides-Extra: test
|
|
37
|
+
Requires-Dist: pytest>=7; extra == "test"
|
|
38
|
+
Provides-Extra: coverage
|
|
39
|
+
Requires-Dist: mqt.problemsolver[test]; extra == "coverage"
|
|
40
|
+
Requires-Dist: coverage[toml]~=6.5.0; extra == "coverage"
|
|
41
|
+
Requires-Dist: pytest-cov~=4.0.0; extra == "coverage"
|
|
42
|
+
Provides-Extra: dev
|
|
43
|
+
Requires-Dist: mqt.problemsolver[coverage]; extra == "dev"
|
|
44
|
+
|
|
45
|
+
[](https://github.com/cda-tum/MQTProblemSolver/actions/workflows/coverage.yml)
|
|
46
|
+
[](https://github.com/cda-tum/MQTProblemSolver/actions/workflows/deploy.yml)
|
|
47
|
+
|
|
48
|
+
<p align="center">
|
|
49
|
+
<picture>
|
|
50
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/cda-tum/MQTProblemSolver/main/img/mqt_light.png" width="60%">
|
|
51
|
+
<img src="https://raw.githubusercontent.com/cda-tum/MQTProblemSolver/main/img/mqt_dark.png" width="60%">
|
|
52
|
+
</picture>
|
|
53
|
+
</p>
|
|
54
|
+
|
|
55
|
+
# MQT ProblemSolver
|
|
56
|
+
|
|
57
|
+
MQT ProblemSolver is a framework to utilize quantum computing as a technology for users with little to no
|
|
58
|
+
quantum computing knowledge.
|
|
59
|
+
All necessary quantum parts are embedded by domain experts while the interfaces provided are similar to the ones
|
|
60
|
+
classical solver provide:
|
|
61
|
+
|
|
62
|
+
<p align="center">
|
|
63
|
+
<img src="img/framework.png" height=300px>
|
|
64
|
+
</p>
|
|
65
|
+
|
|
66
|
+
When provided with a problem description, MQT ProblemSolver offers a selection of implemented quantum algorithms.
|
|
67
|
+
The user just has to chose one and all further (quantum) calculation steps are encapsulated within MQT ProblemSolver.
|
|
68
|
+
After the calculation finished, the respective solution is returned - again in the same format as classical
|
|
69
|
+
solvers use.
|
|
70
|
+
|
|
71
|
+
In the current implementation, two case studies are conducted:
|
|
72
|
+
|
|
73
|
+
1. A SAT Problem: Constraint Satisfaction Problem
|
|
74
|
+
2. A Graph-based Optimization Problem: Travelling Salesman Problem
|
|
75
|
+
|
|
76
|
+
## A SAT Problem: Constraint Satisfaction Problem
|
|
77
|
+
|
|
78
|
+
This exemplary implementation can be found in the [CSP_example.ipynb](notebooks/csp_example.ipynb) Jupyter notebook.
|
|
79
|
+
Here, the solution to a Kakuro riddle with a 2x2 grid can be solved for arbitrary sums `s0` to `s3`:
|
|
80
|
+
|
|
81
|
+
<p align="center">
|
|
82
|
+
<img src="img/kakuro.png" height=100px>
|
|
83
|
+
</p>
|
|
84
|
+
|
|
85
|
+
MQT ProblemSolver will return valid values to `a`, `b`, `c`, and `d` if a solution exists.
|
|
86
|
+
|
|
87
|
+
## A Graph-based Optimization Problem: Travelling Salesman Problem
|
|
88
|
+
|
|
89
|
+
This exemplary implementation can be found in the [TSP_example.ipynb](notebooks/tsp_example.ipynb) Jupyter notebook.
|
|
90
|
+
Here, the solution to a Travelling Salesman Problem with 4 cities can be solved for arbitrary distances `dist_1_2` to `dist_3_4`between the cities.
|
|
91
|
+
|
|
92
|
+
<p align="center">
|
|
93
|
+
<img src="img/tsp.png" height=200px>
|
|
94
|
+
</p>
|
|
95
|
+
|
|
96
|
+
MQT ProblemSolver will return the shortest path visiting all cities as a list.
|
|
97
|
+
|
|
98
|
+
## Satellite Mission Planning Problem
|
|
99
|
+
|
|
100
|
+
Additional to the two case studies, we provide a more complex example for the satellite mission planning problem.
|
|
101
|
+
The goal is to maximize the accumulated values of all images taken by the satellite while it is often not possible
|
|
102
|
+
to take all images since the satellite must rotate and adjust its optics.
|
|
103
|
+
|
|
104
|
+
In the following example, there are five to-be-captured locations which their assigned value.
|
|
105
|
+
|
|
106
|
+
<p align="center">
|
|
107
|
+
<img src="img/satellite_mission_planning_problem.png" height=200px>
|
|
108
|
+
</p>
|
|
109
|
+
|
|
110
|
+
# Pre-Compilation
|
|
111
|
+
|
|
112
|
+
Every quantum computing application must be encoded into a quantum circuit and then compiled for a specific device.
|
|
113
|
+
This lengthy compilation process is a key bottleneck and intensifies for recurring problems---each of which requires
|
|
114
|
+
a new compilation run thus far.
|
|
115
|
+
|
|
116
|
+
<p align="center">
|
|
117
|
+
<img src="img/workflow_old.png">
|
|
118
|
+
</p>
|
|
119
|
+
|
|
120
|
+
Pre-compilation is a promising approach to overcome this bottleneck.
|
|
121
|
+
Beginning with a problem class and suitable quantum algorithm, a **predictive encoding** scheme is applied to encode a
|
|
122
|
+
representative problem instance into a general-purpose quantum circuit for that problem class.
|
|
123
|
+
Once the real problem instance is known, the previously constructed circuit only needs to be
|
|
124
|
+
**adjusted**—with (nearly) no compilation necessary:
|
|
125
|
+
|
|
126
|
+
<p align="center">
|
|
127
|
+
<img src="img/workflow_new.png">
|
|
128
|
+
</p>
|
|
129
|
+
Following this approach, we provide a pre-compilation module that can be used to precompile QAOA circuits
|
|
130
|
+
for the MaxCut problem.
|
|
131
|
+
|
|
132
|
+
# Usage
|
|
133
|
+
|
|
134
|
+
MQT ProblemSolver is available via [PyPI](https://pypi.org/project/mqt.problemsolver/):
|
|
135
|
+
|
|
136
|
+
```console
|
|
137
|
+
(venv) $ pip install mqt.problemsolver
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
# Repository Structure
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
.
|
|
144
|
+
├── src
|
|
145
|
+
│ └── mqt
|
|
146
|
+
│ └── problemsolver
|
|
147
|
+
│ └── satelitesolver
|
|
148
|
+
│ │ └── ...
|
|
149
|
+
│ └── precompilation
|
|
150
|
+
│ │ └── ...
|
|
151
|
+
│ └── csp.py
|
|
152
|
+
│ └── tsp.py
|
|
153
|
+
└── notebooks
|
|
154
|
+
└── satelitesolver
|
|
155
|
+
│ └── ...
|
|
156
|
+
└── precompilation
|
|
157
|
+
│ └── ...
|
|
158
|
+
└── problemsolver_paper_figures.ipynb
|
|
159
|
+
└── csp_example.ipynb
|
|
160
|
+
└── tsp_example.ipynb
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
# References
|
|
164
|
+
|
|
165
|
+
In case you are using MQT ProblemSolver in your work, we would be thankful if you referred to it by citing the following publication:
|
|
166
|
+
|
|
167
|
+
```bibtex
|
|
168
|
+
@INPROCEEDINGS{quetschlich2023mqtproblemsolver,
|
|
169
|
+
title = {{Towards an Automated Framework for Realizing Quantum Computing Solutions}},
|
|
170
|
+
author = {N. Quetschlich and L. Burgholzer and R. Wille},
|
|
171
|
+
booktitle = {International Symposium on Multiple-Valued Logic (ISMVL)},
|
|
172
|
+
year = {2023},
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
which is also available on arXiv:
|
|
177
|
+
[](https://arxiv.org/abs/2210.14928)
|
|
178
|
+
|
|
179
|
+
In case you are using our Pre-Compilation approach, we would be thankful if you referred to it by citing the following publication:
|
|
180
|
+
|
|
181
|
+
```bibtex
|
|
182
|
+
@INPROCEEDINGS{quetschlich2023precompilation,
|
|
183
|
+
title = {{Reducing the Compilation Time of Quantum Circuits Using Pre-Compilation on the Gate Level}},
|
|
184
|
+
author = {N. Quetschlich and L. Burgholzer and R. Wille},
|
|
185
|
+
booktitle = {IEEE International Conference on Quantum Computing and Engineering (QCE)},
|
|
186
|
+
year = {2023},
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
which is also available on arXiv:
|
|
191
|
+
[](https://arxiv.org/abs/2305.04941)
|
|
192
|
+
|
|
193
|
+
In case you are using our Satellite Mission Planning Problem approach, we would be thankful if you referred to it by citing the following publication:
|
|
194
|
+
|
|
195
|
+
```bibtex
|
|
196
|
+
@INPROCEEDINGS{quetschlich2023satellite,
|
|
197
|
+
title = {{A Hybrid Classical Quantum Computing Approach to the Satellite Mission Planning Problem}},
|
|
198
|
+
author = {N. Quetschlich and V. Koch and L. Burgholzer and R. Wille},
|
|
199
|
+
booktitle = {IEEE International Conference on Quantum Computing and Engineering (QCE)},
|
|
200
|
+
year = {2023},
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
which is also available on arXiv:
|
|
205
|
+
[](https://arxiv.org/abs/2308.00029)
|
|
206
|
+
|
|
207
|
+
## Acknowledgements
|
|
208
|
+
|
|
209
|
+
The Munich Quantum Toolkit has been supported by the European
|
|
210
|
+
Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (grant agreement
|
|
211
|
+
No. 101001318), the Bavarian State Ministry for Science and Arts through the Distinguished Professorship Program, as well as the
|
|
212
|
+
Munich Quantum Valley, which is supported by the Bavarian state government with funds from the Hightech Agenda Bayern Plus.
|
|
213
|
+
|
|
214
|
+
<p align="center">
|
|
215
|
+
<picture>
|
|
216
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/cda-tum/mqt-problemsolver/main/img/tum_dark.svg" width="28%">
|
|
217
|
+
<img src="https://raw.githubusercontent.com/cda-tum/mqt-problemsolver/main/img/tum_light.svg" width="28%">
|
|
218
|
+
</picture>
|
|
219
|
+
<picture>
|
|
220
|
+
<img src="https://raw.githubusercontent.com/cda-tum/mqt-problemsolver/main/img/logo-bavaria.svg" width="16%">
|
|
221
|
+
</picture>
|
|
222
|
+
<picture>
|
|
223
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/cda-tum/mqt-problemsolver/main/img/erc_dark.svg" width="24%">
|
|
224
|
+
<img src="https://raw.githubusercontent.com/cda-tum/mqt-problemsolver/main/img/erc_light.svg" width="24%">
|
|
225
|
+
</picture>
|
|
226
|
+
<picture>
|
|
227
|
+
<img src="https://raw.githubusercontent.com/cda-tum/mqt-problemsolver/main/img/logo-mqv.svg" width="28%">
|
|
228
|
+
</picture>
|
|
229
|
+
</p>
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
[](https://github.com/cda-tum/MQTProblemSolver/actions/workflows/coverage.yml)
|
|
2
|
+
[](https://github.com/cda-tum/MQTProblemSolver/actions/workflows/deploy.yml)
|
|
3
|
+
|
|
4
|
+
<p align="center">
|
|
5
|
+
<picture>
|
|
6
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/cda-tum/MQTProblemSolver/main/img/mqt_light.png" width="60%">
|
|
7
|
+
<img src="https://raw.githubusercontent.com/cda-tum/MQTProblemSolver/main/img/mqt_dark.png" width="60%">
|
|
8
|
+
</picture>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
# MQT ProblemSolver
|
|
12
|
+
|
|
13
|
+
MQT ProblemSolver is a framework to utilize quantum computing as a technology for users with little to no
|
|
14
|
+
quantum computing knowledge.
|
|
15
|
+
All necessary quantum parts are embedded by domain experts while the interfaces provided are similar to the ones
|
|
16
|
+
classical solver provide:
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<img src="img/framework.png" height=300px>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
When provided with a problem description, MQT ProblemSolver offers a selection of implemented quantum algorithms.
|
|
23
|
+
The user just has to chose one and all further (quantum) calculation steps are encapsulated within MQT ProblemSolver.
|
|
24
|
+
After the calculation finished, the respective solution is returned - again in the same format as classical
|
|
25
|
+
solvers use.
|
|
26
|
+
|
|
27
|
+
In the current implementation, two case studies are conducted:
|
|
28
|
+
|
|
29
|
+
1. A SAT Problem: Constraint Satisfaction Problem
|
|
30
|
+
2. A Graph-based Optimization Problem: Travelling Salesman Problem
|
|
31
|
+
|
|
32
|
+
## A SAT Problem: Constraint Satisfaction Problem
|
|
33
|
+
|
|
34
|
+
This exemplary implementation can be found in the [CSP_example.ipynb](notebooks/csp_example.ipynb) Jupyter notebook.
|
|
35
|
+
Here, the solution to a Kakuro riddle with a 2x2 grid can be solved for arbitrary sums `s0` to `s3`:
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<img src="img/kakuro.png" height=100px>
|
|
39
|
+
</p>
|
|
40
|
+
|
|
41
|
+
MQT ProblemSolver will return valid values to `a`, `b`, `c`, and `d` if a solution exists.
|
|
42
|
+
|
|
43
|
+
## A Graph-based Optimization Problem: Travelling Salesman Problem
|
|
44
|
+
|
|
45
|
+
This exemplary implementation can be found in the [TSP_example.ipynb](notebooks/tsp_example.ipynb) Jupyter notebook.
|
|
46
|
+
Here, the solution to a Travelling Salesman Problem with 4 cities can be solved for arbitrary distances `dist_1_2` to `dist_3_4`between the cities.
|
|
47
|
+
|
|
48
|
+
<p align="center">
|
|
49
|
+
<img src="img/tsp.png" height=200px>
|
|
50
|
+
</p>
|
|
51
|
+
|
|
52
|
+
MQT ProblemSolver will return the shortest path visiting all cities as a list.
|
|
53
|
+
|
|
54
|
+
## Satellite Mission Planning Problem
|
|
55
|
+
|
|
56
|
+
Additional to the two case studies, we provide a more complex example for the satellite mission planning problem.
|
|
57
|
+
The goal is to maximize the accumulated values of all images taken by the satellite while it is often not possible
|
|
58
|
+
to take all images since the satellite must rotate and adjust its optics.
|
|
59
|
+
|
|
60
|
+
In the following example, there are five to-be-captured locations which their assigned value.
|
|
61
|
+
|
|
62
|
+
<p align="center">
|
|
63
|
+
<img src="img/satellite_mission_planning_problem.png" height=200px>
|
|
64
|
+
</p>
|
|
65
|
+
|
|
66
|
+
# Pre-Compilation
|
|
67
|
+
|
|
68
|
+
Every quantum computing application must be encoded into a quantum circuit and then compiled for a specific device.
|
|
69
|
+
This lengthy compilation process is a key bottleneck and intensifies for recurring problems---each of which requires
|
|
70
|
+
a new compilation run thus far.
|
|
71
|
+
|
|
72
|
+
<p align="center">
|
|
73
|
+
<img src="img/workflow_old.png">
|
|
74
|
+
</p>
|
|
75
|
+
|
|
76
|
+
Pre-compilation is a promising approach to overcome this bottleneck.
|
|
77
|
+
Beginning with a problem class and suitable quantum algorithm, a **predictive encoding** scheme is applied to encode a
|
|
78
|
+
representative problem instance into a general-purpose quantum circuit for that problem class.
|
|
79
|
+
Once the real problem instance is known, the previously constructed circuit only needs to be
|
|
80
|
+
**adjusted**—with (nearly) no compilation necessary:
|
|
81
|
+
|
|
82
|
+
<p align="center">
|
|
83
|
+
<img src="img/workflow_new.png">
|
|
84
|
+
</p>
|
|
85
|
+
Following this approach, we provide a pre-compilation module that can be used to precompile QAOA circuits
|
|
86
|
+
for the MaxCut problem.
|
|
87
|
+
|
|
88
|
+
# Usage
|
|
89
|
+
|
|
90
|
+
MQT ProblemSolver is available via [PyPI](https://pypi.org/project/mqt.problemsolver/):
|
|
91
|
+
|
|
92
|
+
```console
|
|
93
|
+
(venv) $ pip install mqt.problemsolver
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
# Repository Structure
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
.
|
|
100
|
+
├── src
|
|
101
|
+
│ └── mqt
|
|
102
|
+
│ └── problemsolver
|
|
103
|
+
│ └── satelitesolver
|
|
104
|
+
│ │ └── ...
|
|
105
|
+
│ └── precompilation
|
|
106
|
+
│ │ └── ...
|
|
107
|
+
│ └── csp.py
|
|
108
|
+
│ └── tsp.py
|
|
109
|
+
└── notebooks
|
|
110
|
+
└── satelitesolver
|
|
111
|
+
│ └── ...
|
|
112
|
+
└── precompilation
|
|
113
|
+
│ └── ...
|
|
114
|
+
└── problemsolver_paper_figures.ipynb
|
|
115
|
+
└── csp_example.ipynb
|
|
116
|
+
└── tsp_example.ipynb
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
# References
|
|
120
|
+
|
|
121
|
+
In case you are using MQT ProblemSolver in your work, we would be thankful if you referred to it by citing the following publication:
|
|
122
|
+
|
|
123
|
+
```bibtex
|
|
124
|
+
@INPROCEEDINGS{quetschlich2023mqtproblemsolver,
|
|
125
|
+
title = {{Towards an Automated Framework for Realizing Quantum Computing Solutions}},
|
|
126
|
+
author = {N. Quetschlich and L. Burgholzer and R. Wille},
|
|
127
|
+
booktitle = {International Symposium on Multiple-Valued Logic (ISMVL)},
|
|
128
|
+
year = {2023},
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
which is also available on arXiv:
|
|
133
|
+
[](https://arxiv.org/abs/2210.14928)
|
|
134
|
+
|
|
135
|
+
In case you are using our Pre-Compilation approach, we would be thankful if you referred to it by citing the following publication:
|
|
136
|
+
|
|
137
|
+
```bibtex
|
|
138
|
+
@INPROCEEDINGS{quetschlich2023precompilation,
|
|
139
|
+
title = {{Reducing the Compilation Time of Quantum Circuits Using Pre-Compilation on the Gate Level}},
|
|
140
|
+
author = {N. Quetschlich and L. Burgholzer and R. Wille},
|
|
141
|
+
booktitle = {IEEE International Conference on Quantum Computing and Engineering (QCE)},
|
|
142
|
+
year = {2023},
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
which is also available on arXiv:
|
|
147
|
+
[](https://arxiv.org/abs/2305.04941)
|
|
148
|
+
|
|
149
|
+
In case you are using our Satellite Mission Planning Problem approach, we would be thankful if you referred to it by citing the following publication:
|
|
150
|
+
|
|
151
|
+
```bibtex
|
|
152
|
+
@INPROCEEDINGS{quetschlich2023satellite,
|
|
153
|
+
title = {{A Hybrid Classical Quantum Computing Approach to the Satellite Mission Planning Problem}},
|
|
154
|
+
author = {N. Quetschlich and V. Koch and L. Burgholzer and R. Wille},
|
|
155
|
+
booktitle = {IEEE International Conference on Quantum Computing and Engineering (QCE)},
|
|
156
|
+
year = {2023},
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
which is also available on arXiv:
|
|
161
|
+
[](https://arxiv.org/abs/2308.00029)
|
|
162
|
+
|
|
163
|
+
## Acknowledgements
|
|
164
|
+
|
|
165
|
+
The Munich Quantum Toolkit has been supported by the European
|
|
166
|
+
Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (grant agreement
|
|
167
|
+
No. 101001318), the Bavarian State Ministry for Science and Arts through the Distinguished Professorship Program, as well as the
|
|
168
|
+
Munich Quantum Valley, which is supported by the Bavarian state government with funds from the Hightech Agenda Bayern Plus.
|
|
169
|
+
|
|
170
|
+
<p align="center">
|
|
171
|
+
<picture>
|
|
172
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/cda-tum/mqt-problemsolver/main/img/tum_dark.svg" width="28%">
|
|
173
|
+
<img src="https://raw.githubusercontent.com/cda-tum/mqt-problemsolver/main/img/tum_light.svg" width="28%">
|
|
174
|
+
</picture>
|
|
175
|
+
<picture>
|
|
176
|
+
<img src="https://raw.githubusercontent.com/cda-tum/mqt-problemsolver/main/img/logo-bavaria.svg" width="16%">
|
|
177
|
+
</picture>
|
|
178
|
+
<picture>
|
|
179
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/cda-tum/mqt-problemsolver/main/img/erc_dark.svg" width="24%">
|
|
180
|
+
<img src="https://raw.githubusercontent.com/cda-tum/mqt-problemsolver/main/img/erc_light.svg" width="24%">
|
|
181
|
+
</picture>
|
|
182
|
+
<picture>
|
|
183
|
+
<img src="https://raw.githubusercontent.com/cda-tum/mqt-problemsolver/main/img/logo-mqv.svg" width="28%">
|
|
184
|
+
</picture>
|
|
185
|
+
</p>
|