Skip to content

Commit 653c590

Browse files
committed
clean up import
1 parent ba31259 commit 653c590

File tree

21 files changed

+119
-118
lines changed

21 files changed

+119
-118
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from . import _emit as _emit, address as address, _typeinfer as _typeinfer
22
from .stmts import (
3-
QRegNew as QRegNew,
4-
QRegGet as QRegGet,
5-
CRegNew as CRegNew,
6-
CRegGet as CRegGet,
73
Reset as Reset,
8-
Measure as Measure,
94
CRegEq as CRegEq,
5+
CRegGet as CRegGet,
6+
CRegNew as CRegNew,
7+
Measure as Measure,
8+
QRegGet as QRegGet,
9+
QRegNew as QRegNew,
1010
)
1111
from ._dialect import dialect as dialect
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
from . import _emit as _emit, _interp as _interp, _from_python as _from_python
22
from .stmts import (
3-
GateFunction as GateFunction,
4-
ConstFloat as ConstFloat,
5-
ConstInt as ConstInt,
6-
ConstPI as ConstPI,
7-
Neg as Neg,
8-
Sin as Sin,
3+
Add as Add,
94
Cos as Cos,
10-
Tan as Tan,
5+
Div as Div,
116
Exp as Exp,
127
Log as Log,
13-
Sqrt as Sqrt,
14-
Add as Add,
15-
Sub as Sub,
168
Mul as Mul,
17-
Div as Div,
9+
Neg as Neg,
1810
Pow as Pow,
11+
Sin as Sin,
12+
Sub as Sub,
13+
Tan as Tan,
14+
Sqrt as Sqrt,
15+
ConstPI as ConstPI,
16+
ConstInt as ConstInt,
17+
ConstFloat as ConstFloat,
18+
GateFunction as GateFunction,
1919
)
2020
from ._dialect import dialect as dialect
Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,40 @@
1-
from . import _emit as _emit, stmts as stmts
1+
from . import _emit as _emit, stmts as stmts, schedule as schedule
22
from .stmts import (
3-
UGate as UGate,
3+
CH as CH,
4+
CU as CU,
45
CX as CX,
5-
Barrier as Barrier,
6-
Id as Id,
7-
H as H,
8-
X as X,
9-
Y as Y,
10-
Z as Z,
11-
S as S,
12-
Sdag as Sdag,
13-
SX as SX,
14-
SXdag as SXdag,
15-
T as T,
16-
Tdag as Tdag,
6+
CY as CY,
7+
CZ as CZ,
178
RX as RX,
189
RY as RY,
1910
RZ as RZ,
11+
SX as SX,
2012
U1 as U1,
2113
U2 as U2,
22-
CZ as CZ,
23-
CY as CY,
24-
CSX as CSX,
25-
Swap as Swap,
26-
CH as CH,
2714
CCX as CCX,
28-
CSwap as CSwap,
2915
CRX as CRX,
3016
CRY as CRY,
3117
CRZ as CRZ,
18+
CSX as CSX,
3219
CU1 as CU1,
3320
CU3 as CU3,
34-
CU as CU,
3521
RXX as RXX,
3622
RZZ as RZZ,
23+
H as H,
24+
S as S,
25+
T as T,
26+
X as X,
27+
Y as Y,
28+
Z as Z,
29+
Id as Id,
30+
Sdag as Sdag,
31+
Swap as Swap,
32+
Tdag as Tdag,
33+
CSwap as CSwap,
34+
SXdag as SXdag,
35+
UGate as UGate,
36+
Barrier as Barrier,
3737
SingleQubitGate as SingleQubitGate,
3838
TwoQubitCtrlGate as TwoQubitCtrlGate,
3939
)
4040
from ._dialect import dialect as dialect
41-
from . import schedule as schedule

src/bloqade/qasm2/rewrite/desugar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from kirin.rewrite import abc, walk
66
from kirin.dialects import py
77

8-
from bloqade.qasm2.dialects import core
98
from bloqade.qasm2 import types
9+
from bloqade.qasm2.dialects import core
1010

1111

1212
class IndexingDesugarRule(abc.RewriteRule):

src/bloqade/squin/groups.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,3 @@ def run_pass(method):
4444
py_mult_to_mult_pass(method)
4545

4646
return run_pass
47-
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
from . import stmts as stmts
2-
from ._dialect import dialect as dialect
2+
from ._dialect import dialect as dialect
33
from ._wrapper import (
4-
pauli_channel as pauli_channel,
54
pp_error as pp_error,
65
depolarize as depolarize,
7-
pauli_channel as pauli_channel,
86
qubit_loss as qubit_loss,
7+
pauli_channel as pauli_channel,
98
)
10-

src/bloqade/squin/noise/_wrapper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
from kirin.lowering import wraps
1+
from kirin.lowering import wraps
22

33
from bloqade.squin.op.types import Op
4+
45
from . import stmts
56

7+
68
@wraps(stmts.PauliError)
79
def pauli_error(basis: Op, p: float) -> Op: ...
810

src/bloqade/squin/op/__init__.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
from . import stmts as stmts, types as types, rewrite as rewrite
2+
from .stdlib import (
3+
ch as ch,
4+
cx as cx,
5+
cy as cy,
6+
cz as cz,
7+
rx as rx,
8+
ry as ry,
9+
rz as rz,
10+
cphase as cphase,
11+
)
212
from .traits import Unitary as Unitary, MaybeUnitary as MaybeUnitary
313
from ._dialect import dialect as dialect
414
from ._wrapper import (
5-
kron as kron,
6-
mult as mult,
7-
scale as scale,
8-
adjoint as adjoint,
9-
control as control,
10-
identity as identity,
11-
rot as rot,
12-
shift as shift,
13-
phase as phase,
14-
x as x,
15-
y as y,
16-
z as z,
1715
h as h,
1816
s as s,
1917
t as t,
18+
u as u,
19+
x as x,
20+
y as y,
21+
z as z,
2022
p0 as p0,
2123
p1 as p1,
24+
rot as rot,
25+
kron as kron,
26+
mult as mult,
27+
phase as phase,
28+
scale as scale,
29+
shift as shift,
2230
spin_n as spin_n,
2331
spin_p as spin_p,
24-
u as u,
32+
adjoint as adjoint,
33+
control as control,
34+
identity as identity,
2535
pauli_string as pauli_string,
2636
)
27-
from .stdlib import (
28-
rx as rx,
29-
ry as ry,
30-
rz as rz,
31-
cx as cx,
32-
cz as cz,
33-
cy as cy,
34-
ch as ch,
35-
cphase as cphase,
36-
)

src/bloqade/squin/op/_wrapper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from kirin.lowering import wraps
2+
23
from . import stmts, types
34

5+
46
@wraps(stmts.Kron)
57
def kron(lhs: types.Op, rhs: types.Op) -> types.Op: ...
68

@@ -97,4 +99,3 @@ def u(theta: float, phi: float, lam: float) -> types.Op: ...
9799

98100
@wraps(stmts.PauliString)
99101
def pauli_string(*, string: str) -> types.Op: ...
100-

src/bloqade/squin/op/stdlib.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
21
from kirin import ir
3-
from kirin.prelude import structural_no_opt
4-
from ._dialect import dialect
2+
from kirin.prelude import structural_no_opt
3+
54
from . import types
6-
from ._wrapper import (
7-
rot,
8-
x,
9-
y,
10-
z,
11-
h,
12-
phase,
13-
control
14-
)
5+
from ._dialect import dialect
6+
from ._wrapper import h, x, y, z, rot, phase, control
7+
158

169
@ir.dialect_group(structural_no_opt.add(dialect))
1710
def op(self):

0 commit comments

Comments
 (0)