Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4823984
Move most setup.py content into pyproject.toml
google-labs-jules[bot] Nov 18, 2025
26620d6
Merge branch 'main' into mh-more-pyproject
mhucka Nov 24, 2025
73d09dd
Use more setuptools and pip features
mhucka Jan 1, 2026
ec48e0c
Read version number from qsimcirq/_version.py
mhucka Jan 1, 2026
3bce1cb
Bump actions/setup-python from 6.0.0 to 6.1.0 (#964)
dependabot[bot] Dec 1, 2025
77eee39
Remove OSV scanner workflow (#966)
mhucka Dec 30, 2025
586bfa2
Update .gemini/styleguide.md (#972)
mhucka Dec 30, 2025
3a61840
Add more runner names to `/.github/actionlint.yaml` (#970)
mhucka Dec 30, 2025
6844a8b
Add new, larger Windows runners to `.github/actionlint.yaml` (#975)
mhucka Dec 30, 2025
6fd22b7
Remove requirements files from MANIFEST.in
mhucka Jan 1, 2026
942584a
Replace `pip install -r requirements` with `pip install --group dev`
mhucka Jan 1, 2026
87826c7
Add cibuildwheel to dev requirements
mhucka Jan 1, 2026
7b66cf0
Remove unnecessary `cache-dependency-path` setting for setup-python
mhucka Jan 1, 2026
6b1791d
Remove no-longer-needed dev-requirements.txt
mhucka Jan 1, 2026
bc414de
Make dependencies be read from requirements.txt
mhucka Jan 1, 2026
6cc391a
Add more dependency constraints to deal with conflicts
mhucka Jan 1, 2026
7dadaf6
Speed up pytest in cibuildwheel by using parallelism
mhucka Jan 1, 2026
c1cf90b
Update installation commands in Dockerfile
mhucka Jan 1, 2026
97be565
Put back requirements.txt into MANIFEST.in
mhucka Jan 1, 2026
8f2792b
Put back installation of requirements.txt
mhucka Jan 1, 2026
c796145
Fix typo and an ambiguity
mhucka Jan 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 95 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,100 @@
# limitations under the License.

[build-system]
build-backend = "setuptools.build_meta"
requires = [
"packaging",
"setuptools>=78.1.1",
"wheel",
"pybind11[global]",
# "pip install" from sources needs to build Pybind, which needs CMake too.
"cmake~=3.28.1",
]
build-backend = "setuptools.build_meta"

[project]
name = "qsimcirq"
version = "0.23.0.dev0"
description = "High-performance quantum circuit simulator for C++ and Python."
authors = [
{ name = "The qsim/qsimh Developers", email = "qsim-qsimh-dev@googlegroups.com" }
]
maintainers = [
{ name = "Google Quantum AI", email = "quantum-oss-maintainers@google.com" }
]
license = "Apache-2.0"
requires-python = ">=3.10.0"
readme = "README.md"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: GPU :: NVIDIA CUDA",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: C++",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Quantum Computing",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
keywords = [
"algorithms",
"api",
"application programming interface",
"cirq",
"google quantum",
"google",
"nisq",
"python",
"quantum algorithm development",
"quantum circuit simulator",
"quantum computer simulator",
"quantum computing",
"quantum computing research",
"quantum programming",
"quantum simulation",
"quantum",
"schrödinger-feynman simulation",
"sdk",
"simulation",
"state vector simulator",
"software development kit",
]
dependencies = [
"absl-py",
"cirq-core~=1.0",
"numpy>=1.26.0",
]

[project.optional-dependencies]
dev = [
"cmake~=3.28.1",
"black~=25.9.0",
"flynt~=1.0",
"isort[colors]~=6.0.1",
"pybind11[global]",
"pylint~=4.0.2",
"pytest",
"pytest-xdist",
"py-cpuinfo",
"setuptools>=78.1.1",
]

[project.urls]
homepage = "https://quantumai.google/qsim"
documentation = "https://quantumai.google/qsim"
source = "https://github.com/quantumlib/qsim"
download = "https://pypi.org/project/qsimcirq/#files"
tracker = "https://github.com/quantumlib/qsim/issues"

[tool.setuptools]
packages = ["qsimcirq"]
package-data = {"qsimcirq" = ["py.typed"]}

[tool.cibuildwheel]
test-extras = "dev"
Expand All @@ -43,3 +129,11 @@ skip = "*musllinux*"
[tool.black]
target-version = ['py310', 'py311', 'py312', 'py313']
extend-exclude = 'third_party'

[tool.isort]
profile = 'black'
order_by_type = false # Sort alphabetically, irrespective of case.
skip_gitignore = true
combine_as_imports = true
known_first_party = ["cirq*"]
extend_skip = ["__init__.py"]
90 changes: 6 additions & 84 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import os
import platform
import re
import runpy
import shutil
import subprocess
import sys
Expand All @@ -24,6 +23,8 @@
from setuptools import Extension, setup
from setuptools.command.build_ext import build_ext

__version__ = "0.23.0.dev0"


class CMakeExtension(Extension):
def __init__(self, name, sourcedir=""):
Expand Down Expand Up @@ -67,6 +68,8 @@ def build_extension(self, ext):
"-DCMAKE_CUDA_COMPILER=nvcc",
]

# Append additional CMake arguments from the environment variable.
# This is e.g. used by cibuildwheel to force a certain C++ standard.
additional_cmake_args = os.environ.get("CMAKE_ARGS", "")
if additional_cmake_args:
cmake_args += additional_cmake_args.split()
Expand Down Expand Up @@ -110,9 +113,7 @@ def build_extension(self, ext):

env = os.environ.copy()
cxxflags = env.get("CXXFLAGS", "")
env["CXXFLAGS"] = (
f'{cxxflags} -DVERSION_INFO=\\"{self.distribution.get_version()}\\"'
)
env["CXXFLAGS"] = f'{cxxflags} -DVERSION_INFO=\\"{__version__}\\"'
if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)
subprocess.check_call(
Expand All @@ -124,42 +125,7 @@ def build_extension(self, ext):
)


with open("requirements.txt") as f:
requirements = [
line.strip() for line in f if line.strip() and not line.strip().startswith("#")
]
with open("dev-requirements.txt") as f:
dev_requirements = [
line.strip() for line in f if line.strip() and not line.strip().startswith("#")
]

description = "Schrödinger and Schrödinger-Feynman simulators for quantum circuits."

# README file as long_description.
with open("README.md", encoding="utf-8") as f:
long_description = f.read()

__version__ = runpy.run_path("qsimcirq/_version.py")["__version__"]
if not __version__:
raise ValueError("Version string cannot be empty")

setup(
name="qsimcirq",
version=__version__,
url="https://github.com/quantumlib/qsim",
author="The qsim/qsimh Developers",
author_email="qsim-qsimh-dev@googlegroups.com",
maintainer="Google Quantum AI",
maintainer_email="quantum-oss-maintainers@google.com",
python_requires=">=3.10.0",
install_requires=requirements,
extras_require={
"dev": dev_requirements,
},
license="Apache-2.0",
description=description,
long_description=long_description,
long_description_content_type="text/markdown",
ext_modules=[
CMakeExtension("qsimcirq/qsim_avx512"),
CMakeExtension("qsimcirq/qsim_avx2"),
Expand All @@ -170,49 +136,5 @@ def build_extension(self, ext):
CMakeExtension("qsimcirq/qsim_decide"),
CMakeExtension("qsimcirq/qsim_hip"),
],
cmdclass=dict(build_ext=CMakeBuild),
zip_safe=False,
packages=["qsimcirq"],
package_data={"qsimcirq": ["py.typed"]},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: GPU :: NVIDIA CUDA",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: C++",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Quantum Computing",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
],
keywords=[
"algorithms",
"api",
"application programming interface",
"cirq",
"google quantum",
"google",
"nisq",
"python",
"quantum algorithm development",
"quantum circuit simulator",
"quantum computer simulator",
"quantum computing",
"quantum computing research",
"quantum programming",
"quantum simulation",
"quantum",
"schrödinger-feynman simulation",
"sdk",
"simulation",
"state vector simulator",
"software development kit",
],
cmdclass={"build_ext": CMakeBuild},
)
Loading