-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
177 lines (158 loc) · 3.77 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "qiskit-addon-sqd"
version = "0.8.0"
readme = "README.md"
description = "Classically postprocess noisy quantum samples to yield more accurate energy estimations"
license = {file = "LICENSE.txt"}
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"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 = [
"qiskit>=1.2",
"numpy>=1.26",
"pyscf>=2.5; sys_platform != 'win32'",
"jaxlib>=0.4.30",
"jax>=0.4.30",
"scipy>=1.13.1",
]
[project.optional-dependencies]
dev = [
"qiskit-addon-sqd[test,nbtest,lint,docs]",
"tox>=4.4.3",
]
basetest = [
"pytest>=8.0",
"pytest-cov>=5.0",
]
test = [
"qiskit-addon-sqd[basetest]",
]
nbtest = [
"qiskit-addon-sqd[basetest]",
"nbmake>=1.5.0",
]
style = [
"ruff==0.7.2",
"nbqa>=1.8.5",
]
lint = [
"qiskit-addon-sqd[style]",
"mypy==1.13.0",
"pylint==3.3.1",
"reno>=4.1",
"toml>=0.9.6",
]
notebook-dependencies = [
"qiskit-addon-sqd",
"qiskit-addon-utils",
"matplotlib",
"ffsim",
"qiskit",
"qiskit-ibm-runtime",
]
docs = [
"qiskit-addon-sqd[test,notebook-dependencies]",
"qiskit-sphinx-theme~=2.0.0",
"jupyter-sphinx",
"sphinx-design",
"sphinx-autodoc-typehints",
"sphinx-copybutton",
"sphinx_reredirects",
"nbsphinx>=0.9.4",
"reno>=4.1",
]
[tool.coverage.run]
branch = true
parallel = true
[tool.coverage.report]
fail_under = 100
show_missing = true
[tool.hatch.build.targets.wheel]
only-include = [
"qiskit_addon_sqd",
]
[tool.hatch.metadata]
allow-direct-references = true
[tool.mypy]
python_version = "3.10"
show_error_codes = true
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
[tool.pylint.main]
py-version = "3.9"
[tool.pylint."messages control"]
disable = ["all"]
enable = [
"reimported",
"no-self-use",
"no-else-raise",
"redefined-argument-from-local",
"redefined-builtin",
"raise-missing-from",
"cyclic-import",
"unused-argument",
"attribute-defined-outside-init",
"no-else-return",
]
[tool.pytest.ini_options]
testpaths = ["./qiskit_addon_sqd/", "./test/"]
[tool.ruff]
line-length = 100
src = ["qiskit_addon_sqd", "test"]
target-version = "py39"
[tool.ruff.lint]
select = [
"I", # isort
"E", # pycodestyle
"W", # pycodestyle
"D", # pydocstyle
"F", # pyflakes
"RUF", # ruff
"UP", # pyupgrade
"SIM", # flake8-simplify
"B", # flake8-bugbear
"A", # flake8-builtins
]
ignore = [
"E501", # line too long
]
[tool.ruff.lint.pylint]
max-args = 6
[tool.ruff.lint.extend-per-file-ignores]
"test/**.py" = [
"D", # pydocstyle
]
"docs/**/*" = [
"E402", # module level import not at top of file
"D", # pydocstyle
]
[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"