diff --git a/src/tequila-impl.typ b/src/tequila-impl.typ index da9992f..bfbb595 100644 --- a/src/tequila-impl.typ +++ b/src/tequila-impl.typ @@ -129,6 +129,10 @@ control, target, gates.ctrl, gates.gate.with(content) ) +#let multi-controlled-gate(controls, qubit, target) = generate-multi-controlled-gate( + controls, qubit, target +) + /// Constructs a circuit from operation instructions. /// diff --git a/src/tequila.typ b/src/tequila.typ index dc2611a..86cf4bb 100644 --- a/src/tequila.typ +++ b/src/tequila.typ @@ -1 +1 @@ -#import "tequila-impl.typ": build, h, gate, mqgate, x, y, z, cx, cz, s, sdg, sx, sxdg, t, tdg, p, rx, ry, rz, u, barrier, swap, meter, graph-state, qft, ccx, ccz, cca, cccx \ No newline at end of file +#import "tequila-impl.typ": build, h, gate, mqgate, x, y, z, cx, cz, s, sdg, sx, sxdg, t, tdg, p, rx, ry, rz, u, barrier, swap, meter, graph-state, qft, ccx, ccz, cca, cccx, multi-controlled-gate \ No newline at end of file diff --git a/tests/tequila/basic/ref/9.png b/tests/tequila/basic/ref/9.png index ef5f2f8..2b97122 100644 Binary files a/tests/tequila/basic/ref/9.png and b/tests/tequila/basic/ref/9.png differ diff --git a/tests/tequila/basic/test.typ b/tests/tequila/basic/test.typ index 6427eaa..6eb5323 100644 --- a/tests/tequila/basic/test.typ +++ b/tests/tequila/basic/test.typ @@ -92,6 +92,7 @@ tq.y(1), tq.cca(1, 4, 2, $X$), tq.h(range(5)), - tq.cccx(0, 1, 3, 2) + tq.cccx(0, 1, 3, 2), + tq.multi-controlled-gate((0,1,4), 2, quill.mqgate.with(n:2, $K$)) ))