Skip to content

Commit bdfa55d

Browse files
authored
[docs] Improve the QFT example (#40)
1 parent e361f09 commit bdfa55d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

examples/qft.typ

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
row-spacing: 5pt,
66
column-spacing: 8pt,
77
lstick($|j_1〉$), $H$, $R_2$, midstick($ dots $),
8-
$R_(n-1)$, $R_n$, 8,
9-
rstick($|0〉+e^(2pi i 0.j_1 dots j_n)|1〉$),[\ ],
8+
$R_(n-1)$, $R_n$, 8, permute(4, 3, 2, 1, 0, wire-count: (1, 1, 0, 1, 1)),
9+
rstick($1/sqrt(2)(|0〉+e^(2pi i 0.j_n)|1〉)$),[\ ],
1010
lstick($|j_2〉$), 1, ctrl(-1), midstick($ dots $), 2, $H$, midstick($ dots $),
11-
$R_(n-2)$, $R_(n-1)$, midstick($ dots $), 3,
12-
rstick($|0〉+e^(2pi i 0.j_2 dots j_n)|1〉$), [\ ],
11+
$R_(n-2)$, $R_(n-1)$, midstick($ dots $), 4,
12+
rstick($1/sqrt(2)(|0〉+e^(2pi i 0.j_(n-1)j_n)|1〉)$), [\ ],
1313

1414
setwire(0), midstick($dots.v$), 1, midstick($dots.v$), [\ ],
1515

1616
lstick($|j_(n-1)$), 3, ctrl(-3), 3, ctrl(-2), 1, midstick($ dots $), $H$,
17-
$R_2$, 1, rstick($|0〉+e^(2pi i 0.j_(n-1)j_n)|1〉$), [\ ],
18-
lstick($|j_n〉$), 4, ctrl(-4), 3, ctrl(-3), midstick($ dots $), 1, ctrl(-1), $H$,
19-
rstick($|0〉+e^(2pi i 0.j_n)|1〉$)
20-
)
17+
$R_2$, 2, rstick($1/sqrt(2)(|0〉+e^(2pi i 0.j_2 dots j_n)|1〉)$), [\ ],
18+
lstick($|j_n〉$), 4, ctrl(-4), 3, ctrl(-3), midstick($ dots $), 1, ctrl(-1), $H$, 1,
19+
rstick($1/sqrt(2)(|0〉+e^(2pi i 0.j_1 dots j_n)|1〉)$)
20+
)

tests/examples/qft/ref/1.png

2.54 KB
Loading

0 commit comments

Comments
 (0)