diff options
Diffstat (limited to 'sources/know/concept/deutsch-jozsa-algorithm')
-rw-r--r-- | sources/know/concept/deutsch-jozsa-algorithm/circuit.tex | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/sources/know/concept/deutsch-jozsa-algorithm/circuit.tex b/sources/know/concept/deutsch-jozsa-algorithm/circuit.tex new file mode 100644 index 0000000..ad0dff3 --- /dev/null +++ b/sources/know/concept/deutsch-jozsa-algorithm/circuit.tex @@ -0,0 +1,53 @@ +\documentclass[11pt]{article} +\usepackage[utf8]{inputenc} +\usepackage{amsmath} +\usepackage{amsfonts} +\usepackage{physics} +\usepackage{yquant} + + +\begin{document} + +\section{Spacer} + +\begin{tikzpicture} + \begin{yquant}[operator/separation=5mm] + qubit {$\ket{0}$} a; + qubit {$\ket{1}$} b; + + h a; + h b; + box {$U_f$} (a, b); + h a; + measure a; + \end{yquant} +\end{tikzpicture} + +\section{Spacer} + +\yquantdefinebox{dots}[inner sep=0pt]{$\dots$} +\begin{tikzpicture} + \begin{yquant}[operator/separation=5mm] + qubit {$\ket{0}$} a[2]; + nobit ellipsis; + qubit {$\ket{0}$} z; + qubit {$\ket{1}$} b; + + h a[0]; + h a[1]; + dots ellipsis; + h z; + h b; + box {$U_f$} (a[0, 1], ellipsis, z, b); + h a[0]; + h a[1]; + dots ellipsis; + h z; + measure a[0]; + measure a[1]; + dots ellipsis; + measure z; + \end{yquant} +\end{tikzpicture} + +\end{document} |