next up previous
Next: Using Many Quantum Bits Up: Quantum Information Previous: Two Quantum Bits

Processing Two Qubits

The simplest way of modifying the state of two qubits is to apply one of the one-qubit gates. If the gates are expressed in the bra-ket notation, all we need to do is add qubit labels so that we know which qubit each bra or ket belongs to. For example, the $\mathbf{not}$ gate for qubit $\mathsf {B}$ is written as

\begin{displaymath}
{\mathbf{not}}^{({\mathsf {B}})} = \mbox{$\vert\hspace*{-3pt...
...hfrak{0}}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}.
\end{displaymath} (25)

The labels for bra expressions occur as left superscripts. To apply expressions like this to states, we need one more rule:
Commutation. Kets and bras with different labels can be interchanged in products (they ``commute''). This is demonstrated by the following example:
$\displaystyle \left(\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathf...
...angle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!{\mathsf {AB}}}}$ $\textstyle =$ $\displaystyle \mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}...
...rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!{\mathsf {B}}}}$  
  $\textstyle =$ $\displaystyle \mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}...
...rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!{\mathsf {B}}}}$  
  $\textstyle =$ $\displaystyle \mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}...
...rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!{\mathsf {B}}}}$  
  $\textstyle =$ $\displaystyle \mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}...
...ngle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!{\mathsf {AB}}}}.$ (26)

Note that we cannot merge the two vertical bars in expressions such as ${}^{\scriptscriptstyle\mathsf { B}}\!\mbox{$\langle\hspace*{-4.3pt}\langle\hspa...
...rangle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!{\mathsf {A}}}}$ because the two terms belong to different qubits. The bars can only be merged when the expression is an inner product, which requires that the two terms belong to the same qubit.

With the rules for bra-ket expressions in hand, we can apply the $\mathbf{not}$ gate to one of our Bell states to see how it acts:

$\displaystyle {\mathbf{not}}^{({\mathsf {B}})}{1\over\sqrt{2}}
\Big(\mbox{$\ver...
...\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!{\mathsf {AB}}}}\Big)$ $\textstyle =$ $\displaystyle \Big(\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfr...
...\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!{\mathsf {AB}}}}\Big)$  
  $\textstyle =$ $\displaystyle {1\over\sqrt{2}}\Bigg(
\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3...
...*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!{\mathsf {AB}}}}\Big) \Bigg)$  
  $\textstyle =$ $\displaystyle {1\over\sqrt{2}}\Big(
\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3p...
...\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!{\mathsf {AB}}}}\Big)$  
  $\textstyle =$ $\displaystyle {1\over\sqrt{2}}\Big(
\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3p...
...e\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!{\mathsf {B}}}}\Big)$  
  $\textstyle =$ $\displaystyle {1\over\sqrt{2}}\Big(
\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3p...
...ace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!{\mathsf {B}}}}\; 0 \Big)$  
  $\textstyle =$ $\displaystyle {1\over\sqrt{2}}\Big(
\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3p...
...hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!{\mathsf {AB}}}}\Big).$ (27)

The effect of the gate was to flip the state symbols for qubit $\mathsf {B}$, which results in another Bell state.

The gate ${\mathbf{not}}^{({\mathsf {B}})}$ can also be written as a $4\times 4$ matrix acting on the vector representation of a two-qubit state. However, the relationship between this matrix and the one-qubit matrix is not as obvious as for the bra-ket expression. The matrix is

\begin{displaymath}
{\mathbf{not}}^{({\mathsf {B}})} =
\left(\begin{array}{cccc}
0&1&0&0\\ 1&0&0&0\\ 0&0&0&1\\ 0&0&1&0
\end{array}\right),
\end{displaymath} (28)

which swaps the top two and the bottom two entries of a state vector.

One way to see the relationship between the one and the two-qubit representation of the gate ${\mathbf{not}}^{({\mathsf {B}})}$ is to notice that because the $\mathbf{noop}$ gate acts as the identity, and because we can act on different qubits independently, ${\mathbf{noop}}^{({\mathsf {A}})}{\mathbf{not}}^{({\mathsf {B}})}\simeq{\mathbf{not}}^{({\mathsf {B}})}$. The matrix for ${\mathbf{not}}^{({\mathsf {B}})}$ can be expressed as a ``Kronecker product'' (``$\otimes $'') of the matrices for $\mathbf{noop}$ and $\mathbf{not}$:

$\displaystyle {\mathbf{noop}}^{({\mathsf {A}})}{\mathbf{not}}^{({\mathsf {B}})}$ $\textstyle =$ $\displaystyle \left(\begin{array}{cc}1&0\\  0&1\end{array}\right)\otimes \left(\begin{array}{cc}0&1\\  1&0\end{array}\right).$  
  $\textstyle =$ $\displaystyle \left(\begin{array}{cc}
1\left(\begin{array}{cc}0&1\\  1&0\end{ar...
...ight) & 1\left(\begin{array}{cc}0&1\\  1&0\end{array}\right)
\end{array}\right)$  
  $\textstyle =$ $\displaystyle \left(\begin{array}{cccc}
0&1&0&0\\  1&0&0&0\\  0&0&0&1\\  0&0&1&0
\end{array}\right).$ (29)

The Kronecker product of two matrices expands the first matrix by multiplying each entry by the second matrix. A disadvantage of the matrix representation of quantum gates is that it depends on the number and order of the qubits. However, it is often easier to visualize what the operation does by writing down the corresponding matrix.

One cannot do much with one-bit classical gates. Similarly, the utility of one-qubit gates is limited. In particular, it is not possible to obtain a Bell state starting from $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}\mathfrak{0}}\...
...angle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!{\mathsf {AB}}}}$ or any other product state. We therefore need to introduce at least one two-qubit gate not expressible as the product of two one-qubit gates. The best known such gate is the ``controlled-not'' ($\mathbf{cnot}$) gate. Its action can be described by the statement, ``if the first bit is $\mathfrak{1}$, flip the second bit, otherwise do nothing''. The bra-ket and matrix representations for this action are

$\displaystyle {\mathbf{cnot}}^{({\mathsf {AB}})}$ $\textstyle =$ $\displaystyle \mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}...
...langle$}{\mathfrak{0}}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}\Big)$  
  $\textstyle =$ $\displaystyle \left(\begin{array}{cccc}
1&0&0&0\\
0&1&0&0\\
0&0&0&1\\
0&0&1&0
\end{array}\right).$ (30)

The $\mathbf{cnot}$ gate is reversible because its action is undone if a second $\mathbf{cnot}$ is applied. This outcome is easy to see by computing the square of the matrix for $\mathbf{cnot}$, which yields the identity matrix. As an exercise in manipulating bras and kets, let us calculate the product of two $\mathbf{cnot}$ gates by using the bra-ket representation.
\begin{displaymath}
{\mathbf{cnot}}^{({\mathsf {AB}})}{\mathbf{cnot}}^{({\mathsf...
...box{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}\Big)\Bigg).
\end{displaymath} (31)

The first step is to expand this expression by multiplying out. Expressions such as $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}}\mbox{$\rangl...
...3pt}\langle$}{\mathfrak{1}}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}$ cancel because of the inner product evaluation rule, ${}^{\scriptscriptstyle\mathsf { A}}\!\mbox{$\langle\hspace*{-4.3pt}\langle\hspa...
...ngle\hspace*{-4.3pt}\rangle\hspace*{-4.3pt}\rangle$}_{{}_{\!\!{\mathsf {A}}}}=0$. One can also reorder bras and kets with different labels and rewrite $\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}}\mbox{$\rangl...
...3pt}\langle$}{\mathfrak{0}}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}$ to get
$\displaystyle {\mathbf{cnot}}^{({\mathsf {AB}})}{\mathbf{cnot}}^{({\mathsf {AB}})}$ $\textstyle =$ $\displaystyle \mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}...
...langle$}{\mathfrak{0}}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}\Big)$  
  $\textstyle =$ $\displaystyle \mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}...
...langle$}{\mathfrak{1}}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}\Big)$  
  $\textstyle =$ $\displaystyle \mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}...
...$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathbf{noop}}^{({\mathsf {B}})}$  
  $\textstyle \simeq$ $\displaystyle \mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}{\mathfrak{0}...
...3pt}\langle$}{\mathfrak{1}}\mbox{$\vert\hspace*{-3pt}\vert\hspace*{-3pt}\vert$}$  
  $\textstyle =$ $\displaystyle {\mathbf{noop}}^{({\mathsf {A}})}$  
  $\textstyle \simeq$ $\displaystyle 1,$ (32)

where we used the fact that when the bra-ket expression for $\mathbf{noop}$ is applied to the ket expression for a state it acts the same as (here denoted by the symbol ``$\simeq$'') multiplication by the number $1$.


next up previous
Next: Using Many Quantum Bits Up: Quantum Information Previous: Two Quantum Bits