Open
Description
MWE:
@squin.kernel
def main():
q = squin.qubit.new(3)
x = squin.op.x()
for i in range(3):
squin.qubit.apply(x, [q[i]])
main.print()
The resulting IR is shows that the loop variable is an IList
for some reason:
%x_1, %q_1, %x_2, %q_2 = scf.for %i : !py.IList[!py.int, Literal(3,int)] in %1 -> !py.Op, !py.IList[!py.Qubit, !Any], !py.Op, !py.IList[!py.Qubit, !Any]
Tested on bloqade-circuit main branch with kirin v0.17.6.