-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
150 lines (131 loc) · 4.34 KB
/
Copy pathpyproject.toml
File metadata and controls
150 lines (131 loc) · 4.34 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
[build-system]
requires = [ "setuptools>=68.0.0", "setuptools_scm[toml]>=7" ]
build-backend = "setuptools.build_meta"
[project]
name = "QCut"
dynamic = [ "version" ]
authors = [
{ name = "Joonas Nivala", email = "joonas.nivala@csc.fi" },
{ name = "FiQCI", email = "servicedesk@csc.fi" },
]
description = "QCut is a quantum circuit knitting package built on top of qiskit for performing gate cuts and resetless wire cuts allowing simulation of larger quantum circuits on smaller quantum devices or simulators at the cost of a circuit overhead."
readme = "README.md"
license = {file = "LICENSE"}
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Physics",
"Intended Audience :: Science/Research",
]
requires-python = ">=3.11, < 3.13"
dependencies = [
"qiskit >= 1.1, < 3.0",
"numpy",
"qiskit-aer < 0.18",
"pymetis==2025.2.2",
]
[dependency-groups]
dev = [
"matplotlib>=3.10.5",
"notebook>=7.4.5",
"pylatexenc>=2.10",
"pytest>=8.4.1",
"tox<=5.0.0",
"tox-uv<=2.0.0",
"pytest-cov>=6.2.1",
"ruff>=0.12.1",
"ty >=0.0.15",
"pydantic>=2.12.5",
"codespell>=2.3",
]
docs = [
"sphinx==9.0.4",
"myst-nb",
"sphinx-book-theme",
"sphinx_lesson",
]
# Comparing QCut against IBM's circuit-knitting addon: uv run --group benchmark ...
benchmark = [
"qiskit-addon-cutting>=0.10",
"matplotlib>=3.10.5",
"notebook>=7.4.5",
"pandas>=2.2",
"networkx>=3.0",
"psutil>=5.9",
]
[project.urls]
homepage = "https://github.com/FiQCI/QCut"
documentation = "https://fiqci.fi/QCut/"
repository = "https://github.com/FiQCI/QCut.git"
changelog = "https://github.com/FiQCI/QCut/blob/main/CHANGELOG.rst"
[project.optional-dependencies]
dev = ["pytest", "pytest-cov", "ruff"]
# Support for running on IQM hardware: pip install qcut[iqm]
#
# The Qiskit adapter lives in iqm-client's own "qiskit" extra, which covers qiskit 1.0
# up to but not including 2.2. That spans everything QCut supports except the newest
# qiskit, so installing this extra next to qiskit 2.2 or later will make the resolver
# try to move qiskit back; install it into an environment whose qiskit is in range.
#
# The choice of adapter cannot be made automatically. Environment markers can key on the
# python version, the platform and the OS, but there is no marker for the version of
# another package, so a dependency cannot say "this one if qiskit is old, that one
# otherwise". What the resolver does do is pick an iqm-client whose own qiskit
# requirement your qiskit satisfies, which covers the range in one line.
# Older qiskit does not need a different package: the adapter used to live in a
# separate qiskit-iqm, but everything that supported is supported here too, and pinning
# both is not even resolvable since qiskit-iqm caps iqm-client below 23.
iqm = ["iqm-client[qiskit]>=33"]
[tool.setuptools.packages.find]
where = ["."]
include = ["QCut", "QCut.*"]
exclude = ["tests", "tests.*", "build*", "docs*", "benchmarks*"]
[tool.setuptools_scm]
version_scheme = "no-guess-dev"
[tool.ruff]
exclude = [
"__pycache__",
".pytest_cache",
".vscode",
"build",
"dist",
"docs",
"htmlcov",
"QCut.egg-info",
".coverage",
"explain.txt",
"tests/solutions_1q.py",
"tests/solutions.py",
]
line-length = 88
indent-width = 4
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # all errors
"F", # all pyflakes-related checks
"I", # import-related checks
"C", # all code style issues
]
fixable = ["ALL"]
unfixable = []
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
docstring-code-format = false
docstring-code-line-length = "dynamic"
[tool.pytest.ini_options]
python_files = ["tests.py", "test_*.py"]
markers = [
"slow: end-to-end simulation, skipped by the qiskit version matrix",
"sim: runs circuits on a simulator; deselect with -m \"not sim\" for a fast loop",
]
[tool.ty.rules]
unused-type-ignore-comment = "ignore"
[tool.codespell]
skip = "./.venv,./.git,./.tox,./uv.lock,./htmlcov,./build,./dist,./QCut.egg-info,./docs/build,./docs/jupyter_execute,./.pytest_cache"
ignore-words-list = "aer,ket,braket"
ignore-regex = "[A-Za-z0-9+/]{40,}={0,2}"