-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix incorrect error estimation in VF2 fallback #14218
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
Conversation
The VF2 passes include a fall-back error heuristic if the `Target` specifies no error rates: a number proportional to the node degree is used. This was a proxy metric, used historically becasue IBM bowtie devices (amongst others) were unreliable at reporting error rates but had significantly degraded performance on higher-degree nodes. The calculation of the node degree, however, could double count qubits in a directional backend, and since the scaling factor is the total number of qubits, this could cause error rates greater than one, which then cause unpredictable behaviour on the scoring.
One or more of the following people are relevant to this code:
|
@Mergifyio backport stable/1.4 stable/2.0 |
✅ Backports have been created
|
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.
LGTM, I am assuming that you found this by inspecting the code. Is there any way you could reproduce the bug to test the fix?
Pull Request Test Coverage Report for Build 14517171718Details
💛 - Coveralls |
I could potentially try and engineer a circuit and coupling map that causes a high-degree node to get erroneously prioritised, but I think it might be a little bit tricky. My new Rust form scores using |
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.
This looks fine to me, thanks!
The VF2 passes include a fall-back error heuristic if the `Target` specifies no error rates: a number proportional to the node degree is used. This was a proxy metric, used historically becasue IBM bowtie devices (amongst others) were unreliable at reporting error rates but had significantly degraded performance on higher-degree nodes. The calculation of the node degree, however, could double count qubits in a directional backend, and since the scaling factor is the total number of qubits, this could cause error rates greater than one, which then cause unpredictable behaviour on the scoring. (cherry picked from commit 45778dd)
The VF2 passes include a fall-back error heuristic if the `Target` specifies no error rates: a number proportional to the node degree is used. This was a proxy metric, used historically becasue IBM bowtie devices (amongst others) were unreliable at reporting error rates but had significantly degraded performance on higher-degree nodes. The calculation of the node degree, however, could double count qubits in a directional backend, and since the scaling factor is the total number of qubits, this could cause error rates greater than one, which then cause unpredictable behaviour on the scoring. (cherry picked from commit 45778dd)
The VF2 passes include a fall-back error heuristic if the `Target` specifies no error rates: a number proportional to the node degree is used. This was a proxy metric, used historically becasue IBM bowtie devices (amongst others) were unreliable at reporting error rates but had significantly degraded performance on higher-degree nodes. The calculation of the node degree, however, could double count qubits in a directional backend, and since the scaling factor is the total number of qubits, this could cause error rates greater than one, which then cause unpredictable behaviour on the scoring. (cherry picked from commit 45778dd) Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
The VF2 passes include a fall-back error heuristic if the `Target` specifies no error rates: a number proportional to the node degree is used. This was a proxy metric, used historically becasue IBM bowtie devices (amongst others) were unreliable at reporting error rates but had significantly degraded performance on higher-degree nodes. The calculation of the node degree, however, could double count qubits in a directional backend, and since the scaling factor is the total number of qubits, this could cause error rates greater than one, which then cause unpredictable behaviour on the scoring. (cherry picked from commit 45778dd) Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
The VF2 passes include a fall-back error heuristic if the `Target` specifies no error rates: a number proportional to the node degree is used. This was a proxy metric, used historically becasue IBM bowtie devices (amongst others) were unreliable at reporting error rates but had significantly degraded performance on higher-degree nodes. The calculation of the node degree, however, could double count qubits in a directional backend, and since the scaling factor is the total number of qubits, this could cause error rates greater than one, which then cause unpredictable behaviour on the scoring. (cherry picked from commit 45778dd) Co-authored-by: Jake Lishman <jake.lishman@ibm.com> Co-authored-by: Elena Peña Tapia <57907331+ElePT@users.noreply.github.com>
The rustworkx version we have previously had set as the minimum requirement is not correct. It was listed as 0.15.0 but we are using `PyDiGraph.neighbors_undirected()` since Qiskit#14218 merged which was added in rustworkx 0.16.0. [1] This means the requirement is incorrect and if you try to run Qiskit with rustworkx 0.15.0 it will not work when this method is run. This commit corrects this issue and bumps the minimum supported rustworkx version in the requirements list to 0.16.0. [1] https://www.rustworkx.org/release_notes.html#relnotes-0-16-0
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.
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 A 8000 PIs 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.
* 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
* 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)
* 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)
…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>
…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>
* 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
Summary
The VF2 passes include a fall-back error heuristic if the
Target
specifies no error rates: a number proportional to the node degree is used. This was a proxy metric, used historically becasue IBM bowtie devices (amongst others) were unreliable at reporting error rates but had significantly degraded performance on higher-degree nodes.The calculation of the node degree, however, could double count qubits in a directional backend, and since the scaling factor is the total number of qubits, this could cause error rates greater than one, which then cause unpredictable behaviour on the scoring.
Details and comments