Skip to content

Commit b3b5183

Browse files
authored
Advance from python3.10 to 3.11+ (#312)
Signed-off-by: Melody Ren <[email protected]>
1 parent 7977af5 commit b3b5183

File tree

10 files changed

+15
-30
lines changed

10 files changed

+15
-30
lines changed

.github/workflows/build_dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
if: ${{ github.repository == 'NVIDIA/cudaqx' }}
9090
strategy:
9191
matrix:
92-
python: ['3.10', '3.11', '3.12', '3.13']
92+
python: ['3.11', '3.12', '3.13']
9393
platform: ['amd64', 'arm64']
9494
fail-fast: false
9595
runs-on: linux-${{ matrix.platform }}-cpu8

docker/build_env/cudaqx.wheel.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
ARG base_image=ghcr.io/nvidia/cuda-quantum-devdeps:manylinux-amd64-cu12.6-gcc11-main
1010
FROM ${base_image}
1111

12-
ARG python_version=3.10
12+
ARG python_version=3.12
1313

1414
LABEL org.opencontainers.image.description="Dev tools for building and testing CUDA-QX libraries"
1515
LABEL org.opencontainers.image.source="https://github.com/NVIDIA/cudaqx"

libs/qec/pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dynamic = ["version"]
88
description = "Accelerated libraries for Quantum Error Correction built on CUDA-Q"
99
authors = [{name = "NVIDIA Corporation & Affiliates"}]
1010
maintainers = [{name = "NVIDIA Corporation & Affiliates"}]
11-
requires-python = ">=3.10"
11+
requires-python = ">=3.11"
1212
readme = "README.md"
1313
dependencies = [
1414
'cuda-quantum-cu12 >= 0.12',
@@ -18,7 +18,6 @@ classifiers = [
1818
'Intended Audience :: Developers',
1919
'Programming Language :: Python',
2020
'Programming Language :: Python :: 3',
21-
'Programming Language :: Python :: 3.10',
2221
'Programming Language :: Python :: 3.11',
2322
'Programming Language :: Python :: 3.12',
2423
'Programming Language :: Python :: 3.13',

libs/qec/python/tests/test_tensor_network_decoder_negative.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
# Relevant to Python3.10 only
1616
# Update this once the CI advances to Python3.11
17+
# TODO: Should still perform negative tests for Python>=3.11 which may require modifications of test scripts
1718
@pytest.mark.skipif(
1819
sys.version_info >= (3, 11),
1920
reason="Only meaningful on Python < 3.11 when dependencies are missing")

libs/solvers/pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dynamic = ["version"]
88
description = "Accelerated libraries for quantum-classical solvers built on CUDA-Q"
99
authors = [{name = "NVIDIA Corporation & Affiliates"}]
1010
maintainers = [{name = "NVIDIA Corporation & Affiliates"}]
11-
requires-python = ">=3.10"
11+
requires-python = ">=3.11"
1212
readme = "README.md"
1313
dependencies = [
1414
'cuda-quantum-cu12 >= 0.12',
@@ -23,7 +23,6 @@ classifiers = [
2323
'Intended Audience :: Developers',
2424
'Programming Language :: Python',
2525
'Programming Language :: Python :: 3',
26-
'Programming Language :: Python :: 3.10',
2726
'Programming Language :: Python :: 3.11',
2827
'Programming Language :: Python :: 3.12',
2928
'Programming Language :: Python :: 3.13',

scripts/ci/build_cudaq_wheel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export CXX=g++
2727
# Installing dependencies
2828
# ==============================================================================
2929

30-
python_version=3.10
30+
python_version=3.12
3131
python=python${python_version}
3232
${python} -m pip install --no-cache-dir numpy auditwheel
3333

scripts/ci/build_qec_wheel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# /!\ This script must be run inside an docker container /!\
1212

13-
python_version=3.10
13+
python_version=3.12
1414
python=python${python_version}
1515

1616
# Delete previous wheels

scripts/ci/build_solvers_wheel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# /!\ This script must be run inside an docker container /!\
1212

13-
python_version=3.10
13+
python_version=3.12
1414
python=python${python_version}
1515

1616
# Delete previous wheels

scripts/ci/test_wheels.sh

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ set -e
1717

1818
# Installing dependencies
1919
python_version=$1
20-
python_version_no_dot=$(echo $python_version | tr -d '.') # 3.10 --> 310
20+
python_version_no_dot=$(echo $python_version | tr -d '.') # 3.12 --> 312
2121
python=python${python_version}
2222
platform=$2
2323

@@ -42,15 +42,9 @@ fi
4242
# ======================================
4343

4444
qec_wheel=$(ls /wheels/cudaq_qec-*-cp${python_version_no_dot}-cp${python_version_no_dot}-*.whl)
45-
# If Python version is 3.10, then install without tensor network decoder.
46-
# Otherwise, install with the tensor network decoder.
47-
if [ $python_version == "3.10" ]; then
48-
echo "Installing QEC library without tensor network decoder"
49-
${python} -m pip install "${qec_wheel}"
50-
else
51-
echo "Installing QEC library with tensor network decoder"
52-
${python} -m pip install "${qec_wheel}[tensor_network_decoder]"
53-
fi
45+
# Install QEC library with tensor network decoder (requires Python >=3.11)
46+
echo "Installing QEC library with tensor network decoder"
47+
${python} -m pip install "${qec_wheel}[tensor_network_decoder]"
5448
${python} -m pytest -v -s libs/qec/python/tests/
5549

5650
# Solvers library

scripts/validation/wheel/validate_wheels.sh

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ while [[ $# -gt 0 ]]; do
3434
done
3535

3636
CURRENT_ARCH=$(uname -m)
37-
PYTHON_VERSIONS=("3.10" "3.11" "3.12" "3.13")
37+
PYTHON_VERSIONS=("3.11" "3.12" "3.13")
3838
TARGETS=("nvidia" "nvidia --option fp64", "qpp-cpu")
3939

4040
# OpenBLAS can get bogged down on some machines if using too many threads.
@@ -46,11 +46,7 @@ run_python_tests() {
4646

4747
echo "Running Python tests for Python ${python_version} with default target..."
4848

49-
if [[ $python_version == "3.10" ]]; then
50-
python3 -m pytest libs -v --ignore libs/qec/python/tests/test_tensor_network_decoder.py
51-
else
52-
python3 -m pytest libs -v
53-
fi
49+
python3 -m pytest libs -v
5450

5551
local test_result=$?
5652
if [ ${test_result} -ne 0 ]; then
@@ -81,11 +77,7 @@ test_examples() {
8177
conda activate $conda_name
8278
pip install pypiserver
8379
pypi-server run -p 8080 /root/wheels &
84-
if [[ $python_version == "3.10" ]]; then
85-
pip install cudaq-qec --extra-index-url http://localhost:8080
86-
else
87-
pip install cudaq-qec[tensor_network_decoder] --extra-index-url http://localhost:8080
88-
fi
80+
pip install cudaq-qec[tensor_network_decoder] --extra-index-url http://localhost:8080
8981
pip install cudaq-solvers[gqe] --extra-index-url http://localhost:8080
9082
source $CONDA_PREFIX/lib/python${python_version}/site-packages/distributed_interfaces/activate_custom_mpi.sh
9183
export OMPI_MCA_opal_cuda_support=true OMPI_MCA_btl='^openib'

0 commit comments

Comments
 (0)