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

Migrate translation stage to plugins #10621

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

mtreinish
Copy link
Member

Summary

This commit updates the preset pass manager construction to only use plugins for the translation stage. To accomplish this the previously hard coded built-in translation methods, unroller, translator, and synthesis are migrated to be exposed as built-in plugins. This simplifies the preset pass manager construction as now the translation stage is solely built via plugins.

Details and comments

Fixes #9456

This commit updates the preset pass manager construction to only use
plugins for the translation stage. To accomplish this the previously
hard coded built-in translation methods, unroller, translator, and
synthesis are migrated to be exposed as built-in plugins. This
simplifies the preset pass manager construction as now the translation
stage is solely built via plugins.

Fixes Qiskit#9456
@mtreinish mtreinish added Changelog: None Do not include in changelog mod: transpiler Issues and PRs related to Transpiler labels Aug 14, 2023
@mtreinish mtreinish added this to the 0.45.0 milestone Aug 14, 2023
@mtreinish mtreinish requested a review from a team as a code owner August 14, 2023 15:25
@qiskit-bot
Copy link
Collaborator

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

  • @Qiskit/terra-core

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5857576511

  • 16 of 16 (100.0%) changed or added relevant lines in 5 files are covered.
  • 9 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.007%) to 87.262%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 93.76%
crates/qasm2/src/lex.rs 8 90.38%
Totals Coverage Status
Change from base Build 5857364416: -0.007%
Covered Lines: 74303
Relevant Lines: 85149

💛 - Coveralls

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.

This looks sensible and straightforwards to me. Do we have a policy for documenting what plugin names we register as internal to the library (e.g. release note, public docs, etc)?

@mtreinish
Copy link
Member Author

This looks sensible and straightforwards to me. Do we have a policy for documenting what plugin names we register as internal to the library (e.g. release note, public docs, etc)?

It is documented here: https://qiskit.org/documentation/apidoc/transpiler_plugins.html#plugin-stages the names here are already covered there which is why I didn't do a release note. I added a release note for the layout stage because it added a new name default.

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.

Ah nice, thanks - I didn't realise that we'd already reserved the names. Good forward thinking!

@jakelishman jakelishman enabled auto-merge August 21, 2023 16:28
@jakelishman jakelishman added this pull request to the merge queue Aug 21, 2023
Merged via the queue into Qiskit:main with commit 2b885b8 Aug 21, 2023
mtreinish added a commit to raynelfss/qiskit that referenced this pull request Aug 22, 2023
This commit changes the plugin construction logic slightly to adjust
how the embedded translation stage is created. After Qiskit#10621 merged we
only need to use the plugin interface to get the translation stage pass
manager.
github-merge-queue bot pushed a commit that referenced this pull request Aug 22, 2023
* Initial: Optimization stage as a plugin.

* CI: Added fix to preset_passmanager test

* Simplify inner translation stage creation logic

This commit changes the plugin construction logic slightly to adjust
how the embedded translation stage is created. After #10621 merged we
only need to use the plugin interface to get the translation stage pass
manager.

* Update documentation

---------

Co-authored-by: Matthew Treinish <[email protected]>
SamD-1998 pushed a commit to SamD-1998/qiskit-terra that referenced this pull request Sep 7, 2023
This commit updates the preset pass manager construction to only use
plugins for the translation stage. To accomplish this the previously
hard coded built-in translation methods, unroller, translator, and
synthesis are migrated to be exposed as built-in plugins. This
simplifies the preset pass manager construction as now the translation
stage is solely built via plugins.

Fixes Qiskit#9456
SamD-1998 pushed a commit to SamD-1998/qiskit-terra that referenced this pull request Sep 7, 2023
* Initial: Optimization stage as a plugin.

* CI: Added fix to preset_passmanager test

* Simplify inner translation stage creation logic

This commit changes the plugin construction logic slightly to adjust
how the embedded translation stage is created. After Qiskit#10621 merged we
only need to use the plugin interface to get the translation stage pass
manager.

* Update documentation

---------

Co-authored-by: Matthew Treinish <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog mod: transpiler Issues and PRs related to Transpiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create translation stage (translator, synthesis, unroller) plugins
4 participants