Skip to content

Conversation

@weinbe58
Copy link
Member

@weinbe58 weinbe58 commented Oct 22, 2025

In this PR I implement a Joint analysis with constant prop and Address analysis to try to get the address analysis to work properly going into the call stack.

I do not use a Cartesian product for the lattic because I need to implement partial lambda and partial IList and tuple to get the analysis to work. In order to support constant folding, however, I opted into adding an extra lattice element to wrap the constant prop results.

@weinbe58 weinbe58 marked this pull request as draft October 22, 2025 21:09
@weinbe58 weinbe58 marked this pull request as ready for review October 24, 2025 20:33
@codecov
Copy link

codecov bot commented Oct 27, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Oct 27, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
9731 8550 88% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/bloqade/analysis/address/_init_.py 100% 🟢
src/bloqade/analysis/address/analysis.py 88% 🟢
src/bloqade/analysis/address/impls.py 82% 🟢
src/bloqade/analysis/address/lattice.py 67% 🟢
src/bloqade/analysis/fidelity/analysis.py 100% 🟢
src/bloqade/pyqrack/device.py 80% 🟢
src/bloqade/pyqrack/target.py 76% 🟢
src/bloqade/qasm2/dialects/core/address.py 89% 🟢
src/bloqade/qasm2/dialects/noise/fidelity.py 100% 🟢
src/bloqade/qasm2/dialects/noise/model.py 93% 🟢
src/bloqade/qasm2/rewrite/noise/heuristic_noise.py 96% 🟢
src/bloqade/qasm2/rewrite/parallel_to_glob.py 71% 🟢
src/bloqade/qasm2/rewrite/parallel_to_uop.py 76% 🟢
src/bloqade/squin/analysis/schedule.py 88% 🟢
src/bloqade/stim/rewrite/qubit_to_stim.py 86% 🟢
src/bloqade/stim/rewrite/squin_noise.py 93% 🟢
src/bloqade/stim/rewrite/util.py 82% 🟢
TOTAL 86% 🟢

updated for commit: a259ba4 by action🐍

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.

I have some minor comments. Other than that it looks good, and I did make sure that also the documentation examples work with this change.

Still, I'll have to go through this as it's not a simple change.
I'm fine with merging it, though.

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.

Great!

case _:
return result

def unpack_iterable(self, collection: Address):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess, for consistency, this method should be called unpack_collection.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I'm gonna rename it to iterable since in some cases it is an iterable in some cases its not.

@weinbe58 weinbe58 merged commit ca005e0 into main Oct 30, 2025
10 of 11 checks passed
@weinbe58 weinbe58 deleted the phil/new-address-analysis branch October 30, 2025 12:31
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