Skip to content

Commit

Permalink
Fix PTM stable latest related to the default.qubit.legacy (#966)
Browse files Browse the repository at this point in the history
### 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`.

- [X] 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 CIs on the PTM fail due to incompatibilities between deprecated
devices.

**Description of the Change:**

The PTM has an unexpected behaviour for Stable Lightnin - Latest
PennyLane because on CIs still using the device default.qubit.legacy.
The solution is patching tests following deprecation which will be
removed after v0.39.

**Benefits:**
No more errors in the PTM stable-latest regarding the
`default.qubit.legacy`

**Possible Drawbacks:**

**Related GitHub Issues:**
[sc-76902]

---------

Co-authored-by: ringo-but-quantum <[email protected]>
  • Loading branch information
LuisAlfredoNu and ringo-but-quantum authored Oct 28, 2024
1 parent a55a58e commit 5f70b06
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@

### Bug fixes

* Fix PTM stable latest related to `default.qubit.legacy`.
[(#966)](https://github.com/PennyLaneAI/pennylane-lightning/pull/966)

* Fix build failure for Lightning-Kokkos editable installation on MacOS due to `liblightning_kokkos_catalyst.so` copy.
[(#947)](https://github.com/PennyLaneAI/pennylane-lightning/pull/947)

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/tests_lgpumpi_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ jobs:
git checkout $(git branch -a --list "origin/v0.*rc*" | sort | tail -1)
python -m pip uninstall -y pennylane && python -m pip install . -vv --no-deps
- name: Patching tests following deprecation FIXME(remove after v0.39)
if: inputs.lightning-version == 'stable' && inputs.pennylane-version == 'latest'
run: |
pushd mpitests
grep -rl "default.qubit.legacy" . | xargs sed -i "s|default.qubit.legacy|default.qubit|g";
popd
- name: Build and install package
env:
CUQUANTUM_SDK: $(python -c "import site; print( f'{site.getsitepackages()[0]}/cuquantum')")
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/tests_lkcpu_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ jobs:
git log -1 --format='%H'
git status
- name: Patching tests following deprecation FIXME(remove after v0.39)
if: inputs.lightning-version == 'stable' && inputs.pennylane-version == 'latest'
run: |
pushd tests
grep -rl "default.qubit.legacy" . | xargs sed -i "s|default.qubit.legacy|default.qubit|g";
popd
- uses: actions/download-artifact@v4
with:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/tests_lkcuda_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,14 @@ jobs:
PL_BACKEND=${{ matrix.pl_backend }} CMAKE_ARGS="-DCMAKE_PREFIX_PATH=${{ github.workspace }}/Kokkos" \
python -m pip install . -vv
- name: Patching tests following deprecation FIXME(remove after v0.39)
if: inputs.lightning-version == 'stable' && inputs.pennylane-version == 'latest'
run: |
cd main/
pushd tests
grep -rl "default.qubit.legacy" . | xargs sed -i "s|default.qubit.legacy|default.qubit|g";
popd
- name: Run PennyLane-Lightning unit tests
if: ${{ matrix.pl_backend != 'all'}}
env:
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.39.0-dev50"
__version__ = "0.39.0-dev51"

0 comments on commit 5f70b06

Please sign in to comment.