Skip to content

Updating MeasureIDAnalysis to track Observables and Detectors + Gemini dialects refactor. #699

Merged
weinbe58 merged 19 commits intomainfrom
phil/697-dataflow-analysis-to-map-detectormeasurementobservables-to-user-output-of-kernel
Feb 4, 2026
Merged

Updating MeasureIDAnalysis to track Observables and Detectors + Gemini dialects refactor. #699
weinbe58 merged 19 commits intomainfrom
phil/697-dataflow-analysis-to-map-detectormeasurementobservables-to-user-output-of-kernel

Conversation

@weinbe58
Copy link
Member

@weinbe58 weinbe58 commented Feb 3, 2026

In this PR I implement logic that handes the propagation and tracking of observables and detectors through the MeasurementIDAnalysis. In top of that I also refactor the gemini submodule and made the number of physical qubits in the logical qubit measurement explicit. After that I also updated the logic in the MeasurementIDAnalysis to handle the conversion from logical to physical measurements.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
11110 9804 88% 0% 🟢

New Files

File Coverage Status
src/bloqade/gemini/logical/_init_.py 100% 🟢
src/bloqade/gemini/logical/dialects/_init_.py 100% 🟢
src/bloqade/gemini/logical/rewrite/qubit_count.py 100% 🟢
TOTAL 100% 🟢

Modified Files

File Coverage Status
src/bloqade/analysis/measure_id/analysis.py 100% 🟢
src/bloqade/analysis/measure_id/impls.py 91% 🟢
src/bloqade/analysis/measure_id/lattice.py 90% 🟢
src/bloqade/gemini/_init_.py 100% 🟢
src/bloqade/gemini/analysis/measurement_validation/impls.py 88% 🟢
TOTAL 94% 🟢

updated for commit: b60fec6 by action🐍

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 91.05691% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/bloqade/analysis/measure_id/lattice.py 81.81% 6 Missing ⚠️
src/bloqade/analysis/measure_id/impls.py 89.13% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

@weinbe58 weinbe58 requested a review from johnzl-777 February 3, 2026 16:31
@weinbe58 weinbe58 marked this pull request as draft February 3, 2026 16:46
@weinbe58 weinbe58 marked this pull request as ready for review February 3, 2026 18:15
Copy link
Contributor

@johnzl-777 johnzl-777 left a comment

Choose a reason for hiding this comment

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

LGTM! Once you get it merged in I'll merge it into #630 and have that ready for review too.

Comment on lines 374 to 376
O0 = squin.set_observable([m0[0], m0[1]], 0)
m1 = squin.broadcast.measure(q)
O1 = squin.set_observable([m1[0], m1[1]], 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason that you decided to use capital "O" as the prefix for observable-related variables?

No problem on my end, just curious if there was some specific motivation for it

@weinbe58 weinbe58 merged commit 572f669 into main Feb 4, 2026
11 of 12 checks passed
@weinbe58 weinbe58 deleted the phil/697-dataflow-analysis-to-map-detectormeasurementobservables-to-user-output-of-kernel branch February 4, 2026 15:19
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.

Dataflow analysis to map detector/measurement/observables to user output of kernel.

2 participants