File tree Expand file tree Collapse file tree 4 files changed +31
-0
lines changed
Expand file tree Collapse file tree 4 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 11# Need this for impl registration to work properly!
22from . import impls as impls
33from .lattice import (
4+ Sites as Sites ,
45 NoSites as NoSites ,
56 AnySites as AnySites ,
67 NumberSites as NumberSites ,
Original file line number Diff line number Diff line change 1+ from typing import Dict
2+ from dataclasses import dataclass
3+
4+ from bloqade .analysis .address import Address
5+ from bloqade .squin .analysis .nsites import Sites
6+
7+ from kirin import ir
8+ from kirin .rewrite .abc import RewriteResult , RewriteRule
9+
10+
11+ @dataclass
12+ class SquinToStim (RewriteRule ):
13+
14+ # Somehow need to plug in Address and Sites
15+ # into the SSAValue Hints field, which only accepts
16+ # Attribute types
17+
18+ ## Could literally just plug in `ir.Attribute` into
19+ ## the Address and Site lattices?
20+ ## Couldn't I just create my own attributes instead?
21+
22+ address_analysis : Dict [ir .SSAValue , Address ]
23+ op_site_analysis : Dict [ir .SSAValue , Sites ]
24+
25+ # need to plug in data into the SSAValue
26+ # for the rewrite from these passes,
27+ # then something should look at those hints
28+ # and generate the corresponding stim statements
29+
30+ pass
You can’t perform that action at this time.
0 commit comments