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

Add default translation stage plugin #13794

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

jakelishman
Copy link
Member

Summary

This is added to give us semantic room to play with the default translation algorithm during the 2.x series. It starts life as an alias to translator, but may change to improve support for fractional-gate translation, more optimized synthesis routines, or discrete-basis translations (like a SK-based 1q translator for logical backends).

This makes it programmatically possible to distinguish the "default" plugin choice from an explicit "translator" choice, even when (as right now) those are the same thing. Note that pass_manager_config uses None as an implicit default, but we active suggest using the plugin-stage getters, which need an actual plugin name.

Details and comments

Close #13788.

Built on top of the enhanced documentation #13620.

@jakelishman jakelishman added on hold Can not fix yet Changelog: New Feature Include in the "Added" section of the changelog Changelog: API Change Include in the "Changed" section of the changelog mod: transpiler Issues and PRs related to Transpiler labels Feb 5, 2025
@jakelishman jakelishman added this to the 2.0.0 milestone Feb 5, 2025
@jakelishman jakelishman requested a review from a team as a code owner February 5, 2025 18:50
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

@coveralls
Copy link

coveralls commented Feb 5, 2025

Pull Request Test Coverage Report for Build 13168256573

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 8 of 8 (100.0%) changed or added relevant lines in 5 files are covered.
  • 26 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.02%) to 88.631%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 8 90.98%
crates/qasm2/src/parse.rs 18 96.22%
Totals Coverage Status
Change from base Build 13165103262: -0.02%
Covered Lines: 79214
Relevant Lines: 89375

💛 - Coveralls

This is added to give us semantic room to play with the default
translation algorithm during the 2.x series.  It starts life as an alias
to `translator`, but may change to improve support for fractional-gate
translation, more optimized synthesis routines, or discrete-basis
translations (like a SK-based 1q translator for logical backends).

This makes it programmatically possible to distinguish the "default"
plugin choice from an explicit "translator" choice, even when (as right
now) those are the same thing.  Note that `pass_manager_config` uses
`None` as an implicit default, but we active suggest using the
plugin-stage getters, which need an actual plugin name.
@jakelishman jakelishman removed the on hold Can not fix yet label Feb 5, 2025
@jakelishman
Copy link
Member Author

Now rebased over main.

Copy link
Contributor

@ElePT ElePT left a comment

Choose a reason for hiding this comment

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

I am usually triggered by things like this but even after reviewing the new docs I didn't realize that the translation stage was missing a default plugin. I think the change looks good and makes sense (but I will leave the PR around for a bit in case anyone has further opinions)

Copy link
Contributor

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

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

Nice, I'm looking forward to finally transpiling to a discrete basis out of the box 😄

@jakelishman
Copy link
Member Author

Ha, I think we've got quite some way to go still til then, but this at least gives us semantic leeway to make changes to the algorithm we use by default to move that way.

@ElePT ElePT added this pull request to the merge queue Feb 6, 2025
Merged via the queue into Qiskit:main with commit 05c4f01 Feb 6, 2025
17 checks passed
@jakelishman jakelishman deleted the default-translation branch February 6, 2025 11:00
jakelishman added a commit to jakelishman/qiskit-terra that referenced this pull request Feb 6, 2025
This is added for a similar reason as the recent `default`
translation-stage plugin (Qiskitgh-13794).  We currently have no plans to
change the default routing method, if not only because the `default`
layout plugin does routing most of the time, but this makes the
semantics of "just use the default method" clearer.
jakelishman added a commit to jakelishman/qiskit-terra that referenced this pull request Feb 6, 2025
This is added for a similar reason as the recent `default`
translation-stage plugin (Qiskitgh-13794).  We currently have no plans to
change the default routing method, if not only because the `default`
layout plugin does routing most of the time, but this makes the
semantics of "just use the default method" clearer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: API Change Include in the "Changed" section of the changelog Changelog: New Feature Include in the "Added" section of the changelog mod: transpiler Issues and PRs related to Transpiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add default translation plugin
5 participants