Skip to content

Commit

Permalink
fix: check the qubit set length against observables
Browse files Browse the repository at this point in the history
  • Loading branch information
Coull committed May 7, 2024
1 parent 84c3bb7 commit eef5e04
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 eef5e04

Please sign in to comment.