Skip to content

fix: support single circuits with noise in run_batch - #1338

Open
danielgaskins wants to merge 2 commits into
amazon-braket:mainfrom
danielgaskins:fix/single-noisy-local-batch
Open

fix: support single circuits with noise in run_batch#1338
danielgaskins wants to merge 2 commits into
amazon-braket:mainfrom
danielgaskins:fix/single-noisy-local-batch

Conversation

@danielgaskins

Copy link
Copy Markdown

Issue #, if available:

Fixes #1337

Description of changes:

Detect a single task specification before applying the configured noise model. Apply the noise model once for a single circuit while preserving the existing behavior for a list of circuits.

Add a regression test that verifies a single circuit is accepted, receives the noise instructions, and produces one result.

Testing done:

  • python -m pytest -o addopts="" -q test/unit_tests
  • ruff check src
  • ruff format --check .

Merge Checklist

General

  • I have read the CONTRIBUTING doc
  • I used the PR title format described in CONTRIBUTING
  • I have updated any necessary documentation, including READMEs and API docs, if appropriate

Tests

  • I have added tests that prove my fix is effective
  • I have checked that my tests are not configured for a specific region or account

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

@danielgaskins
danielgaskins requested a review from a team as a code owner August 18, 2026 17:35
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ba93960) to head (bbf2128).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1338   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          171       171           
  Lines        11577     11578    +1     
  Branches      1517      1517           
=========================================
+ Hits         11577     11578    +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.

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.

LocalSimulator.run_batch() fails for a single circuit when a noise model is configured

1 participant