Skip to content

Commit

Permalink
Bump PennyLane and Lightning minimum versions (#1089)
Browse files Browse the repository at this point in the history
**Context:** Merge only after Lightning has been released!

---------

Co-authored-by: Romain Moyard <[email protected]>
  • Loading branch information
rauletorresc and rmoyard authored Sep 3, 2024
1 parent af1bd8d commit 2cb2fc8
Show file tree
Hide file tree
Showing 13 changed files with 44 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.130

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

# 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.38.0rc4
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=1536d88 \
-DLIGHTNING_GIT_TAG=latest_release \
-DENABLE_WARNINGS=OFF \
-DENABLE_OPENQASM=ON \
-DENABLE_OPENMP=OFF \
Expand Down Expand Up @@ -442,6 +442,11 @@ jobs:
- name: Install OQC client
run: |
python${{ matrix.python_version }} -m pip install oqc-qcaas-client
# TODO: remove workaround before merging to main
- name: Install PennyLane RC
run: |
pip install git+https://github.com/PennyLaneAI/[email protected]
- name: Install Catalyst
run: |
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=1536d88 \
-DLIGHTNING_GIT_TAG=latest_release \
-DENABLE_LAPACK=OFF \
-DENABLE_WARNINGS=OFF \
-DENABLE_OPENQASM=ON \
Expand Down Expand Up @@ -410,6 +410,11 @@ jobs:
run: |
python${{ matrix.python_version }} -m pip install oqc-qcaas-client
# TODO: remove workaround before merging to main
- name: Install PennyLane RC
run: |
pip install git+https://github.com/PennyLaneAI/[email protected]
- name: Install Catalyst
run: |
python${{ matrix.python_version }} -m pip install dist/*.whl --extra-index-url https://test.pypi.org/simple
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=1536d88 \
-DLIGHTNING_GIT_TAG=latest_release \
-DENABLE_LAPACK=OFF \
-DENABLE_WARNINGS=OFF \
-DENABLE_OPENQASM=ON \
Expand Down Expand Up @@ -398,6 +398,11 @@ jobs:
run: |
python${{ matrix.python_version }} -m pip install oqc-qcaas-client
# TODO: remove workaround before merging to main
- name: Install PennyLane RC
run: |
pip install git+https://github.com/PennyLaneAI/[email protected]
- name: Install Catalyst
run: |
python${{ matrix.python_version }} -m pip install dist/*.whl --extra-index-url https://test.pypi.org/simple
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/check-catalyst.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,10 @@ 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.38
pip install pennylane-lightning-kokkos==0.38
pip install git+https://github.com/PennyLaneAI/[email protected]
make frontend
- name: Get Cached LLVM Build
Expand Down Expand Up @@ -493,6 +497,10 @@ 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.38
pip install pennylane-lightning-kokkos==0.38
pip install git+https://github.com/PennyLaneAI/[email protected]
make frontend
- name: Get Cached LLVM Build
Expand Down Expand Up @@ -548,6 +556,9 @@ 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-kokkos==0.38
pip install git+https://github.com/PennyLaneAI/[email protected]
make frontend
- name: Get Cached LLVM Build
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/check-pl-compat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ jobs:
DIALECTS_BUILD_DIR="$(pwd)/quantum-build" \
ENABLE_LLD=ON \
make dialects
# TODO: remove workaround before merging to main
pip install pennylane-lightning==0.38
pip install pennylane-lightning-kokkos==0.38
pip install git+https://github.com/PennyLaneAI/[email protected]
make frontend
- name: Build Catalyst Runtime (latest)
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=1536d88 \
-DLIGHTNING_GIT_TAG=latest_release \
-DENABLE_LAPACK=OFF \
-DENABLE_WARNINGS=OFF \
-DENABLE_OPENQASM=ON \
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/scripts/linux_arm64/rh8/test_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export PATH=/catalyst/llvm-build/bin:/opt/_internal/cpython-${PYTHON_VERSION}.${
/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 git+https://github.com/PennyLaneAI/[email protected]

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

Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ catalyst: runtime dialects frontend
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.37-dev0).
$(PYTHON) -m pip uninstall -y pennylane
# versions of a package with the same version tag (e.g. 0.38-dev0).
# 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
2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ lxml_html_clean
--extra-index-url https://test.pypi.org/simple/
pennylane-lightning-kokkos==0.38.0rc4
pennylane-lightning==0.38.0rc4
pennylane==0.38.0.dev24
pennylane==0.39.0.dev6
2 changes: 1 addition & 1 deletion frontend/test/pytest/test_adjoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ def test_label(self):

base = qml.S(0) + qml.T(0)
op = adjoint(base)
assert op.label() == "(S+T)†"
assert op.label() == "𝓗†"

def test_adjoint_of_adjoint(self):
"""Test that the adjoint of an adjoint is the original operation."""
Expand Down
2 changes: 1 addition & 1 deletion runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ENABLE_LIGHTNING?=ON
ENABLE_LIGHTNING_KOKKOS?=ON
ENABLE_OPENQASM?=ON
ENABLE_ASAN?=OFF
LIGHTNING_GIT_TAG_VALUE?=1536d88
LIGHTNING_GIT_TAG_VALUE?=latest_release
ENABLE_LAPACK?=OFF

BUILD_TARGETS := rt_capi rtd_dummy
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.37
pl_min_release = 0.38
lq_min_release = pl_min_release

if pl_version is not None:
Expand Down

0 comments on commit 2cb2fc8

Please sign in to comment.