Skip to content

Commit 4b35f8a

Browse files
committed
fixing tests
1 parent 78f5d2b commit 4b35f8a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/bloqade/native/_prelude.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
from bloqade import qubit
99

10-
from .dialects import gates
10+
from .dialects import gate
1111

1212

13-
@ir.dialect_group(structural_no_opt.union([gates, qubit]))
13+
@ir.dialect_group(structural_no_opt.union([gate, qubit]))
1414
def kernel(self):
1515
"""Compile a function to a native kernel."""
1616

test/native/upstream/test_squin2native.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from bloqade import squin
66
from bloqade.squin import gate
77
from bloqade.pyqrack import StackMemorySimulator
8-
from bloqade.native.dialects import gates
8+
from bloqade.native.dialects import gate as native_gate
99
from bloqade.native.upstream import GateRule, SquinToNative
1010

1111

@@ -33,14 +33,14 @@ def main():
3333
new_main = SquinToNative().emit(main, no_raise=True)
3434

3535
new_callgraph = callgraph.CallGraph(new_main)
36-
# make sure all kernels have been converted to native gates
36+
# make sure all kernels have been converted to native gate
3737
all_kernels = (ker for kers in new_callgraph.defs.values() for ker in kers)
3838
for ker in all_kernels:
3939
assert gate.dialect not in ker.dialects
40-
assert gates.dialect in ker.dialects
40+
assert native_gate.dialect in ker.dialects
4141

4242
# test to make sure the statevectors are the same
43-
# before and after conversion to native gates
43+
# before and after conversion to native gate
4444
old_sv = np.asarray(StackMemorySimulator(min_qubits=n).state_vector(main))
4545
old_sv /= old_sv[imax := np.abs(old_sv).argmax()] / np.abs(old_sv[imax])
4646

0 commit comments

Comments
 (0)