Skip to content

Commit

Permalink
fix: check the qubit set length against observables (#970)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbeCoull authored May 8, 2024
1 parent b791858 commit 6c4282e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/braket/circuits/result_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def __init__(
"target length is equal to the observable term's qubits count."
)
self._target = [QubitSet(term_target) for term_target in target]
for term_target, obs in zip(target, observable.summands):
for term_target, obs in zip(self._target, observable.summands):
if obs.qubit_count != len(term_target):
raise ValueError(
"Sum observable's target shape must be a nested list where each term's "
Expand Down

0 comments on commit 6c4282e

Please sign in to comment.