Skip to content
This repository has been archived by the owner on Oct 27, 2023. It is now read-only.

Ensure active return check doesn't break CI #80

Merged
merged 4 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@

### Bug fixes

* Fix `applyMultiQubitOp`'s functor which had a bug causing incorrect gate application with parallel Kokkos backends.
[(#75)](https://github.com/PennyLaneAI/pennylane-lightning-kokkos/pull/75)
* Ensure active return check doesn't break CI.
[(#80)](https://github.com/PennyLaneAI/pennylane-lightning-kokkos/pull/80)

* `apply` no longer mutates the inputted list of operations.
[(#78)](https://github.com/PennyLaneAI/pennylane-lightning-kokkos/pull/78)

* Fix `applyMultiQubitOp`'s functor which had a bug causing incorrect gate application with parallel Kokkos backends.
[(#75)](https://github.com/PennyLaneAI/pennylane-lightning-kokkos/pull/75)

### Contributors

This release contains contributions from (in alphabetical order):
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tests_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ jobs:

- name: Install Latest PennyLane
if: inputs.pennylane-version == 'latest'
run: python -m pip install git+https://github.com/PennyLaneAI/pennylane.git@master
run: |
python -m pip install --index-url https://test.pypi.org/simple/ pennylane-lightning --pre --force-reinstall --no-deps
vincentmr marked this conversation as resolved.
Show resolved Hide resolved
python -m pip install git+https://github.com/PennyLaneAI/pennylane.git@master

- name: Build and run unit tests
env:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tests_linux_x86_nvidia_gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ jobs:

- name: Install Latest PennyLane
if: inputs.pennylane-version == 'latest'
run: python -m pip install git+https://github.com/PennyLaneAI/pennylane.git@master
run: |
python -m pip install --index-url https://test.pypi.org/simple/ pennylane-lightning --pre --force-reinstall --no-deps
python -m pip install git+https://github.com/PennyLaneAI/pennylane.git@master

- name: Build and run unit tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-mock flaky
python -m pip install git+https://github.com/PennyLaneAI/pennylane.git@master
python -m pip install --index-url https://test.pypi.org/simple/ pennylane-lightning --pre --force-reinstall --no-deps
python -m pip install git+https://github.com/PennyLaneAI/pennylane.git@master

- name: Install ML libraries for interfaces
run: |
Expand Down
5 changes: 3 additions & 2 deletions pennylane_lightning_kokkos/lightning_kokkos.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

import numpy as np
from pennylane import (
active_return,
BasisState,
DeviceError,
Hermitian,
Expand Down Expand Up @@ -683,7 +682,9 @@ def adjoint_jacobian(self, tape, starting_state=None, use_device_state=False, **
jac = jac.reshape(-1, len(tp_shift))
jac_r = np.zeros((jac.shape[0], all_params))
jac_r[:, record_tp_rows] = jac
return self._adjoint_jacobian_processing(jac_r) if active_return() else jac_r
if hasattr(qml, "active_return"):
return self._adjoint_jacobian_processing(jac_r) if qml.active_return() else jac_r
return self._adjoint_jacobian_processing(jac_r)

def vjp(self, measurements, dy, starting_state=None, use_device_state=False):
"""Generate the processing function required to compute the vector-Jacobian products of a tape."""
Expand Down
Loading