-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add qk_transpile_stage_init() to the C API #15207
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
Open
mtreinish
wants to merge
2
commits into
Qiskit:main
Choose a base branch
from
mtreinish:init-at-sea
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+415
−172
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 18746065048Details
💛 - Coveralls |
For the rust function that implements the `qk_transpile()` C API it was originally written as a single function where the full "staged pass manager" was just a rust function and the pass manager logic was just the logic inside that function. This worked fine and provided a full pipeline as a single entrypoint which was the desire for qk_transpile. However, with the plans to expose DAGCircuit to rust (see Qiskit#15187) to facilitate creating custom transpiler passes from C. To enable users to pair custom passes with the default workflow it will be useful to expose the preset stages to C as well. This commit is the first step towards that, as it splits the stages from the `qk_transpile()` into standalone rust functions. Each stage gets it's own function which can be called independently. These new functions have public visibility because the goal is that these will be exposed to C. Following on from this PR separate PRs will be opened for each stage that expose these new functions to the C API and enable using them in custom transpilation workflows.
This commit adds a new function to the C API, `qk_transpile_stage_init()`, which is used to run just the init stage of the preset pass manager. The intended use case for this is to enable using stages from the preset pass manager with custom transpiler passes to build custom compilation workflows from C.
7e37563 to
94b290b
Compare
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C API
Related to the C API
Changelog: New Feature
Include in the "Added" section of the changelog
mod: transpiler
Issues and PRs related to Transpiler
on hold
Can not fix yet
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This commit adds a new function to the C API,
qk_transpile_stage_init(), which is used to run just the init stageof the preset pass manager. The intended use case for this is to enable
using stages from the preset pass manager with custom transpiler passes
to build custom compilation workflows from C.
Details and comments
This PR is based on top of
#15200and #15205 and will need to be rebased after both of those merge. In the meantime you can see the contents of just this PR by looking at the HEAD commit on this PR branch here: 94b290b