-
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
Adding HLS plugins for linear functions and cliffords #9399
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:
|
Pull Request Test Coverage Report for Build 4616968912
💛 - Coveralls |
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 LGTM, it's simple and straightforward. The only thing missing is some documentation about how to use the new plugins. None of the docstrings and the release note doesn't actually map the method to the plugin name. I think it'd be good to document this so users know how to use these plugins.
Added high-level-synthesis plugins for :class:`.LinearFunction` and for | ||
:class:`qiskit.quantum_info.Clifford`, extending the set of synthesis | ||
methods that can be called from :class:`~qiskit.transpiler.passes.HighLevelSynthesis` | ||
transpiler pass. | ||
For :class:`.LinearFunction` the newly available plugins are | ||
:class:`.PMHSynthesisLinearFunction` and :class:`.KMSSynthesisLinearFunction`. | ||
For :class:`qiskit.quantum_info.Clifford` the newly available plugins are | ||
:class:`.AGSynthesisClifford`, :class:`.BMSynthesisClifford`, | ||
:class:`.GreedySynthesisClifford` and :class:`.LayerSynthesisClifford`. | ||
Please refer to :mod:`qiskit.synthesis` documentation for more information | ||
about each individual method. |
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.
Can you add a table or something that maps the plugin names to the methods? I think that'll be good for users so they know what the plugin names are going to be. Also having an example of how to use it with transpile would go a long way too.
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.
Done in 0dbcf31.
class DefaultSynthesisLinearFunction(HighLevelSynthesisPlugin): | ||
"""The default linear function synthesis plugin.""" | ||
class AGSynthesisClifford(HighLevelSynthesisPlugin): | ||
"""Clifford synthesis plugin based on the Aaronson-Gottesman method.""" |
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.
It'd be good to say explicitly in the docstring here (and for the other plugin classes) that the name of this plugin is "ag"
so that users know how to specify the plugin.
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.
Done in a91f5d2.
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 LGTM, just one small suggestion inline about the wording in the docstring for the plugin classes (it applies to all of them, not just the one I left inline). When that's resolved I think we're good to go here.
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 all the updates
* Adding barebone HLS plugins for linear functions and cliffods * adding clifford.lnn method and improving docstrings * improving release notes with table and example * docstring improvements following review
* Adding barebone HLS plugins for linear functions and cliffods * adding clifford.lnn method and improving docstrings * improving release notes with table and example * docstring improvements following review
Summary
This commit adds the high-level-synthesis plugins for
LinearFunction
andClifford
, extending the set of plugins that can be called viaHighLevelSynthesis
transpiler pass.This does not include any actual synthesis algorithms.