-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
252 lines (227 loc) · 8 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
[build-system]
requires = [
"setuptools>=66.1",
"setuptools_scm>=8.1",
]
build-backend = "setuptools.build_meta"
[project]
name = "mqt.qao"
description = "MQT Quantum Auto Optimizer: Automatic Framework for Solving Optimization Problems with Quantum Computers"
readme = "README.md"
authors = [
{ name = "Deborah Volpe", email = "[email protected]" },
{ name = "Nils Quetschlich", email = "[email protected]" },
]
keywords = ["MQT", "quantum-computing", "optimization", "QUBO"]
license = { file = "LICENSE" }
requires-python = ">=3.9"
dynamic = ["version"]
dependencies = [
"qiskit>=1.0",
"qiskit_optimization>=0.6",
"qiskit_aer>=0.15",
"pandas>=2.1.2",
"numpy>=1.26",
"qubovert>=1.2.5",
"matplotlib>=3.8",
"docplex>=2.21.207",
"dwave-system>=1.25.0",
"dwave-samplers>=1.3.0",
"scikit-learn>=1.4.2",
"networkx"
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"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",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
]
[project.optional-dependencies]
test = ["pytest>=7.2"]
coverage = ["mqt.qao[test]", "pytest-cov>=4"]
docs = [
"furo>=2023.9.10",
"setuptools-scm>=8.1",
"sphinxcontrib-bibtex>=2.4.2",
"sphinx-copybutton>=0.5",
"ipython",
"ipykernel",
"nbsphinx",
"sphinxext-opengraph>=0.9",
"sphinx-autodoc-typehints",
"qiskit[visualization]",
]
dev = ["mqt.qao[coverage,docs]"]
[project.urls]
Homepage = "https://github.com/cda-tum/mqt-qao"
Issues = "https://github.com/cda-tum/mqt-qao/issues"
Discussions = "https://github.com/cda-tum/mqt-qao/discussions"
Research = "https://www.cda.cit.tum.de/research/quantum/"
[tool.setuptools_scm]
[tool.pytest.ini_options]
minversion = "7.2"
testpaths = ["tests"]
pythonpath = ["src"]
addopts = ["-ra", "--strict-markers", "--strict-config", "--showlocals"]
log_cli_level = "info"
xfail_strict = true
filterwarnings = [
"error",
"ignore:.*invalid escape sequence.*::.*docplex.*", # See https://github.com/cda-tum/mqt-qao/issues/3
"ignore:.*invalid escape sequence.*::.*dwave.*", # See https://github.com/cda-tum/mqt-qao/issues/3
"ignore:.*invalid escape sequence.*::.*homebase.*", # See https://github.com/cda-tum/mqt-qao/issues/3
"ignore:.*invalid escape sequence.*::.*plucky.*", # See https://github.com/cda-tum/mqt-qao/issues/3
"ignore:.*numpy.core.shape_base.*::", # See https://github.com/cda-tum/mqt-qao/issues/3
# The warning filters below are only temporary and should be removed once the usage of the Sampler and Estimator is updated
"ignore:.*BaseSamplerV1.*:DeprecationWarning:",
"ignore:.*BaseEstimatorV1.*:DeprecationWarning:",
'ignore:.*qiskit\.primitives\.utils.*:DeprecationWarning:',
# The RandomForest classifier has been trained with sklearn 1.4.1.post1, which might not be compatible with newer versions
'ignore:.*Trying to unpickle.*:sklearn.exceptions.InconsistentVersionWarning:',
'ignore:.*X does not have valid feature names.*:UserWarning:',
# Qiskit 1.3 deprecations
'ignore:.*The property ``qiskit.dagcircuit.dagcircuit.DAGCircuit.*`` is deprecated as of qiskit 1.3.0.*:DeprecationWarning:qiskit.*',
'ignore:.*The class ``qiskit.circuit.library.n_local.two_local.*`` is deprecated as of Qiskit 1.3.*:DeprecationWarning:qiskit.*',
'ignore:.*is pending deprecation as of qiskit 1.3..*:PendingDeprecationWarning:',
]
[tool.coverage]
run.source = ["mqt.qao"]
report.exclude_also = [
'\.\.\.',
'if TYPE_CHECKING:',
'raise AssertionError',
'raise NotImplementedError',
]
show_missing = true
skip_empty = true
precision = 1
[tool.mypy]
files = ["src", "tests"]
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.*",
"qiskit_optimization.*",
"qiskit_algorithms.*",
"qiskit_aer.*",
"matplotlib.*",
"qubovert.*",
"sympy.*",
"qiskit_ibm_runtime.*",
"matplotlib.*",
"docplex.*",
"dwave.*",
"dimod.*",
"scikit-learn.*",
"networkx.*"
]
ignore_missing_imports = true
[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
"SLF", # flake8-self
"SLOT", # flake8-slots
"SIM", # flake8-simplify
"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
"S404", # `subprocess` module is possibly insecure
]
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 scikit_build_core._compat.typing.Self instead."
"typing_extensions.Self".msg = "Use scikit_build_core._compat.typing.Self instead."
"typing.assert_never".msg = "Use scikit_build_core._compat.typing.assert_never instead."
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["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
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.typos]
default.extend-ignore-re = [
"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$", # ignore line
"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on" # ignore block
]
default.extend-ignore-identifiers-re = [
"BasicAer",
"qiskit_aer",
"AerSimulator",
]
[tool.typos.default.extend-words]
wille = "wille"
[tool.repo-review]
ignore = [
"PC160", # "Uses codespell" -> switched to https://github.com/crate-ci/typos
"PC180", # "Uses prettier" -> switched to different prettier-mirror that is not recognized by the check
]