Skip to content

Commit

Permalink
[remove] the deprecated scale-factor of quantum-circuit
Browse files Browse the repository at this point in the history
Use `scale` instead
  • Loading branch information
Mc-Zen committed May 2, 2024
1 parent a291051 commit dfb8092
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/shor-nine-qubit-code.typ
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
setwire(0), 5, lstick($|0〉$), setwire(1), 1, targ(), 1)

#quantum-circuit(
scale-factor: 80%,
scale: 80%,
lstick($|ψ〉$), 1, 10pt, ctrl(3), ctrl(6), $H$, 1, 15pt,
ctrl(1), ctrl(2), 1, [\ ],
..ancillas, [\ ],
Expand Down
2 changes: 0 additions & 2 deletions src/quill2.typ
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
fill: white,
font-size: 10pt,
scale: 100%,
scale-factor: 100%,
baseline: 0pt,
circuit-padding: .4em,
fill-wires: true,
Expand Down Expand Up @@ -495,7 +494,6 @@
/////////// END Second pass: Generation ///////////
// grace period backwards-compatibility:
let scale = scale
if scale-factor != 100% { scale = scale-factor }
let scale-float = scale / 100%
if circuit-padding != none {
let circuit-padding = process-args.process-padding-arg(circuit-padding)
Expand Down
2 changes: 1 addition & 1 deletion tests/gates/custom gate size/test.typ
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

#pagebreak()

#quantum-circuit(scale-factor: 70%,
#quantum-circuit(scale: 70%,
targ(), targ(size: 6pt), targ(size: 3pt), ctrl(0), ctrl(0, size: 4pt), ctrl(0, open: true), ctrl(0, size: 4pt, open: true), ctrl(0), ctrl(0, size: 4pt)
)
3 changes: 1 addition & 2 deletions tests/gates/meter/test.typ
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#pagebreak()

#quantum-circuit(
scale-factor: 120%,
scale: 120%,
1, meter(label: $y$), 1, meter(n: 1, label: $lr(|plus.minus〉)$), meter(label: $phi/2$, n: 1, wire-count: 1), meter(target: 1, label: $X$), meter(n: 2, label: $X$), [\ ],
1, meter(radius: 3pt, fill: gray), 3,ctrl(0), 1
)
Expand All @@ -19,7 +19,6 @@
gate-padding: 2pt,
wire: .2pt + red,
color: red,
// scale-factor: 200%,
1, meter(label: $y$), 1, meter(n: 1, label: $lr(|plus.minus〉)$), meter(label: $phi/2$, n: 1, wire-count: 1), meter(target: 1, label: "a"), meter(n: 2, label: "a"), [\ ],
1, gate($H$), 3, ctrl(0), 2
)

0 comments on commit dfb8092

Please sign in to comment.