-
Notifications
You must be signed in to change notification settings - Fork 992
Expand file tree
/
Copy pathpyproject.toml
More file actions
158 lines (144 loc) · 4.36 KB
/
pyproject.toml
File metadata and controls
158 lines (144 loc) · 4.36 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
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[project]
name = "qumat"
version = "0.6.0"
description = "A library for composing quantum machine learning."
authors = [{ name = "Apache Mahout", email = "dev@mahout.apache.org" }]
license = "Apache-2.0"
requires-python = ">=3.10,<3.13"
readme = "README.md"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Rust",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"qiskit>=2.2.0,<3.0.0",
"qiskit-aer>=0.17.2,<0.18.0",
"cirq>=1.5.0,<1.6.0",
"amazon-braket-sdk>=1.108.0,<2.0",
"sympy>=1.14.0,<2.0",
]
[project.optional-dependencies]
qdp = ["qumat-qdp"]
[dependency-groups]
dev = [
"pytest>=9.0.1",
"pytest-xdist>=3.8.0",
"ruff>=0.13.1",
"ty>=0.0.16",
"pre-commit>=3.0.0",
"maturin>=1.10.2",
"patchelf>=0.17.2.4",
"torch>=2.2,<=2.9.0",
"numpy>=1.24,<2.0",
"setuptools>=80.9.0",
"tensorflow>=2.20",
"pytest-cov>=7.0.0",
]
[tool.uv]
# Override to fix amazon-braket-default-simulator dependency on old numba/llvmlite
# The simulator v1.32.1 requires numba 0.53.1 which doesn't support Python 3.10+
override-dependencies = [
"numba>=0.60.0",
"llvmlite>=0.43.0",
]
[tool.uv.sources]
qumat-qdp = { path = "qdp/qdp-python", editable = true }
[tool.pytest.ini_options]
testpaths = ["testing"]
python_files = "test_*.py"
python_functions = "test_*"
addopts = ["-v", "--tb=short", "-rs"]
markers = [
"gpu: marks tests as requiring GPU and _qdp extension (auto-skipped if unavailable)",
"rocm: marks tests as requiring ROCm/Triton AMD runtime",
"slow: marks tests as slow running",
]
[tool.ty.src]
exclude = [
".github/scripts/",
"qdp/qdp-python/benchmark/",
]
[tool.ty.analysis]
# _qdp: compiled Rust extension (no type info for members)
# api: benchmark module loaded via sys.path in tests
# qumat_qdp: optional QDP Python package (editable install from qdp/qdp-python)
allowed-unresolved-imports = [
"_qdp",
"_qdp.*",
"api",
"api.*",
"qumat_qdp",
"qumat_qdp.*",
]
[tool.ruff]
target-version = "py310"
[tool.ruff.lint]
select = [
# flake8-annotations
"ANN",
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
"UP",
# isort
"I",
# pygrep-hooks
"PGH003",
"PGH004",
# unsorted-dunder-all
"RUF022",
# unused-noqa
"RUF100",
# flake8-pytest-style
"PT",
]
ignore = [
"E402", # Module level import not at top of file
"E501", # Line too long
# The following ignore rules are temporary and should be removed when the issues are fixed.
"PT011", # TODO: `pytest.raises(ValueError)` is too broad
"ANN001", # TODO: fix (missing-type-function-argument)
"ANN201", # TODO: fix (missing-return-type-undocumented-public-function)
"ANN202", # TODO: fix (missing-return-type-private-function)
"ANN401",
]
[tool.ruff.lint.pyflakes]
allowed-unused-imports = ["_qdp"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.sdist]
only-include = [
"qumat",
"LICENSE",
"README.md",
]