-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Assert properties not specifics of DenseLayout
results (backport #10901)
#10907
Conversation
`DenseLayout` is a deterministic pass, so there's no risk of RNG manipulations changing the output. Internally, however, the use of the sparse-matrix bandwidth-reduction algorithm in Scipy's `reverse_cuthill_mckee` uses `numpy.argsort` internally with the unstable default sorting algorithm, which means the output _can_ be dependent on the way that sort is implemented. The arrays that are sorted are directly related to the input coupling map, and are likely to include degeneracies, which pose problems when the implementation of the unstable sort changes. This was the case moving from Numpy 1.24 to Numpy 1.25. This commit instead changes the tests from asserting that a precise layout was returned to asserting that the returned layout contains only a connected subgraph of qubits. The "most" connected component that `DenseLayout` finds must be _at least_ connected, though this assertion is not quite as strong as finding the _densest_. The extra test accounts for this weakening. (cherry picked from commit 0f66cdf)
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
Pull Request Test Coverage Report for Build 6355449092
💛 - Coveralls |
This is an automatic backport of pull request #10901 done by Mergify.
Mergify commands and options
More conditions and actions can be found in the documentation.
You can also trigger Mergify actions by commenting on this pull request:
@Mergifyio refresh
will re-evaluate the rules@Mergifyio rebase
will rebase this PR on its base branch@Mergifyio update
will merge the base branch into this PR@Mergifyio backport <destination>
will backport this PR on<destination>
branchAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.com