Skip to content

Commit

Permalink
fix: Correct comment
Browse files Browse the repository at this point in the history
  • Loading branch information
speller26 committed May 6, 2024
1 parent 2aec11c commit f28abb5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/braket/pennylane_plugin/braket_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ def operations(self) -> frozenset[str]:
@property
def observables(self) -> frozenset[str]:
base_observables = frozenset(super().observables - {"SProd", "Sum"})
# This needs to be here bc expectation(ax+by)== a*expectation(x)+b*expectation(y)
# is only true when shots=0
# Amazon Braket only supports coefficients and multiple terms when shots==0
if not self.shots:
return base_observables.union({"Hamiltonian", "LinearCombination"})
return base_observables
Expand Down

0 comments on commit f28abb5

Please sign in to comment.