fix: treat scalar observables as one observable - #1343
Merged
speller26 merged 2 commits intoAug 29, 2026
Merged
Conversation
Signed-off-by: Daniel Gaskins <danielgaskins99@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1343 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 171 171
Lines 11590 11594 +4
Branches 1517 1518 +1
=========================================
+ Hits 11590 11594 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
speller26
approved these changes
Aug 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Closes #1341
Description of changes:
CircuitBindingnow accepts a singleObservable,PauliString, or Pauli word string and treats it as one observable. This keeps multi-qubit Pauli words intact and preserves signed Pauli strings.ProgramSet.product()accepts the same scalar inputs.ProgramSet.zip()is unchanged because its observables are matched positionally to circuits.Testing done:
pytest -n 0 -q test/unit_tests/braket/program_setsruff format --check src/braket/program_sets/circuit_binding.py src/braket/program_sets/program_set.py test/unit_tests/braket/program_sets/test_circuit_binding.py test/unit_tests/braket/program_sets/test_program_set.pyruff check srcmypyMerge Checklist
General
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.