%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%  Latex templete for students
%%%  please keep the header unchanged   
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[onecolumn,fleqn]{revtex4}

% special 
\usepackage{ifthen}
\usepackage{ifpdf}

% fonts
\usepackage{latexsym}
\usepackage{amsmath} 
\usepackage{amssymb} 
\usepackage{bm}
\usepackage{wasysym}


\ifpdf
\usepackage{graphicx}
\usepackage{epstopdf}
\else
\usepackage{graphicx}
\usepackage{epsfig}
\fi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% math symbols I
\newcommand{\sinc}{\mbox{sinc}}
\newcommand{\const}{\mbox{const}}
\newcommand{\trc}{\mbox{trace}}
\newcommand{\intt}{\int\!\!\!\!\int }
\newcommand{\ointt}{\int\!\!\!\!\int\!\!\!\!\!\circ\ }
\newcommand{\ar}{\mathsf r}
\newcommand{\im}{\mbox{Im}}
\newcommand{\re}{\mbox{Re}}

% math symbols II
\newcommand{\eexp}{\mbox{e}^}
\newcommand{\bra}{\left\langle}
\newcommand{\ket}{\right\rangle}

% Mass symbol
\newcommand{\mass}{\mathsf{m}} 
\newcommand{\Mass}{\mathsf{M}} 

% more math commands
\newcommand{\tbox}[1]{\mbox{\tiny #1}}
\newcommand{\bmsf}[1]{\bm{\mathsf{#1}}} 
\newcommand{\amatrix}[1]{\begin{matrix} #1 \end{matrix}} 
\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}

% equations
\newcommand{\be}[1]{\begin{eqnarray}\ifthenelse{#1=-1}{\nonumber}{\ifthenelse{#1=0}{}{\label{e#1}}}}
\newcommand{\ee}{\end{eqnarray}} 

% arrangement
\newcommand{\hide}[1]{}
\newcommand{\drawline}{\begin{picture}(500,1)\line(1,0){500}\end{picture}}
\newcommand{\bitem}{$\bullet$ \ \ \ }
\newcommand{\Cn}[1]{\begin{center} #1 \end{center}}
\newcommand{\mpg}[2][1.0\hsize]{\begin{minipage}[b]{#1}{#2}\end{minipage}}
\newcommand{\mpgt}[2][1.0\hsize]{\begin{minipage}[t]{#1}{#2}\end{minipage}}
\newcommand{\putgraph}[2][0.30\hsize]{\includegraphics[width=#1]{#2}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Page setup
\setlength{\parindent}{0cm} 
\setlength{\parskip}{0.3cm} 
\interfootnotelinepenalty=10000

% contents
\newcommand{\addsectiontocontents}[1]
{\addcontentsline{toc}{section}{#1}}


% Sections
\renewcommand{\thesection}{\arabic{section}}
\setcounter{section}{0}
\newcommand{\sect}[1]
{
\addtocounter{section}{1}
\addsectiontocontents{\thesection \ \ #1} 
\ \\ \ \\ {\Large\bf $=\!=\!=\!=\!=\!=\;$ [\thesection] \ #1}
}


% heading
\newcommand{\heading}[1]{\begin{center} \Large {#1} \end{center}}
\newcommand{\auname}[1]{\begin{center} \bf Submitted by: #1 \end{center}}


\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%   document starts here
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\heading{The CNOT Quantum Gate}
\auname{Ohad Levinkron}

%\date{August 27, 2009}
%\maketitle


%%%%%%%%%%%%%

In this document we shall provide an explanation about the CNOT quantum logic gate, followed by a brief illustration of the idea using NMR spectroscopy.

\sect{Motivation} 

In quantum computation we perform unitary operations on arrays of qubits \footnotemark. These operations are referred to as \textit{gates}. When we set out to build a quantum computer we are actually aiming at building the qubits, the elements holding information using physical properties, and the gates. That is, finding a good way to store information and read it out would not be enough - we would like to manipulate it using gates. So, for each type of qubit implementation, we would like to construct an appropriate method of performing operations on it.

In general, we would like to be able to perform any operation on our qubits. However, there are infinite possible operations, and constructing a specially-designed gate for every operation we may like to carry our in the future could take a while. To make things simpler, we can design building blocks, sets of simple gates, out of which more complicated operations can be built.

But how do we know if our gates are enough to carry out \textit{any} operation we may like? This is where the concept of \textit{universality} comes in handy. A \textit{universal set} of gates is a set out of which (roughly speaking) any other gate can be built. More precisely we would say that any other gate can be \textit{approximated} by a universal set, but we will not go into that detail here. Thus, for our implementation of a computer we can settle for constructing the qubits and any universal set of gates we find convenient.

This is why CNOT and other controlled gates are useful: A universal set of 1-qubit gates, together with \textit{any} entangling 2-qubit gate (such as the CNOT gate, as we shall shortly see), composes a universal set for n-qubit operations.

\footnotetext{Note: You may be wondering why quantum information is usually stored in two-state systems, and not in systems with three or more orthogonal states (called \textit{qudits}, for \textit{d} dimensions. For example take photons, a spin-1 particle). There are several reasons for this. For one, two-state systems are usually easier to implement than multi-state systems, and implementing a many-qubit computer is currently a major challenge. On the other hand, when building quantum computers we are interested in gaining an exponential speedup over classical computers, and when increasing the number of states we only gain a polynomial speedup.}


%%%%%%%%%%
\sect{The CNOT Gate} 

The Controlled-NOT gate, or CNOT, takes as input two bits (a control bit and a target bit) and performs the following operation: If the control bit is set to zero it does nothing. If it is set to one, the target bit is flipped. In the computational basis, the gate can be described by the following matrix:
%
\be{0}
\hat{U}_{CN} = \hat{P}^1 \otimes \hat{1} + \hat{P}^2 \otimes \hat{\sigma} _x  \mapsto
\left( \amatrix{ 
1 & 0 & 0 & 0 \cr 
0 & 1 & 0 & 0 \cr 
0 & 0 & 0 & 1 \cr 
0 & 0 & 1 & 0 } \right) 
\ee
%
When this gate is applied to a vector of the computational basis, the result on the target bit corresponds to the more familiar XOR gate from classical computation.

As we can see, this is an entangling gate. That is, the gate causes the target bit to be correlated to the control bit. Or, following the definition of an entangling gate, the output of some input product state is not a product state:
%
\be{0}
\hat{U}_{CN} \cdot \left( \frac{1}{\sqrt{2}} \left( \left| \uparrow \ket + \left| \downarrow \ket \right) \otimes \left| \uparrow \ket \right) \mapsto
\frac{1}{\sqrt{2}}
\left( \amatrix{ 
1 & 0 & 0 & 0 \cr 
0 & 1 & 0 & 0 \cr 
0 & 0 & 0 & 1 \cr 
0 & 0 & 1 & 0 } \right) 
\left( \amatrix{ 
1 \cr 
0 \cr 
1 \cr 
0 } \right) =
\frac{1}{\sqrt{2}}
\left( \amatrix{ 
1 \cr 
0 \cr 
0 \cr 
1 } \right)
\ee
%
To complete the picture, it can be proven that any entangling gate together with a universal set of 1-qubit gates is a universal set of gates for n-qubit operations.



%%%%%%%%%%
\sect{NMR Implementation}

As mentioned earlier, when we look at building a quantum computer we need to find a physical system which can store information using quantum properties (that can be set and measured), and which we can manipulate to create a universal set of gates. It is common to store information using two-state systems such as spins. For our gate, we will need to find an appropriate Hamiltonian which will evolve our system to the required result. That is, given a state described by a probability density matrix, after a given time the interaction will transform the state:
%
\be{0}
\rho _t = U \left( t \right) \rho _0 U \left( t \right)^\dagger 
\ee
%
Following we shall briefly sketch out an implementation of the CNOT gate in NMR Spectroscopy:
%
In NMR Spectroscopy we use the internal spins of molecules as our qubits, and RF pulses interacting with the spins as our gates. The liquid NMR apparatus consists of a liquid of molecules inside a container, with a very strong DC magnetic field applied. In the case of chloroform (CHCl3), for example, each molecule has one carbon atom, one hydrogen atom and three chlorine atoms. The carbon and hydrogen atoms have intrinsic spin-1/2 properties, while the chlorine does not interact with the field and will be ignored. Therefore in each molecule we have two spins that can interact with the external magnetic field, and due to their proximity can also interact with each other. A first-order approximation of the Hamiltonian of each molecule would be:
%
\be{0}
H_0 = \frac{\omega _1}{2}Z_1 + \frac{\omega _2}{2}Z_2 + \frac{\pi}{2} J_{12} Z_1 Z_2 \mapsto
\left( \amatrix{ 
\frac{\omega _1}{2} + \frac{\omega _2}{2} +  \frac{\pi}{2} J_{12} & 0 & 0 & 0 \cr 
0 & \frac{\omega _1}{2} - \frac{\omega _2}{2} -  \frac{\pi}{2} J_{12} & 0 & 0 \cr 
0 & 0 & - \frac{\omega _1}{2} + \frac{\omega _2}{2} -  \frac{\pi}{2} J_{12} & 0 \cr 
0 & 0 & 0 & - \frac{\omega _1}{2} - \frac{\omega _2}{2} +  \frac{\pi}{2} J_{12} } \right) 
\ee
%
The first two terms are called Zeeman terms and reflect the interaction with the external field B at the Larmor frequency $\omega _k$:
%
\be{0}
\omega _k = -\gamma _k B
\ee
%
The third term reflects the coupling between the spins. We note that the Larmor frequencies are much larger than the J-coupling (for H it is around 3 GHz,  compared to J-coupling of about 200 Hz).
As we can see, the Hamiltonian is diagonal in the computational basis.

Now we would like to apply a field for a certain time, in order to flip the spins. Supplementing the Hamiltonian with terms of the form a(t)Z would have no effect on the state of the spins, since the eigenstates would remain the same. For each spin we need to apply a field generating a Hamiltonian of the form:
%
\be{0}
H_{RF_i} = \frac{\Omega \left( t \right)}{2} \left( X_i \cos \left( \eta t + \phi \left( t \right) \right) + Y_i \sin \left( \eta t + \phi \left( t \right) \right) \right)
\ee
%
Where $\Omega \left( t \right)$ is the pulse amplitude, $\eta $ the RF frequency and $ \phi \left( t \right)$ the pulse phase.
We can think of each on the spins rotating about the $\hat{z}$-axis at their respective Larmor frequencies. Generally the RF terms we added (on the order of say 100KHz) are much smaller than the Zeeman terms and would have no effect. However, at the resonant frequency $\eta = \omega _i$ the Zeeman term would cancel out and writing the Hamiltonian of one of the atoms in a reference frame rotating at a frequency $\eta$:
%
\be{0}
H_1 = H_{01} + H_{RF_1} = \frac{\omega _2 - \eta}{2} Z_2 + \frac{\pi}{2} J_{12} Z_1 Z_2 + \frac{\Omega \left( t \right)}{2} \left( \left( X_1 + X_2 \right) \cos \phi \left( t \right) + \left( Y_1 + Y_2 \right) \sin \phi \left( t \right) \right)
\ee
%
If we look at the terms affecting only the first spin, and neglect the J-coupling term at the moment since it is much smaller than the RF term, we get:
%
\be{0}
H_1 = \frac{\Omega \left( t \right)}{2} \left( X_1 \cos \phi \left( t \right) + Y_1 \sin \phi \left( t \right) \right)
\ee
%
That is, a generator of rotations. Applying the RF field at the appropriate frequency and amplitude and for the right length of time will rotate the spin accordingly. Any rotation can be carried out in this form, commonly by combining RF pulses of a fixed length and amplitude one after the other.

Now, in order to implement 2-qubit entangling gates we can use the J-coupling term of the Hamiltonian. By setting two RF transmitters to the Larmor frequencies we can eliminate the Zeeman terms, and we are left with a rotation for each spin and a spin-coupling term.

Finally, we will outline how to implement a CNOT gate using this apparatus. At first we acquaint ourselves with the ZZ90 gate, defined as the following:
%
\be{0}
ZZ90 \triangleq e^{-i \frac{pi}{4}Z_1 Z_2}
\ee
%
Which is directly constructed from the J-coupling term. By using 90-degree rotations on each spin (we have already seen how to construct these) we can construct the Controlled-Phase gate, or Cphase:
%
\be{0}
\hat{C}_{Phase} &= \left| 0 \ket \bra 0 \right| \otimes \hat{1} + \left| 1 \ket \bra 1 \right| \otimes Z \\
\hat{U}_{C_{Phase}} &= Z_1(-90) Z_2(90) ZZ90 = e^{i \frac{\pi}{4}} \hat{C}_{Phase}
\ee
%
And to receive the CNOT gate from this entangling gate we can apply different rotations:
%
\be{0}
\hat{U}_{CN} = Y_2 \left( 90 \right) \hat{C}_{Phase} Y_2 \left( -90 \right)
\ee
%
A final remark on NMR qubits: We are interested in operating on individual qubits separately. However our liquid contains many molecules with spin systems. Rather than try to separate these systems we use their statistical properties and create what is called a "thermal state". This state can be described by a probability density matrix as our isolated spin systems can. In order to bring this density matrix to the form of a pure state we separate the matrix into an identity term, which does not change under unitary evolution, and a pure state.

To conclude this section, we have seen how qubits can be implemented with spin systems, and acted upon with gates composed of specially-tuned RF pulses. These qubits can be set and measured, and one can build a system with more than two qubits operable under a universal set of gates constructed in this fashion.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{thebibliography}{9}

\bibitem{univ}
J.L. Brylinski, R. Brylinski, Universal Quantum Gates, arxiv

\bibitem{KLM}
P. Kaye, R.Laflamme, M. Mosca, \textit{An Introduction to Quantum Computing} (Oxford University Press, Oxford, 2007).

\bibitem{NC}
M.A Nielsen and I.L Chuang, \textit{Quantum Computation and Quantum Information} (Cambridge University Press, Cambridge, 2000).

\bibitem{Obs}
M. Pravia, E.Fortunato, Y. Weinstein \textit{et al.}, Observations of Quantum Dynamics by Solution-State NMR Spectroscopy, arXiv:quant-ph/9905061v2

\bibitem{USEQIP}
J. Baugh, Introduction to Nuclear Magnetic Resonance, \textit{Proceedings of the Undergraduate School on Experimental Quantum Information Processing}, Waterloo (2009).

\end{thebibliography}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
