-
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathpyproject.toml
More file actions
277 lines (246 loc) · 8.5 KB
/
pyproject.toml
File metadata and controls
277 lines (246 loc) · 8.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM
# Copyright (c) 2025 Munich Quantum Software Company GmbH
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License
[build-system]
requires = [
"hatchling>=1.27.0",
"hatch-vcs>=0.4.0"
]
build-backend = "hatchling.build"
[project]
name = "mqt.predictor"
description = "MQT Predictor - A MQT Tool for Automatic Device Selection with Device-Specific Circuit Compilation for Quantum Computing"
readme = "README.md"
authors = [
{ name = "Nils Quetschlich", email = "nils.quetschlich@tum.de" },
{ name = "Lukas Burgholzer", email = "lukas.burgholzer@tum.de"},
{ name = "Patrick Hopf", email = "patrick.hopf@tum.de"},
]
keywords = ["MQT", "quantum computing", "compilation", "machine learning", "prediction"]
license = "MIT"
license-files = ["LICENSE.md"]
requires-python = ">=3.10"
dynamic = ["version"]
dependencies = [
"mqt.bench>=2.0.0",
"qiskit>=1.3.3",
"pytket>=1.29.0", # lowest version that supports the used pytket AutoRebase pass instead of auto_rebase
"pytket_qiskit>=0.61.0",
"qiskit-ibm-runtime>=0.30.0",
"sb3_contrib>=2.0.0",
"tqdm>=4.66.0",
"rich>=12.6.0",
"scikit-learn>=1.5.1",
"tensorboard>=2.17.0",
"bqskit>=1.2.0",
"numpy>=2.1; python_version >= '3.13'",
"numpy>=1.26; python_version >= '3.12'",
"numpy>=1.24; python_version >= '3.11'",
"numpy>=1.22",
"optuna>=4.0.0",
"torch-geometric>=2.7.0,<2.8.0",
"torch>=2.7.0,<2.8.0; sys_platform == 'darwin' and 'x86_64' in platform_machine and python_version < '3.13'", # Restrict torch v2.3.0 for macOS x86 since it is not supported anymore.
"safetensors>=0.3.0",
"typing-extensions>=4.1", # for `assert_never`
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
"Typing :: Typed",
]
[dependency-groups]
test = [
"pytest>=9.0.1",
"pytest-cov>=7.0.0",
]
docs = [
"furo>=2025.09.25",
"myst-nb>=1.3.0",
"setuptools-scm>=9.2.2",
"sphinx>=8.1.3",
"sphinx>=8.2.3; python_version >= '3.11'",
"sphinx-autoapi>=3.6.0",
"sphinx-copybutton>=0.5.2",
"sphinx-design>=0.6.1",
"sphinxcontrib-bibtex>=2.6.5",
"sphinxcontrib-svg2pdfconverter>=1.3.0",
"sphinxext-opengraph>=0.13.0",
]
dev = [
{include-group = "test"},
"nox>=2025.11.12",
]
[project.urls]
Homepage = "https://github.com/munich-quantum-toolkit/predictor"
Issues = "https://github.com/munich-quantum-toolkit/predictor/issues"
Discussions = "https://github.com/munich-quantum-toolkit/predictor/discussions"
Research = "https://www.cda.cit.tum.de/research/quantum/"
[tool.hatch.build.targets.wheel]
packages = ["src/mqt"]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "src/mqt/predictor/_version.py"
[tool.pytest]
minversion = "9.0"
testpaths = ["tests"]
strict = true
addopts = [
"-ra",
"--showlocals",
]
log_level = "INFO"
filterwarnings = [
'error',
'ignore:.*pytorch.*:UserWarning:',
"ignore:`torch_geometric.distributed` has been deprecated:DeprecationWarning:torch_geometric",
"ignore:.*'type_params' parameter of 'typing\\._eval_type'.*:DeprecationWarning:",
'ignore:.*Values in x.*:RuntimeWarning:',
'ignore:.*The least populated class in y has only 3 members, which is less than n_splits=5.*:UserWarning:',
'ignore:.*divide by zero encountered in det.*:RuntimeWarning:',
'ignore:.*invalid value encountered in det.*:RuntimeWarning:',
'ignore:.*Treating CircuitInstruction as an iterable is deprecated legacy behavior since Qiskit 1.2, and will be removed in Qiskit 3.0.*:DeprecationWarning:',
'ignore:.*qiskit.providers.models is deprecated since Qiskit 1.2*:DeprecationWarning:',
'ignore:.*The class ``qiskit.qobj.*`` is deprecated as of Qiskit 1.3.*:DeprecationWarning:',
'ignore:.*The property ``qiskit.circuit.instruction.Instruction.*`` is deprecated as of qiskit 1.3.0.*:DeprecationWarning:',
]
[tool.coverage]
run.source = ["mqt.predictor"]
report.exclude_also = [
'\.\.\.',
'if TYPE_CHECKING:',
'raise AssertionError',
'raise NotImplementedError',
]
run.disable_warnings = [
"no-sysmon",
]
show_missing = true
skip_empty = true
precision = 1
[tool.mypy]
mypy_path = "$MYPY_CONFIG_FILE_DIR/src"
files = ["src", "tests"]
python_version = "3.10"
strict = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
explicit_package_bases = true
pretty = true
[[tool.mypy.overrides]]
module = ["pytket.*"]
implicit_reexport = true
[[tool.mypy.overrides]]
# `mqt.bench` and `sb3_contrib` are fully typed but take forever to install in the environment.
# recent versions of `gym` are typed, but stable-baselines3 pins a very old version of gym.
# qiskit is not yet marked as typed, but is typed mostly.
# the other libraries do not have type stubs.
module = ["qiskit.*", "joblib.*", "sklearn.*", "matplotlib.*", "gymnasium.*", "mqt.bench.*", "sb3_contrib.*", "bqskit.*", "qiskit_ibm_runtime.*", "networkx.*", "stable_baselines3.*", "torch", "torch.*", "torch_geometric", "torch_geometric.*", "optuna.*", "safetensors", "safetensors.torch", "safetensors.*" ]
ignore_missing_imports = true
# Relax type checking for the GNN module since torch and torch_geometric expose
# many APIs as Any due to incomplete type stubs; the GNN implementation must
# work with these untyped returns and may need to subclass Any-typed classes.
[[tool.mypy.overrides]]
module = ["mqt.predictor.ml.gnn"]
disallow_subclassing_any = false
[tool.ruff]
line-length = 120
namespace-packages = ["mqt"]
preview = true
fix = true
unsafe-fixes = true
show-fixes = true
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
extend-select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # pydocstyle
"EM", # flake8-errmsg
"EXE", # flake8-executable
"FA", # flake8-future-annotations
"FLY", # flynt
"FURB", # refurb
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging-format
"N", # flake8-naming
"NPY", # numpy
"PERF", # perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific
"SLF", # flake8-self
"SLOT", # flake8-slots
"SIM", # flake8-simplify
"TC", # flake8-type-checking
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"YTT", # flake8-2020
]
ignore = [
"E501", # Line too long (Black is enough)
"PLR", # Design-related pylint codes
"S101", # Use of assert detected
]
flake8-unused-arguments.ignore-variadic-names = true
future-annotations = true
[tool.ruff.lint.isort]
known-first-party = ["mqt.predictor"]
[tool.ruff.lint.per-file-ignores]
"*.pyi" = ["D"] # pydocstyle
"*.ipynb" = [
"D", # pydocstyle
"E402", # Allow imports to appear anywhere in Jupyter notebooks
"I002", # Allow missing `from __future__ import annotations` import
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.typos]
default.extend-ignore-re = [
'"id": ".*",',
"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$", # ignore line
"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on" # ignore block
]
[tool.typos.default.extend-words]
wille = "wille"
anc = "anc"
aer = "aer"
fom = "fom"
TPE = "TPE"
[tool.repo-review]
ignore = [
"GH200",
]
[tool.check-sdist]
sdist-only = ["src/mqt/predictor/_version.py"]