Skip to content

Commit

Permalink
[add] ..args to tequila.ccx and co.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mc-Zen committed Jan 15, 2025
1 parent dce8569 commit 72430f7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/tequila-impl.typ
Original file line number Diff line number Diff line change
Expand Up @@ -188,17 +188,17 @@
#let swap(control, target, ..args) = generate-two-qubit-gate(
control, target, gates.swap.with(..args), gates.swap.with(0)
)
#let ccx(control1, control2, target) = generate-multi-controlled-gate(
(control1, control2), target, gates.targ
#let ccx(control1, control2, target, ..args) = generate-multi-controlled-gate(
(control1, control2), target, gates.targ, ..args
)
#let cccx(control1, control2, control3, target) = generate-multi-controlled-gate(
(control1, control2, control3), target, gates.targ
#let cccx(control1, control2, control3, target, ..args) = generate-multi-controlled-gate(
(control1, control2, control3), target, gates.targ, ..args
)
#let ccz(control1, control2, target) = generate-multi-controlled-gate(
(control1, control2), target, gates.ctrl.with(0)
#let ccz(control1, control2, target, ..args) = generate-multi-controlled-gate(
(control1, control2), target, gates.ctrl.with(0), ..args
)
#let cca(control1, control2, target, content) = generate-multi-controlled-gate(
(control1, control2), target, gates.gate.with(content)
#let cca(control1, control2, target, content, ..args) = generate-multi-controlled-gate(
(control1, control2), target, gates.gate.with(content), ..args
)


Expand Down
Binary file modified tests/tequila/styling/ref/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tests/tequila/styling/test.typ
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
..tq.build(
tq.h(0),
tq.cx(0, 1, open: true, wire-label: sym.dots.v),
tq.ccx(0, 2, 1, open: true),
tq.multi-controlled-gate((0, 1), 2, quill.targ, open: true),
)
)
Expand Down

0 comments on commit 72430f7

Please sign in to comment.