diff --git a/src/braket/circuits/observables.py b/src/braket/circuits/observables.py index a9039ee4c..8249d156f 100644 --- a/src/braket/circuits/observables.py +++ b/src/braket/circuits/observables.py @@ -322,9 +322,9 @@ def __init__(self, observables: list[Observable]): f"{'@'.join([obs.ascii_symbols[0] for obs in unscaled_factors])}" ) all_targets = [factor.targets for factor in unscaled_factors] - if all(targets is None for targets in all_targets): - merged_targets = None - elif all(targets is not None for targets in all_targets): + if not any(all_targets): + merged_targets = QubitSet() + elif all(all_targets): flat_targets = [qubit for target in all_targets for qubit in target] merged_targets = QubitSet(flat_targets) if len(merged_targets) != len(flat_targets):