Skip to content

Commit f6105bb

Browse files
committed
confirm analysis wrapping works
1 parent 89a17fd commit f6105bb

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

src/bloqade/main.py

Whitespace-only changes.

src/bloqade/squin/analysis/rewrite/__init__.py

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from .stim import (
2+
SitesAttribute as SitesAttribute,
3+
AddressAttribute as AddressAttribute,
4+
WrapSquinAnalysis as WrapSquinAnalysis,
5+
)

src/bloqade/squin/analysis/rewrite/stim.py renamed to src/bloqade/squin/rewrite/stim.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __hash__(self) -> int:
2626

2727
def print_impl(self, printer: Printer) -> None:
2828
# Can return to implementing this later
29-
pass
29+
printer.print(self.address)
3030

3131

3232
@op.dialect.register
@@ -41,7 +41,7 @@ def __hash__(self) -> int:
4141

4242
def print_impl(self, printer: Printer) -> None:
4343
# Can return to implementing this later
44-
pass
44+
printer.print(self.sites)
4545

4646

4747
@dataclass
@@ -54,7 +54,7 @@ def wrap(self, value: ir.SSAValue) -> bool:
5454
address_analysis_result = self.address_analysis[value]
5555
op_site_analysis_result = self.op_site_analysis[value]
5656

57-
if value.hints["address"] and value.hints["sites"]:
57+
if value.hints.get("address") and value.hints.get("sites"):
5858
return False
5959
else:
6060
value.hints["address"] = AddressAttribute(address_analysis_result)

0 commit comments

Comments
 (0)