Skip to content

Commit 733b50e

Browse files
committed
adjusting file
1 parent 8e0aa9f commit 733b50e

2 files changed

Lines changed: 30 additions & 11 deletions

File tree

5.44 KB
Binary file not shown.

doc/src/week12/Latexfiles/week12.tex

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
\usepackage[T1]{fontenc}
44
\usepackage[utf8]{inputenc}
5-
\usepackage{lmodern}
5+
66
\usepackage{amsmath,amssymb,amsfonts}
77
\usepackage{physics}
88
\usepackage{bm}
99
\usepackage{mathtools}
10-
\usepackage{quantikz}
10+
\usepackage{tikz}
11+
\usetikzlibrary{quantikz,arrows.meta,positioning}
1112
\usepackage{graphicx}
1213
\usepackage{booktabs}
1314
\usepackage{hyperref}
@@ -173,12 +174,16 @@
173174

174175
\begin{frame}{QPE Circuit}
175176
\centering
177+
\begin{tikzpicture}
178+
\node[scale=0.9] {
176179
\begin{quantikz}
177180
\lstick{$\ket{0}$} & \gate{H} & \ctrl{3} & \qw & \qw & \gate[3]{\mathrm{QFT}^\dagger} & \meter{} \\
178181
\lstick{$\ket{0}$} & \gate{H} & \qw & \ctrl{2} & \qw & \ghost{\mathrm{QFT}^\dagger} & \meter{} \\
179182
\lstick{$\ket{0}$} & \gate{H} & \qw & \qw & \ctrl{1} & \ghost{\mathrm{QFT}^\dagger} & \meter{} \\
180183
\lstick{$\ket{\psi}$} & \qw & \gate{U^4} & \gate{U^2} & \gate{U} & \qw & \qw
181184
\end{quantikz}
185+
};
186+
\end{tikzpicture}
182187

183188
\vspace{0.5em}
184189

@@ -375,12 +380,16 @@ \section{Quantum Phase Estimation}
375380
\end{frame}
376381

377382
\begin{frame}{Phase Estimation Circuit}
383+
\begin{tikzpicture}
384+
\node[scale=0.85] {
378385
\begin{quantikz}[row sep=0.35cm, column sep=0.45cm]
379386
\lstick{$|0\rangle$} & \gate{H} & \ctrl{3} & \qw & \qw & \gate[wires=3]{\mathrm{QFT}^\dagger} & \meter{} \\
380387
\lstick{$|0\rangle$} & \gate{H} & \qw & \ctrl{2} & \qw & & \meter{} \\
381388
\lstick{$|0\rangle$} & \gate{H} & \qw & \qw & \ctrl{1} & & \meter{} \\
382389
\lstick{$|u\rangle$} & \qw & \gate{U} & \gate{U^2} & \gate{U^4} & \qw & \qw
383390
\end{quantikz}
391+
};
392+
\end{tikzpicture}
384393
\end{frame}
385394

386395
\begin{frame}{How the Phases Accumulate}
@@ -441,11 +450,15 @@ \section{The HHL Algorithm}
441450
\end{frame}
442451

443452
\begin{frame}{Full HHL Circuit Schematic}
453+
\begin{tikzpicture}
454+
\node[scale=0.85] {
444455
\begin{quantikz}[row sep=0.35cm, column sep=0.38cm]
445456
\lstick{$|0\rangle$} & \qw & \gate[style={fill=blue!10}]{R(\lambda^{-1})} & \qw & \meter{} \\
446457
\lstick{$|0\rangle^{\otimes m}$} & \gate[wires=2, style={fill=green!10}]{\mathrm{QPE}(e^{iAt})} & \qw & \gate[wires=2, style={fill=green!10}]{\mathrm{QPE}^\dagger} & \qw \\
447458
\lstick{$|b\rangle$} & \qw & \qw & \qw & \rstick{$|x\rangle\propto A^{-1}|b\rangle$}
448459
\end{quantikz}
460+
};
461+
\end{tikzpicture}
449462
\end{frame}
450463

451464

@@ -692,13 +705,15 @@ \section{The HHL Algorithm}
692705

693706

694707
\begin{frame}{High-Level HHL Circuit}
695-
\[
708+
\begin{tikzpicture}
709+
\node[scale=0.85] {
696710
\begin{quantikz}[row sep=0.35cm, column sep=0.42cm]
697-
\lstick{\ket{0}_a} & \qw & \gate[style={fill=blue!10}]{R(\lambda^{-1})} & \qw & \meter{} \\
698-
\lstick{\ket{0}^{\otimes m}_p} & \gate[wires=2, style={fill=green!10}]{\mathrm{QPE}(e^{iAt})} & \qw & \gate[wires=2, style={fill=green!10}]{\mathrm{QPE}^\dagger} & \qw \\
699-
\lstick{\ket{b}_s} & \qw & \qw & \qw & \rstick{\ket{x}\propto A^{-1}\ket{b}}
711+
\lstick{$|0\rangle_a$} & \qw & \gate[style={fill=blue!10}]{R(\lambda^{-1})} & \qw & \meter{} \\
712+
\lstick{$|0\rangle^{\otimes m}_p$} & \gate[wires=2, style={fill=green!10}]{\mathrm{QPE}(e^{iAt})} & \qw & \gate[wires=2, style={fill=green!10}]{\mathrm{QPE}^\dagger} & \qw \\
713+
\lstick{$|b\rangle_s$} & \qw & \qw & \qw & \rstick{$|x\rangle\propto A^{-1}|b\rangle$}
700714
\end{quantikz}
701-
\]
715+
};
716+
\end{tikzpicture}
702717

703718
\medskip
704719

@@ -1990,12 +2005,16 @@ \section{Second Example: 1D Poisson Equation}
19902005

19912006
\begin{frame}{QPE Circuit Block}
19922007
\centering
2008+
\begin{tikzpicture}
2009+
\node[scale=0.85] {
19932010
\begin{quantikz}[row sep=0.35cm, column sep=0.3cm]
19942011
\lstick{$|u_j\rangle$} & \qw & \qw & \qw & \qw & \qw \\
19952012
\lstick{$|0\rangle$} & \gate{H} & \ctrl{-1} & \qw & \qw & \gate[wires=3]{\text{QFT}^{-1}} & \qw \\
19962013
\lstick{$|0\rangle$} & \gate{H} & \qw & \ctrl{-2} & \qw & \qw & \qw \\
19972014
\lstick{$|0\rangle$} & \gate{H} & \qw & \qw & \ctrl{-3} & \qw & \qw
19982015
\end{quantikz}
2016+
};
2017+
\end{tikzpicture}
19992018

20002019
Here the controlled gates are
20012020
\[
@@ -2021,11 +2040,15 @@ \section{Second Example: 1D Poisson Equation}
20212040

20222041
\begin{frame}{High-Level HHL Circuit}
20232042
\centering
2043+
\begin{tikzpicture}
2044+
\node[scale=0.75] {
20242045
\begin{quantikz}[row sep=0.35cm, column sep=0.42cm]
20252046
\lstick{$|b\rangle$} & \qw & \gate[wires=2,style={fill=blue!15,draw=blue}]{\text{QPE}} & \qw & \gate[wires=2,style={fill=yellow!20,draw=orange}]{\text{Controlled } \lambda^{-1}} & \qw & \gate[wires=2,style={fill=blue!15,draw=blue}]{\text{QPE}^{\dagger}} & \qw & \qw \\
20262047
\lstick{$|0\rangle^{\otimes m}$} & \qw & \ghost{\text{QPE}} & \qw & \ghost{\text{Controlled } \lambda^{-1}} & \qw & \ghost{\text{QPE}^{\dagger}} & \qw & \qw \\
20272048
\lstick{$|0\rangle_a$} & \qw & \qw & \qw & \gate{R_y(\theta(\lambda))} & \qw & \qw & \meter{} & \qw
20282049
\end{quantikz}
2050+
};
2051+
\end{tikzpicture}
20292052

20302053
\begin{itemize}
20312054
\item Blue block: spectral decomposition and recombination.
@@ -2467,7 +2490,3 @@ \section{Second Example: 1D Poisson Equation}
24672490

24682491
\end{document}
24692492

2470-
2471-
2472-
\end{document}
2473-

0 commit comments

Comments
 (0)