fix circuit routing failure for directed device graph#7889
Merged
pavoljuhas merged 6 commits intoquantumlib:mainfrom Mar 4, 2026
Merged
fix circuit routing failure for directed device graph#7889pavoljuhas merged 6 commits intoquantumlib:mainfrom
pavoljuhas merged 6 commits intoquantumlib:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7889 +/- ##
=======================================
Coverage 99.62% 99.62%
=======================================
Files 1106 1106
Lines 99421 99484 +63
=======================================
+ Hits 99046 99109 +63
Misses 375 375 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@pavoljuhas - The routing algorithm used directed distance calculations for undirected swap operations, causing the bug in first place |
Contributor
Author
|
@pavoljuhas - Gentle reminder to review . Thank you |
Instead of adding new MappingManager methods `dist_on_device_undirected`, `shortest_path_undirected`, just add an extra `undirected` flag to `dist_on_device`, `shortest_path`.
Also ensure the routed circuit has the same unitary and verify the expected count of added gates.
pavoljuhas
approved these changes
Mar 4, 2026
Collaborator
pavoljuhas
left a comment
There was a problem hiding this comment.
LGTM after pushing some clean ups - mainly replacing new
something_undirected methods with an optional undirected flag.
Contributor
Author
|
thanks for the review @pavoljuhas . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Treat graph edges as undirected when placing routing SWAPs.
Also extend MappingManager methods
dist_on_deviceandshortest_pathwith an optionalundirectedflag.Fixes #7885