Skip to content
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

Document how to use high level synthesis plugins #11389

Merged
merged 8 commits into from
Dec 15, 2023

Conversation

mtreinish
Copy link
Member

@mtreinish mtreinish commented Dec 8, 2023

Summary

This commit adds missing documentation to the transpiler synthesis plugin page on how to use the high level synthesis plugin interface. There was existing documentation on how to write a high level synthesis plugin but not for how users can consume any installed plugins. This commit fills that documentation gap and also adds the HLSConfig class to the documentation as a stable defined interface. This was an oversight as we've not been treating the API interface as stable as it's the primary entrypoint for using high level synthesis plugins. Additionally, a new function high_level_synthesis_plugin_names is added in this PR to make querying the installed plugins a bit easier as to do this before you had to instantiate a plugin manager object to do this. This makes the querying interface similar to what exists for unitary synthesis.

Details and comments

Fixes #11356
Fixes Qiskit/documentation#505

This commit adds missing documentation to the transpiler synthesis
plugin page on how to use the high level synthesis plugin interface.
There was existing documentation on how to write a high level synthesis
plugin but not for how users can consume any installed plugins. This
commit fills that documentation gap and also adds the HLSConfig class to
the documentation as a stable defined interface. This was an oversight
as we've not been treating the API interface as stable as it's the
primary entrypoint for using high level synthesis plugins. Additionally,
a new function high_level_synthesis_plugin_names is added in this PR to
make querying the installed plugins a bit easier as to do this before
you had to instantiate a plugin manager object to do this. This makes
the querying interface similar to what exists for unitary synthesis.

Fixes Qiskit#11356
@mtreinish mtreinish added documentation Something is not clear or an error documentation Changelog: New Feature Include in the "Added" section of the changelog synthesis mod: transpiler Issues and PRs related to Transpiler labels Dec 8, 2023
@mtreinish mtreinish added this to the 1.0.0 milestone Dec 8, 2023
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

@coveralls
Copy link

coveralls commented Dec 8, 2023

Pull Request Test Coverage Report for Build 7213117378

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 3 of 5 (60.0%) changed or added relevant lines in 2 files are covered.
  • 6 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.01%) to 87.564%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/transpiler/passes/synthesis/plugin.py 2 4 50.0%
Files with Coverage Reduction New Missed Lines %
qiskit/pulse/parameter_manager.py 1 96.84%
crates/qasm2/src/lex.rs 5 91.67%
Totals Coverage Status
Change from base Build 7163309461: 0.01%
Covered Lines: 59784
Relevant Lines: 68275

💛 - Coveralls

qiskit/transpiler/passes/synthesis/plugin.py Outdated Show resolved Hide resolved
qiskit/transpiler/passes/synthesis/plugin.py Outdated Show resolved Hide resolved
qiskit/transpiler/passes/synthesis/plugin.py Outdated Show resolved Hide resolved
Co-authored-by: Kevin J. Sung <kevinjefferysung@gmail.com>
mtreinish and others added 2 commits December 11, 2023 17:25
@mtreinish mtreinish modified the milestones: 1.0.0, 0.45.2 Dec 12, 2023
@jakelishman
Copy link
Member

I'll take over the last few changes needed for this on Matt's behalf, since he's on holiday now and I'd like to get the documentation whole plugged sooner rather than later. Let me know if there's anything more that needs changing, and I can do it.

@kevinsung
Copy link
Contributor

Thanks, it's pretty clear now. Now the documentation here is clearer than in the docstring of HLSConfig. How about we add a link in that docstring to this documentation?

kevinsung
kevinsung previously approved these changes Dec 14, 2023
Copy link
Contributor

@kevinsung kevinsung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with just one comment about improving the docstring of HLSConfig itself

@jakelishman
Copy link
Member

Sure, I've tried to make HLSConfig a little clearer about the allowed forms, and put in a cross-link to the overview section in 5cc74e1.

Copy link
Contributor

@kevinsung kevinsung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(proxying approval)

@kevinsung kevinsung added this pull request to the merge queue Dec 15, 2023
Merged via the queue into Qiskit:main with commit 7e73fcf Dec 15, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog documentation Something is not clear or an error documentation mod: transpiler Issues and PRs related to Transpiler synthesis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HLSConfig missing from API docs Document usage of high level synthesis plugins
6 participants