Skip to content

Conversation

@johnzl-777
Copy link
Contributor

@johnzl-777 johnzl-777 commented Oct 22, 2025

This fixes two problems, one where Stim adjoint gates weren't appearing from SquinToStim when they should and another where the outputs of SquinU3ToClifford were not correct (because no *_DAG gates were coming out)

@rafaelha has already implemented a version of the fix on main ready for the latest release while this should be compatible with the current stable release (:

As a bit of a historical aside, there was some discussion to canonicalize adjoints (so it would be safer to assume the existence of only one or zero Adjoints by the time somebody hits this rewrite) here #468 but that's not planned

@johnzl-777 johnzl-777 requested a review from kaihsin October 22, 2025 20:51
@david-pl
Copy link
Collaborator

FYI, CI is currently broken on release (which causes the failure here), because QuEraComputing/kirin#536 (and maybe also QuEraComputing/kirin#539) have to be backported to kirin v0.17.

@johnzl-777
Copy link
Contributor Author

@david-pl Ah gotcha! On another note I had to bump up the minimum version of kirin in the pyproject.toml because the CanonicalizeIlist pass uses the FlattenAdd rewrite rule which (from what I can dig up) doesn't exist until kirin 0.17.26?

Although release-0-7 seemed to be fine with 17.23 so I'm not quite sure what's going on here

@david-pl
Copy link
Collaborator

@johnzl-777 I'm not sure why you had to bump the minimal version to get CI to work. I mean, it's the right thing to do, but my guess is that semver took care of that before: setting the compat to 0.17.23 should still fetch all available version that are more recent than that. Looking at the CI run that failed on the first commit, it did install v0.17.25, so maybe v0.17.26 just wasn't released?

@kaihsin
Copy link
Contributor

kaihsin commented Oct 24, 2025

@johnzl-777 I'm not sure why you had to bump the minimal version to get CI to work. I mean, it's the right thing to do, but my guess is that semver took care of that before: setting the compat to 0.17.23 should still fetch all available version that are more recent than that. Looking at the CI run that failed on the first commit, it did install v0.17.25, so maybe v0.17.26 just wasn't released?

It's because CI is setup such that it use uv.lock to install dependencies I believe, so it does not automatically upgrade to latest

@rafaelha rafaelha self-requested a review October 24, 2025 20:32
Copy link
Contributor

@rafaelha rafaelha left a comment

Choose a reason for hiding this comment

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

Looks good to me, once CI passes.

@david-pl
Copy link
Collaborator

CI is blocked by QuEraComputing/kirin#542

@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Contributor

github-actions bot commented Oct 27, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
10676 9401 88% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/bloqade/stim/rewrite/qubit_to_stim.py 90% 🟢
TOTAL 90% 🟢

updated for commit: 5790a13 by action🐍

@rafaelha
Copy link
Contributor

@kaihsin is this good to merge?

@johnzl-777 johnzl-777 merged commit 170088a into release-0-7 Oct 29, 2025
13 of 15 checks passed
@johnzl-777 johnzl-777 deleted the john/fix-u3-clifford-translation branch October 29, 2025 00:36
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.

5 participants