|
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | 14 |
|
| 15 | +# Note: there are altogether 3 types of dependencies listed in this file: |
| 16 | +# |
| 17 | +# [build-system].requires: the packages needed by the build backend to build |
| 18 | +# the project from source. This list is not stored in the package metadata. |
| 19 | +# |
| 20 | +# [project].dependencies: core packages needed to be able to run qsimcirq. |
| 21 | +# Equivalent to "install_requires" in setuptools' setup.py. The list is stored |
| 22 | +# in the metadata of the package; when the project is installed by pip, this is |
| 23 | +# the specification that is used to install its dependencies. |
| 24 | +# |
| 25 | +# [dependency-groups].dev: the development dependencies; i.e., what a |
| 26 | +# developer needs in order to run unit tests, linters, and formatters. The |
| 27 | +# "[dependency-groups]" section is a Python packaging feature introduced in |
| 28 | +# 2025. This list is not stored in the metadata of the package. To install the |
| 29 | +# development dependencies, use "pip install --group dev". |
| 30 | + |
15 | 31 | [build-system] |
| 32 | +build-backend = "setuptools.build_meta" |
16 | 33 | requires = [ |
17 | | - "packaging", |
18 | | - "setuptools>=78.1.1", |
19 | | - "pybind11[global]", |
20 | | - # "pip install" from sources needs to build Pybind, which needs CMake too. |
21 | | - "cmake~=3.28.1", |
| 34 | + "cmake~=3.28.1", |
| 35 | + "pybind11[global]", |
| 36 | + "setuptools-scm[toml]>=6.2", |
| 37 | + "setuptools>=78.1.1", |
| 38 | + "wheel", |
22 | 39 | ] |
23 | | -build-backend = "setuptools.build_meta" |
| 40 | + |
| 41 | +[project] |
| 42 | +name = "qsimcirq" |
| 43 | +description = "High-performance quantum circuit simulator for C++ and Python." |
| 44 | +authors = [ |
| 45 | + { name = "The qsim/qsimh Developers", email = "qsim-qsimh-dev@googlegroups.com" } |
| 46 | +] |
| 47 | +maintainers = [ |
| 48 | + { name = "Google Quantum AI", email = "quantum-oss-maintainers@google.com" } |
| 49 | +] |
| 50 | +readme = {file = "README.md", content-type = "text/markdown"} |
| 51 | +license = "Apache-2.0" |
| 52 | +requires-python = ">=3.10.0" |
| 53 | +dynamic = ["version", "dependencies"] |
| 54 | +classifiers = [ |
| 55 | + "Development Status :: 5 - Production/Stable", |
| 56 | + "Environment :: GPU :: NVIDIA CUDA", |
| 57 | + "Intended Audience :: Developers", |
| 58 | + "Intended Audience :: Science/Research", |
| 59 | + "Operating System :: MacOS :: MacOS X", |
| 60 | + "Operating System :: Microsoft :: Windows", |
| 61 | + "Operating System :: POSIX :: Linux", |
| 62 | + "Programming Language :: C++", |
| 63 | + "Programming Language :: Python :: 3", |
| 64 | + "Programming Language :: Python :: 3.10", |
| 65 | + "Programming Language :: Python :: 3.11", |
| 66 | + "Programming Language :: Python :: 3.12", |
| 67 | + "Programming Language :: Python :: 3.13", |
| 68 | + "Topic :: Scientific/Engineering :: Quantum Computing", |
| 69 | + "Topic :: Software Development :: Libraries :: Python Modules", |
| 70 | + "Typing :: Typed", |
| 71 | +] |
| 72 | +keywords = [ |
| 73 | + "cirq", |
| 74 | + "nisq", |
| 75 | + "quantum algorithm development", |
| 76 | + "quantum circuit simulator", |
| 77 | + "quantum computing", |
| 78 | + "quantum programming", |
| 79 | + "quantum simulation", |
| 80 | + "quantum", |
| 81 | + "schrödinger-feynman simulation", |
| 82 | + "simulation", |
| 83 | + "state vector simulator", |
| 84 | +] |
| 85 | + |
| 86 | +[project.urls] |
| 87 | +documentation = "https://quantumai.google/qsim" |
| 88 | +download = "https://pypi.org/project/qsimcirq/#files" |
| 89 | +homepage = "https://quantumai.google/qsim" |
| 90 | +issues = "https://github.com/quantumlib/qsim/issues" |
| 91 | +source = "https://github.com/quantumlib/qsim" |
| 92 | + |
| 93 | +[dependency-groups] |
| 94 | +# Development dependencies. Install these with "pip install --group dev". |
| 95 | +dev = [ |
| 96 | + # The following repeats [build-system].requires b/c pyproject.toml has no |
| 97 | + # mechanism to reference that list. Keep these versions in sync with above. |
| 98 | + "cmake~=3.28.1", |
| 99 | + "pybind11[global]", |
| 100 | + "setuptools>=78.1.1; python_version >= '3.12'", |
| 101 | + |
| 102 | + # Other build, packaging, and distribution utilities. |
| 103 | + "cibuildwheel", |
| 104 | + |
| 105 | + # Linters, formatters, and test utilities. |
| 106 | + "black~=25.9.0", |
| 107 | + "isort[colors]~=6.0.1", |
| 108 | + "py-cpuinfo", |
| 109 | + "pylint~=4.0.2", |
| 110 | + "pytest", |
| 111 | + "pytest-xdist", |
| 112 | +] |
| 113 | + |
| 114 | +[tool.setuptools] |
| 115 | +packages = ["qsimcirq"] |
| 116 | +package-data = {"qsimcirq" = ["py.typed"]} |
| 117 | + |
| 118 | +[tool.setuptools.dynamic] |
| 119 | +# The next one becomes the value of [project].version. |
| 120 | +version = {attr = "qsimcirq._version.__version__"} |
| 121 | +# The next one becomes [project].dependencies, equivalent to "install_requires" |
| 122 | +# in setuptools' setup.py. "pip install qsim" installs these automatically. |
| 123 | +dependencies = {file = ["requirements.txt"] } |
24 | 124 |
|
25 | 125 | [tool.cibuildwheel] |
26 | | -test-extras = "dev" |
| 126 | +build = "cp310-* cp311-* cp312-* cp313-*" |
27 | 127 | dependency-versions = "latest" |
28 | 128 | enable = ["cpython-prerelease"] |
29 | 129 | environment.PIP_PREFER_BINARY = "1" |
30 | 130 | # Due to package & module name conflict, temporarily move it away to run tests: |
31 | | -before-test = "mv {package}/qsimcirq /tmp" |
32 | | -test-command = "pytest -s -v {package}/qsimcirq_tests/qsimcirq_test.py && mv /tmp/qsimcirq {package}" |
| 131 | +before-test = "pip install --group dev && mv {package}/qsimcirq /tmp" |
| 132 | +test-command = """ |
| 133 | +pytest -s -v {package}/qsimcirq_tests/qsimcirq_test.py && |
| 134 | +mv /tmp/qsimcirq {package} |
| 135 | +""" |
33 | 136 |
|
34 | 137 | [tool.cibuildwheel.macos] |
35 | | -before-build = "brew install -q libomp llvm@19 && brew unlink libomp && brew unlink llvm@19 && brew link --force libomp && brew link --force llvm@19" |
36 | | -repair-wheel-command = "delocate-listdeps {wheel} && delocate-wheel --verbose --require-archs {delocate_archs} -w {dest_dir} {wheel}" |
| 138 | +before-build = """ |
| 139 | +brew install -q libomp llvm@19 && |
| 140 | +brew unlink libomp && |
| 141 | +brew unlink llvm@19 && |
| 142 | +brew link --force libomp && |
| 143 | +brew link --force llvm@19 |
| 144 | +""" |
| 145 | +repair-wheel-command = """ |
| 146 | +delocate-listdeps {wheel} && |
| 147 | +delocate-wheel --verbose --require-archs {delocate_archs} -w {dest_dir} {wheel} |
| 148 | +""" |
37 | 149 |
|
38 | 150 | [tool.cibuildwheel.linux] |
39 | 151 | manylinux-x86_64-image = "manylinux2014" |
|
0 commit comments