Skip to content

Conversation

p51lee
Copy link
Contributor

@p51lee p51lee commented Sep 1, 2025

Control operations sharing the same control key could be assigned an earlier moment index, causing later measurements to appear before earlier controls.

This change updates ckey_indices to keep the maximum moment index seen so far, preventing reordering of classical controls and measurements.

Fixes #7622, fixes #7623

Control operations sharing the same control key could be assigned an
earlier moment index, causing later measurements to appear before
earlier controls.

This change updates `ckey_indices` to keep the maximum moment index seen
so far, preventing reordering of classical controls and measurements.

Fixes quantumlib#7622, quantumlib#7623
@p51lee p51lee requested review from a team and vtomole as code owners September 1, 2025 16:30
@p51lee p51lee requested a review from senecameeks September 1, 2025 16:30
@github-actions github-actions bot added the size: S 10< lines changed <50 label Sep 1, 2025
Copy link

codecov bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.56%. Comparing base (c334f75) to head (02ce65c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7626      +/-   ##
==========================================
- Coverage   99.56%   99.56%   -0.01%     
==========================================
  Files        1088     1088              
  Lines       96039    96048       +9     
==========================================
+ Hits        95623    95631       +8     
- Misses        416      417       +1     

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@daxfohl daxfohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. thanks for including the code comments!

@pavoljuhas pavoljuhas self-requested a review September 3, 2025 07:29
Copy link
Collaborator

@pavoljuhas pavoljuhas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for reporting and fixing!

PS: I have tweaked the test to compare with the expected circuit.

@pavoljuhas pavoljuhas enabled auto-merge September 6, 2025 00:29
@pavoljuhas pavoljuhas added this pull request to the merge queue Sep 6, 2025
Merged via the queue into quantumlib:main with commit c35ed72 Sep 6, 2025
33 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: S 10< lines changed <50

Projects

None yet

3 participants