-
Notifications
You must be signed in to change notification settings - Fork 26
/
pyproject.toml
339 lines (296 loc) · 10.7 KB
/
pyproject.toml
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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
[build-system]
requires = [
"scikit-build-core>=0.10.1",
"setuptools-scm>=8.1",
"pybind11>=2.13.5",
]
build-backend = "scikit_build_core.build"
[project]
name = "mqt.qmap"
description = "A tool for Quantum Circuit Mapping"
readme = "README.md"
authors = [
{ name = "Lukas Burgholzer", email = "[email protected]" },
{ name = "Stefan Hillmich", email = "[email protected]" },
{ name = "Tom Peham", email = "[email protected]" },
{ name = "Ludwig Schmid", email = "[email protected]" },
{ name = "Yannick Stade", email = "[email protected]" }
]
keywords = ["MQT", "quantum-computing", "design-automation", "compiler", "clifford-synthesis"]
license = { file = "LICENSE.md" }
classifiers = [
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"License :: OSI Approved :: MIT License",
"Programming Language :: C++",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Development Status :: 5 - Production/Stable",
"Typing :: Typed",
]
requires-python = ">=3.9"
dependencies = [
"qiskit[qasm3-import]>=1.0.0",
"rustworkx[all]>=0.14.0",
"importlib_resources>=5.0; python_version < '3.10'",
"typing_extensions>=4.6; python_version < '3.10'",
]
dynamic = ["version"]
[project.optional-dependencies]
test = ["pytest>=7.2", "mqt.qcec>=2.4.5", "mqt.qmap[visualization]"]
coverage = ["mqt.qmap[test]", "pytest-cov>=4"]
docs = [
"furo>=2023.9.10",
"setuptools-scm>=8.1",
"sphinxcontrib-bibtex>=2.4.2",
"sphinx-copybutton>=0.5",
"ipykernel",
"nbsphinx",
"sphinxext-opengraph>=0.9",
"sphinx-autodoc-typehints",
"qiskit[visualization]",
"mqt.qmap[visualization]"
]
visualization = [
"distinctipy>=1.2.2",
"plotly>=5.15.0",
"networkx>=2.5",
"walkerlayout>=1.0.2",
"ipywidgets>=7.6.5",
]
dev = ["mqt.qmap[coverage, docs]"]
[project.urls]
Homepage = "https://github.com/cda-tum/mqt-qmap"
Documentation = "https://mqt.readthedocs.io/projects/qmap"
Issues = "https://github.com/cda-tum/mqt-qmap/issues"
Discussions = "https://github.com/cda-tum/mqt-qmap/discussions"
[tool.scikit-build]
# Protect the configuration against future changes in scikit-build-core
minimum-version = "build-system.requires"
# Set the wheel install directory
wheel.install-dir = "mqt/qmap"
# Set required Ninja version
ninja.version = ">=1.10"
# Setuptools-style build caching in a local directory
build-dir = "build/{wheel_tag}/{build_type}"
# Explicitly set the package directory
wheel.packages = ["src/mqt"]
# Only build the Python bindings target
build.targets = ["pyqmap"]
# Only install the Python package component
install.components = ["mqt-qmap_Python"]
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
sdist.include = ["src/mqt/qmap/_version.py"]
sdist.exclude = [
"**/.github",
"**/doc",
"**/docs",
"**/meta",
"**/plots",
"**/test",
"**/tests",
]
[tool.scikit-build.cmake.define]
BUILD_MQT_QMAP_TESTS = "OFF"
BUILD_MQT_QMAP_BINDINGS = "ON"
[[tool.scikit-build.overrides]]
if.python-version = ">=3.13"
if.abi-flags = "t"
if.platform-system = "win32"
inherit.cmake.define = "append"
cmake.define.DISABLE_GIL = "1"
[tool.check-sdist]
sdist-only = ["src/mqt/qmap/_version.py"]
git-only = [
"docs/*",
"extern/*",
"test/*",
".idea/*",
]
[tool.setuptools_scm]
write_to = "src/mqt/qmap/_version.py"
[tool.pytest.ini_options]
minversion = "7.2"
testpaths = ["test/python"]
addopts = ["-ra", "--strict-markers", "--strict-config", "--showlocals"]
log_cli_level = "INFO"
xfail_strict = true
filterwarnings = [
"error",
'ignore:.*datetime\.datetime\.utcfromtimestamp.*:DeprecationWarning:',
'ignore:.*qiskit\.providers\.models.* is deprecated.*:DeprecationWarning:qiskit.*', # Qiskit imports deprecated code (should be resolved in the 1.2.1 release)
'ignore:.*Treating CircuitInstruction as an iterable is deprecated.*:DeprecationWarning:mqt.qcec.*', # Needs a new release of QCEC (should be resolved in 2.7.1)
# we purposely maintain compatibility with the V1 backends until Qiskit removes them in 2.0
'ignore:.*qiskit\.providers\.models.* is deprecated.*:DeprecationWarning:mqt.qmap.*',
'ignore:.*qiskit\.providers\.fake_provider\.fake_backend\.FakeBackend.* is deprecated.*:DeprecationWarning:',
'ignore:.*qiskit\.providers\.backend.BackendV1.* is deprecated.*:DeprecationWarning:',
# Qiskit 1.3 deprecations
'ignore:.*``qiskit.dagcircuit.dagcircuit.DAGCircuit.*`` is deprecated as of qiskit 1.3.0.*:DeprecationWarning:',
'ignore:.*``qiskit.circuit.instruction.Instruction.condition`` is deprecated as of qiskit 1.3.0.*:DeprecationWarning:',
'ignore:.*``qiskit.circuit.library.standard_gates.x.*`` is pending deprecation as of qiskit 1.3.*:PendingDeprecationWarning:',
]
[tool.coverage]
run.source = ["mqt.qmap"]
run.omit = [
"*/visualization/*",
"*/_compat/*",
]
report.exclude_also = [
'\.\.\.',
'if TYPE_CHECKING:',
'raise AssertionError',
'raise NotImplementedError',
]
[tool.mypy]
files = ["src/mqt", "test/python", "noxfile.py"]
mypy_path = ["$MYPY_CONFIG_FILE_DIR/src"]
python_version = "3.9"
warn_unused_configs = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
strict = true
disallow_untyped_defs = false
explicit_package_bases = true
warn_unreachable = true
[[tool.mypy.overrides]]
module = ["qiskit.*", "matplotlib.*", "networkx.*", "plotly.*", "_plotly_utils.*", "distinctipy.*", "ipywidgets.*", "walkerlayout.*"]
ignore_missing_imports = true
[tool.check-wheel-contents]
ignore = ["W002"] # Triggers on __init__.py's
[tool.ruff]
line-length = 120
preview = true
unsafe-fixes = true
[tool.ruff.lint]
extend-select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"B", "B904", # 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
"S", # flake8-bandit
"SLF", # flake8-self
"SLOT", # flake8-slots
"SIM", # flake8-simplify
"T20", # flake8-print
"TC", # flake8-type-checking
"TID251", # flake8-tidy-imports.banned-api
"TRY", # tryceratops
"UP", # pyupgrade
"YTT", # flake8-2020
]
ignore = [
"ISC001", # Conflicts with formatter
"PLR09", # Too many <...>
"PLR2004", # Magic value used in comparison
"PLC0415", # Import should be at top of file
"S101", # Use of assert detected
"S403", # `pickle`, `cPickle`, `dill`, and `shelve` modules are possibly insecure
]
typing-modules = ["mqt.qmap._compat.typing"]
isort.required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"typing.Callable".msg = "Use collections.abc.Callable instead."
"typing.Iterator".msg = "Use collections.abc.Iterator instead."
"typing.Mapping".msg = "Use collections.abc.Mapping instead."
"typing.Sequence".msg = "Use collections.abc.Sequence instead."
"typing.Set".msg = "Use collections.abc.Set instead."
"typing.Self".msg = "Use mqt.qmap._compat.typing.Self instead."
"typing_extensions.Self".msg = "Use mqt.qmap._compat.typing.Self instead."
"typing.TypeAlias".msg = "Use mqt.qmap._compat.typing.TypeAlias instead."
"typing_extensions.TypeAlias".msg = "Use mqt.qmap._compat.typing.TypeAlias instead."
"importlib.resources".msg = "Use mqt.qmap._compat.importlib.resources instead."
"importlib_resources".msg = "Use mqt.qmap._compat.importlib.resources instead."
[tool.ruff.lint.per-file-ignores]
"test/python/**" = ["T20", "ANN"]
"docs/**" = ["T20"]
"noxfile.py" = ["T20", "TID251"]
"*.pyi" = ["D418", "PYI021"] # pydocstyle
"*.ipynb" = [
"D", # pydocstyle
"E402", # Allow imports to appear anywhere in Jupyter notebooks
"I002", # Allow missing `from __future__ import annotations` import
]
"src/mqt/qmap/_compat/**.py" = ["TID251"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.typos]
files.extend-exclude = [
"tableaus\\.json"
]
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"
optin = "optin"
aer = "aer"
iy = "iy"
[tool.repo-review]
ignore = ["GH200"]
[tool.cibuildwheel]
build = "cp3*"
skip = "*-musllinux*"
archs = "auto64"
test-command = "python -c \"from mqt import qmap\""
test-skip = ["cp313*"] # skip testing on Python 3.13 until our dependencies are ready
build-frontend = "build[uv]"
enable = ["cpython-freethreading"]
manylinux-x86_64-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_28"
manylinux-ppc64le-image = "manylinux_2_28"
manylinux-s390x-image = "manylinux_2_28"
[tool.cibuildwheel.linux]
environment = { Z3_ROOT="/opt/python/cp311-cp311/lib/python3.11/site-packages/z3", DEPLOY="ON" }
before-all = "/opt/python/cp311-cp311/bin/pip install z3-solver==4.12.6"
repair-wheel-command = [
"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/python/cp311-cp311/lib/python3.11/site-packages/z3/lib",
"auditwheel repair -w {dest_dir} {wheel}",
]
[tool.cibuildwheel.macos]
environment = { MACOSX_DEPLOYMENT_TARGET = "11.0" }
[tool.cibuildwheel.windows]
before-build = "pip install delvewheel>=1.7.3"
repair-wheel-command = "delvewheel repair -v -w {dest_dir} {wheel} --namespace-pkg mqt"
environment = { CMAKE_GENERATOR = "Ninja" }
[[tool.cibuildwheel.overrides]]
select = "*-macosx_arm64"
environment = { MACOSX_DEPLOYMENT_TARGET = "11.0" }
[tool.uv]
reinstall-package = ["mqt.qmap"]