-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
205 lines (189 loc) · 5.14 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "qiskit-addon-aqc-tensor"
version = "0.1.1"
description = "Approximate quantum compilation with tensor networks"
readme = "README.md"
license = {file = "LICENSE.txt"}
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Physics",
]
requires-python = ">=3.9"
dependencies = [
"plum-dispatch>=2.4.1",
"wrapt>=1.13.3",
"numpy>=1.23.0",
"scipy>=1.11.0",
"qiskit>=1.2.0, <2.0",
]
[project.optional-dependencies]
quimb = [
"quimb>=1.8.4, <2; python_version < '3.13'",
"qiskit-quimb>=0.0.4, <0.1; python_version < '3.13'",
"networkx>=2.3; python_version < '3.13'",
# The following line silences a warning from cotengra, which is
# a dependency of quimb. We install kahypar only on platforms
# where we have verified that wheels are available on pypi.
"kahypar>=1.3.5; (sys_platform == 'linux' or sys_platform == 'darwin') and python_version < '3.13'",
]
quimb-autograd = [
"qiskit-addon-aqc-tensor[quimb]",
"autograd>=1.7.0",
]
quimb-jax = [
"qiskit-addon-aqc-tensor[quimb]",
"jax>=0.4.30",
]
quimb-all = [
"qiskit-addon-aqc-tensor[quimb-autograd,quimb-jax]",
]
aer = [
"qiskit-aer>=0.14.2",
]
dev = [
"qiskit-addon-aqc-tensor[test,nbtest,lint]",
]
basetest = [
"pytest>=7.0.0",
"pytest-randomly>=1.2.0",
]
test = [
"qiskit-addon-aqc-tensor[basetest]",
"pytest-subtests>=0.11.0",
"qiskit-addon-utils>=0.1.0",
]
nbtest = [
"qiskit-addon-aqc-tensor[basetest]",
"nbmake>=1.4.3"
]
style = [
"autoflake==2.3.1",
"black[jupyter]~=24.1",
"ruff==0.7.2",
"nbqa>=1.6.0",
]
lint = [
"qiskit-addon-aqc-tensor[style]",
"mypy==1.13.0",
"reno>=3.4.0",
"pylint==3.3.1",
]
docs = [
"Sphinx>=3.0.0",
"sphinx-autodoc-typehints>=1.12.0",
"sphinx-reredirects",
"jupyter-sphinx>=0.3.2",
"nbsphinx>=0.8.8",
"sphinx-copybutton>=0.5.0",
"reno>=3.4.0",
"qiskit-sphinx-theme~=2.0.0"
]
notebook-dependencies = [
"qiskit-addon-aqc-tensor[aer,quimb-jax]",
"qiskit-addon-utils>=0.1.0",
"qiskit-ibm-runtime>=0.24.0",
"matplotlib>=3.3.4",
"ipywidgets>=7.5.1",
"pylatexenc>=2.0",
]
[project.urls]
"Documentation" = "https://qiskit.github.io/qiskit-addon-aqc-tensor/"
"Repository" = "https://github.com/Qiskit/qiskit-addon-aqc-tensor"
[tool.hatch.build.targets.wheel]
only-include = [
"qiskit_addon_aqc_tensor",
]
[tool.black]
line-length = 100
target-version = ["py39"]
[tool.autoflake]
remove-unused-variables = true
remove-all-unused-imports = true
[tool.ruff]
target-version = "py39"
[tool.ruff.lint]
preview = true # necessary currently to enable CPY rule
ignore = [
"E501", # line too long
]
extend-select = [
"I", # sort imports
"CPY", # copyright notices
"D", # pydocstyle
]
[tool.ruff.lint.per-file-ignores]
"test/**.py" = [
"F405", # star import
"F403", # unable to detect undefined names due to star import
"D", # pydocstyle
]
"docs/**" = [
"E402", # module level import not at top of file
"CPY", # copyright notices
"D100", # missing docstring in public module
"D103", # missing docstring in public function
]
[tool.ruff.lint.flake8-copyright]
notice-rgx = """
# This code is a Qiskit project.
#
# \\(C\\) Copyright IBM 2024\\.
#
# This code is licensed under the Apache License, Version 2\\.0\\. You may
# obtain a copy of this license in the LICENSE\\.txt file in the root directory
# of this source tree or at http\\:\\/\\/www\\.apache\\.org\\/licenses\\/LICENSE\\-2\\.0\\.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals\\.
"""
[tool.ruff.lint.pydocstyle]
convention = "google"
ignore-decorators = ["plum.dispatch"]
[tool.pylint.main]
py-version = "3.9"
disable = "all"
enable = [
"reimported",
"no-self-use",
"no-else-raise",
"redefined-argument-from-local",
"redefined-builtin",
"raise-missing-from",
"cyclic-import",
"unused-argument",
"use-list-literal",
"use-dict-literal",
"dangerous-default-value",
"consider-using-generator",
"consider-using-f-string",
"unidiomatic-typecheck",
"wrong-import-order",
"wrong-import-position",
"unnecessary-comprehension",
"no-else-return",
"arguments-renamed",
"consider-using-enumerate",
"unnecessary-lambda",
"consider-merging-isinstance",
]
[tool.mypy]
ignore_missing_imports = true
warn_unused_configs = true
warn_redundant_casts = true
[tool.pytest.ini_options]
testpaths = ["./qiskit_addon_aqc_tensor", "./test/"]
addopts = "--doctest-modules -rs --durations=10"