Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
144 lines (133 loc) · 4.05 KB
/
Copy pathpyproject.toml
File metadata and controls
144 lines (133 loc) · 4.05 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
[tool.poetry]
name = "pyquil"
version = "4.23.0"
description = "A Python library for creating Quantum Instruction Language (Quil) programs."
authors = [
"Rigetti Benchmarking Software <benchmarking-software@rigetti.com>",
"Rigetti QPU Software <qpu-software@rigetti.com>",
]
readme = "README.md"
repository = "https://github.com/rigetti/pyquil.git"
documentation = "https://pyquil-docs.rigetti.com"
license = "Apache-2.0"
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
]
keywords = ["quantum", "quil", "programming", "hybrid"]
packages = [{ include = "pyquil" }]
exclude = ["pyquil/conftest.py"]
[tool.poetry.dependencies]
# TODO(#1816): Loosen this bound once we've resolved support for Python 3.13+.
python = ">=3.11, <3.13"
numpy = ">=1.26,<3"
scipy = "^1.11"
rpcq = "^3.11.0"
networkx = ">=2.5"
qcs-sdk-python = ">=0.31.1,<0.32.0"
packaging = ">=23.1"
deprecated = "^1.2.14"
types-deprecated = "^1.2.9.3"
rigetti-quax = "^0.7.6"
quil = ">=0.18.0, <0.34.0"
# latex extra
ipython = { version = "^8.16.0", optional = true }
[tool.poetry.extras]
latex = ["ipython"]
[tool.poetry.group.dev.dependencies]
typing-extensions = "^4.12.0"
setuptools = {version = ">=83.0.0", python = ">=3.12"}
ruff = "^0.4.6"
pytest = ">=8.2.0,<10"
pytest-cov = "^5.0.0"
mypy = "^1.10.0"
pytest-xdist = "^3.6.1"
pytest-rerunfailures = "^14.0.0"
pytest-timeout = "^2.3.1"
pytest-mock = "^3.14.0"
pytest-benchmark = "4.0.0"
respx = "^0.21.1"
syrupy = "^5.3.3"
jinja2 = {version = ">=3.1.6", optional = true} # see: https://osv.dev/vulnerability/GHSA-gmj6-6f8f-6699 and https://osv.dev/vulnerability/GHSA-q2x7-8rv6-6q7h and https://osv.dev/GHSA-cpwx-vrp4-4pq7
h11 = {version = ">=0.16.0", optional = true} # see: https://osv.dev/vulnerability/GHSA-vqfr-h8mv-ghfj
# Used by scripts/ci.py. publish.yml pip-installs it separately, because that
# runner installs no project dependencies.
toml = "^0.10.2"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
Sphinx = "^7.3.7"
sphinx-rtd-theme = "^1.3.0,<=2.0.0"
nbsphinx = "^0.9.3"
myst-parser = "^3.0.1"
pandoc = "2.4"
matplotlib = "^3.9.0"
matplotlib-inline = "^0.1.7"
seaborn = "^0.13.2"
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
line-length = 120
indent-width = 4
target-version = "py311"
[tool.ruff.lint]
select = ["D", "E4", "E7", "E9", "F", "I", "B", "S", "UP", "W", "NPY201"]
ignore = [
"D105", # Allow missing documentation in dunder method.
"D203", # This conflicts with D211.
"D213", # This conflicts with D212.
"UP007", # Optional[X] → X | None is not applied in files with from __future__ import annotations.
"UP038", # Deprecated: isinstance(x, (A, B)) → isinstance(x, A | B) has a runtime cost.
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
docstring-code-line-length = "dynamic"
[tool.ruff.lint.per-file-ignores]
"test/**/*.py" = [
"D", # docstrings are not enforced in tests
"S101", # asserts are allowed in tests
"S301", # we only deserialize our own data to ensure compatibility with the pickle module
]
[tool.pytest.ini_options]
filterwarnings = ["ignore::DeprecationWarning:pyquil.*:", "ignore::DeprecationWarning:test.unit.*:"]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"