Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.12 wheel builds #541

Merged
merged 17 commits into from
Jan 3, 2024
Merged
2 changes: 1 addition & 1 deletion .github/workflows/set_wheel_build_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/wheel_linux_aarch64.yml
Original file line number Diff line number Diff line change
@@ -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.

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

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

Expand Down Expand Up @@ -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 }}

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

Expand Down Expand Up @@ -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 }}

Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/wheel_macos_arm64.yml
Original file line number Diff line number Diff line change
@@ -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.

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

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

Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
exec_model: [\"SERIAL\"]
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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/core/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
Version number (major.minor.patch[-label])
"""

__version__ = "0.34.0-dev25"
__version__ = "0.34.0-dev26"
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,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",
]
Expand Down