Next: Using Many Quantum Bits
Up: Quantum Information
Previous: Two Quantum Bits
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
gate for qubit
is written as
 |
(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:
Note that we cannot merge the two vertical bars in expressions such as
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
gate to one of our Bell states to see how it acts:
The effect of the gate was to flip the state symbols for qubit
,
which results in another Bell state.
The gate
can also be written as a
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
 |
(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
is to notice that
because the
gate acts as the identity, and because we can act on
different qubits independently,
. The matrix
for
can be expressed as a ``Kronecker product''
(``
'') of the matrices for
and
:
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
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'' (
) gate. Its action can be
described by the statement, ``if the first bit is
, flip the
second bit, otherwise do nothing''. The bra-ket and matrix
representations for this action are
The
gate is reversible because its action
is undone if a second
is applied.
This outcome is easy to see by computing the square of the matrix for
, which yields the identity matrix. As an exercise in
manipulating bras and kets, let us calculate the product of two
gates by using the bra-ket representation.
 |
(31) |
The first step is to expand this expression by multiplying
out. Expressions such as
cancel because of the inner product evaluation rule,
. One can also reorder bras and kets
with different labels and rewrite
to get
where we used the fact that when the bra-ket expression for
is applied to the ket expression for a state it acts the
same as (here denoted by the symbol ``
'') multiplication by
the number
.
Next: Using Many Quantum Bits
Up: Quantum Information
Previous: Two Quantum Bits