Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Port substitute_node_with_subgraph to core. #1259

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

Draft
kevinhartman wants to merge 5 commits into Qiskit:main
base: main
Choose a base branch
Loading
from kevinhartman:sub-node-with-graph-core

Conversation

@kevinhartman
Copy link
Contributor

@kevinhartman kevinhartman commented Jul 31, 2024
edited
Loading

Adds a new graph extension trait substitute_node_with_graph to rustworkx-core, which is currently implemented for StableGraph. It should be easy to open this up to other graph types (which I may consider doing as part of this PR, time permitting).

Todo:

  • Migrate Py(Di|)Graph::substitute_node_with_subgraph to use this method.
  • Enable for more graph types.
  • Release note.

Note to self:

  • Check other graph for cycles / multiple edges in Py(Di|)Graph before execution when migrating impl to core method.
  • Set node_removed to true.

Copy link

coveralls commented Aug 2, 2024
edited
Loading

Pull Request Test Coverage Report for Build 10890612928

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 156 of 176 (88.64%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.06%) to 95.753%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/lib.rs 5 6 83.33%
rustworkx-core/src/graph_ext/substitution.rs 111 130 85.38%
Totals Coverage Status
Change from base Build 10152100235: -0.06%
Covered Lines: 18082
Relevant Lines: 18884

💛 - Coveralls

This makes the interface a lot simpler, especially given that most
clients are unlikely to need to raise errors in the callbacks at
all (we only need it to support Python's error propagation).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /