-
Notifications
You must be signed in to change notification settings - Fork 165
Expand file tree
/
Copy pathpyproject.toml
More file actions
178 lines (157 loc) · 5.6 KB
/
Copy pathpyproject.toml
File metadata and controls
178 lines (157 loc) · 5.6 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
[project]
name = "toqito"
version = "1.3.0"
description = "Python tools for the study of quantum information."
readme = "README.md"
requires-python = ">=3.12,<4"
authors = [
{ name = "Vincent Russo", email = "vincentrusso1@gmail.com" },
]
maintainers = [
{ name = "Vincent Russo", email = "vincentrusso1@gmail.com" },
{ name = "Purva Thakre", email = "quantum.purvat@gmail.com" },
]
keywords = [
"quantum information",
"quantum information theory",
"quantum computing",
"quantum states",
"quantum channels",
"quantum measurements",
"entanglement",
"density matrices",
"nonlocal games",
"semidefinite programming",
"cvxpy",
"numpy",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Quantum Computing",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
# Runtime dependencies use compatible ranges (floor at the tested version, capped at the next major) rather than
# exact pins, so that installing toqito alongside other scientific packages does not force a single version. The
# exact development versions are recorded in uv.lock.
dependencies = [
"cvxpy>=1.9.0,<2",
"more-itertools>=11.1.0,<12",
"numpy>=2.4.1,<3",
"scipy>=1.17.1,<2",
"scs>=3.2.11,<4",
"picos>=2.6.2",
"networkx>=3.4,<4.0",
"matplotlib>=3.11.0,<4",
]
[project.optional-dependencies]
# MOSEK is an optional commercial solver. Install with `pip install toqito[mosek]` (a license is required to use it).
mosek = ["mosek"]
[project.urls]
homepage = "https://vprusso.github.io/toqito/"
repository = "https://github.com/vprusso/toqito"
[dependency-groups]
dev = [
"pytest==9.1.0",
"pytest-cov==7.1.0",
"coverage==7.15.0",
"distlib==0.4.0",
"ipython==9.15.0",
"setuptools>65.5.1",
"pre-commit>=3.0.0",
]
lint = [
"ruff==0.15.0",
"ty==0.0.12",
]
docs = [
"matplotlib==3.11.0",
"mkdocs>=1.5",
"mkdocs-material>=9.0",
"mkdocstrings[python]>=0.24",
"mkdocs-bibtex>=4.3",
"pypandoc>=1.13",
"mkdocs-jupyter>=0.24",
"mkdocs-gallery>=0.10.0",
"pymdown-extensions>=10.0",
# pymdown-extensions 10.20.1 passes `filename=None` to pygments'
# HtmlFormatter, which pygments 2.20.0 no longer accepts (crashes in
# html.escape). Cap until an upstream fix ships.
"pygments<2.21",
"mkdocs-api-autonav>=0.4.0",
"markdown-exec[ansi]>=1.7",
"pybtex>=0.24",
"mike>=2.0",
"ruff==0.15.0",
]
[tool.uv]
default-groups = ["dev"]
constraint-dependencies = ["cvxopt>=1.3.3"]
[tool.pytest.ini_options]
testpaths = ["toqito"]
[tool.isort]
py_version = "312"
skip = [".gitignore", "__init__.py"]
skip_glob = [".github/*"]
line_length = 120
multi_line_output = 3
use_parentheses = true
order_by_type = true
lines_between_types = 1
include_trailing_comma = true
split_on_trailing_comma = true
group_by_package = true
color_output = true
[tool.setuptools.packages.find]
where = ["."]
include = ["toqito*"]
[build-system]
requires = ["setuptools>=65.5.1"]
build-backend = "setuptools.build_meta"
[tool.ruff]
exclude = ["__init__.py", "docs/"]
line-length = 120
# Match the minimum supported Python (requires-python = ">=3.12").
target-version = "py312"
force-exclude = true
[tool.ty.environment]
python-version = "3.12"
[tool.ruff.lint]
select = ["I", "E", "W", "D", "PL", "F"]
# ruff configuration
# E, W -- pycodestyle
# D -- pydocstyle
# I -- isort
# PL -- pylint
# F -- pyflakes
# Rules considered over other incompatible ones
exclude = []
ignore = ["D407", "D203", "D213", "D416", "PLR0912", "PLR0911", "PLR0915", "PLR2004", "PLR0913", "F811", "E203"]
# Rules Ignored
# D407 - Ignored because ==== under a section heading is considered as a missing underline.
# pydocstyle considers ----- an underline.
# D212 and D211 specially selected due to following incompatibilities
# warning: `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible. Ignoring `one-blank-line-before-class`.
# warning: `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible. Ignoring `multi-line-summary-second-line`.
# D416 was adding a semicolon after some section headings when ruff's automated --fix was was used
# As this was not added evenly after all section headings, we ignore this.
# PLR0912 -- Checks for functions or methods with too many branches. The default number is 12.
# PLR0911 -- Checks for functions or methods with too many return statements. The default number is 6.
# PLR0915 -- Checks for functions or methods with too many statements. The default number is 50.
# PLR2004 -- Checks if an equality or an inequality is compared to a variable or a num (prefers variable pre)
# PLR0913 Too many arguments in function definition
# F811 -- Checks for variable definitions that redefine (or "shadow") unused variables
# E203 -- Whitespace before ':'. This rule conflicts with Black's formatting style.
# It was removing definitions with the same name creating conflicts in test_is_stochastic.py
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["I001", "F401"]
# I001 - skip checking Import block is un-sorted or un-formatted
# F401 - Checks for unused imports, applying fixes to __init__.py currently under review
# skip checking all the .py files in the examples gallery
"docs/content/examples/*" = ["I", "E", "W", "D", "PL", "F"]