From 4c5ac1165f33036a910be2e21ccdaa137996010c Mon Sep 17 00:00:00 2001 From: mdzurick Date: Thu, 4 Jun 2026 13:51:59 +0000 Subject: [PATCH 1/3] python: add Python 3.14 support Add 3.14 to the supported-version matrix and bump the dependencies that gate it: - Classifiers (cu12/cu13/metapackages) gain 'Programming Language :: Python :: 3.14'; requires-python stays >=3.11. - CI matrices include 3.14: ci.yml, deployments.yml, publishing.yml, ci_macos.yml, integration_tests.yml, validation_config.json, and the metapackage required checks. - cupy-cuda1Xx has no cp314 wheel below 14.0.0, so gate the existing ~=13.6.0 pin to python_version < '3.14' and require >=14.0.0 on 3.14. - pyscf/openfermionpyscf have no cp314 wheels yet, so the 'chemistry' extra is marked python_version < '3.14' (unsupported on 3.14 for now) rather than blocking the core wheel. - requirements-dev.txt: gate numpy/h5py/openfermionpyscf pins that lack cp314 wheels and add a 3.14-compatible numpy. numpy/scipy floors already resolve to cp314 builds; nanobind>=2.12.0 and the NVIDIA cuQuantum/cuBLAS (py3-none) wheels already support 3.14. Signed-off-by: mdzurick --- .github/required-checks.yml | 2 ++ .github/workflows/ci.yml | 4 ++-- .github/workflows/ci_macos.yml | 4 ++-- .github/workflows/config/validation_config.json | 7 +++++++ .github/workflows/deployments.yml | 2 +- .github/workflows/integration_tests.yml | 1 + .github/workflows/publishing.yml | 4 ++-- pyproject.toml.cu12 | 6 ++++-- pyproject.toml.cu13 | 6 ++++-- python/metapackages/pyproject.toml | 3 ++- requirements-dev.txt | 7 ++++--- 11 files changed, 31 insertions(+), 15 deletions(-) diff --git a/.github/required-checks.yml b/.github/required-checks.yml index 20befb9add6..8af5b5347fe 100644 --- a/.github/required-checks.yml +++ b/.github/required-checks.yml @@ -33,8 +33,10 @@ merge_group: &full_matrix - Create Python metapackages / Build Python metapackages - Create Python metapackages / Test Python metapackages (3.11) - Create Python metapackages / Test Python metapackages (3.13) +- Create Python metapackages / Test Python metapackages (3.14) - Create Python metapackages / Test Python metapackages (12.6, 3.11) - Create Python metapackages / Test Python metapackages (12.6, 3.13) +- Create Python metapackages / Test Python metapackages (12.6, 3.14) - Create Python wheels (amd64, 3.11, 12.6) / Validate wheel (debian:12, --user) - Create Python wheels (amd64, 3.11, 12.6) / Validate wheel (debian:12) - Create Python wheels (amd64, 3.11, 12.6) / Validate wheel (fedora:42, --user) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b0f912e7a0..f0145239c88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -293,7 +293,7 @@ jobs: strategy: matrix: platform: [amd64, arm64] - python_version: ['3.11', '3.13'] + python_version: ['3.11', '3.13', '3.14'] cuda_version: ["12.6", "13.0"] fail-fast: ${{ github.event_name == 'merge_group' }} uses: ./.github/workflows/python_wheels.yml @@ -315,7 +315,7 @@ jobs: uses: ./.github/workflows/python_metapackages.yml with: cudaq_version: ${{ needs.python_wheels.outputs.cudaq_version }} - python_versions: "['3.11', '3.13']" + python_versions: "['3.11', '3.13', '3.14']" cuda_versions: "['', '12.6', '13.0']" wheel_artifacts: 'pycudaq-*' diff --git a/.github/workflows/ci_macos.yml b/.github/workflows/ci_macos.yml index 202bcbdc796..4fa8012aa35 100644 --- a/.github/workflows/ci_macos.yml +++ b/.github/workflows/ci_macos.yml @@ -198,7 +198,7 @@ jobs: needs: [devdeps, metadata] strategy: matrix: - python_version: ['3.11', '3.12', '3.13'] + python_version: ['3.11', '3.12', '3.13', '3.14'] fail-fast: false runs-on: macos-26 permissions: @@ -304,7 +304,7 @@ jobs: needs: wheel strategy: matrix: - python_version: ['3.11', '3.12', '3.13'] + python_version: ['3.11', '3.12', '3.13', '3.14'] fail-fast: false runs-on: macos-26 diff --git a/.github/workflows/config/validation_config.json b/.github/workflows/config/validation_config.json index d1fae918429..b71862c879a 100644 --- a/.github/workflows/config/validation_config.json +++ b/.github/workflows/config/validation_config.json @@ -29,6 +29,13 @@ [ "fedora:42" ] + }, + { + "version": "3.14", + "operating_systems": + [ + "fedora:42" + ] } ], "cpp": diff --git a/.github/workflows/deployments.yml b/.github/workflows/deployments.yml index 01f81eb953b..29d99d96779 100644 --- a/.github/workflows/deployments.yml +++ b/.github/workflows/deployments.yml @@ -820,7 +820,7 @@ jobs: strategy: matrix: platform: ${{ fromJson(needs.metadata.outputs.platforms).ids }} - python_version: ['3.11', '3.12', '3.13'] + python_version: ['3.11', '3.12', '3.13', '3.14'] cuda_version: ["12.6", "13.0"] fail-fast: false uses: ./.github/workflows/python_wheels.yml diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 4d87a2d28a7..908474ea6aa 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -58,6 +58,7 @@ on: - '3.11' - '3.12' - '3.13' + - '3.14' schedule: - cron: 0 3 * * * diff --git a/.github/workflows/publishing.yml b/.github/workflows/publishing.yml index fbe8af94bae..c36d4b75c70 100644 --- a/.github/workflows/publishing.yml +++ b/.github/workflows/publishing.yml @@ -720,7 +720,7 @@ jobs: strategy: matrix: info_file: ${{ fromJson(needs.assets.outputs.python_wheels).info_files }} - python_version: ['3.11', '3.12', '3.13'] + python_version: ['3.11', '3.12', '3.13', '3.14'] fail-fast: false runs-on: ${{ (contains(matrix.info_file, 'arm') && 'linux-arm64-cpu8') || 'linux-amd64-cpu8' }} @@ -857,7 +857,7 @@ jobs: uses: ./.github/workflows/python_metapackages.yml with: cudaq_version: ${{ needs.assets.outputs.cudaq_version }} - python_versions: "['3.11', '3.12', '3.13']" + python_versions: "['3.11', '3.12', '3.13', '3.14']" cuda_versions: "['', '12.6', '13.0']" wheel_artifacts: '*-wheels' github_commit: ${{ inputs.github_commit || needs.assets.outputs.github_commit }} diff --git a/pyproject.toml.cu12 b/pyproject.toml.cu12 index dbfdf7add0a..66c76c50b1c 100644 --- a/pyproject.toml.cu12 +++ b/pyproject.toml.cu12 @@ -31,7 +31,8 @@ dependencies = [ 'nvidia-cuda-runtime-cu12 ~= 12.0', 'nvidia-cusolver-cu12 ~= 11.4', 'nvidia-cuda-nvrtc-cu12 ~= 12.0', - 'cupy-cuda12x ~= 13.6.0' + 'cupy-cuda12x ~= 13.6.0; python_version < "3.14"', + 'cupy-cuda12x >= 14.0.0; python_version >= "3.14"' ] classifiers = [ 'Intended Audience :: Science/Research', @@ -41,6 +42,7 @@ classifiers = [ 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3.13', + 'Programming Language :: Python :: 3.14', "Environment :: GPU :: NVIDIA CUDA", "Environment :: GPU :: NVIDIA CUDA :: 12", 'Topic :: Software Development', @@ -56,7 +58,7 @@ Releases = "https://nvidia.github.io/cuda-quantum/latest/releases.html" # We must use h5py<3.11 because 3.11 doesn't include aarch64 Linux wheels. # https://github.com/h5py/h5py/issues/2408 [project.optional-dependencies] -chemistry = [ "openfermionpyscf==0.5", "h5py<3.11" ] +chemistry = [ "openfermionpyscf==0.5; python_version < '3.14'", "h5py<3.11; python_version < '3.14'" ] visualization = [ "qutip>5" , "matplotlib>=3.5" ] # Additional torch-based integrator integrators = [ "torchdiffeq" ] diff --git a/pyproject.toml.cu13 b/pyproject.toml.cu13 index 41f9d24200c..8e510bb71d2 100644 --- a/pyproject.toml.cu13 +++ b/pyproject.toml.cu13 @@ -32,7 +32,8 @@ dependencies = [ 'nvidia-cuda-runtime ~= 13.0; sys_platform != "darwin"', 'nvidia-cusolver ~= 12.0; sys_platform != "darwin"', 'nvidia-cuda-nvrtc ~= 13.0; sys_platform != "darwin"', - 'cupy-cuda13x ~= 13.6.0; sys_platform != "darwin"', + 'cupy-cuda13x ~= 13.6.0; sys_platform != "darwin" and python_version < "3.14"', + 'cupy-cuda13x >= 14.0.0; sys_platform != "darwin" and python_version >= "3.14"', ] classifiers = [ 'Intended Audience :: Science/Research', @@ -42,6 +43,7 @@ classifiers = [ 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3.13', + 'Programming Language :: Python :: 3.14', "Environment :: GPU :: NVIDIA CUDA", "Environment :: GPU :: NVIDIA CUDA :: 12", "Environment :: GPU :: NVIDIA CUDA :: 13", @@ -58,7 +60,7 @@ Releases = "https://nvidia.github.io/cuda-quantum/latest/releases.html" # We must use h5py<3.11 because 3.11 doesn't include aarch64 Linux wheels. # https://github.com/h5py/h5py/issues/2408 [project.optional-dependencies] -chemistry = [ "openfermionpyscf==0.5", "h5py<3.11" ] +chemistry = [ "openfermionpyscf==0.5; python_version < '3.14'", "h5py<3.11; python_version < '3.14'" ] visualization = [ "qutip>5" , "matplotlib>=3.5" ] # Additional torch-based integrator integrators = [ "torchdiffeq" ] diff --git a/python/metapackages/pyproject.toml b/python/metapackages/pyproject.toml index 92db31c4acd..a532f8c9b83 100644 --- a/python/metapackages/pyproject.toml +++ b/python/metapackages/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3.13', + 'Programming Language :: Python :: 3.14', "Environment :: GPU :: NVIDIA CUDA", "Environment :: GPU :: NVIDIA CUDA :: 11", "Environment :: GPU :: NVIDIA CUDA :: 12", @@ -39,7 +40,7 @@ Repository = "https://github.com/NVIDIA/cuda-quantum" Releases = "https://nvidia.github.io/cuda-quantum/latest/releases.html" [project.optional-dependencies] -chemistry = [ "scipy==1.10.1", "openfermionpyscf==0.5", "h5py==3.12.1" ] +chemistry = [ "scipy==1.10.1; python_version < '3.14'", "openfermionpyscf==0.5; python_version < '3.14'", "h5py==3.12.1; python_version < '3.14'" ] visualization = [ "qutip>5" , "matplotlib>=3.5" ] [build-system] diff --git a/requirements-dev.txt b/requirements-dev.txt index 31b3b884d3d..bf603418940 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -14,7 +14,8 @@ lit==18.1.4 pytest==9.0.3 pytest-xdist==3.8.0 psutil -numpy==1.26.4 +numpy==1.26.4; python_version < "3.14" +numpy>=2.3.2; python_version >= "3.14" notebook==7.5.6 nbconvert==7.17.1 llvmlite==0.47.0 @@ -23,8 +24,8 @@ requests==2.32.3 fastapi==0.111.0 uvicorn==0.29.0 pydantic==2.12.5 -openfermionpyscf==0.5 -h5py==3.12.1 +openfermionpyscf==0.5; python_version < "3.14" +h5py==3.12.1; python_version < "3.14" matplotlib pyspelling==2.10 pymdown-extensions==10.21.3 From 3c26c4c789245d11a7ae21d889f7118ad8096c4e Mon Sep 17 00:00:00 2001 From: mdzurick Date: Fri, 5 Jun 2026 06:24:30 +0000 Subject: [PATCH 2/3] python: read struct __annotations__ from the class for Python 3.14 When marshalling a dataclass/struct kernel argument, py_alt_launch_kernel read `arg.__annotations__` directly off the instance. Python 3.14 (PEP 749) no longer resolves `__annotations__` on an instance via its class, so this raised "'' object has no attribute '__annotations__'" and failed all dataclass/struct kernel tests on 3.14. Read the annotations from the struct's class (`arg.__class__.__annotations__`) instead, which works on all supported Python versions. Signed-off-by: mdzurick --- python/runtime/cudaq/platform/py_alt_launch_kernel.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/runtime/cudaq/platform/py_alt_launch_kernel.cpp b/python/runtime/cudaq/platform/py_alt_launch_kernel.cpp index 81156c6cdb5..97090fbd373 100644 --- a/python/runtime/cudaq/platform/py_alt_launch_kernel.cpp +++ b/python/runtime/cudaq/platform/py_alt_launch_kernel.cpp @@ -475,8 +475,11 @@ void cudaq::packArgs( handleStructMemberVariable