Skip to content

Conversation

@kaihsin
Copy link
Contributor

@kaihsin kaihsin commented Oct 27, 2025

This PR address Status #522

@kaihsin kaihsin requested a review from david-pl October 27, 2025 14:33
@weinbe58 weinbe58 linked an issue Oct 27, 2025 that may be closed by this pull request
@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
9508 8390 88% 0% 🟢

New Files

File Coverage Status
src/bloqade/stim/emit/impls.py 100% 🟢
TOTAL 100% 🟢

Modified Files

File Coverage Status
src/bloqade/stim/emit/_init_.py 100% 🟢
TOTAL 100% 🟢

updated for commit: def9bc1 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.

Looks good! Just wondering whether you'd want to be able to deal with inputs as well.

@rafaelha
Copy link
Contributor

I'm not sure if this should be part of this PR, but f-strings do not work

debug.info(f"debug measure {i}")
BuildError: Cannot lower JoinedStr node: <ast.JoinedStr object at 0x105878d10>
Source Traceback:
  File "/Users/rafaelhaenel/Documents/quera/bloqade-circuit/test/stim/passes/test_squin_debug_to_stim.py", line 55, col 19
    │  q = sq.qalloc(5)
    │  for i in range(5):
  55│      debug.info(f"debug measure {i}")
    │                 ^^^^^^^^^^^^^^^^^^^^
    │      qubit.broadcast.measure(q)
    │  return

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.

Other than @david-pl comment this looks good to me.

@weinbe58
Copy link
Member

I'm not sure if this should be part of this PR, but f-strings do not work

debug.info(f"debug measure {i}")
BuildError: Cannot lower JoinedStr node: <ast.JoinedStr object at 0x105878d10>
Source Traceback:
  File "/Users/rafaelhaenel/Documents/quera/bloqade-circuit/test/stim/passes/test_squin_debug_to_stim.py", line 55, col 19
    │  q = sq.qalloc(5)
    │  for i in range(5):
  55│      debug.info(f"debug measure {i}")
    │                 ^^^^^^^^^^^^^^^^^^^^
    │      qubit.broadcast.measure(q)
    │  return

yeah you would typically write this like:

debug.info(f"debug measure", i)

which means you would need to implement the additional inputs field of the info statement in the display.

@kaihsin
Copy link
Contributor Author

kaihsin commented Oct 28, 2025

I'm not sure if this should be part of this PR, but f-strings do not work

debug.info(f"debug measure {i}")
BuildError: Cannot lower JoinedStr node: <ast.JoinedStr object at 0x105878d10>
Source Traceback:
  File "/Users/rafaelhaenel/Documents/quera/bloqade-circuit/test/stim/passes/test_squin_debug_to_stim.py", line 55, col 19
    │  q = sq.qalloc(5)
    │  for i in range(5):
  55│      debug.info(f"debug measure {i}")
    │                 ^^^^^^^^^^^^^^^^^^^^
    │      qubit.broadcast.measure(q)
    │  return

f-string does not support by kirin at the moment. I don't think it should be mixed in this PR. maybe create an issue for "feature" request

@david-pl david-pl merged commit 34e9679 into main Oct 29, 2025
11 checks passed
@david-pl david-pl deleted the khwu/stim_annotate branch October 29, 2025 12:17
david-pl pushed a commit that referenced this pull request Oct 29, 2025
david-pl pushed a commit that referenced this pull request Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to Qubit Address Analysis

6 participants