-
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
Add option to unitary synthesis plugin interface for user config #7252
Conversation
This commit adds a new option to the unitary synthesis plugin interface for plugins to accept free form user config. Two potential synthesis plugins both have asked for an interface where a user can pass configuration options through to the plugin to tune how the plugin runs. To enable this, this commit adds a new kwarg to transpile() to pass a configuration dictionary straight through to the plugin. As this is a custom thing for each plugin the burden is on the plugin author to define how this dictionary is used, implement using it, and documenting it's use.
@edyounis @adekusar-drl this should add the interface you were both asking for to enable users to tweak unitary synthesis plugins. Does this work for what you need? |
Pull Request Test Coverage Report for Build 1446347607
💛 - Coveralls |
Yeah, this will work for BQSKit. Thanks for implementing it. |
@mtreinish Thanks a lot! Yes, this is really nice to see! |
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.
Mostly looks good to me - one comment about the keyword management within the run step, but it's not 100% necessary, since I think the way it's written won't actually cause problems (at the moment, at least!).
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.
Looks good to me!
Summary
This commit adds a new option to the unitary synthesis plugin interface
for plugins to accept free form user config. Two potential synthesis
plugins both have asked for an interface where a user can pass
configuration options through to the plugin to tune how the plugin runs.
To enable this, this commit adds a new kwarg to transpile() to pass a
configuration dictionary straight through to the plugin. As this is a
custom thing for each plugin the burden is on the plugin author to
define how this dictionary is used, implement using it, and documenting
it's use.
Details and comments