Skip to content

Commit 79f3168

Browse files
committed
Remove custom gate handling from QASM2 emission logic
1 parent db9743b commit 79f3168

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/bloqade/qasm2/emit/target.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -124,29 +124,6 @@ def emit(self, entry: ir.Method) -> ast.MainProgram:
124124
extra = []
125125
if self.qelib1:
126126
extra.append(ast.Include("qelib1.inc"))
127-
if self.custom_gate:
128-
cg = CallGraph(entry)
129-
130-
for _, fns in cg.defs.items():
131-
if len(fns) != 1:
132-
raise ValueError("Incorrect callgraph")
133-
134-
(fn,) = fns
135-
if fn is entry:
136-
continue
137-
138-
fn = fn.similar()
139-
QASM2Fold(fn.dialects).fixpoint(fn)
140-
141-
# if not self.allow_global:
142-
# # rewrite global to parallel
143-
# GlobalToParallel(dialects=fn.dialects)(fn)
144-
145-
# if not self.allow_parallel:
146-
# # rewrite parallel to uop
147-
# ParallelToUOp(dialects=fn.dialects)(fn)
148-
149-
Py2QASM(fn.dialects)(fn)
150127

151128
main_program.statements = extra + main_program.statements
152129
return main_program

0 commit comments

Comments
 (0)