Skip to content

[WIP] Transpile C API #14760

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

mtreinish
Copy link
Member

Summary

This is a very early draft of what the transpiler C API will look like. It is very far from being able to compile and is missing some key pieces of functionality. But the goal of this early draft is to show what the transpile function will look like to inform how to design the rust interfaces of the individual passes.

Details and comments

Closes #14245

This is very much blocked until all the sub-issues on #14245 are implemented. This does not compile and won't be able to for sometime. It is still an very early draft to give a more concrete idea at what the final goal will look like.

This is a very early draft of what the transpiler C API will look like.
It is very far from being able to compile and is missing some key pieces
of functionality. But the goal of this early draft is to show what the
transpile function will look like to inform how to design the rust
interfaces of the individual passes.
@mtreinish mtreinish added this to the 2.2.0 milestone Jul 18, 2025
@mtreinish mtreinish added the on hold Can not fix yet label Jul 18, 2025
mtreinish added a commit to mtreinish/qiskit-core that referenced this pull request Jul 22, 2025
This commit adds a Rust TranspileLayout object which is analgous to the
Python space object. It is a self contained struct that is only for
Rust and will be used by the C API for the C transpiler so that users
will be able to reason about the permutations caused by the transpiler.
This will also be used by Qiskit#14106 to apply a transpilation layout to the
SparseObservable in C. This commit only adds the rust struct and it's
associated tests, a subsequent PR will add the C API on top. This won't
be used until we have a full path transpiler in C though (see Qiskit#14760).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold Can not fix yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add C FFI for transpilation
1 participant