From 4e426de6e2c62da2a45b3b05c3ecf79eb78ab703 Mon Sep 17 00:00:00 2001 From: "Lee J. O'Riordan" Date: Tue, 31 Oct 2023 15:31:13 -0400 Subject: [PATCH 01/12] Add support for Python 3.12 wheel builds --- .github/workflows/set_wheel_build_matrix.yml | 2 +- .github/workflows/wheel_linux_aarch64.yml | 6 +++--- .github/workflows/wheel_linux_ppc64le.yml | 6 +++--- .github/workflows/wheel_linux_x86_64.yml | 6 +++--- .github/workflows/wheel_linux_x86_64_cu11.yml | 6 +++--- .github/workflows/wheel_macos_arm64.yml | 6 +++--- .github/workflows/wheel_macos_x86_64.yml | 6 +++--- .github/workflows/wheel_win_x86_64.yml | 6 +++--- CMakeLists.txt | 2 +- setup.py | 1 + 10 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.github/workflows/set_wheel_build_matrix.yml b/.github/workflows/set_wheel_build_matrix.yml index 2cb9d820e7..ad1687b805 100644 --- a/.github/workflows/set_wheel_build_matrix.yml +++ b/.github/workflows/set_wheel_build_matrix.yml @@ -2,7 +2,7 @@ name: Set wheel build matrix env: PYTHON3_MIN_VERSION: "9" - PYTHON3_MAX_VERSION: "11" + PYTHON3_MAX_VERSION: "12" on: workflow_call: diff --git a/.github/workflows/wheel_linux_aarch64.yml b/.github/workflows/wheel_linux_aarch64.yml index c7e870efbe..bd0664c3bd 100644 --- a/.github/workflows/wheel_linux_aarch64.yml +++ b/.github/workflows/wheel_linux_aarch64.yml @@ -1,7 +1,7 @@ name: Wheel::Linux::ARM # **What it does**: Builds python wheels for Linux (ubuntu-latest) architecture ARM 64 and store it as artifacts. -# Python versions: 3.9, 3.10, 3.11. +# Python versions: 3.9, 3.10, 3.11, 3.12. # **Why we have it**: To build wheels for pennylane-lightning installation. # **Who does it impact**: Wheels to be uploaded to PyPI. @@ -92,7 +92,7 @@ jobs: kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }} container_img: ["quay.io/pypa/manylinux2014_aarch64"] timeout-minutes: 45 - name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11" }')[matrix.cibw_build] }}) + 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] }}) runs-on: ${{ matrix.os }} steps: @@ -114,7 +114,7 @@ jobs: cp -rf ${{ github.workspace }}/Kokkos_install/${{ matrix.exec_model }}/* Kokkos/ - name: Install cibuildwheel - run: python -m pip install cibuildwheel~=2.11.0 + run: python -m pip install cibuildwheel~=2.16.0 - uses: docker/setup-qemu-action@v2 name: Set up QEMU diff --git a/.github/workflows/wheel_linux_ppc64le.yml b/.github/workflows/wheel_linux_ppc64le.yml index 0e9a14e5dc..95820b4d0b 100644 --- a/.github/workflows/wheel_linux_ppc64le.yml +++ b/.github/workflows/wheel_linux_ppc64le.yml @@ -1,7 +1,7 @@ name: Wheel::Linux::PowerPC # **What it does**: Builds python wheels for Linux (ubuntu-latest) architecture PowerPC 64 and store it as artifacts. -# Python versions: 3.9, 3.10, 3.11. +# Python versions: 3.9, 3.10, 3.11, 3.12. # **Why we have it**: To build wheels for pennylane-lightning installation. # **Who does it impact**: Wheels to be uploaded to PyPI. @@ -92,7 +92,7 @@ jobs: kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }} container_img: ["quay.io/pypa/manylinux2014_ppc64le"] timeout-minutes: 45 - name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{"cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11" }')[matrix.cibw_build] }}) + 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] }}) runs-on: ${{ matrix.os }} steps: @@ -113,7 +113,7 @@ jobs: cp -rf ${{ github.workspace }}/Kokkos_install/${{ matrix.exec_model }}/* Kokkos/ - name: Install cibuildwheel - run: python -m pip install cibuildwheel~=2.11.0 + run: python -m pip install cibuildwheel~=2.16.0 - uses: docker/setup-qemu-action@v2 name: Set up QEMU diff --git a/.github/workflows/wheel_linux_x86_64.yml b/.github/workflows/wheel_linux_x86_64.yml index a9b7be8e07..afd3456ce5 100644 --- a/.github/workflows/wheel_linux_x86_64.yml +++ b/.github/workflows/wheel_linux_x86_64.yml @@ -1,7 +1,7 @@ name: Wheel::Linux::x86_64 # **What it does**: Builds python wheels for Linux (ubuntu-latest) architecture x86_64 and store it as artifacts. -# Python versions: 3.9, 3.10, 3.11. +# Python versions: 3.9, 3.10, 3.11, 3.12. # **Why we have it**: To build wheels for pennylane-lightning installation. # **Who does it impact**: Wheels to be uploaded to PyPI. @@ -97,7 +97,7 @@ jobs: kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }} container_img: ["quay.io/pypa/manylinux2014_x86_64"] timeout-minutes: 30 - name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11" }')[matrix.cibw_build] }}) + 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] }}) runs-on: ${{ matrix.os }} container: ${{ matrix.container_img }} @@ -126,7 +126,7 @@ jobs: yum update -y && yum install -y docker - name: Install cibuildwheel - run: python3.9 -m pip install cibuildwheel~=2.11.0 + run: python3.9 -m pip install cibuildwheel~=2.16.0 - name: Build wheels env: diff --git a/.github/workflows/wheel_linux_x86_64_cu11.yml b/.github/workflows/wheel_linux_x86_64_cu11.yml index 301d4c70e0..a06c2b4bcb 100644 --- a/.github/workflows/wheel_linux_x86_64_cu11.yml +++ b/.github/workflows/wheel_linux_x86_64_cu11.yml @@ -1,7 +1,7 @@ name: Wheel::Linux::x86_64::CUDA-11 # **What it does**: Builds python wheels for Linux (ubuntu-latest) architecture x86_64 and store it as artifacts. -# Python versions: 3.9, 3.10, 3.11. +# Python versions: 3.9, 3.10, 3.11, 3.12. # **Why we have it**: To build wheels for pennylane-lightning-gpu installation. # **Who does it impact**: Wheels to be uploaded to PyPI. @@ -40,7 +40,7 @@ jobs: cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }} container_img: ["quay.io/pypa/manylinux2014_x86_64"] timeout-minutes: 30 - name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11" }')[matrix.cibw_build] }}) + 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] }}) runs-on: ${{ matrix.os }} container: ${{ matrix.container_img }} @@ -57,7 +57,7 @@ jobs: yum update -y && yum install -y docker - name: Install cibuildwheel - run: python3.9 -m pip install cibuildwheel~=2.11.0 + run: python3.9 -m pip install cibuildwheel~=2.16.0 - name: Build wheels env: diff --git a/.github/workflows/wheel_macos_arm64.yml b/.github/workflows/wheel_macos_arm64.yml index 42155c69a9..60f0eeab3c 100644 --- a/.github/workflows/wheel_macos_arm64.yml +++ b/.github/workflows/wheel_macos_arm64.yml @@ -1,7 +1,7 @@ name: Wheel::MacOS::ARM # **What it does**: Builds python wheels for MacOS (11) architecture ARM 64 and store it as artifacts. -# Python versions: 3.9, 3.10, 3.11. +# Python versions: 3.9, 3.10, 3.11, 3.12. # **Why we have it**: To build wheels for pennylane-lightning installation. # **Who does it impact**: Wheels to be uploaded to PyPI. @@ -58,7 +58,7 @@ jobs: pl_backend: ["lightning_kokkos", "lightning_qubit"] cibw_build: ${{fromJson(needs.mac-set-matrix-arm.outputs.python_version)}} timeout-minutes: 30 - name: macos-latest::arm64 - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11" }')[matrix.cibw_build] }}) + name: macos-latest::arm64 - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11","cp312-*":"3.12" }')[matrix.cibw_build] }}) runs-on: ${{ matrix.os }} steps: @@ -71,7 +71,7 @@ jobs: python-version: '3.9' - name: Install cibuildwheel - run: python -m pip install cibuildwheel~=2.11.0 + run: python -m pip install cibuildwheel~=2.16.0 - name: Build wheels env: diff --git a/.github/workflows/wheel_macos_x86_64.yml b/.github/workflows/wheel_macos_x86_64.yml index 188739b67d..4831b3e3b7 100644 --- a/.github/workflows/wheel_macos_x86_64.yml +++ b/.github/workflows/wheel_macos_x86_64.yml @@ -1,7 +1,7 @@ name: Wheel::MacOS::Intel # **What it does**: Builds python wheels for MacOS (10.15) architecture x86_64 and store it as artifacts. -# Python versions: 3.9, 3.10, 3.11. +# Python versions: 3.9, 3.10, 3.11, 3.12. # **Why we have it**: To build wheels for pennylane-lightning installation. # **Who does it impact**: Wheels to be uploaded to PyPI. @@ -95,7 +95,7 @@ jobs: exec_model: ${{ fromJson(needs.set_wheel_build_matrix.outputs.exec_model) }} kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }} timeout-minutes: 30 - name: ${{ matrix.os }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11" }')[matrix.cibw_build] }}) + name: ${{ matrix.os }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11","cp312-*":"3.12" }')[matrix.cibw_build] }}) runs-on: ${{ matrix.os }} steps: @@ -120,7 +120,7 @@ jobs: python-version: '3.9' - name: Install cibuildwheel - run: python -m pip install cibuildwheel~=2.11.0 + run: python -m pip install cibuildwheel~=2.16.0 - name: Build wheels env: diff --git a/.github/workflows/wheel_win_x86_64.yml b/.github/workflows/wheel_win_x86_64.yml index 62bd651055..241156ee09 100644 --- a/.github/workflows/wheel_win_x86_64.yml +++ b/.github/workflows/wheel_win_x86_64.yml @@ -1,7 +1,7 @@ name: Wheel::Windows::x86_64 # **What it does**: Builds python wheels for Windows (windows-latest) and store it as artifacts. -# Python versions: 3.9, 3.10, 3.11. +# Python versions: 3.9, 3.10, 3.11, 3.12. # **Why we have it**: To build wheels for pennylane-lightning installation. # **Who does it impact**: Wheels to be uploaded to PyPI. @@ -93,7 +93,7 @@ jobs: exec_model: ${{ fromJson(needs.set_wheel_build_matrix.outputs.exec_model) }} kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }} timeout-minutes: 30 - name: ${{ matrix.os }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11" }')[matrix.cibw_build] }}) + name: ${{ matrix.os }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11","cp312-*":"3.12" }')[matrix.cibw_build] }}) runs-on: ${{ matrix.os }} steps: @@ -114,7 +114,7 @@ jobs: -Destination "D:\a\Lightning-Unification\Lightning-Unification\Kokkos" -Recurse -Force - name: Install cibuildwheel - run: python -m pip install cibuildwheel~=2.11.0 wheel + run: python -m pip install cibuildwheel~=2.16.0 wheel - name: Build wheels env: diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f907bd6d3..53ee259aea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,7 @@ if(ENABLE_PYTHON) find_package(Python COMPONENTS Interpreter Development) FetchContent_Declare(pybind11 GIT_REPOSITORY https://github.com/pybind/pybind11.git - GIT_TAG v2.10.1 + GIT_TAG v2.11.1 ) FetchContent_MakeAvailable(pybind11) endif() diff --git a/setup.py b/setup.py index 03ef6064f7..388c1a0415 100644 --- a/setup.py +++ b/setup.py @@ -240,6 +240,7 @@ def build_extension(self, ext: CMakeExtension): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3 :: Only", "Topic :: Scientific/Engineering :: Physics", ] From a2e2ee88ed1d272020357da14f1dd6b8d4fe6803 Mon Sep 17 00:00:00 2001 From: Dev version update bot Date: Tue, 31 Oct 2023 19:31:45 +0000 Subject: [PATCH 02/12] Auto update version --- pennylane_lightning/core/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index 3029ae116d..34b114ce22 100644 --- a/pennylane_lightning/core/_version.py +++ b/pennylane_lightning/core/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.34.0-dev2" +__version__ = "0.34.0-dev3" From 402c65c6442c6ab8079ba5c3ea0d362210952f61 Mon Sep 17 00:00:00 2001 From: "Lee J. O'Riordan" Date: Tue, 31 Oct 2023 15:38:19 -0400 Subject: [PATCH 03/12] Trigger CI From 5ee1b664578c82bc92d9373f9a50078e573b793a Mon Sep 17 00:00:00 2001 From: Dev version update bot Date: Wed, 1 Nov 2023 15:46:11 +0000 Subject: [PATCH 04/12] Auto update version --- pennylane_lightning/core/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index 34b114ce22..f3438898a8 100644 --- a/pennylane_lightning/core/_version.py +++ b/pennylane_lightning/core/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.34.0-dev3" +__version__ = "0.34.0-dev4" From 3cd90f51d56512d7826dee8d38bc5bc4b58300d2 Mon Sep 17 00:00:00 2001 From: "Lee J. O'Riordan" Date: Wed, 1 Nov 2023 11:46:51 -0400 Subject: [PATCH 05/12] Trigger CI From 310655371a75863a436e92f689099a1e287325f2 Mon Sep 17 00:00:00 2001 From: Dev version update bot Date: Thu, 9 Nov 2023 14:28:32 +0000 Subject: [PATCH 06/12] Auto update version --- pennylane_lightning/core/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index f3438898a8..a2ae112382 100644 --- a/pennylane_lightning/core/_version.py +++ b/pennylane_lightning/core/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.34.0-dev4" +__version__ = "0.34.0-dev5" From 980b814d1ace2b3452d1edadf57dfc6f854ed078 Mon Sep 17 00:00:00 2001 From: "Lee J. O'Riordan" Date: Thu, 9 Nov 2023 09:30:34 -0500 Subject: [PATCH 07/12] Trigger CI From cf1d81dc62308e5db3f5fba7e4beecbd7a41058d Mon Sep 17 00:00:00 2001 From: Dev version update bot Date: Wed, 3 Jan 2024 14:42:56 +0000 Subject: [PATCH 08/12] Auto update version --- pennylane_lightning/core/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index 07b0ad6aff..568f943a4a 100644 --- a/pennylane_lightning/core/_version.py +++ b/pennylane_lightning/core/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.34.0-dev22" +__version__ = "0.34.0-dev23" From 1b2eeb57fff18ccac136b190bb798b29877d4134 Mon Sep 17 00:00:00 2001 From: "Lee J. O'Riordan" Date: Wed, 3 Jan 2024 09:46:41 -0500 Subject: [PATCH 09/12] Trigger CI From fc6a631d4a7ef96e452300bd9da44448d8071475 Mon Sep 17 00:00:00 2001 From: Dev version update bot Date: Wed, 3 Jan 2024 19:57:48 +0000 Subject: [PATCH 10/12] Auto update version --- pennylane_lightning/core/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index fe836ab474..64f71a994c 100644 --- a/pennylane_lightning/core/_version.py +++ b/pennylane_lightning/core/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.34.0-dev25" +__version__ = "0.34.0-dev26" From 3d16d9ef35ee313b0d244dcd877d74a7207110b7 Mon Sep 17 00:00:00 2001 From: "Lee J. O'Riordan" Date: Wed, 3 Jan 2024 14:58:17 -0500 Subject: [PATCH 11/12] Trigger CI From ba1c375d975afec737caca8fa2c3f0c93a04dc16 Mon Sep 17 00:00:00 2001 From: "Lee J. O'Riordan" Date: Wed, 3 Jan 2024 15:15:51 -0500 Subject: [PATCH 12/12] Add changelog entry --- .github/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 6122347719..9e94ac7ac8 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -2,6 +2,9 @@ ### New features since last release +* Support added for Python 3.12 wheel builds. + [(#541)](https://github.com/PennyLaneAI/pennylane-lightning/pull/541) + * Lightning-Qubit support arbitrary controlled gates (any wires and any control values). The kernels are implemented in the `LM` module. [(#576)](https://github.com/PennyLaneAI/pennylane-lightning/pull/576)