next up previous
Next: Creating a Labeled Pseudopure Up: Examples of Quantum Algorithms Previous: Examples of Quantum Algorithms

The Controlled-not

One of the standard gates used in quantum algorithms is the controlled-not. The controlled-not gate ($\mathbf{cnot}$) acts on two qubits. The action of $\mathbf{cnot}$ can be described by ``if the first qubit is $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{1}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$, then flip the second qubit.'' Consequently, the effect of $\mathbf{cnot}$ on the logical states is given by the mapping

\begin{displaymath}
\begin{array}{rcl}
\mathbf{cnot}\mbox{$\vert\hspace*{-3pt}\v...
...le\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}.
\end{array}\end{displaymath} (20)

As an operator, the controlled-not is given by
\begin{displaymath}
\mathbf{cnot}=\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\...
...ma_z}^{({\mathsf {1}})}){\sigma_x}^{({\mathsf {2}})}\right)/2.
\end{displaymath} (21)

The goal is to derive a sequence of NMR operations that realize the controlled-not. As discussed in Sect. 2, the unitary operations that are implementable by simple NMR techniques are rotations $e^{-i{\sigma_u}^{({\mathsf {a}})}\theta/2}$ by $\theta$ around the $u$-axis, where $u$ is any direction in the plane (RF pulses), and the two-qubit operations $e^{-i{\sigma_z}^{({\mathsf {b}})}{\sigma_z}^{({\mathsf {c}})}\phi/2}$ (the $J$-coupling). We call $e^{-i{\sigma_z}^{({\mathsf {b}})}{\sigma_z}^{({\mathsf {c}})}\phi/2}$ a rotation by $\phi$ around ${\sigma_z}^{({\mathsf {b}})}{\sigma_z}^{({\mathsf {c}})}$. This terminology reflects the fact that such rotations and their effects on deviation density matrices can be understood by a generalization of the Bloch sphere picture called the ``product operator formalism'' introduced by O. Sörensen et al. [22].

To implement the controlled-not using NMR techniques one can decompose the gate into a sequence of $90^\circ$ rotations around the main axes on each of the two qubits, and a $90^\circ$ rotation around ${\sigma_z}^{({\mathsf {1}})}{\sigma_z}^{({\mathsf {2}})}$. One way to find a decomposition is to first realize that the two-qubit $90^\circ$ rotation $e^{-i{\sigma_z}^{({\mathsf {1}})}{\sigma_z}^{({\mathsf {2}})}\pi/4}$ is equivalent to a combination of two gates, each conditional on the logical state of qubit $\mathsf {1}$. The first gate applies a $90^\circ$ rotation around the $z$-axis ( $e^{-i{\sigma_z}^{({\mathsf {2}})}\pi/4}$) to qubit $\mathsf {2}$ conditional on qubit $\mathsf {1}$'s state being $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}}\mbox{$\rangl...
...e*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!\scriptstyle{\mathsf {1}}}}$. The second applies the $-90^\circ$ rotation $e^{i{\sigma_z}^{({\mathsf {2}})}\pi/4}$ to qubit $\mathsf {2}$ conditional on qubit $\mathsf {1}$'s state being $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{1}}\mbox{$\rangl...
...e*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!\scriptstyle{\mathsf {1}}}}$. By following the two-qubit rotation with a $-90^\circ$ rotation around $z$-axis ( $e^{i{\sigma_z}^{({\mathsf {2}})}\pi/4}$) on qubit $\mathsf {2}$, the total effect is to cancel the rotation if qubit $\mathsf {1}$ is in state $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}}\mbox{$\rangl...
...e*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!\scriptstyle{\mathsf {1}}}}$; if qubit $\mathsf {1}$ is in state $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{1}}\mbox{$\rangl...
...e*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!\scriptstyle{\mathsf {1}}}}$, the rotations add to a $-180^\circ$ rotation $e^{i{\sigma_z}^{({\mathsf {2}})}\pi/2}=i{\sigma_z}^{({\mathsf {2}})}$ on qubit $\mathsf {2}$. If we precede this sequence with $e^{-i{\sigma_y}^{({\mathsf {2}})}\pi/4}$ and follow it by $e^{i{\sigma_y}^{({\mathsf {2}})}\pi/4}$ (this operation is called ``conjugating'' by a $-90^\circ$ $y$-rotation), then the overall effect is a conditional $-i{\sigma_x}^{({\mathsf {2}})}$ operation. Note how the conjugation rotated the operation's axis according to the Bloch sphere rules. The controlled-not is obtained by eliminating the $-i$ with a $90^\circ$ $z$-rotation on qubit $\mathsf {1}$. That is, the effect of the complete sequence is $e^{-i\pi/4}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}}\m...
...mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\sigma_x}^{({\mathsf {2}})}$, which is the controlled-not up to a global phase. The decomposition thus obtained can be represented as a quantum network with rotation gates as shown in Fig. 9. The corresponding NMR pulse sequence implementation is shown in Fig. 10.


\begin{picture}(7,2.7)(-3.5,-2.6)
\put(0,0){\makebox(0,0)[t]{\includegraphics[]{fig.pdf/cnotbynmr.eps}}}
\end{picture}

FIG. 9: Quantum network for implementing the controlled-not using operations available in NMR. The conventions for depicting gates are as explained in [2]. The two one-qubit $z$-rotations can be implemented by a change in the reference phase of the rotating frame without applying any RF pulses.


\begin{picture}(7,3)(-3.5,-3)
\put(0,0){\makebox(0,0)[t]{\includegraphics[width=7in]{fig.pdf/cnotpulses.eps}}}
\end{picture}

FIG. 10: Pulse sequence for realizing the controlled-not. The control bit is spin $\mathsf {1}$ and the target is spin $\mathsf {2}$. The pulses are shown using the representation introduced in Fig. 6. The $z$-pulses (shown in green) are ``virtual'', requiring only a change of reference frame. The placement of the $z$-pulses between the RF pulses is immaterial, because they commute with the coupling that evolves in between. The delay between the two RF pulses is $1/(2J)$ ( $5{\mathchoice{\mbox{ms}}{\mbox{ms}}{\mbox{\small ms}}{\mbox{\tiny ms}}}\,$ if $J=100{\mathchoice{\mbox{Hz}}{\mbox{Hz}}{\mbox{\small Hz}}{\mbox{\tiny Hz}}}\,$), which realizes the desired two-qubit rotation by internal evolution. The $-90^\circ$ $y$-rotation is actually implemented with a $90^\circ$ pulse with axis $-y$. The resulting rotation has the desired effect up to a global phase. The pulse widths are exaggerated and should be as short as possible to avoid errors due to coupling evolution during the RF pulses. Alternatively, techniques can be used that compensate for some of these errors [23].

The effect of the NMR pulse sequence that implements the controlled-not can be visualized for logical initial states with the help of the Bloch-sphere representation of the states. Such a visualization is shown for two initial states in Fig. 11.

  $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}}\mbox{$\rangl...
...e*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!\scriptstyle{\mathsf {2}}}}$ $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{1}}\mbox{$\rangl...
...e*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!\scriptstyle{\mathsf {2}}}}$
(1)
\begin{picture}(2.5,1.4)(-1.25,-1.4)
\put(0,0){\makebox(0,0)[t]{\includegraphics[height=1.4in]{graphics/bloch4a1.eps}}}
\end{picture}

\begin{picture}(2.5,1.4)(-1.25,-1.4)
\put(0,0){\makebox(0,0)[t]{\includegraphics[height=1.4in]{graphics/bloch4a2.eps}}}
\end{picture}
(2)
\begin{picture}(2.5,1.4)(-1.25,-1.4)
\put(0,0){\makebox(0,0)[t]{\includegraphics[height=1.4in]{graphics/bloch4b1.eps}}}
\end{picture}

\begin{picture}(2.5,1.4)(-1.25,-1.4)
\put(0,0){\makebox(0,0)[t]{\includegraphics[height=1.4in]{graphics/bloch4b2.eps}}}
\end{picture}
(3)
\begin{picture}(2.5,1.4)(-1.25,-1.4)
\put(0,0){\makebox(0,0)[t]{\includegraphics[height=1.4in]{graphics/bloch4c1.eps}}}
\end{picture}

\begin{picture}(2.5,1.4)(-1.25,-1.4)
\put(0,0){\makebox(0,0)[t]{\includegraphics[height=1.4in]{graphics/bloch4c2.eps}}}
\end{picture}
(4)
\begin{picture}(2.5,1.4)(-1.25,-1.4)
\put(0,0){\makebox(0,0)[t]{\includegraphics[height=1.4in]{graphics/bloch4a1.eps}}}
\end{picture}

\begin{picture}(2.5,1.4)(-1.25,-1.4)
\put(0,0){\makebox(0,0)[t]{\includegraphics[height=1.4in]{graphics/bloch4d2.eps}}}
\end{picture}



FIG. 11: Sequences of states for the controlled-not pulse sequence. The first column has both spins initially in the logical $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$ state, represented by two arrows pointing up. The blue and red arrows represent spin $\mathsf {1}$ and $\mathsf {2}$, respectively. The second column has the first spin initially in the $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{1}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$ state, indicated by its arrow (blue) pointing down. The configurations are shown (1) at the beginning of the sequence, (2) after the $90^\circ$ $y$-rotation, (3) after the $J$-coupling (but before the $z$- and $y$-pulses), and (4) at the end of the sequence. The conditional effect is realized by the second spin's pointing down at the end of the second column. The effect of the $J$-coupling causing the evolution from (2) to (3) is best understood as a conditional rotation around the $z$-axis (forward by $90^\circ$ if the first spin is up; backward if it is down).

The effects of the pulse sequence for the controlled-not can be shown with the Bloch sphere as in Fig. 11 only if the intermediate states are products of states on each qubit. Things are no longer so simple if the initial state of the spins is ${1\over\sqrt{2}}\left(\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mat...
...thfrak{0}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}\right)$, for example. This is representable as spin $\mathsf {1}$'s arrow pointing along the $x$-axis, but the $J$-coupling leads to a superposition of states (a maximally entangled state) no longer representable by a simple combination of arrows in the Bloch sphere.


next up previous
Next: Creating a Labeled Pseudopure Up: Examples of Quantum Algorithms Previous: Examples of Quantum Algorithms