blob: 53b349d16d75715551f051df27dc6010d166ed62 [file]
# 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)",
"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",
]