Skip to content

Commit

Permalink
Bump PennyLane and Lightning minimum versions (#1269)
Browse files Browse the repository at this point in the history
Following the [release guidance
docs](https://github.com/PennyLaneAI/guidance-docs/blob/master/development/catalyst-release.md#prepare-bump-pennylane-and-lightning-minimum-versions-pr),
bump the PennyLane and Lightning minimum versions in preparation for the
Catalyst 0.9.0 release. These changes ensure we can build the wheels
after the Lightning release and before the core PennyLane release.
  • Loading branch information
joeycarter authored Nov 5, 2024
1 parent 01c6fa8 commit d809155
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .dep-versions
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ enzyme=v0.0.149

# For a custom PL version, update the package version here and at
# 'doc/requirements.txt
pennylane=0.39.0.dev30

# For a custom LQ/LK version, update the package version here and at
# 'doc/requirements.txt'. Also, update the 'LIGHTNING_GIT_TAG' at
# 'runtime/Makefile' and at all GitHub workflows, using the exact
# commit hash corresponding to the merged PR that implements the
# desired feature.
lightning=0.39.0-dev38
7 changes: 6 additions & 1 deletion .github/workflows/build-wheel-linux-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ jobs:
-DPYTHON_EXECUTABLE=$(which python${{ matrix.python_version }}) \
-Dpybind11_DIR=$(python${{ matrix.python_version }} -c "import pybind11; print(pybind11.get_cmake_dir())") \
-DENABLE_LAPACK=OFF \
-DLIGHTNING_GIT_TAG=6f3e0d5d371ff9823a3177dd2c66052668883d42 \
-DLIGHTNING_GIT_TAG=latest_release \
-DENABLE_WARNINGS=OFF \
-DENABLE_OPENQASM=ON \
-DENABLE_OPENMP=OFF \
Expand Down Expand Up @@ -445,6 +445,11 @@ jobs:
- name: Install Catalyst
run: |
# TODO: --- remove workaround before merging to main ----------------- #
pip install pennylane-lightning==0.39.0
pip install pennylane-lightning-kokkos==0.39.0
pip install git+https://github.com/PennyLaneAI/pennylane@v0.39.0-rc0
# -------------------------------------------------------------------- #
python${{ matrix.python_version }} -m pip install dist/*.whl --extra-index-url https://test.pypi.org/simple
- name: Run Python Pytest Tests
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/build-wheel-macos-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ jobs:
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$GITHUB_WORKSPACE/runtime-build/lib \
-DPYTHON_EXECUTABLE=$(which python${{ matrix.python_version }}) \
-Dpybind11_DIR=$(python${{ matrix.python_version }} -c "import pybind11; print(pybind11.get_cmake_dir())") \
-DLIGHTNING_GIT_TAG=6f3e0d5d371ff9823a3177dd2c66052668883d42\
-DLIGHTNING_GIT_TAG=latest_release \
-DENABLE_LAPACK=OFF \
-DENABLE_WARNINGS=OFF \
-DENABLE_OPENQASM=ON \
Expand Down Expand Up @@ -412,6 +412,11 @@ jobs:
- name: Install Catalyst
run: |
# TODO: --- remove workaround before merging to main ----------------- #
pip install pennylane-lightning==0.39.0
pip install pennylane-lightning-kokkos==0.39.0
pip install git+https://github.com/PennyLaneAI/pennylane@v0.39.0-rc0
# -------------------------------------------------------------------- #
python${{ matrix.python_version }} -m pip install dist/*.whl --extra-index-url https://test.pypi.org/simple
- name: Run Python Pytest Tests
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/build-wheel-macos-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ jobs:
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$GITHUB_WORKSPACE/runtime-build/lib \
-DPYTHON_EXECUTABLE=$(which python${{ matrix.python_version }}) \
-Dpybind11_DIR=$(python${{ matrix.python_version }} -c "import pybind11; print(pybind11.get_cmake_dir())") \
-DLIGHTNING_GIT_TAG=6f3e0d5d371ff9823a3177dd2c66052668883d42 \
-DLIGHTNING_GIT_TAG=latest_release \
-DENABLE_LAPACK=OFF \
-DENABLE_WARNINGS=OFF \
-DENABLE_OPENQASM=ON \
Expand Down Expand Up @@ -400,6 +400,11 @@ jobs:
- name: Install Catalyst
run: |
# TODO: --- remove workaround before merging to main ----------------- #
pip install pennylane-lightning==0.39.0
pip install pennylane-lightning-kokkos==0.39.0
pip install git+https://github.com/PennyLaneAI/pennylane@v0.39.0-rc0
# -------------------------------------------------------------------- #
python${{ matrix.python_version }} -m pip install dist/*.whl --extra-index-url https://test.pypi.org/simple
- name: Run Python Pytest Tests
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/check-catalyst.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,11 @@ jobs:
# macOS requirements.txt
python3 -m pip install cuda-quantum==0.6.0
python3 -m pip install oqc-qcaas-client
# TODO: --- remove workaround before merging to main ----------------- #
pip install pennylane-lightning==0.39.0
pip install pennylane-lightning-kokkos==0.39.0
pip install git+https://github.com/PennyLaneAI/pennylane@v0.39.0-rc0
# -------------------------------------------------------------------- #
make frontend
- name: Get Cached LLVM Build
Expand Down Expand Up @@ -484,6 +489,11 @@ jobs:
sudo apt-get install -y python3 python3-pip libomp-dev libasan6 make
python3 --version | grep ${{ needs.constants.outputs.primary_python_version }}
python3 -m pip install -r requirements.txt
# TODO: --- remove workaround before merging to main ----------------- #
pip install pennylane-lightning==0.39.0
pip install pennylane-lightning-kokkos==0.39.0
pip install git+https://github.com/PennyLaneAI/pennylane@v0.39.0-rc0
# -------------------------------------------------------------------- #
make frontend
- name: Get Cached LLVM Build
Expand Down Expand Up @@ -539,6 +549,11 @@ jobs:
sudo apt-get install -y python3 python3-pip libomp-dev libasan6 make
python3 --version | grep ${{ needs.constants.outputs.primary_python_version }}
python3 -m pip install -r requirements.txt
# TODO: --- remove workaround before merging to main ----------------- #
pip install pennylane-lightning==0.39.0
pip install pennylane-lightning-kokkos==0.39.0
pip install git+https://github.com/PennyLaneAI/pennylane@v0.39.0-rc0
# -------------------------------------------------------------------- #
make frontend
- name: Get Cached LLVM Build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ cmake -S runtime -B runtime-build -G Ninja \
-DPYTHON_INCLUDE_DIR=/opt/_internal/cpython-${PYTHON_VERSION}.${PYTHON_SUBVERSION}/include/python${PYTHON_VERSION} \
-DPYTHON_LIBRARY=/opt/_internal/cpython-${PYTHON_VERSION}.${PYTHON_SUBVERSION}/lib \
-Dpybind11_DIR=/opt/_internal/cpython-${PYTHON_VERSION}.${PYTHON_SUBVERSION}/lib/python${PYTHON_VERSION}/site-packages/pybind11/share/cmake/pybind11 \
-DLIGHTNING_GIT_TAG=6f3e0d5d371ff9823a3177dd2c66052668883d42 \
-DLIGHTNING_GIT_TAG=latest_release \
-DENABLE_LAPACK=OFF \
-DENABLE_WARNINGS=OFF \
-DENABLE_OPENQASM=ON \
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/scripts/linux_arm64/rh8/test_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ export PATH=/catalyst/llvm-build/bin:/opt/_internal/cpython-${PYTHON_MAJOR_MINOR
/usr/bin/python3 -m pip install pennylane pybind11 PyYAML cmake ninja pytest pytest-xdist pytest-mock autoray PennyLane-Lightning-Kokkos 'amazon-braket-pennylane-plugin>1.27.1'
/usr/bin/python3 -m pip install oqc-qcaas-client

# TODO: --- remove workaround before merging to main ----------------- #
pip install pennylane-lightning==0.39.0
pip install pennylane-lightning-kokkos==0.39.0
pip install git+https://github.com/PennyLaneAI/pennylane@v0.39.0-rc0
# -------------------------------------------------------------------- #

# Install Catalyst wheel
/usr/bin/python3 -m pip install /catalyst/dist/*.whl --extra-index-url https://test.pypi.org/simple

Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ frontend:
@echo "install Catalyst Frontend"
# Uninstall pennylane before updating Catalyst, since pip will not replace two development
# versions of a package with the same version tag (e.g. 0.38-dev0).
$(PYTHON) -m pip uninstall -y pennylane
# TODO: --- enable the following line before merging to main ------------- #
# $(PYTHON) -m pip uninstall -y pennylane
# ------------------------------------------------------------------------ #
$(PYTHON) -m pip install -e . --extra-index-url https://test.pypi.org/simple
rm -r frontend/PennyLane_Catalyst.egg-info

Expand Down
6 changes: 3 additions & 3 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ lxml_html_clean

# Pre-install PL development wheels
--extra-index-url https://test.pypi.org/simple/
pennylane-lightning-kokkos==0.39.0-dev38
pennylane-lightning==0.39.0-dev38
pennylane==0.39.0.dev30
pennylane-lightning-kokkos==0.39.0
pennylane-lightning==0.39.0
pennylane @ git+https://github.com/pennylaneAI/pennylane@v0.39.0-rc0
2 changes: 1 addition & 1 deletion runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ENABLE_WARNINGS?=ON
ENABLE_LIGHTNING?=ON
ENABLE_OPENQASM?=ON
ENABLE_ASAN?=OFF
LIGHTNING_GIT_TAG_VALUE?=6f3e0d5d371ff9823a3177dd2c66052668883d42
LIGHTNING_GIT_TAG_VALUE?=latest_release
ENABLE_LAPACK?=OFF

BUILD_TARGETS := rt_capi rtd_null_qubit
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
pl_version = next((line[10:].strip() for line in lines if "pennylane=" in line), None)
lq_version = next((line[10:].strip() for line in lines if "lightning=" in line), None)

pl_min_release = 0.38
pl_min_release = 0.39
lq_min_release = pl_min_release

if pl_version is not None:
Expand Down

0 comments on commit d809155

Please sign in to comment.