-
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
Use rustworkx version of token_swapper #10001
Conversation
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:
|
rustworkx 0.13.0 was released yesterday so we can move forward with this now |
Pull Request Test Coverage Report for Build 5547501913
💛 - Coveralls |
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.
Overall this looks great! Thanks for doing this and also implementing the rustworkx side, this will have real performance improvements for the control flow path and also enables us to support control flow in sabre (see #10366 ). I left a small inline comment around the rng usage. The other thing is we need to bump the minimum version for rustworkx in the requirements.txt
file, because with this change terra needs rustworkx 0.13.0. We also should have a matching upgrade
release note to document that minimum requirements change.
todo_nodes.remove(node) | ||
# Since integer seed is used in rustworkx, take random integer from np.random.randint | ||
# and use that for the seed. | ||
seed = np.random.randint(1, 10000, size=1)[0] |
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.
I think we probably should do:
seed = np.random.randint(1, 10000, size=1)[0] | |
seed = self.seed.integers(1, 10000) |
so that we're respecting the input seed to the class.
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.
Sure thing. Done in 39617ec.
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, thanks for the quick update. I'll try to get 0.13.1 out before the final release so we can unskip the test too.
Summary
Call the
rustworkx
version of token_swapperDetails and comments
This PR should be put on hold until release of
rustworkx
version 0.13.0.This replaces the python version of
transpiler/passes/routing/algorithms/token_swapper
with a call to therustworkx
version.