Skip to content

Commit bbeca77

Browse files
committed
make default true
1 parent e034dae commit bbeca77

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/bloqade/qasm2/dialects/noise.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def emit_pauli(
4242

4343
frame.body.append(
4444
ast.Comment(
45-
text=f"noist.Pauli1({px.value}, {py.value}, {pz.value}) {qarg_str}]"
45+
text=f"noise.Pauli1({px.value}, {py.value}, {pz.value}) {qarg_str}]"
4646
)
4747
)
4848
return ()

src/bloqade/qasm2/emit/target.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(
2929
allow_global: bool = False,
3030
custom_gate: bool = True,
3131
unroll_ifs: bool = True,
32-
allow_noise: bool = False,
32+
allow_noise: bool = True,
3333
) -> None:
3434
"""Initialize the QASM2 target.
3535

test/qasm2/emit/test_qasm2_emit.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def glob_u():
2020
qasm2_str = target.emit_str(glob_u)
2121
assert (
2222
qasm2_str
23-
== """KIRIN {func,lowering.call,lowering.func,py.ilist,qasm2.core,qasm2.expr,qasm2.glob,qasm2.indexing,qasm2.uop,scf};
23+
== """KIRIN {func,lowering.call,lowering.func,native,py.ilist,qasm2.core,qasm2.expr,qasm2.glob,qasm2.indexing,qasm2.uop,scf};
2424
include "qelib1.inc";
2525
qreg qreg[3];
2626
qreg qreg1[3];
@@ -46,7 +46,7 @@ def glob_u():
4646
print(qasm2_str)
4747
assert (
4848
qasm2_str
49-
== """KIRIN {func,lowering.call,lowering.func,py.ilist,qasm2.core,qasm2.expr,qasm2.glob,qasm2.indexing,qasm2.parallel,qasm2.uop,scf};
49+
== """KIRIN {func,lowering.call,lowering.func,native,py.ilist,qasm2.core,qasm2.expr,qasm2.glob,qasm2.indexing,qasm2.parallel,qasm2.uop,scf};
5050
include "qelib1.inc";
5151
qreg qreg[3];
5252
qreg qreg1[3];
@@ -102,7 +102,7 @@ def glob_u():
102102

103103
assert (
104104
qasm2_str
105-
== """KIRIN {func,lowering.call,lowering.func,py.ilist,qasm2.core,qasm2.expr,qasm2.indexing,qasm2.parallel,qasm2.uop,scf};
105+
== """KIRIN {func,lowering.call,lowering.func,native,py.ilist,qasm2.core,qasm2.expr,qasm2.indexing,qasm2.parallel,qasm2.uop,scf};
106106
include "qelib1.inc";
107107
qreg qreg[3];
108108
qreg qreg1[3];
@@ -160,7 +160,7 @@ def para_u():
160160
qasm2_str = target.emit_str(para_u)
161161
assert (
162162
qasm2_str
163-
== """KIRIN {func,lowering.call,lowering.func,py.ilist,qasm2.core,qasm2.expr,qasm2.indexing,qasm2.parallel,qasm2.uop,scf};
163+
== """KIRIN {func,lowering.call,lowering.func,native,py.ilist,qasm2.core,qasm2.expr,qasm2.indexing,qasm2.parallel,qasm2.uop,scf};
164164
include "qelib1.inc";
165165
qreg qreg[3];
166166
parallel.U(0.1, 0.2, 0.3) {
@@ -188,7 +188,7 @@ def para_u():
188188
qasm2_str = target.emit_str(para_u)
189189
assert (
190190
qasm2_str
191-
== """KIRIN {func,lowering.call,lowering.func,py.ilist,qasm2.core,qasm2.expr,qasm2.glob,qasm2.indexing,qasm2.parallel,qasm2.uop,scf};
191+
== """KIRIN {func,lowering.call,lowering.func,native,py.ilist,qasm2.core,qasm2.expr,qasm2.glob,qasm2.indexing,qasm2.parallel,qasm2.uop,scf};
192192
include "qelib1.inc";
193193
qreg qreg[3];
194194
parallel.U(0.1, 0.2, 0.3) {
@@ -217,7 +217,7 @@ def para_u():
217217
print(qasm2_str)
218218
assert (
219219
qasm2_str
220-
== """KIRIN {func,lowering.call,lowering.func,py.ilist,qasm2.core,qasm2.expr,qasm2.glob,qasm2.indexing,qasm2.uop,scf};
220+
== """KIRIN {func,lowering.call,lowering.func,native,py.ilist,qasm2.core,qasm2.expr,qasm2.glob,qasm2.indexing,qasm2.uop,scf};
221221
include "qelib1.inc";
222222
qreg qreg[3];
223223
U(0.1, 0.2, 0.3) qreg[1];

0 commit comments

Comments
 (0)