amazon-braket-sdk-python icon indicating copy to clipboard operation
amazon-braket-sdk-python copied to clipboard

feature: circuit binding observables to inputs & program set support for noise model

Open sesmart opened this issue 1 month ago • 1 comments

Issue #, if available:

Noise Model cannot process a ProgramSet. LocalSimulator has hard coded exceptions. Observables are particularly problematic with the noise model and CircuitBindings, as observables are not respected.

Description of changes:

  • Added CircuitBinding.bind_observables_to_inputs to cast observables to parameterized quantum circuits.
  • Removed LocalSimulator checking for supported noise -> moved this to NoiseModel
  • Updated NoiseModel accordingly with supported task specifications, and program set support via above function

Testing done:

Added tests to noise model, program set, and circuit binding.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

  • [X] I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • [X] I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

sesmart avatar Dec 08 '25 22:12 sesmart

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 100.00%. Comparing base (dd8ecdd) to head (cb017da). :warning: Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1178   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          162       162           
  Lines        10522     10560   +38     
  Branches      1312      1323   +11     
=========================================
+ Hits         10522     10560   +38     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Dec 08 '25 22:12 codecov[bot]