Skip to content

Commit

Permalink
do not use measurementprocess.name (#605)
Browse files Browse the repository at this point in the history
* do not use measurementprocess.name

* Auto update version

* Trigger CI

* Update pennylane_lightning/lightning_qubit/lightning_qubit.py

---------

Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com>
Co-authored-by: AmintorDusko <[email protected]>
  • Loading branch information
3 people authored Feb 1, 2024
1 parent cfe2455 commit f3beabc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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.35.0-dev10"
__version__ = "0.35.0-dev11"
2 changes: 1 addition & 1 deletion pennylane_lightning/lightning_qubit/lightning_qubit.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ def probability_lightning(self, wires):
# pylint: disable=attribute-defined-outside-init
def sample(self, observable, shot_range=None, bin_size=None, counts=False):
"""Return samples of an observable."""
if observable.name != "PauliZ":
if not isinstance(observable, qml.PauliZ):
self.apply_lightning(observable.diagonalizing_gates())
self._samples = self.generate_samples()
return super().sample(
Expand Down

0 comments on commit f3beabc

Please sign in to comment.