Skip to content

Commit a908c4a

Browse files
committed
2 parents 262c4fd + e611c83 commit a908c4a

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

src/compiler/reflection.jl

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function yao_code_lowered_m(ex)
2020
:($locs => $gate) => quote
2121
Base.code_lowered(
2222
$Intrinsics.apply,
23-
($YaoCompiler.AnyReg, typeof($gate), typeof($Locations($(locs))))
23+
($YaoCompiler.AnyReg, typeof($gate), typeof($Locations($(locs)))),
2424
)
2525
end
2626
# apply(reg, gate)
@@ -36,7 +36,12 @@ function yao_code_lowered_m(ctrl, ex)
3636
:($locs => $gate) => quote
3737
Base.code_lowered(
3838
$Intrinsics.apply,
39-
($YaoCompiler.AnyReg, typeof($gate), typeof($Locations($(locs))), typeof($CtrlLocations($ctrl)))
39+
(
40+
$YaoCompiler.AnyReg,
41+
typeof($gate),
42+
typeof($Locations($(locs))),
43+
typeof($CtrlLocations($ctrl)),
44+
),
4045
)
4146
end
4247
_ => error("expect a locs => gate expression")
@@ -50,14 +55,15 @@ function yao_code_typed_m(ex)
5055
$Base.code_typed(
5156
$Intrinsics.apply,
5257
($YaoCompiler.AnyReg, typeof($gate), typeof($Locations($(locs))));
53-
interp=$(YaoInterpreter())
58+
interp = $(YaoInterpreter()),
5459
)
5560
end
5661
# apply(reg, gate)
5762
_ => quote
5863
$Base.code_typed(
59-
$Intrinsics.apply, ($YaoCompiler.AnyReg, typeof($ex));
60-
interp=$(YaoInterpreter()),
64+
$Intrinsics.apply,
65+
($YaoCompiler.AnyReg, typeof($ex));
66+
interp = $(YaoInterpreter()),
6167
)
6268
end
6369
end
@@ -69,8 +75,13 @@ function yao_code_typed_m(ctrl, ex)
6975
:($locs => $gate) => quote
7076
Base.code_typed(
7177
$Intrinsics.apply,
72-
($YaoCompiler.AnyReg, typeof($gate), typeof($Locations($(locs))), typeof($CtrlLocations($ctrl)));
73-
interp=$(YaoInterpreter()),
78+
(
79+
$YaoCompiler.AnyReg,
80+
typeof($gate),
81+
typeof($Locations($(locs))),
82+
typeof($CtrlLocations($ctrl)),
83+
);
84+
interp = $(YaoInterpreter()),
7485
)
7586
end
7687
_ => error("expect a locs => gate expression")

0 commit comments

Comments
 (0)