-
Notifications
You must be signed in to change notification settings - Fork 22
/
pyproject.toml
170 lines (155 loc) · 3.9 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
[build-system]
requires = ["setuptools>=66.1", "wheel", "setuptools_scm"]
build-backend = "setuptools.build_meta"
[project]
name = "graphix"
authors = [{ name = "Shinichi Sunami", email = "shinichi.sunami@gmail.com" }]
maintainers = [
{ name = "Shinichi Sunami", email = "shinichi.sunami@gmail.com" },
]
license = { file = "LICENSE" }
description = "Optimize and simulate measurement-based quantum computation"
readme = "README.md"
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Physics",
]
requires-python = ">=3.8,<3.13"
dynamic = ["version", "dependencies", "optional-dependencies"]
[project.urls]
Documentation = "https://graphix.readthedocs.io"
"Bug Tracker" = "https://github.com/TeamGraphix/graphix/issues"
[tool.setuptools_scm]
version_file = "graphix/_version.py"
[tool.setuptools.dynamic]
dependencies = { file = ["requirements.txt"] }
[tool.setuptools.dynamic.optional-dependencies]
dev = { file = ["requirements-dev.txt"] }
extra = { file = ["requirements-extra.txt"] }
[tool.ruff]
line-length = 120
extend-exclude = ["docs"]
[tool.ruff.lint]
extend-select = [
"A",
"B",
"D",
"FA",
"I",
"NPY",
"N",
"PERF",
"PLE",
"PLW",
"RUF",
"TCH",
"TID",
"UP",
"W",
]
ignore = [
"E74", # Ambiguous name
]
# Allow "α" (U+03B1 GREEK SMALL LETTER ALPHA) which could be confused for "a"
allowed-confusables = ["α"]
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint.extend-per-file-ignores]
"__init__.py" = [
"F401", # Unused import
]
"benchmarks/*.py" = [
"D", # Benchmarks follow Sphinx doc conventions
]
"examples/*.py" = [
"B018", # Useless expression
"D", # Examples follow Sphinx doc conventions
"E402", # Import not at top of file
]
"tests/*.py" = [
"D10", # Allow undocumented items
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.pytest.ini_options]
# Silence cotengra warning
filterwarnings = ["ignore:Couldn't import `kahypar`"]
[tool.mypy]
# Keep in sync with pyright
files = [
"graphix/channels.py",
"graphix/clifford.py",
"graphix/command.py",
"graphix/fundamentals.py",
"graphix/instruction.py",
"graphix/linalg_validations.py",
"graphix/measurements.py",
"graphix/ops.py",
"graphix/pauli.py",
"graphix/pyzx.py",
"graphix/rng.py",
"graphix/states.py",
"graphix/utils.py",
"graphix/**/__init__.py",
"graphix/_db.py",
"noxfile.py",
"tests/conftest.py",
"tests/test_clifford.py",
"tests/test_command.py",
"tests/test_db.py",
"tests/test_fundamentals.py",
"tests/test_kraus.py",
"tests/test_pauli.py",
"tests/test_pyzx.py",
"tests/test_rng.py",
]
follow_imports = "silent"
strict = true
[tool.pyright]
# Keep in sync with mypy
include = [
"graphix/channels.py",
"graphix/clifford.py",
"graphix/command.py",
"graphix/fundamentals.py",
"graphix/instruction.py",
"graphix/linalg_validations.py",
"graphix/measurements.py",
"graphix/ops.py",
"graphix/pauli.py",
"graphix/pyzx.py",
"graphix/rng.py",
"graphix/states.py",
"graphix/utils.py",
"graphix/**/__init__.py",
"graphix/_db.py",
"noxfile.py",
"tests/conftest.py",
"tests/test_clifford.py",
"tests/test_command.py",
"tests/test_db.py",
"tests/test_fundamentals.py",
"tests/test_kraus.py",
"tests/test_pauli.py",
"tests/test_pyzx.py",
"tests/test_rng.py",
]
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:",
"raise NotImplementedError\\(.*\\)",
"return NotImplemented",
"typing_extensions.assert_never\\(.*\\)",
"@abc.abstractmethod",
]