Skip to content

feature: make noise lookup control-aware - #1356

Open
danielgaskins wants to merge 2 commits into
amazon-braket:mainfrom
danielgaskins:feature/control-aware-noise
Open

danielgaskins wants to merge 2 commits into
amazon-braket:mainfrom
danielgaskins:feature/control-aware-noise

Conversation

@danielgaskins

@danielgaskins danielgaskins commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Issue #: Closes #1336

Description of changes:
NoiseModel.apply(..., control_aware=True) now matches controlled X, Y, Z, V, Swap, and CNot instructions against their equivalent named gates when applying noise. A controlled Z receives the same two-qubit noise as CZ. The original gate instruction stays intact, and calls without the new option behave as before. Gates without a named equivalent retain their existing matching behavior. The API docstring describes the option.

Tests also cover controlled H and three-control X, which must keep their original gate and target matching.

Testing done:

  • Full SDK unit suite: 3,504 passed, 131 expected failures
  • Full SDK line and branch coverage: 100%
  • Noise and emulator suites: 379 passed, 11 expected failures
  • Ruff source and repository formatting checks pass
  • No AWS account or region was used

@danielgaskins
danielgaskins requested a review from a team as a code owner September 25, 2026 17:03
@codecov

codecov Bot commented Oct 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.98%. Comparing base (428fefa) to head (38d3ea6).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/braket/circuits/noise_model/noise_model.py 88.23% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              main    #1356      +/-   ##
===========================================
- Coverage   100.00%   99.98%   -0.02%     
===========================================
  Files          171      171              
  Lines        11648    11658      +10     
  Branches      1538     1540       +2     
===========================================
+ Hits         11648    11656       +8     
- Misses           0        1       +1     
- Partials         0        1       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

control-aware noise model application

1 participant