Skip to content

Commit dfad9d7

Browse files
Add support for Python 3.12 wheel builds (#541)
* Add support for Python 3.12 wheel builds * Auto update version * Trigger CI * Auto update version * Trigger CI * Auto update version * Trigger CI * Auto update version * Trigger CI * Auto update version * Trigger CI * Add changelog entry --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com>
1 parent bce3b09 commit dfad9d7

12 files changed

+28
-24
lines changed

.github/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
### New features since last release
44

5+
* Support added for Python 3.12 wheel builds.
6+
[(#541)](https://github.com/PennyLaneAI/pennylane-lightning/pull/541)
7+
58
* Lightning-Qubit support arbitrary controlled gates (any wires and any control values). The kernels are implemented in the `LM` module.
69
[(#576)](https://github.com/PennyLaneAI/pennylane-lightning/pull/576)
710

.github/workflows/set_wheel_build_matrix.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Set wheel build matrix
22

33
env:
44
PYTHON3_MIN_VERSION: "9"
5-
PYTHON3_MAX_VERSION: "11"
5+
PYTHON3_MAX_VERSION: "12"
66

77
on:
88
workflow_call:

.github/workflows/wheel_linux_aarch64.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Wheel::Linux::ARM
22

33
# **What it does**: Builds python wheels for Linux (ubuntu-latest) architecture ARM 64 and store it as artifacts.
4-
# Python versions: 3.9, 3.10, 3.11.
4+
# Python versions: 3.9, 3.10, 3.11, 3.12.
55
# **Why we have it**: To build wheels for pennylane-lightning installation.
66
# **Who does it impact**: Wheels to be uploaded to PyPI.
77

@@ -92,7 +92,7 @@ jobs:
9292
kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }}
9393
container_img: ["quay.io/pypa/manylinux2014_aarch64"]
9494
timeout-minutes: 45
95-
name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11" }')[matrix.cibw_build] }})
95+
name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11", "cp312-*":"3.12" }')[matrix.cibw_build] }})
9696
runs-on: ${{ matrix.os }}
9797

9898
steps:
@@ -114,7 +114,7 @@ jobs:
114114
cp -rf ${{ github.workspace }}/Kokkos_install/${{ matrix.exec_model }}/* Kokkos/
115115
116116
- name: Install cibuildwheel
117-
run: python -m pip install cibuildwheel~=2.11.0
117+
run: python -m pip install cibuildwheel~=2.16.0
118118

119119
- uses: docker/setup-qemu-action@v2
120120
name: Set up QEMU

.github/workflows/wheel_linux_ppc64le.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Wheel::Linux::PowerPC
22

33
# **What it does**: Builds python wheels for Linux (ubuntu-latest) architecture PowerPC 64 and store it as artifacts.
4-
# Python versions: 3.9, 3.10, 3.11.
4+
# Python versions: 3.9, 3.10, 3.11, 3.12.
55
# **Why we have it**: To build wheels for pennylane-lightning installation.
66
# **Who does it impact**: Wheels to be uploaded to PyPI.
77

@@ -92,7 +92,7 @@ jobs:
9292
kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }}
9393
container_img: ["quay.io/pypa/manylinux2014_ppc64le"]
9494
timeout-minutes: 45
95-
name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{"cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11" }')[matrix.cibw_build] }})
95+
name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{"cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11", "cp312-*":"3.12"}')[matrix.cibw_build] }})
9696
runs-on: ${{ matrix.os }}
9797

9898
steps:
@@ -113,7 +113,7 @@ jobs:
113113
cp -rf ${{ github.workspace }}/Kokkos_install/${{ matrix.exec_model }}/* Kokkos/
114114
115115
- name: Install cibuildwheel
116-
run: python -m pip install cibuildwheel~=2.11.0
116+
run: python -m pip install cibuildwheel~=2.16.0
117117

118118
- uses: docker/setup-qemu-action@v2
119119
name: Set up QEMU

.github/workflows/wheel_linux_x86_64.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Wheel::Linux::x86_64
22

33
# **What it does**: Builds python wheels for Linux (ubuntu-latest) architecture x86_64 and store it as artifacts.
4-
# Python versions: 3.9, 3.10, 3.11.
4+
# Python versions: 3.9, 3.10, 3.11, 3.12.
55
# **Why we have it**: To build wheels for pennylane-lightning installation.
66
# **Who does it impact**: Wheels to be uploaded to PyPI.
77

@@ -97,7 +97,7 @@ jobs:
9797
kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }}
9898
container_img: ["quay.io/pypa/manylinux2014_x86_64"]
9999
timeout-minutes: 30
100-
name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11" }')[matrix.cibw_build] }})
100+
name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11","cp312-*":"3.12" }')[matrix.cibw_build] }})
101101
runs-on: ${{ matrix.os }}
102102
container: ${{ matrix.container_img }}
103103

@@ -126,7 +126,7 @@ jobs:
126126
yum update -y && yum install -y docker
127127
128128
- name: Install cibuildwheel
129-
run: python3.9 -m pip install cibuildwheel~=2.11.0
129+
run: python3.9 -m pip install cibuildwheel~=2.16.0
130130

131131
- name: Build wheels
132132
env:

.github/workflows/wheel_linux_x86_64_cu11.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Wheel::Linux::x86_64::CUDA-11
22

33
# **What it does**: Builds python wheels for Linux (ubuntu-latest) architecture x86_64 and store it as artifacts.
4-
# Python versions: 3.9, 3.10, 3.11.
4+
# Python versions: 3.9, 3.10, 3.11, 3.12.
55
# **Why we have it**: To build wheels for pennylane-lightning-gpu installation.
66
# **Who does it impact**: Wheels to be uploaded to PyPI.
77

@@ -40,7 +40,7 @@ jobs:
4040
cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }}
4141
container_img: ["quay.io/pypa/manylinux2014_x86_64"]
4242
timeout-minutes: 30
43-
name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11" }')[matrix.cibw_build] }})
43+
name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11","cp312-*":"3.12" }')[matrix.cibw_build] }})
4444
runs-on: ${{ matrix.os }}
4545
container: ${{ matrix.container_img }}
4646

@@ -57,7 +57,7 @@ jobs:
5757
yum update -y && yum install -y docker
5858
5959
- name: Install cibuildwheel
60-
run: python3.9 -m pip install cibuildwheel~=2.11.0
60+
run: python3.9 -m pip install cibuildwheel~=2.16.0
6161

6262
- name: Build wheels
6363
env:

.github/workflows/wheel_macos_arm64.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Wheel::MacOS::ARM
22

33
# **What it does**: Builds python wheels for MacOS (11) architecture ARM 64 and store it as artifacts.
4-
# Python versions: 3.9, 3.10, 3.11.
4+
# Python versions: 3.9, 3.10, 3.11, 3.12.
55
# **Why we have it**: To build wheels for pennylane-lightning installation.
66
# **Who does it impact**: Wheels to be uploaded to PyPI.
77

@@ -58,7 +58,7 @@ jobs:
5858
pl_backend: ["lightning_kokkos", "lightning_qubit"]
5959
cibw_build: ${{fromJson(needs.mac-set-matrix-arm.outputs.python_version)}}
6060
timeout-minutes: 30
61-
name: macos-latest::arm64 - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11" }')[matrix.cibw_build] }})
61+
name: macos-latest::arm64 - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11","cp312-*":"3.12" }')[matrix.cibw_build] }})
6262
runs-on: ${{ matrix.os }}
6363

6464
steps:
@@ -71,7 +71,7 @@ jobs:
7171
python-version: '3.9'
7272

7373
- name: Install cibuildwheel
74-
run: python -m pip install cibuildwheel~=2.11.0
74+
run: python -m pip install cibuildwheel~=2.16.0
7575

7676
- name: Build wheels
7777
env:

.github/workflows/wheel_macos_x86_64.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Wheel::MacOS::Intel
22

33
# **What it does**: Builds python wheels for MacOS (10.15) architecture x86_64 and store it as artifacts.
4-
# Python versions: 3.9, 3.10, 3.11.
4+
# Python versions: 3.9, 3.10, 3.11, 3.12.
55
# **Why we have it**: To build wheels for pennylane-lightning installation.
66
# **Who does it impact**: Wheels to be uploaded to PyPI.
77

@@ -95,7 +95,7 @@ jobs:
9595
exec_model: ${{ fromJson(needs.set_wheel_build_matrix.outputs.exec_model) }}
9696
kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }}
9797
timeout-minutes: 30
98-
name: ${{ matrix.os }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11" }')[matrix.cibw_build] }})
98+
name: ${{ matrix.os }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11","cp312-*":"3.12" }')[matrix.cibw_build] }})
9999
runs-on: ${{ matrix.os }}
100100

101101
steps:
@@ -120,7 +120,7 @@ jobs:
120120
python-version: '3.9'
121121

122122
- name: Install cibuildwheel
123-
run: python -m pip install cibuildwheel~=2.11.0
123+
run: python -m pip install cibuildwheel~=2.16.0
124124

125125
- name: Build wheels
126126
env:

.github/workflows/wheel_win_x86_64.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Wheel::Windows::x86_64
22

33
# **What it does**: Builds python wheels for Windows (windows-latest) and store it as artifacts.
4-
# Python versions: 3.9, 3.10, 3.11.
4+
# Python versions: 3.9, 3.10, 3.11, 3.12.
55
# **Why we have it**: To build wheels for pennylane-lightning installation.
66
# **Who does it impact**: Wheels to be uploaded to PyPI.
77

@@ -93,7 +93,7 @@ jobs:
9393
exec_model: [\"SERIAL\"]
9494
kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }}
9595
timeout-minutes: 30
96-
name: ${{ matrix.os }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11" }')[matrix.cibw_build] }})
96+
name: ${{ matrix.os }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11","cp312-*":"3.12" }')[matrix.cibw_build] }})
9797
runs-on: ${{ matrix.os }}
9898

9999
steps:
@@ -114,7 +114,7 @@ jobs:
114114
-Destination "D:\a\Lightning-Unification\Lightning-Unification\Kokkos" -Recurse -Force
115115
116116
- name: Install cibuildwheel
117-
run: python -m pip install cibuildwheel~=2.11.0 wheel
117+
run: python -m pip install cibuildwheel~=2.16.0 wheel
118118

119119
- name: Build wheels
120120
env:

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ if(ENABLE_PYTHON)
8585
find_package(Python COMPONENTS Interpreter Development)
8686
FetchContent_Declare(pybind11
8787
GIT_REPOSITORY https://github.com/pybind/pybind11.git
88-
GIT_TAG v2.10.1
88+
GIT_TAG v2.11.1
8989
)
9090
FetchContent_MakeAvailable(pybind11)
9191
endif()

pennylane_lightning/core/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
Version number (major.minor.patch[-label])
1717
"""
1818

19-
__version__ = "0.34.0-dev25"
19+
__version__ = "0.34.0-dev26"

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ def build_extension(self, ext: CMakeExtension):
241241
"Programming Language :: Python :: 3.9",
242242
"Programming Language :: Python :: 3.10",
243243
"Programming Language :: Python :: 3.11",
244+
"Programming Language :: Python :: 3.12",
244245
"Programming Language :: Python :: 3 :: Only",
245246
"Topic :: Scientific/Engineering :: Physics",
246247
]

0 commit comments

Comments
 (0)