Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix undo_swaps and split_non_commuting #5081

Merged
merged 5 commits into from
Jan 19, 2024
Merged

fix undo_swaps and split_non_commuting #5081

merged 5 commits into from
Jan 19, 2024

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Jan 18, 2024

When exploring in PR #5058, I found bugs in undo_swaps and split_non_commuting.

[sc-54373]
[sc-54374]

Undo swaps had a fragile way of mapping wires, as it was created before we had Operator.map_wires. Now it works with more general operations.

split_non_commuting was not passing the shots along. This was a silent issue on the old device interface, but would be causing problems if it was ever used with the new device interface.

Copy link

codecov bot commented Jan 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8a43135) 99.68% compared to head (ecbd413) 99.68%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5081      +/-   ##
==========================================
- Coverage   99.68%   99.68%   -0.01%     
==========================================
  Files         394      394              
  Lines       35733    35452     -281     
==========================================
- Hits        35622    35340     -282     
- Misses        111      112       +1     

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

@albi3ro albi3ro requested a review from a team January 18, 2024 20:17
Copy link
Contributor

@timmysilv timmysilv left a comment

Choose a reason for hiding this comment

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

🎉

Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
Copy link
Contributor

@lillian542 lillian542 left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@albi3ro albi3ro enabled auto-merge (squash) January 19, 2024 20:46
@albi3ro albi3ro merged commit c0ce3ce into master Jan 19, 2024
35 checks passed
@albi3ro albi3ro deleted the transform-fixes branch January 19, 2024 21:16
mudit2812 pushed a commit that referenced this pull request Jan 19, 2024
When exploring in PR #5058, I found bugs in `undo_swaps` and
`split_non_commuting`.

[sc-54373]
[sc-54374]

Undo swaps had a fragile way of mapping wires, as it was created before
we had `Operator.map_wires`. Now it works with more general operations.

`split_non_commuting` was not passing the shots along. This was a silent
issue on the old device interface, but would be causing problems if it
was ever used with the new device interface.

---------

Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
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.

4 participants