From a55a58e5908550f3c31954a560ea080af04a9d7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Alfredo=20Nu=C3=B1ez=20Meneses?= Date: Fri, 25 Oct 2024 09:11:32 -0600 Subject: [PATCH] Fix PTM stable latest (#961) ### Before submitting Please complete the following checklist when submitting a PR: - [ ] All new features must include a unit test. If you've fixed a bug or added code that should be tested, add a test to the [`tests`](../tests) directory! - [ ] All new functions and code must be clearly commented and documented. If you do make documentation changes, make sure that the docs build and render correctly by running `make docs`. - [ ] Ensure that the test suite passes, by running `make test`. - [ ] Add a new entry to the `.github/CHANGELOG.md` file, summarizing the change, and including a link back to the PR. - [ ] Ensure that code is properly formatted by running `make format`. When all the above are checked, delete everything above the dashed line and fill in the pull request template. ------------------------------------------------------------------------------------------------------------ **Context:** The PTM has an unexpected behaviour for Stable Lightnin - Latest PennyLane because on CIs looks like Latest PL reference to the last release instead of to `master` **Description of the Change:** **Benefits:** Correct behavior for the PTM **Possible Drawbacks:** **Related GitHub Issues:** [sc-76772] --------- Co-authored-by: ringo-but-quantum --- .github/CHANGELOG.md | 3 +++ .github/workflows/tests_gpu_python.yml | 11 +++++++++-- .github/workflows/tests_lgpumpi_python.yml | 11 +++++++++-- .github/workflows/tests_lkcpu_python.yml | 11 +++++++++-- .github/workflows/tests_lkcuda_python.yml | 11 +++++++++-- .github/workflows/tests_lqcpu_python.yml | 11 +++++++++-- .github/workflows/tests_without_binary.yml | 11 +++++++++-- pennylane_lightning/core/_version.py | 2 +- 8 files changed, 58 insertions(+), 13 deletions(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 05edc385c6..60bb1c67e2 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -46,6 +46,9 @@ ### Improvements +* Fix PTM stable-latest. + [(#961)](https://github.com/PennyLaneAI/pennylane-lightning/pull/961) + * Update `README.rst` installation instructions for `lightning.gpu` and `lightning.tensor`. [(#957)](https://github.com/PennyLaneAI/pennylane-lightning/pull/957) diff --git a/.github/workflows/tests_gpu_python.yml b/.github/workflows/tests_gpu_python.yml index 37a9ca95d6..241b0726e9 100644 --- a/.github/workflows/tests_gpu_python.yml +++ b/.github/workflows/tests_gpu_python.yml @@ -150,13 +150,20 @@ jobs: run: | python -m pip install cutensornet-cu${{ matrix.cuda_version }} - - name: Checkout PennyLane for release build - if: inputs.pennylane-version == 'release' + - name: Checkout PennyLane for release or latest build + if: inputs.pennylane-version == 'release' || inputs.pennylane-version == 'latest' uses: actions/checkout@v4 with: path: pennylane repository: PennyLaneAI/pennylane + - name: Switch to latest build of PennyLane + if: inputs.pennylane-version == 'latest' + run: | + cd pennylane + git checkout master + python -m pip uninstall -y pennylane && python -m pip install . -vv --no-deps + - name: Switch to release build of PennyLane if: inputs.pennylane-version == 'release' run: | diff --git a/.github/workflows/tests_lgpumpi_python.yml b/.github/workflows/tests_lgpumpi_python.yml index 79c2f3ea48..fa195d397e 100644 --- a/.github/workflows/tests_lgpumpi_python.yml +++ b/.github/workflows/tests_lgpumpi_python.yml @@ -120,13 +120,20 @@ jobs: python scripts/configure_pyproject_toml.py || true python -m pip install . -vv - - name: Checkout PennyLane for release build - if: inputs.pennylane-version == 'release' + - name: Checkout PennyLane for release or latest build + if: inputs.pennylane-version == 'release' || inputs.pennylane-version == 'latest' uses: actions/checkout@v4 with: path: pennylane repository: PennyLaneAI/pennylane + - name: Switch to latest build of PennyLane + if: inputs.pennylane-version == 'latest' + run: | + cd pennylane + git checkout master + python -m pip uninstall -y pennylane && python -m pip install . -vv --no-deps + - name: Switch to release build of PennyLane if: inputs.pennylane-version == 'release' run: | diff --git a/.github/workflows/tests_lkcpu_python.yml b/.github/workflows/tests_lkcpu_python.yml index 99a858ada3..b211ac527d 100644 --- a/.github/workflows/tests_lkcpu_python.yml +++ b/.github/workflows/tests_lkcpu_python.yml @@ -214,13 +214,20 @@ jobs: fi python -m pip install ${{ github.workspace }}/$WHEEL_NAME --no-deps - - name: Checkout PennyLane for release build - if: inputs.pennylane-version == 'release' + - name: Checkout PennyLane for release or latest build + if: inputs.pennylane-version == 'release' || inputs.pennylane-version == 'latest' uses: actions/checkout@v4 with: path: pennylane repository: PennyLaneAI/pennylane + - name: Switch to latest build of PennyLane + if: inputs.pennylane-version == 'latest' + run: | + cd pennylane + git checkout master + python -m pip uninstall -y pennylane && python -m pip install . -vv --no-deps + - name: Switch to release build of PennyLane if: inputs.pennylane-version == 'release' run: | diff --git a/.github/workflows/tests_lkcuda_python.yml b/.github/workflows/tests_lkcuda_python.yml index 20b50042d4..a018cc1453 100644 --- a/.github/workflows/tests_lkcuda_python.yml +++ b/.github/workflows/tests_lkcuda_python.yml @@ -213,13 +213,20 @@ jobs: python -m pip install -r requirements-dev.txt python -m pip install openfermionpyscf - - name: Checkout PennyLane for release build - if: inputs.pennylane-version == 'release' + - name: Checkout PennyLane for release or latest build + if: inputs.pennylane-version == 'release' || inputs.pennylane-version == 'latest' uses: actions/checkout@v4 with: path: pennylane repository: PennyLaneAI/pennylane + - name: Switch to latest build of PennyLane + if: inputs.pennylane-version == 'latest' + run: | + cd pennylane + git checkout master + python -m pip uninstall -y pennylane && python -m pip install . -vv --no-deps + - name: Switch to release build of PennyLane if: inputs.pennylane-version == 'release' run: | diff --git a/.github/workflows/tests_lqcpu_python.yml b/.github/workflows/tests_lqcpu_python.yml index a65d9b4d69..2284831ec4 100644 --- a/.github/workflows/tests_lqcpu_python.yml +++ b/.github/workflows/tests_lqcpu_python.yml @@ -161,13 +161,20 @@ jobs: python -m pip install semantic-version python -m pip install ${{ github.workspace }}/$WHEEL_NAME --no-deps --force-reinstall - - name: Checkout PennyLane for release build - if: inputs.pennylane-version == 'release' + - name: Checkout PennyLane for release or latest build + if: inputs.pennylane-version == 'release' || inputs.pennylane-version == 'latest' uses: actions/checkout@v4 with: path: pennylane repository: PennyLaneAI/pennylane + - name: Switch to latest build of PennyLane + if: inputs.pennylane-version == 'latest' + run: | + cd pennylane + git checkout master + python -m pip uninstall -y pennylane && python -m pip install . -vv --no-deps + - name: Switch to release build of PennyLane if: inputs.pennylane-version == 'release' run: | diff --git a/.github/workflows/tests_without_binary.yml b/.github/workflows/tests_without_binary.yml index b69ba2d69f..ac484d940d 100644 --- a/.github/workflows/tests_without_binary.yml +++ b/.github/workflows/tests_without_binary.yml @@ -84,13 +84,20 @@ jobs: rm -fr $(python -m pip cache dir)/selfcheck/ python -m pip install -r requirements-dev.txt - - name: Checkout PennyLane for release build - if: inputs.pennylane-version == 'release' + - name: Checkout PennyLane for release or latest build + if: inputs.pennylane-version == 'release' || inputs.pennylane-version == 'latest' uses: actions/checkout@v4 with: path: pennylane repository: PennyLaneAI/pennylane + - name: Switch to latest build of PennyLane + if: inputs.pennylane-version == 'latest' + run: | + cd pennylane + git checkout master + python -m pip uninstall -y pennylane && python -m pip install . -vv --no-deps + - name: Switch to release build of PennyLane if: inputs.pennylane-version == 'release' run: | diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index eba0279f93..a9b42bc9f7 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.39.0-dev49" +__version__ = "0.39.0-dev50"