Skip to content

Commit e2493cd

Browse files
committed
Cleaner self arg in qasm loading
1 parent 7c7a1ee commit e2493cd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/bloqade/qasm2/_qasm_loading.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from typing import Any
55

66
from kirin import ir, lowering
7+
from kirin.types import MethodType
78
from kirin.dialects import func
89

910
from . import parse
@@ -82,8 +83,10 @@ def loads(
8283
body=body,
8384
)
8485

85-
self_arg = ir.BlockArgument(body.blocks[0], 0) # Self argument
86-
body.blocks[0]._args = (self_arg,)
86+
# self_arg = ir.BlockArgument(body.blocks[0], 0) # Self argument
87+
88+
body.blocks[0].args.append_from(MethodType, kernel_name + "_self")
89+
# body.blocks[0]._args = (self_arg,)
8790

8891
mt = ir.Method(
8992
sym_name=kernel_name,

0 commit comments

Comments
 (0)