Skip to content

Commit db36429

Browse files
authored
rename aux statements in stim dialect to auxiliary (#261)
Fixes #260 , decent number of folks seem to be unable to get this to work in Win 10 _at all_ will merge in by myself once CI clears it. Local test via `just coverage-run` seems fine. cc: @ChenZhao44 - I don't think this will impact your work if you're pulling from the `stim` module considering existing aliasing
1 parent ed86501 commit db36429

File tree

16 files changed

+24
-20
lines changed

16 files changed

+24
-20
lines changed

src/bloqade/stim/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from .groups import main as main
22
from ._wrappers import * # noqa: F403
3-
from .dialects.aux import * # noqa F403
43
from .dialects.gate import * # noqa F403
54
from .dialects.noise import * # noqa F403
65
from .dialects.collapse import * # noqa F403
6+
from .dialects.auxiliary import * # noqa F403

src/bloqade/stim/_wrappers.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from kirin.lowering import wraps
44

5-
from .dialects import aux, gate, noise, collapse
5+
from .dialects import gate, noise, collapse, auxiliary
66

77

88
# dialect:: gate
@@ -69,32 +69,34 @@ def cz(
6969

7070
## pp
7171
@wraps(gate.SPP)
72-
def spp(targets: tuple[aux.PauliString, ...], dagger=False) -> None: ...
72+
def spp(targets: tuple[auxiliary.PauliString, ...], dagger=False) -> None: ...
7373

7474

7575
# dialect:: aux
76-
@wraps(aux.GetRecord)
77-
def rec(id: int) -> aux.RecordResult: ...
76+
@wraps(auxiliary.GetRecord)
77+
def rec(id: int) -> auxiliary.RecordResult: ...
7878

7979

80-
@wraps(aux.Detector)
80+
@wraps(auxiliary.Detector)
8181
def detector(
82-
coord: tuple[Union[int, float], ...], targets: tuple[aux.RecordResult, ...]
82+
coord: tuple[Union[int, float], ...], targets: tuple[auxiliary.RecordResult, ...]
8383
) -> None: ...
8484

8585

86-
@wraps(aux.ObservableInclude)
87-
def observable_include(idx: int, targets: tuple[aux.RecordResult, ...]) -> None: ...
86+
@wraps(auxiliary.ObservableInclude)
87+
def observable_include(
88+
idx: int, targets: tuple[auxiliary.RecordResult, ...]
89+
) -> None: ...
8890

8991

90-
@wraps(aux.Tick)
92+
@wraps(auxiliary.Tick)
9193
def tick() -> None: ...
9294

9395

94-
@wraps(aux.NewPauliString)
96+
@wraps(auxiliary.NewPauliString)
9597
def pauli_string(
9698
string: tuple[str, ...], flipped: tuple[bool, ...], targets: tuple[int, ...]
97-
) -> aux.PauliString: ...
99+
) -> auxiliary.PauliString: ...
98100

99101

100102
# dialect:: collapse
@@ -123,7 +125,7 @@ def mxx(p: float, targets: tuple[int, ...]) -> None: ...
123125

124126

125127
@wraps(collapse.PPMeasurement)
126-
def mpp(p: float, targets: tuple[aux.PauliString, ...]) -> None: ...
128+
def mpp(p: float, targets: tuple[auxiliary.PauliString, ...]) -> None: ...
127129

128130

129131
@wraps(collapse.RZ)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from . import aux as aux, gate as gate, noise as noise, collapse as collapse
2-
from .aux.stmts import * # noqa F403
1+
from . import gate as gate, noise as noise, collapse as collapse, auxiliary as auxiliary
32
from .gate.stmts import * # noqa F403
43
from .noise.stmts import * # noqa F403
54
from .collapse.stmts import * # noqa F403
5+
from .auxiliary.stmts import * # noqa F403
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)