-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Split out NLayout rust class into standalone Python module #9064
Conversation
This commit moves the NLayout rust class out of the stochastic swap python module into a new standalone nlayout module in qiskit._accelerate. The NLayout class was originally added with the stochastic swap rust code, but since then it's started being used by other rust code including SabreSwap (and soon to be VF2Layout and VF2PostLayout scoring in Qiskit#9026).
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:
|
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
Pull Request Test Coverage Report for Build 3381554318
💛 - Coveralls |
Previously the module of this was set incorrectly (stemming from its move in Qiskitgh-9064), at which point the `__getstate__`/`__setstate__` pickling wouldn't work correctly any more. Also, however, there was no `__getnewargs__` and `new` didn't have a zero-argument form, so this wouldn't have worked either.
Previously the module of this was set incorrectly (stemming from its move in gh-9064), at which point the `__getstate__`/`__setstate__` pickling wouldn't work correctly any more. Also, however, there was no `__getnewargs__` and `new` didn't have a zero-argument form, so this wouldn't have worked either.
Previously the module of this was set incorrectly (stemming from its move in gh-9064), at which point the `__getstate__`/`__setstate__` pickling wouldn't work correctly any more. Also, however, there was no `__getnewargs__` and `new` didn't have a zero-argument form, so this wouldn't have worked either. (cherry picked from commit 136548c) # Conflicts: # test/python/transpiler/test_layout.py
Previously the module of this was set incorrectly (stemming from its move in gh-9064), at which point the `__getstate__`/`__setstate__` pickling wouldn't work correctly any more. Also, however, there was no `__getnewargs__` and `new` didn't have a zero-argument form, so this wouldn't have worked either. (cherry picked from commit 136548c)
Previously the module of this was set incorrectly (stemming from its move in gh-9064), at which point the `__getstate__`/`__setstate__` pickling wouldn't work correctly any more. Also, however, there was no `__getnewargs__` and `new` didn't have a zero-argument form, so this wouldn't have worked either.
Previously the module of this was set incorrectly (stemming from its move in gh-9064), at which point the `__getstate__`/`__setstate__` pickling wouldn't work correctly any more. Also, however, there was no `__getnewargs__` and `new` didn't have a zero-argument form, so this wouldn't have worked either.
* Fix pickling of `NLayout` (#12298) Previously the module of this was set incorrectly (stemming from its move in gh-9064), at which point the `__getstate__`/`__setstate__` pickling wouldn't work correctly any more. Also, however, there was no `__getnewargs__` and `new` didn't have a zero-argument form, so this wouldn't have worked either. (cherry picked from commit 136548c) * Switch back to PyO3 0.20 --------- Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
* Fix pickling of `NLayout` (#12298) Previously the module of this was set incorrectly (stemming from its move in gh-9064), at which point the `__getstate__`/`__setstate__` pickling wouldn't work correctly any more. Also, however, there was no `__getnewargs__` and `new` didn't have a zero-argument form, so this wouldn't have worked either. * Switch back to PyO3 0.20 --------- Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
Summary
This commit moves the NLayout rust class out of the stochastic swap python module into a new standalone nlayout module in qiskit._accelerate. The NLayout class was originally added with the stochastic swap rust code, but since then it's started being used by other rust code including SabreSwap (and soon to be VF2Layout and VF2PostLayout scoring in #9026).
Details and comments