Skip to content

feat: Kraus implementation for density matrix MCM#382

Open
speller26 wants to merge 1 commit into
mainfrom
mcm-kraus
Open

feat: Kraus implementation for density matrix MCM#382
speller26 wants to merge 1 commit into
mainfrom
mcm-kraus

Conversation

@speller26

Copy link
Copy Markdown
Member

Uses Kraus formalism to implement mid-circuit measurements in braket_dm; this allows shots=0 simulation of dynamic circuits.

As well, instead of rerunning a simulation for each branch, this implementation merges intermediate ensembles during the course of a simulation. This takes more space than the branching algorithm, but the intermediate merging prevents the full exponential space explosion from branching.

Issue #, if available:
#368

Description of changes:

Testing done:

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

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • 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.

Uses Kraus formalism to implement mid-circuit measurements in `braket_dm`; this allows `shots=0` simulation of dynamic circuits.

As well, instead of rerunning a simulation for each branch, this implementation merges intermediate ensembles during the course of a simulation. This takes more space than the branching algorithm, but the intermediate merging prevents the full exponential space explosion from branching.
@speller26 speller26 requested a review from a team as a code owner June 8, 2026 05:19
@speller26 speller26 linked an issue Jun 8, 2026 that may be closed by this pull request
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##              main      #382    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           49        50     +1     
  Lines         4919      5161   +242     
  Branches       569       603    +34     
==========================================
+ Hits          4919      5161   +242     

☔ 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Kraus formalism for dynamic circuits on braket_dm

1 participant