Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
astralcai committed Sep 17, 2024
1 parent 9789d8b commit ec212af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pennylane/devices/qubit/measure.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def get_measurement_function(
# always use sum_of_terms_method for Sum observables in backprop mode
return sum_of_terms_method

if not all(obs.has_sparse_matrix() for _, obs in measurementprocess.obs.terms()):
if not all(obs.has_sparse_matrix for obs in measurementprocess.obs):
return sum_of_terms_method

if (
Expand Down

0 comments on commit ec212af

Please sign in to comment.