next up previous
Next: Two Quantum Bits Up: Quantum Information Previous: The Quantum Bit

Processing One Qubit

The quantum version of the $\mathbf{not}$ gate for bits exchanges the two logical states. That is, using ket notation,

\begin{displaymath}
\mathbf{not}\Big(\alpha\mbox{$\vert\hspace*{-3pt}\vert\hspac...
...mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}.
\end{displaymath} (8)

In vector notation this equation becomes
\begin{displaymath}
\mathbf{not}\left(\!\begin{array}{c}\alpha\\ \beta\end{array...
... = \left(\!\begin{array}{c}\beta\\ \alpha\end{array}\!\right).
\end{displaymath} (9)

Another way of expressing the effect of $\mathbf{not}$ is by multiplying the vector by a matrix representing $\mathbf{not}$:
\begin{displaymath}
\mathbf{not}\left(\!\begin{array}{c}\alpha\\ \beta\end{array...
... = \left(\!\begin{array}{c}\beta\\ \alpha\end{array}\!\right),
\end{displaymath} (10)

so we that can identify the action of $\mathbf{not}$ with the matrix $\sigma_x=\left(\begin{array}{cc}0&1\\ 1&0\end{array}\right)$. An even simpler gate is the one that does nothing. We call this the $\mathbf{noop}$ gate, and its matrix form is the identity matrix as shown in the following equation:
\begin{displaymath}
\mathbf{noop}\left(\!\begin{array}{c}\alpha\\ \beta\end{arr...
... = \left(\!\begin{array}{c}\alpha\\ \beta\end{array}\!\right).
\end{displaymath} (11)

The $\mathbf{noop}$ and $\mathbf{not}$ gates are ``reversible''. In other words, we can undo their actions by applying other gates. For example, the action of the $\mathbf{not}$ gate can be undone by another $\mathbf{not}$ gate. The action of every reversible quantum gate can be represented by matrix multiplication, where the matrix has the additional property of preserving the length of vectors. Such matrices are called ``unitary'' and are characterized by the equation $A^\dagger A = {\mathchoice {\rm 1\mskip-4mu l} {\rm 1\mskip-4mu l} {\rm 1\mskip-4.5mu l} {\rm 1\mskip-5mu l}}$, where $A^\dagger$ is the conjugate transpose of $A$ and ${\mathchoice {\rm 1\mskip-4mu l} {\rm 1\mskip-4mu l} {\rm 1\mskip-4.5mu l} {\rm 1\mskip-5mu l}}$ is the identity matrix. (The conjugate transpose of a matrix is computed by flipping the matrix across the main diagonal and conjugating the complex numbers.) For gates represented by a matrix, the unitarity condition is necessary and sufficient for ensuring that pure states get mapped to pure states.

Because qubit states can be represented as points on a sphere, reversible one-qubit gates can be thought of as rotations of the Bloch sphere. This is why such quantum gates are often called ``rotations''. As explained in detail in [11], rotations around the $x$, $y$ and $z$ axis are in a sense generated by the three Pauli matrices

\begin{displaymath}
\sigma_x = \left(\begin{array}{cc}0&1\\ 1&0\end{array}\right...
...gma_z = \left(\begin{array}{cc}1&0\\ 0&-1\end{array}\right)\;,
\end{displaymath} (12)

each of which represents a one-qubit gate. For example, a rotation around the $x$-axis by an angle $\phi$ is given by $e^{-i\sigma_x\phi/2}=\cos(\phi/2){\mathchoice {\rm 1\mskip-4mu l} {\rm 1\mskip-4mu l} {\rm 1\mskip-4.5mu l} {\rm 1\mskip-5mu l}}- i\sin(\phi/2)\sigma_x$. To obtain this identity, one can use the power series for $e^A$, $e^{A}=\sum_{k=0}^\infty{1\over k!} A^k$, and exploit the fact that $\sigma_x^2={\mathchoice {\rm 1\mskip-4mu l} {\rm 1\mskip-4mu l} {\rm 1\mskip-4.5mu l} {\rm 1\mskip-5mu l}}$ to simplify the expression. Here are some gates that can be defined with the help of rotations:
\begin{displaymath}
\begin{array}{lrcl}
\mbox{$90^\circ$\ $x$-rotation}: &\mathb...
...\left(\begin{array}{cc}1&1\\ 1&-1\end{array}\right)
\end{array}\end{displaymath} (13)

The rotation gates often show up in controlling spins or ions with radio-frequency pulses or lasers. The Hadamard gate is used primarily by quantum programmers. It can be expressed as a product of a $90^\circ$ $y$-rotation and $\sigma_z$.

To check directly that the rotation gates are reversible one can determine their inverses. In this case and as expected, the inverse of a rotation is the rotation around the same axis in the opposite direction. For example, the inverses of the $\mathbf{roty}_{90^\circ}$ and $\mathbf{rotz}_{\phi}$ gates are given by

\begin{displaymath}
\begin{array}{rcl}
\mathbf{roty}_{-90^\circ}&=&
{1\over\sqr...
...cc}e^{i\phi/2}&0\\ 0&e^{-i\phi/2}\end{array}\right)
\end{array}\end{displaymath} (14)

Another useful property of the rotation gates is that the angles add when rotations are applied around the same axis. For example, $\mathbf{rotz}_{\phi}\mathbf{rotz}_{\theta} = \mathbf{rotz}_{\phi+\theta}$.

The ket notation can be extended so that we can write gates in a compact form that readily generalizes to multiple qubits. To do so we have to introduce expressions such as $\mbox{$\langle\hspace*{-4.3pt}\langle\hspace*{-4.3pt}\langle$}{\psi}\mbox{$\ver...
...3pt}\langle$}{\mathfrak{1}}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}$. This is called the ``bra'' notation. The terminology comes from the term ``bracket'': The `bra'' is the left and the ``ket'' is the right part of a matched pair of brackets. From the vector point of view, $\mbox{$\langle\hspace*{-4.3pt}\langle\hspace*{-4.3pt}\langle$}{\psi}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}$ corresponds to the row vector $(\alpha,\beta)$. Note that a column vector multiplied by a row vector yields a matrix. In the bra-ket notation, this corresponds to multiplying a ket $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\psi}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$ by a bra $\mbox{$\langle\hspace*{-4.3pt}\langle\hspace*{-4.3pt}\langle$}{\phi}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}$, written as $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\psi}\mbox{$\rangle\hspace...
...ace*{-4.3pt}\langle$}{\phi}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}$. Since this represents an operator on states, we expect to be able to compute the effect of $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\psi}\mbox{$\rangle\hspace...
...ace*{-4.3pt}\langle$}{\phi}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}$ on a state $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\varphi}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$ by forming the product. To be able to evaluate such products with one-qubit kets and bras, we need the following two rules.

Distributivity. You can rewrite sums and products using distributivity. For example,
\begin{displaymath}
\Big({3\over 5}\mbox{$\langle\hspace*{-4.3pt}\langle\hspace*...
...mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}.
\end{displaymath} (15)

Observe that we can combine the amplitudes of terms, but we cannot rearrange the order of the bras and kets in a product.
Inner product evaluation. The product of a logical ``bra'' and a logical ``ket'' is evaluated according to the identities
$\displaystyle \mbox{$\langle\hspace*{-4.3pt}\langle\hspace*{-4.3pt}\langle$}{\m...
...t$}{\mathfrak{0}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$ $\textstyle =$ $\displaystyle 1,$  
$\displaystyle \mbox{$\langle\hspace*{-4.3pt}\langle\hspace*{-4.3pt}\langle$}{\m...
...t$}{\mathfrak{1}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$ $\textstyle =$ $\displaystyle 0,$  
$\displaystyle \mbox{$\langle\hspace*{-4.3pt}\langle\hspace*{-4.3pt}\langle$}{\m...
...t$}{\mathfrak{0}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$ $\textstyle =$ $\displaystyle 0,$  
$\displaystyle \mbox{$\langle\hspace*{-4.3pt}\langle\hspace*{-4.3pt}\langle$}{\m...
...t$}{\mathfrak{1}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$ $\textstyle =$ $\displaystyle 1.$ (16)

It follows that for logical states, if a bra multiplies a ket, the result cancels unless the states match, in which case the answer is $1$. Applying inner product evaluation to the example (Eq. 15) results in
\begin{displaymath}
{i3\over 5}\mbox{$\langle\hspace*{-4.3pt}\langle\hspace*{-4....
....3pt}\rangle$}
= {i3\over 5} 0 + {i4\over 5} 1 = {i4\over 5}.
\end{displaymath} (17)

To simplify the notation, we can omit one of the two vertical bars in products such as $\mbox{$\langle\hspace*{-4.3pt}\langle\hspace*{-4.3pt}\langle$}{a}\mbox{$\vert\h...
...*{-3pt}\vert$}{b}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$ and write $\mbox{$\langle\hspace*{-4.3pt}\langle\hspace*{-4.3pt}\langle$}{a}\mbox{$\vert\h...
...*{-3pt}\vert$}{b}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$.

To understand inner product evaluation, think of the expressions as products of row and column vectors. For example,

\begin{displaymath}
\mbox{$\langle\hspace*{-4.3pt}\langle\hspace*{-4.3pt}\langle...
...d{array}\left(\!\begin{array}{c}0\\ 1\end{array}\!\right) = 0,
\end{displaymath} (18)

That is, as vectors the two states $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$ and $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{1}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$ are orthogonal. In general, if $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\phi}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$ and $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\psi}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$ are states, then $\mbox{$\langle\hspace*{-4.3pt}\langle\hspace*{-4.3pt}\langle$}{\phi}\mbox{$\ver...
...3pt}\vert$}{\psi}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$ is the ``inner product'' or ``overlap'' of the two states. In the expression for the overlap, $\mbox{$\langle\hspace*{-4.3pt}\langle\hspace*{-4.3pt}\langle$}{\phi}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}$ is computed from $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\phi}\mbox{$\rangle\hspace...
...t$}{\mathfrak{1}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$ by conjugating the coefficients and converting the logical kets to bras: $\mbox{$\langle\hspace*{-4.3pt}\langle\hspace*{-4.3pt}\langle$}{\phi}\mbox{$\ver...
...3pt}\langle$}{\mathfrak{1}}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}$. In the vector representation, this is the conjugate transpose of the column vector for $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\phi}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$, so the inner product agrees with the usual one. Two states are orthogonal if their overlap is zero. We write $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\phi}\mbox{$\rangle\hspace...
...ace*{-4.3pt}\langle$}{\phi}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}$ and $\mbox{$\langle\hspace*{-4.3pt}\langle\hspace*{-4.3pt}\langle$}{\phi}\mbox{$\ver...
...3pt}\vert$}{\phi}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$.

Every linear operator on states can be expressed with the bra-ket notation. For example, the bra-ket expression for the $\mathbf{noop}$ gate is $\mathbf{noop} = \mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{...
...3pt}\langle$}{\mathfrak{1}}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}$. To apply $\mathbf{noop}$ to a qubit, you multiply its state on the left by the bra-ket expression:

$\displaystyle \mathbf{noop}\Big(\alpha\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-...
...mathfrak{1}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}\Big)$ $\textstyle =$ $\displaystyle \Big(\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfr...
...mathfrak{1}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}\Big)$  
  $\textstyle =$ $\displaystyle \mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}...
...mathfrak{1}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}\Big)$  
  $\textstyle =$ $\displaystyle \alpha\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathf...
...t$}{\mathfrak{1}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$  
  $\textstyle =$ $\displaystyle \alpha\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathf...
...}{\mathfrak{1}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$} 1$  
  $\textstyle =$ $\displaystyle \alpha\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathf...
...t$}{\mathfrak{1}}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$ (19)

One way to think about an operator such as $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{a}\mbox{$\rangle\hspace*{-...
...hspace*{-4.3pt}\langle$}{b}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}$ is to notice that when it is used to operate on a ket expression, the $\mbox{$\langle\hspace*{-4.3pt}\langle\hspace*{-4.3pt}\langle$}{b}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}$ picks out the matching kets in the state, which are then changed to $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{a}\mbox{$\rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}$. For example, we can write the $\mathbf{not}$ operation as $\mathbf{not} =
\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0...
...3pt}\langle$}{\mathfrak{0}}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}$.

The coefficients of the $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{a}\mbox{$\rangle\hspace*{-...
...hspace*{-4.3pt}\langle$}{b}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}$ in a bra-ket representation of a gate correspond to matrix entries in the matrix representation. The relationship is defined by

\begin{displaymath}
\alpha_{00}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\ver...
..._{00}&\alpha_{01}\\ \alpha_{10}&\alpha_{11}\end{array}\right).
\end{displaymath} (20)


next up previous
Next: Two Quantum Bits Up: Quantum Information Previous: The Quantum Bit