Skip to content

Conversation

@johnzl-777
Copy link
Contributor

I believe the signature should be in line with what was requested in #609 but I went ahead and made a dedicated dialect for the additional statement.

I originally wanted to follow something like native's structure which has its own version of the squin qubit dialect (same name but tucked away elsewhere) although I wasn't sure if this was something we wanted to mirror.

@johnzl-777 johnzl-777 linked an issue Nov 18, 2025 that may be closed by this pull request
@github-actions
Copy link
Contributor

github-actions bot commented Nov 18, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
10242 8986 88% 0% 🟢

New Files

File Coverage Status
src/bloqade/gemini/dialects/_init_.py 100% 🟢
src/bloqade/gemini/dialects/logical/_init_.py 100% 🟢
src/bloqade/gemini/dialects/logical/_dialect.py 100% 🟢
src/bloqade/gemini/dialects/logical/_interface.py 100% 🟢
src/bloqade/gemini/dialects/logical/stmts.py 100% 🟢
TOTAL 100% 🟢

Modified Files

File Coverage Status
src/bloqade/gemini/_init_.py 100% 🟢
src/bloqade/gemini/analysis/_init_.py 100% 🟢
src/bloqade/gemini/analysis/logical_validation/init.py 100% 🟢
TOTAL 100% 🟢

updated for commit: 136ed03 by action🐍

@codecov
Copy link

codecov bot commented Nov 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Collaborator

@david-pl david-pl left a comment

Choose a reason for hiding this comment

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

Generally, the code looks good. Just some small comments throughout. Also:

  • Please add a test.
  • What's the plan for method table impls for the new statement? I suppose this should work with the simulator and similar things. Is there a follow-up issue?

@weinbe58 weinbe58 self-assigned this Nov 19, 2025
Copy link
Member

@weinbe58 weinbe58 left a comment

Choose a reason for hiding this comment

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

If @david-pl is OK with a breaking change I think we should probably go ahead and rename the groups but otherwise @johnzl-777 please roll that change back.

Overall it looks good I have no other changes to propose

@david-pl
Copy link
Collaborator

@david-pl @johnzl-777 No, I'm fine with the breaking change. I was just wondering.

@johnzl-777
Copy link
Contributor Author

@david-pl so if we have simulator support for this, does that mean under the hood we're keeping track of the physical qubits? (hope this isn't too silly a question)

@weinbe58
Copy link
Member

weinbe58 commented Nov 20, 2025

@david-pl so if we have simulator support for this, does that mean under the hood we're keeping track of the physical qubits? (hope this isn't too silly a question)

No simulator support for this dialect. It doesn't make sense here because you're converting from logical qubit to physical qubits.

@johnzl-777
Copy link
Contributor Author

Trying to add a test to the validation, seems to be some obnoxious circular import thing going on. Will merge once I fix it (or request another review if it's a large change)

@johnzl-777
Copy link
Contributor Author

@david-pl @weinbe58 sorry to re-requst a review here, I kept running into this obnoxious circular import problem but I finally fixed it. The problem though is that "groups" now lives inside logical to keep the gemini.logical.kernel structure which kind of irks me.

@david-pl
Copy link
Collaborator

@johnzl-777 I think that's fine. Consider it approved from my side, but I'm not sure whether @weinbe58 has any comments.

@johnzl-777
Copy link
Contributor Author

@weinbe58 gave a thumbs up on the comment and hasn't revoked/changed his original approval so I think we're good (:

@johnzl-777
Copy link
Contributor Author

@david-pl With the docstrings checking feature in our CI will it always fail until we get everything fixed?

@david-pl
Copy link
Collaborator

@johnzl-777 yes. I know, not ideal, but I've yet to figure out how to make it check changes only.

FWIW, you can check your files with ruff check --select="D" path/to/file.

@johnzl-777 johnzl-777 merged commit cfc7f69 into main Nov 21, 2025
11 of 12 checks passed
@johnzl-777 johnzl-777 deleted the 609-create-terminalmeasure-statement branch November 21, 2025 14: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.

Create TerminalMeasure statement

4 participants