Skip to content

Commit 26de281

Browse files
committed
fixing bug in standard library
1 parent 152a84a commit 26de281

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/bloqade/native/stdlib/broadcast.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def _ry_turns(angle: float, qubits: ilist.IList[qubit.Qubit, Any]):
3333

3434
@kernel
3535
def _rz_turns(angle: float, qubits: ilist.IList[qubit.Qubit, Any]):
36-
native.r(0.5, angle, qubits)
36+
native.rz(angle, qubits)
3737

3838

3939
@kernel
@@ -126,7 +126,7 @@ def rz(angle: float, qubits: ilist.IList[qubit.Qubit, Any]):
126126
angle (float): Rotation angle in radians.
127127
qubits (ilist.IList[qubit.Qubit, Any]): Target qubits.
128128
"""
129-
native.rz(_radian_to_turn(angle), qubits)
129+
_rz_turns(_radian_to_turn(angle), qubits)
130130

131131

132132
@kernel

test/native/upstream/test_squin2native.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
import pytest
33
from kirin.analysis import callgraph
44

5-
from bloqade import squin, native
5+
from bloqade import squin, native, test_utils
66
from bloqade.squin import gate
77
from bloqade.pyqrack import StackMemorySimulator
8-
from bloqade.test_utils import assert_methods
98
from bloqade.rewrite.passes import AggressiveUnroll
109
from bloqade.native.dialects import gate as native_gate
1110
from bloqade.native.upstream import GateRule, SquinToNative
@@ -70,4 +69,6 @@ def ghz_native(angle: float):
7069

7170
AggressiveUnroll(ghz_native.dialects).fixpoint(ghz_native)
7271
ghz_native.print()
73-
assert_methods(ghz_native_rewrite, ghz_native)
72+
test_utils.assert_nodes(
73+
ghz_native_rewrite.callable_region, ghz_native.callable_region
74+
)

0 commit comments

Comments
 (0)