|
1 | 1 | from kirin import ir, types |
2 | | -from bloqade import qasm2, squin |
3 | 2 | from kirin.passes import Fold |
4 | 3 | from kirin.dialects import py, func, ilist |
| 4 | + |
| 5 | +from bloqade import qasm2, squin |
5 | 6 | from bloqade.analysis import address |
6 | 7 |
|
7 | 8 |
|
@@ -74,10 +75,7 @@ def test_multiple_unwrap(): |
74 | 75 | stmts: list[ir.Statement] = [ |
75 | 76 | # Create qubit register |
76 | 77 | (n_qubits := as_int(2)), |
77 | | - # (qreg := qasm2.core.QRegNew(n_qubits=n_qubits.result)), |
78 | | - (qreg := squin.qubit.New(n_qubits=n_qubits.result)), |
79 | | - (idx0 := as_int(0)), |
80 | | - # (q0 := py.GetItem(obj=qreg.result, index=idx0.result)), |
| 78 | + (qreg := qasm2.core.QRegNew(n_qubits=n_qubits.result)), |
81 | 79 | # Get qubits out |
82 | 80 | (idx0 := as_int(0)), |
83 | 81 | (q0 := qasm2.core.QRegGet(reg=qreg.result, idx=idx0.result)), |
@@ -117,8 +115,6 @@ def test_multiple_unwrap(): |
117 | 115 | fold_pass = Fold(squin_with_qasm_core) |
118 | 116 | fold_pass(constructed_method) |
119 | 117 |
|
120 | | - constructed_method.print() |
121 | | - |
122 | 118 | frame, _ = address.AddressAnalysis(constructed_method.dialects).run_analysis( |
123 | 119 | constructed_method, no_raise=False |
124 | 120 | ) |
@@ -190,8 +186,6 @@ def test_multiple_wire_apply(): |
190 | 186 | constructed_method, no_raise=False |
191 | 187 | ) |
192 | 188 |
|
193 | | - constructed_method.print(analysis=frame.entries) |
194 | | - |
195 | 189 | address_wire_parent_qubit_0 = [] |
196 | 190 | address_wire_parent_qubit_1 = [] |
197 | 191 | address_types = frame.entries.values() # dict[SSAValue, Address] |
|
0 commit comments