Skip to content

Commit

Permalink
Update src/braket/pennylane_plugin/translation.py
Browse files Browse the repository at this point in the history
Co-authored-by: Christina Lee <[email protected]>
  • Loading branch information
speller26 and albi3ro authored Oct 28, 2024
1 parent 5ca54ff commit 27bd6a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/braket/pennylane_plugin/translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ def translate_result_type( # noqa: C901
observable = measurement.obs

if return_type is ObservableReturnTypes.Probability:
if observable:
if observable and observable.diagonalizing_gates():
raise qml.DeviceError("Probability result type not supported for observables")
return Probability(targets)

Expand Down

0 comments on commit 27bd6a9

Please sign in to comment.