Skip to content

feat!: Make qis-compiler callable from Rust crates#1428

Open
qciaran wants to merge 1 commit intoQuantinuum:mainfrom
qciaran:fix/pr-1163
Open

feat!: Make qis-compiler callable from Rust crates#1428
qciaran wants to merge 1 commit intoQuantinuum:mainfrom
qciaran:fix/pr-1163

Conversation

@qciaran
Copy link

@qciaran qciaran commented Feb 28, 2026

Currently the qis-compiler can only be called from Python. This aims to add minimal changes to make it callable from Rust crates too (e.g., in PECOS).

This aims to add no breaking changes to those already using the Python API. It only adds functionality for Rust users.

BREAKING CHANGE: None

Closes Issue #1163

@qciaran qciaran requested a review from a team as a code owner February 28, 2026 19:07
@qciaran qciaran requested a review from doug-q February 28, 2026 19:07
@qciaran qciaran changed the title Make qis-compiler callable from Rust crates feat!: Make qis-compiler callable from Rust crates Feb 28, 2026
@qciaran
Copy link
Author

qciaran commented Feb 28, 2026

Failure of actions seems to be due to pushing the PR via a fork and codecov token stuff not being setup up for this...

@jake-arkinstall
Copy link
Contributor

I'd tentatively recommend that this be released at the same time or later than the LLVM version update PR. For reference we're currently using LLVM14 and the PR bumps it several major versions.

For python end users, for whom the package is presently intended, this is not a concern. The LLVM install requirement is strictly at build/link time, and the built library is self contained.

For rust crates that depend on this crate, however, I believe they will also require a local install of LLVM. The LLVM version requirement changing will then be a nasty break for those users, as they'll need to go through a process of installing LLVM the first time, setting up env vars and CI, then going back and redoing all of that for the later version. This may encourage sticking to an older tket2 version which would be unfortunate.

Devenv.nix users get off lightly, as it only takes a couple of lines of config changes to do it. Windows users and github actions workflows can get more awkward.

If this PR lands in the same release or in a later one, that pain need only happen once. OTOH, as PECOS is likely to be the only crate depending on this for the short term, it's your call (especially if the other PR takes a while to get in, I imagine a bunch of downstream testing is going to be needed).

@ciaranra
Copy link

ciaranra commented Mar 1, 2026

This mainly just let's me remove one of the crates in PECOS and directly use tket2 for compiling to QIS. So this isn't a blocker for me. I can either keep my crate or maybe point to the commit in the fork for now (although don't love that since the commit might disappear eventually).

So if it is worth holding off, that is fine. Just in the future hopefully can call the QIS compiler from Rust

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants