8000 Avoid using rustworkx 0.16.0 methods in vf2_utils by mtreinish · Pull Request #14513 · Qiskit/qiskit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Avoid using rustworkx 0.16.0 methods in vf2_utils #14513

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
merged 3 commits into from
Jun 4, 2025

Conversation

mtreinish
Copy link
Member

Summary

In #14218 the vf2_utils module was updated to use the PyDiGraph.neighbors_undirected() method which was added in 0.16.0. However that PR neglected to bump the minimum required version of rustworkx to 0.16.0 from 0.15.0 which is the current minim version listed. While we could bump the minimum version (see #14507) to rustworkx 0.16.0 using this method isn't strictly necessary and #14218 was backported to stable branches and backporting a version bump is not desireable. This commit instead just updates the rustworkx usage to use APIs in 0.15.0.

This PR will need to be backported to stable/1.4 and stable/2.0 to fix compatibility with the listed rustworkx requirement. However, in the backport a fix note will be needed to document that the release fixes compatibility with the listed requirement.

Details and comments

@mtreinish mtreinish added this to the 1.4.4 milestone May 30, 2025
@mtreinish mtreinish requested a review from a team as a code owner May 30, 2025 20:08
@mtreinish mtreinish added stable backport potential The bug might be minimal and/or import enough to be port to stable Changelog: None Do not include in changelog labels May 30, 2025
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

In Qiskit#14218 the vf2_utils module was updated to use the
`PyDiGraph.neighbors_undirected()` method which was added in 0.16.0.
However that PR neglected to bump the minimum required version of
rustworkx to 0.16.0 from 0.15.0 which is the current minim version
listed. While we could bump the minimum version (see Qiskit#14507) to
rustworkx 0.16.0 using this method isn't strictly necessary and Qiskit#14218
was backported to stable branches and backporting a version bump is not
desireable. This commit instead just updates the rustworkx usage to use
APIs in 0.15.0.

This PR will need to be backported to stable/1.4 and stable/2.0 to fix
compatibility with the listed rustworkx requirement. However, in the
backport a fix note will be needed to document that the release fixes
compatibility with the listed requirement.
@mtreinish
Copy link
Member Author

@Mergifyio backport stable/1.4 stable/2.0

Copy link
Contributor
mergify bot commented May 30, 202 8000 5

backport stable/1.4 stable/2.0

✅ Backports have been created

@coveralls
Copy link
coveralls commented May 30, 2025

Pull Request Test Coverage Report for Build 15395190072

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

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • 25 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-0.02%) to 87.821%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 94.23%
crates/transpiler/src/passes/unitary_synthesis.rs 1 94.57%
crates/circuit/src/symbol_expr.rs 4 75.12%
crates/qasm2/src/lex.rs 7 92.23%
crates/qasm2/src/parse.rs 12 96.68%
Totals Coverage Status
Change from base Build 15393181973: -0.02%
Covered Lines: 80430
Relevant Lines: 91584

💛 - Coveralls

@mtreinish mtreinish requested a review from jakelishman June 2, 2025 20:17
@Cryoris
Copy link
Contributor
Cryoris commented Jun 4, 2025

Running the tests on rustworkx==0.15.0 still gives me 1 failing test

ERROR: test_plot_gate_map_no_backend (test.python.visualization.test_gate_map.TestGateMap.test_plot_gate_map_no_backend)
[...]
  File "/opt/homebrew/Cellar/python@3.11/3.11.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['neato', '-T', 'png']' returned non-zero exit status 1.

Do you get the same?

@jakelishman
Copy link
Member

That test failure is unrelated - it's something to do with your graphviz installation.

@Cryoris
Copy link
Contributor
Cryoris commented Jun 4, 2025
< 8000 /tr>

It was because I was testing on rustworkx 0.15.0 -- not 0.15.1 😅

Copy link
Contributor
@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

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

After some testing hiccups on my end, this now LGTM 👍🏻 What's the rule for relying on minor versions? If the tests fail with 0.15.0 should we require >=0.15.1?

@mtreinish mtreinish added this pull request to the merge queue Jun 4, 2025
@mtreinish
Copy link
Member Author

After some testing hiccups on my end, this now LGTM 👍🏻 What's the rule for relying on minor versions? If the tests fail with 0.15.0 should we require >=0.15.1?

There isn't a hard rule we take it on a case by case basis. I'd say in this particular case the test was for visualization functions and doesn't justify a minimum version bump because most users will never see that bug. If it was something like the coupling map didn't work at all then yeah we'd bump the minimum

Merged via the queue into Qiskit:main with commit 9aa1a29 Jun 4, 2025
26 checks passed
mergify bot pushed a commit that referenced this pull request Jun 4, 2025
* Avoid using rustworkx 0.16.0 methods in vf2_utils

In #14218 the vf2_utils module was updated to use the
`PyDiGraph.neighbors_undirected()` method which was added in 0.16.0.
However that PR neglected to bump the minimum required version of
rustworkx to 0.16.0 from 0.15.0 which is the current minim version
listed. While we could bump the minimum version (see #14507) to
rustworkx 0.16.0 using this method isn't strictly necessary and #14218
was backported to stable branches and backporting a version bump is not
desireable. This commit instead just updates the rustworkx usage to use
APIs in 0.15.0.

This PR will need to be backported to stable/1.4 and stable/2.0 to fix
compatibility with the listed rustworkx requirement. However, in the
backport a fix note will be needed to document that the release fixes
compatibility with the listed requirement.

* Correctly handle duplicates across successors and predecessors

(cherry picked from commit 9aa1a29)
mergify bot pushed a commit that referenced this pull request Jun 4, 2025
* Avoid using rustworkx 0.16.0 methods in vf2_utils

In #14218 the vf2_utils module was updated to use the
`PyDiGraph.neighbors_undirected()` method which was added in 0.16.0.
However that PR neglected to bump the minimum required version of
rustworkx to 0.16.0 from 0.15.0 which is the current minim version
listed. While we could bump the minimum version (see #14507) to
rustworkx 0.16.0 using this method isn't strictly necessary and #14218
was backported to stable branches and backporting a version bump is not
desireable. This commit instead just updates the rustworkx usage to use
APIs in 0.15.0.

This PR will need to be backported to stable/1.4 and stable/2.0 to fix
compatibility with the listed rustworkx requirement. However, in the
backport a fix note will be needed to document that the release fixes
compatibility with the listed requirement.

* Correctly handle duplicates across successors and predecessors

(cherry picked from commit 9aa1a29)
@mtreinish mtreinish deleted the use-15-rx-now branch June 4, 2025 21:30
github-merge-queue bot pushed a commit that referenced this pull request Jun 12, 2025
…14533)

* Avoid using rustworkx 0.16.0 methods in vf2_utils (#14513)

* Avoid using rustworkx 0.16.0 methods in vf2_utils

In #14218 the vf2_utils module was updated to use the
`PyDiGraph.neighbors_undirected()` method which was added in 0.16.0.
However that PR neglected to bump the minimum required version of
rustworkx to 0.16.0 from 0.15.0 which is the current minim version
listed. While we could bump the minimum version (see #14507) to
rustworkx 0.16.0 using this method isn't strictly necessary and #14218
was backported to stable branches and backporting a version bump is not
desireable. This commit instead just updates the rustworkx usage to use
APIs in 0.15.0.

This PR will need to be backported to stable/1.4 and stable/2.0 to fix
compatibility with the listed rustworkx requirement. However, in the
backport a fix note will be needed to document that the release fixes
compatibility with the listed requirement.

* Correctly handle duplicates across successors and predecessors

(cherry picked from commit 9aa1a29)

* Add release note

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
github-merge-queue bot pushed a commit that referenced this pull request Jun 12, 2025
…14534)

* Avoid using rustworkx 0.16.0 methods in vf2_utils (#14513)

* Avoid using rustworkx 0.16.0 methods in vf2_utils

In #14218 the vf2_utils module was updated to use the
`PyDiGraph.neighbors_undirected()` method which was added in 0.16.0.
However that PR neglected to bump the minimum required version of
rustworkx to 0.16.0 from 0.15.0 which is the current minim version
listed. While we could bump the minimum version (see #14507) to
rustworkx 0.16.0 using this method isn't strictly necessary and #14218
was backported to stable branches and backporting a version bump is not
desireable. This commit instead just updates the rustworkx usage to use
APIs in 0.15.0.

This PR will need to be backported to stable/1.4 and stable/2.0 to fix
compatibility with the listed rustworkx requirement. However, in the
backport a fix note will be needed to document that the release fixes
compatibility with the listed requirement.

* Correctly handle duplicates across successors and predecessors

(cherry picked from commit 9aa1a29)

* Add release note

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
rahaman-quantum pushed a commit to rahaman-quantum/qiskit that referenced this pull request Jun 20, 2025
* Avoid using rustworkx 0.16.0 methods in vf2_utils

In Qiskit#14218 the vf2_utils module was updated to use the
`PyDiGraph.neighbors_undirected()` method which was added in 0.16.0.
However that PR neglected to bump the minimum required version of
rustworkx to 0.16.0 from 0.15.0 which is the current minim version
listed. While we could bump the minimum version (see Qiskit#14507) to
rustworkx 0.16.0 using this method isn't strictly necessary and Qiskit#14218
was backported to stable branches and backporting a version bump is not
desireable. This commit instead just updates the rustworkx usage to use
APIs in 0.15.0.

This PR will need to be backported to stable/1.4 and stable/2.0 to fix
compatibility with the listed rustworkx requirement. However, in the
backport a fix note will be needed to document that the release fixes
compatibility with the listed requirement.

* Correctly handle duplicates across successors and predecessors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0