Skip to content

Commit

Permalink
[add] basic multi-qubit support for midstick, see #10
Browse files Browse the repository at this point in the history
  • Loading branch information
Mc-Zen committed Sep 14, 2024
1 parent c6d132b commit 6f5a887
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/decorations.typ
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,19 @@
/// - label (array, str, content, dictionary): One or more labels to add to the gate.
#let midstick(
content,
n: 1,
fill: none,
label: none,
x: auto,
y: auto
) = gate(content, draw-function: draw-functions.draw-unboxed-gate, label: label, fill: fill, x: x, y: y)
) = {
if n == 1 {
gate(content, draw-function: draw-functions.draw-unboxed-gate, label: label, fill: fill, x: x, y: y)
} else {
mqgate(content, n: n, draw-function: draw-functions.draw-boxed-multigate, label: label, fill: fill, x: x, y: y, stroke: none)
}
}




Expand Down

0 comments on commit 6f5a887

Please sign in to comment.