blob: 43763c0ff567426f9bc24d3c397c7223d3dda6b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{physics}
\usepackage{yquant}
\begin{document}
\section{SWAP}
\begin{tikzpicture}
\begin{yquant}[operator/separation=5mm]
qubit {$\ket{\psi_1}$} a;
qubit {$\ket{\psi_2}$} b;
swap (a, b);
\end{yquant}
\end{tikzpicture}
\section{CNOT}
\begin{tikzpicture}
\begin{yquant}[operator/separation=5mm]
qubit {$\ket{\psi_1}$} a;
qubit {$\ket{\psi_2}$} b;
cnot b | a;
\end{yquant}
\end{tikzpicture}
\section{CU}
\begin{tikzpicture}
\begin{yquant}[operator/separation=5mm]
qubit {$\ket{\psi_1}$} a;
qubit {$\ket{\psi_2}$} b;
box {$U$} b | a;
\end{yquant}
\end{tikzpicture}
\end{document}
|