-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpyproject.toml
More file actions
119 lines (112 loc) · 5.11 KB
/
Copy pathpyproject.toml
File metadata and controls
119 lines (112 loc) · 5.11 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
[project]
name = "pecos-workspace"
version = "0.9.0.dev1"
requires-python = ">=3.10"
# Meta-package; runtime deps live in the member packages. Test/example/dev
# tooling is declared in [dependency-groups] below.
dependencies = []
[project.optional-dependencies]
# Keep these in sync with the cuda dependency groups below. The extras support
# `uv sync --extra cuda13`; the groups support `uv run --group cuda13 ...`.
# Pick the extra matching your CUDA major -- do not install both.
cuda13 = ["quantum-pecos[cuda13]==0.9.0.dev1"]
cuda12 = ["quantum-pecos[cuda12]==0.9.0.dev1"]
[tool.uv.workspace]
members = [
"python/pecos-rslib",
"python/pecos-rslib-exp",
"python/pecos-rslib-cuda",
"python/pecos-rslib-llvm",
"python/quantum-pecos",
"python/selene-plugins/pecos-selene-mast",
"python/selene-plugins/pecos-selene-stab-mps",
"python/selene-plugins/pecos-selene-stab-vec",
"python/selene-plugins/pecos-selene-stabilizer",
"python/selene-plugins/pecos-selene-statevec",
]
[tool.uv.sources]
quantum-pecos = { workspace = true }
[dependency-groups]
# Build, lint, and docs tooling. Runtime deps used by member packages
# (networkx, matplotlib, phir, ...) come in transitively via quantum-pecos.
dev = [
"maturin>=1.13.1,<2.0", # For building (matches sub-package build-system requirements)
"patchelf; platform_system != 'Windows'", # For setting rpath in shared libraries (Linux/macOS only)
"setuptools>=82.0.1", # Build system
"pre-commit", # Git hooks
"black", # Code formatting
"ruff", # Fast Python linting
"tomli>=1.1.0; python_version < '3.11'", # TOML parsing (stdlib in 3.11+)
"mkdocs", # Documentation framework
"mkdocs-material", # Material theme for MkDocs
"mkdocstrings[python]", # Code documentation extraction
"markdown-exec[ansi]", # Executable markdown blocks
]
test = [ # exact pins so workspace tests run against a reproducible environment
# Note: sub-package test extras (pecos-rslib, selene plugins) intentionally
# use `pytest>=9.0` lower bounds instead of these exact pins -- those
# packages ship to PyPI and must stay installable against newer pytest
# releases that downstream users may already have. Reproducibility for
# in-repo dev comes from uv.lock, not from over-constraining the sub-package
# requires-dist.
"pytest==9.0.3",
"pytest-cov==7.1.0",
"pytest-timeout==2.4.0",
"hypothesis==6.152.1",
"stim==1.15.0", # Stim-comparison and decomposition-invariant tests
"matplotlib>=2.2.0", # Surface-patch render tests import matplotlib directly
"qir-qis==0.1.8", # QIR spec-compliance validation gate over the audit corpus
]
examples = [ # extras used by the examples/ tree and notebook walkthroughs
"jupyter>=1.1.1",
"polars>=1.0.0",
]
numpy-compat = [ # NumPy/SciPy compatibility tests - verify compatibility with scientific Python stack
"numpy>=1.15.0",
"scipy>=1.1.0",
]
cuda13 = [ # CUDA 13 Python packages for GPU-accelerated simulations (requires CUDA toolkit)
"quantum-pecos[cuda13]==0.9.0.dev1",
]
cuda12 = [ # CUDA 12 Python packages for GPU-accelerated simulations
"quantum-pecos[cuda12]==0.9.0.dev1",
]
[tool.uv]
default-groups = ["dev", "test"]
# Security floors for transitive dependencies. Keep in sync with
# docs/requirements.txt, which pins the same floors for the readthedocs build
# (that file does not constrain this workspace's resolution).
constraint-dependencies = [
"idna>=3.18", # CVE-2026-45409 (re-fix of CVE-2024-3651): idna.encode() DoS on crafted long inputs
]
# CUDA 12 and CUDA 13 stacks are mutually exclusive (separate cupy/cuquantum
# wheels per CUDA major). Declare them conflicting so the lock never co-resolves
# both -- co-resolution downgrades cu12 to satisfy cu13.
conflicts = [
[{ extra = "cuda12" }, { extra = "cuda13" }],
[{ group = "cuda12" }, { group = "cuda13" }],
]
# Prevent uv from caching native workspace wheels - always use freshly built versions.
# This fixes stale code issues when uv sync/run reinstalls cached old wheels.
# See: https://github.com/astral-sh/uv/issues/11390
reinstall-package = [
"pecos-rslib",
"pecos-rslib-cuda",
"pecos-rslib-exp",
"pecos-rslib-llvm",
]
[tool.black]
line-length = 120
# Target the minimum supported Python (matches `requires-python = ">=3.10"`
# above and `target-version = "py310"` in ruff.toml) so black produces code
# that parses cleanly on every interpreter in the support range -- otherwise
# black auto-targets the newest version satisfying requires-python and can
# emit 3.14-only syntax that 3.10/3.11/3.12 can't parse.
target-version = ["py310"]
[tool.pytest.ini_options]
markers = [
"optional_dependency: mark a test as using one or more optional dependencies",
"optional_unix: mark tests as using an optional dependency that only work with Unix-based systems",
"slow: mark tests that provide extra integration coverage but are excluded from the default fast Python test lane",
"numpy: mark tests that verify NumPy compatibility (requires numpy installed)",
]