Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .github/required-checks.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Required sub-job names per event type for the `CI` workflow.
#
# `CI Summary` fails if any name listed here did not complete with
Expand Down Expand Up @@ -33,8 +33,10 @@
- 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)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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-*'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/config/validation_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
[
"fedora:42"
]
},
{
"version": "3.14",
"operating_systems":
[
"fedora:42"
]
}
],
"cpp":
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ on:
- '3.11'
- '3.12'
- '3.13'
- '3.14'

schedule:
- cron: 0 3 * * *
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publishing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down Expand Up @@ -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 }}
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml.cu12
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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" ]
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml.cu13
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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",
Expand All @@ -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" ]
Expand Down
29 changes: 13 additions & 16 deletions python/cudaq/kernel/ast_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1812,9 +1812,8 @@ def visit_FunctionDef(self, node):
self.debug_msg(lambda: f'Visiting inner FunctionDef {node.name}')
lambdaFct = self.__createFunctionWithinKernel(
node.args.args, node.body)
assignNode = ast.Assign()
assignNode.targets = [ast.Name(node.name)]
assignNode.value = lambdaFct
assignNode = ast.Assign(targets=[ast.Name(node.name)],
value=lambdaFct)
assignNode.lineno = node.lineno
self.visit_Assign(assignNode)
return
Expand Down Expand Up @@ -1869,19 +1868,20 @@ def visit_FunctionDef(self, node):
self.symbolTable.beginBlock()
# Process function arguments like any other assignments.
if node.args.args:
assignNode = ast.Assign()
if len(node.args.args) == 1:
assignNode.targets = [ast.Name(node.args.args[0].arg)]
assignNode.value = entry_block.arguments[0]
assignTargets = [ast.Name(node.args.args[0].arg)]
assignValue = entry_block.arguments[0]
else:
assignNode.targets = [
assignTargets = [
ast.Tuple(
[ast.Name(arg.arg) for arg in node.args.args])
]
assignNode.value = [
assignValue = [
entry_block.arguments[idx]
for idx in range(len(entry_block.arguments.types))
]
assignNode = ast.Assign(targets=assignTargets,
value=assignValue)
assignNode.lineno = node.lineno
self.visit_Assign(assignNode)

Expand Down Expand Up @@ -4082,11 +4082,10 @@ def process_void_list():
self.emitWarning(
"produced elements in list comprehension contain None - "
"expression will be evaluated but no list is generated", node)
forNode = ast.For()
forNode.iter = node.generators[0].iter
forNode.target = node.generators[0].target
forNode.body = [node.elt]
forNode.orelse = []
forNode = ast.For(target=node.generators[0].target,
iter=node.generators[0].iter,
body=[node.elt],
orelse=[])
forNode.lineno = node.lineno
# This loop could be marked as invariant if we didn't use
# `visit_For`, but that would be premature optimization.
Expand Down Expand Up @@ -4926,9 +4925,7 @@ def blockBuilder(iterVar, stmts):
values = getValues(iterVar)
# We need to create proper assignments to the loop
# iteration variable(s) to have consistent behavior.
assignNode = ast.Assign()
assignNode.targets = [node.target]
assignNode.value = values
assignNode = ast.Assign(targets=[node.target], value=values)
assignNode.lineno = node.lineno
self.visit(assignNode)
[self.visit(b) for b in stmts]
Expand Down
3 changes: 2 additions & 1 deletion python/metapackages/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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]
Expand Down
7 changes: 5 additions & 2 deletions python/runtime/cudaq/platform/py_alt_launch_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,11 @@ void cudaq::packArgs(
handleStructMemberVariable<style>(allocatedArg, offsets[i],
memberTys[i], elements[i]);
} else {
nanobind::dict attributes =
nanobind::cast<nanobind::dict>(arg.attr("__annotations__"));
// Read field annotations from the struct's class. On Python
// 3.14 (PEP 749) `__annotations__` is no longer accessible on
// instances, only on the class, so go through `__class__`.
nanobind::dict attributes = nanobind::cast<nanobind::dict>(
arg.attr("__class__").attr("__annotations__"));
for (std::size_t i = 0;
const auto &[attr_name, unused] : attributes) {
nanobind::object attr_value =
Expand Down
7 changes: 4 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading