-
Notifications
You must be signed in to change notification settings - Fork 677
Support for weighted gates in graph decomposition algorithm #7389
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
Merged
comp-phys-marc
merged 117 commits into
master
from
feature/wghtd-gts-based-on-symblc-rls
May 21, 2025
Merged
Support for weighted gates in graph decomposition algorithm #7389
comp-phys-marc
merged 117 commits into
master
from
feature/wghtd-gts-based-on-symblc-rls
May 21, 2025
Conversation
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
…o symbolic-rules-01
…o symbolic-rules-01
Co-authored-by: Pietropaolo Frisoni <[email protected]>
…o symbolic-rules-01
…o symbolic-rules-01
…o symbolic-rules-01
- TODO: tests, debug
- Switch to use TypeError instead of custom error - always guarantee we have weights - stringify keys of weights dict - correct logic for edge weight calculation - closing this PR and switching to new one (#7389) which is off of symbolic-rules-01
astralcai
reviewed
May 7, 2025
…o symbolic-rules-01
PietropaoloFrisoni
approved these changes
May 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
…o symbolic-rules-01
…o conditional-decomp
Co-authored-by: Pietropaolo Frisoni <[email protected]>
…o conditional-decomp
…wghtd-gts-based-on-symblc-rls
…wghtd-gts-based-on-symblc-rls
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.
Context: In short, a decomposition system based on a graph traversal using Dijkstra's algorithm is applied to find the most optimal gate decompositions for non-native gates. The nodes in the graph represent either decompositions, operations in the target gateset, or higher order operations. The edges show either membership of a native op in a decomposition, or equivalence of a decomposition to a higher order operation. The cost of an edge between a native operation and a decomposition is the number of additional gates found in the decomposition. The cost of an edge between a decomposition and an equivalent higher order op is zero. For more context, see [sc-84664].
Description of the Change: Work in progress on implementing support for relatively weighted gates within a target gateset. The weights are provided by the user, and influence what gate decompositions are chosen by the graph decomposition algorithm. The implementation is such that the weights of the gates are represented by weights on the edges leading to and from native gates.
Benefits: Allows a user to more closely model the behaviour of their backends, and capture the relative cost of executing certain gates such as non-Clifford gates which are native, but more expensive.
Possible Drawbacks: The representation of weights in this way is possibly not intuitive.
Related GitHub Issues: