Integrate petgraph keefefixes#33
Merged
Merged
Conversation
Signed-off-by: daehiff <winderl13@gmail.com>
Signed-off-by: daehiff <winderl13@gmail.com>
Signed-off-by: daehiff <winderl13@gmail.com>
Signed-off-by: daehiff <winderl13@gmail.com>
Signed-off-by: daehiff <winderl13@gmail.com>
Signed-off-by: daehiff <winderl13@gmail.com>
Signed-off-by: daehiff <winderl13@gmail.com>
Signed-off-by: daehiff <winderl13@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This test does not correctly test for considered weight.
Remove unnecessary mut declarations. Remove unnecessary vec! calls Remove unused imports Remove unneeded casts Remove unused imports
Test only checks for correct creation.
This Error type is not used in any situation.
The implemented Ungraph reshuffles node ids each time a node is removed. Hence, a method to track the correct nodes is required. As we do not use node weights, we can now use these as effective node identifiers. Updated the function `remove_node` and tests to ensure correct trackable behavior.
Updated the Architecture trait to include `disconnect` as a means to update graphs during synthesis. Disconnect creates a new Architecture object while leaving the prior Architecture unchanged, as is required for some algorithms. Added tests to check behavior. Note that each time a new graph is created, the node order is effectively sorted, though the overall structure remains as expected.
`add_node` is removed as tracking the original size of the circuit is required if we use node weight to track nodes. The assumption is that we have all available quantum resources from the beginning. Can be updated in the future for future proofing, but should be good enough for now.
Ensure that the algorithms identifies the best path if it finds one. The unweighted case has many equivalent solutions, which are bounded by length.
Use node weights to track nodes. Ensure that an error is thrown if a cx ladder containing non-existant nodes is requested. Add new LadderError when a node is not found.
04eff6c to
3ebed56
Compare
daehiff
reviewed
Jun 10, 2025
3ebed56 to
8031626
Compare
Merged
added 3 commits
June 26, 2025 17:11
Update to custom branch of petgraph
Updated variant does not clone graph multiple times when running steiner tree algorithms.
added 5 commits
July 1, 2025 15:51
Set default NodeWeight to () as it is no longer used. Remove all usages of node_weight.
daehiff
approved these changes
Jul 4, 2025
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.
Main updates:
get_cx_ladderto ensure correctness.remove_nodeanddisconnect, utilizing node weights to keep track of actual nodes as node ids are reshuffled every time a node is removed.remove_nodeis a private function that allows the modification of graphs.disconnectis added to the Architecture trait, creating a new graph with a single node disconnected as required for synthesis algorithmsadd_nodeis removed entirely as node id is not consistent, this would require the tracking of the previous max size if we want to ensure single assignment.get_cx_ladderwith tests to ensure correctnes withdisconnect. Added check to ensure all requested nodes in ladder exist in graph.