-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathpyproject.toml
More file actions
403 lines (347 loc) · 11.2 KB
/
pyproject.toml
File metadata and controls
403 lines (347 loc) · 11.2 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
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
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM
# Copyright (c) 2025 - 2026 Munich Quantum Software Company GmbH
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License
[build-system]
requires = [
"nanobind>=2.10.2",
"scikit-build-core>=0.11.6",
"setuptools-scm>=9.2.2",
"mqt.core~=3.4.0",
]
build-backend = "scikit_build_core.build"
[project]
name = "mqt.qcec"
description = "A tool for Quantum Circuit Equivalence Checking"
readme = "README.md"
authors = [
{ name = "Lukas Burgholzer", email = "lukas.burgholzer@tum.de"},
{ name = "Tom Peham", email = "tom.peham@tum.de" }
]
keywords = ["MQT", "quantum-computing", "design-automation", "equivalence-checking", "verification"]
license = "MIT"
license-files = ["LICENSE.md"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: C++",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"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",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
"Typing :: Typed",
]
requires-python = ">=3.10"
dependencies = [
"mqt.core~=3.4.0",
"typing_extensions>=4.2; python_version < '3.11'", # used for typing.Unpack
"numpy>=1.22",
"numpy>=1.24; python_version >= '3.11'",
"numpy>=1.26; python_version >= '3.12'",
"numpy>=2.1; python_version >= '3.13'",
"numpy>=2.3.2; python_version >= '3.14'",
]
dynamic = ["version"]
[project.optional-dependencies]
qiskit = ["qiskit[qasm3-import]>=1.0.0"]
[project.urls]
Homepage = "https://github.com/munich-quantum-toolkit/qcec"
Documentation = "https://mqt.readthedocs.io/projects/qcec"
Issues = "https://github.com/munich-quantum-toolkit/qcec/issues"
Discussions = "https://github.com/munich-quantum-toolkit/qcec/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/qcec"
# Explicitly set the package directory
wheel.packages = ["python/mqt"]
# Enable Stable ABI builds for CPython 3.12+
wheel.py-api = "cp312"
# Set required Ninja version
ninja.version = ">=1.10"
# Setuptools-style build caching in a local directory
build-dir = "build/{wheel_tag}/{build_type}"
# Only build the Python bindings target
build.targets = [
"mqt-qcec-bindings",
]
# Only install the Python package component
install.components = ["mqt-qcec_Python"]
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
sdist.include = ["python/mqt/qcec/_version.py"]
sdist.exclude = [
"**/.github",
"**/doc",
"**/docs",
"**/meta",
"**/plots",
"**/test",
"**/tests",
]
[tool.scikit-build.cmake.define]
BUILD_MQT_QCEC_TESTS = "OFF"
BUILD_MQT_QCEC_BINDINGS = "ON"
ENABLE_IPO = "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 = ["python/mqt/qcec/_version.py"]
git-only = [
"docs/*",
"extern/*",
"test/*",
".idea/*",
]
[tool.setuptools_scm]
write_to = "python/mqt/qcec/_version.py"
[tool.pytest]
minversion = "9.0"
testpaths = ["test/python"]
strict = true
addopts = [
"-ra",
"--showlocals",
"--numprocesses=auto", # Automatically use all available CPU cores for parallel testing
]
log_level = "INFO"
filterwarnings = [
"error",
'ignore:.*encountered in det.*:RuntimeWarning:numpy.linalg:',
'ignore:.*datetime\.datetime\.utcfromtimestamp.*:DeprecationWarning:',
# Qiskit 1.3 deprecations
'ignore:.*``qiskit.circuit.library.standard_gates.x.*`` is pending deprecation as of qiskit 1.3.*:PendingDeprecationWarning:',
# Qiskit 2.1 deprecations
"ignore:.*``qiskit.circuit.quantumcircuit.QuantumCircuit.mcx.*``'s argument ``mode`` is deprecated as of Qiskit 2.1.*:DeprecationWarning:",
"ignore:.*``qiskit.circuit.library.standard_gates.x.MCXGate.get_num_ancilla_qubits.*`` is deprecated as of Qiskit 2.1.*:DeprecationWarning:",
"ignore:.*``qiskit.circuit.library.standard_gates.x.MCXRecursive.__new__()`` is deprecated as of Qiskit 2.1.*:DeprecationWarning:",
"ignore:.*``qiskit.circuit.library.standard_gates.x.MCXVChain.__new__()`` is deprecated as of Qiskit 2.1.*:DeprecationWarning:",
# mqt.qcec deprecations
"ignore:.*``mqt.qcec`` has deprecated the ``mode`` argument of ``generate_profile``*:DeprecationWarning:",
"ignore:.*``mqt.qcec`` has deprecated the ``ancilla_mode`` argument of ``verify_compilation``*:DeprecationWarning:",
]
[tool.coverage]
run.source = ["mqt.qcec"]
run.omit = ["python/mqt/qcec/_compat/typing.py"]
report.exclude_also = [
'\.\.\.',
'if TYPE_CHECKING:',
'raise AssertionError',
'raise NotImplementedError',
'def __dir__()', # Ignore __dir__ method that exists mainly for better IDE support
'@overload', # Overloads are only for static typing
]
run.disable_warnings = [
"no-sysmon",
]
[tool.mypy]
files = ["python/mqt", "test/python", "noxfile.py"]
mypy_path = ["$MYPY_CONFIG_FILE_DIR/python"]
python_version = "3.10"
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.*"]
ignore_missing_imports = true
[tool.ty.terminal]
# Error if ty emits any warning-level diagnostics.
error-on-warning = true
[tool.ty.src]
exclude = [
"docs/**",
]
[tool.check-wheel-contents]
ignore = ["W002"] # Triggers on __init__.py's
[tool.ruff]
line-length = 120
namespace-packages = ["mqt"]
preview = true
fix = true
unsafe-fixes = true
show-fixes = true
src = ["python"]
[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
"S", # flake8-bandit
"SLF", # flake8-self
"SLOT", # flake8-slots
"SIM", # flake8-simplify
"T20", # flake8-print
"TC", # flake8-type-checking
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"YTT", # flake8-2020
]
ignore = [
"PLR09", # Too many <...>
"PLR2004", # Magic value used in comparison
"S101", # Use of assert detected
]
future-annotations = true
typing-modules = ["mqt.qcec._compat.typing"]
[tool.ruff.lint.isort]
known-first-party = ["mqt.qcec"]
[tool.ruff.lint.per-file-ignores]
"test/python/**" = [
"T20", # allow print statements in tests
"PLC2701" # allow private name imports in tests
]
"docs/**" = ["T20"]
"noxfile.py" = ["T20", "TID251"]
"python/mqt/qcec/_compat/**.py" = ["TID251"]
"*.pyi" = ["D418", "DOC202", "PYI011", "PYI021"]
"*.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"
[tool.repo-review]
ignore = [
"GH200", # We use Renovate instead of Dependabot
"PC160", # We use a mirror of crate-ci/typos
]
[tool.cibuildwheel]
build = "cp3*"
skip = ["*-musllinux_*", "cp313t-*"]
archs = "auto64"
test-groups = ["test"]
test-command = "pytest {project}/test/python"
build-frontend = "build[uv]"
enable = ["cpython-freethreading"]
test-skip = [
"cp3??t-*", # no freethreading qiskit wheels
"cp*-win_arm64", # no numpy, qiskit, ... wheels
]
# The mqt-core shared libraries are provided by the mqt-core Python package.
# They should not be vendorized into the mqt-qcec wheel. This requires
# excluding the shared libraries from the repair process.
[tool.cibuildwheel.linux]
environment = { DEPLOY="ON" }
# The SOVERSION needs to be updated when the shared libraries are updated.
repair-wheel-command = """auditwheel repair -w {dest_dir} {wheel} \
--exclude libmqt-core-ir.so.3.4 \
--exclude libmqt-core-qasm.so.3.4 \
--exclude libmqt-core-circuit-optimizer.so.3.4 \
--exclude libmqt-core-algorithms.so.3.4 \
--exclude libmqt-core-dd.so.3.4 \
--exclude libmqt-core-zx.so.3.4"""
[tool.cibuildwheel.macos]
environment = { MACOSX_DEPLOYMENT_TARGET = "11.0" }
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} --ignore-missing-dependencies"
[tool.cibuildwheel.windows]
before-build = "uv pip install delvewheel>=1.11.2"
repair-wheel-command = """delvewheel repair -w {dest_dir} {wheel} --namespace-pkg mqt \
--exclude mqt-core-ir.dll \
--exclude mqt-core-qasm.dll \
--exclude mqt-core-circuit-optimizer.dll \
--exclude mqt-core-algorithms.dll \
--exclude mqt-core-dd.dll \
--exclude mqt-core-zx.dll"""
environment = { CMAKE_ARGS = "-T ClangCL" }
[tool.uv]
required-version = ">=0.5.20"
cache-keys = [
{ file = "pyproject.toml" },
{ git = { commit = true, tags = true } },
{ file = "bindings/**/*.cpp"},
]
[tool.uv.sources]
mqt-qcec = { workspace = true }
[dependency-groups]
build = [
"nanobind>=2.10.2",
"scikit-build-core>=0.11.6",
"setuptools-scm>=9.2.2",
"mqt.core~=3.4.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.1",
"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",
"qiskit[qasm3-import,visualization]>=1.0.0"
]
test = [
"pytest>=9.0.1",
"pytest-cov>=7.0.0",
"pytest-sugar>=1.1.1",
"pytest-xdist>=3.8.0",
"qiskit[qasm3-import]>=1.0.0",
]
dev = [
{include-group = "build"},
{include-group = "test"},
"nox>=2025.11.12",
"ty==0.0.11",
]