Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Conditional.then_op usage to Conditional.base #752

Merged
merged 4 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@

### Bug fixes

* `lightning.qubit` and `lightning.kokkos` use `qml.ops.Conditional.base` instead of `qml.ops.Conditional.then_op`.
[(#752)](https://github.com/PennyLaneAI/pennylane-lightning/pull/752)

mudit2812 marked this conversation as resolved.
Show resolved Hide resolved
* Fix AVX streaming operation support with newer GCC.
[(#729)](https://github.com/PennyLaneAI/pennylane-lightning/pull/729)

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.37.0-dev27"
__version__ = "0.37.0-dev28"
2 changes: 1 addition & 1 deletion pennylane_lightning/lightning_kokkos/lightning_kokkos.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def apply_lightning(self, operations, mid_measurements=None, postselect_mode=Non

if isinstance(ops, Conditional):
if ops.meas_val.concretize(mid_measurements):
self.apply_lightning([ops.then_op])
self.apply_lightning([ops.base])
elif isinstance(ops, MidMeasureMP):
self._apply_lightning_midmeasure(ops, mid_measurements, postselect_mode)
elif isinstance(ops, qml.ops.op_math.Controlled) and isinstance(
Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/lightning_qubit/_state_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def _apply_lightning(

if isinstance(operation, Conditional):
if operation.meas_val.concretize(mid_measurements):
self._apply_lightning([operation.then_op])
self._apply_lightning([operation.base])
elif isinstance(operation, MidMeasureMP):
self._apply_lightning_midmeasure(
operation, mid_measurements, postselect_mode=postselect_mode
Expand Down
Loading