To use more than two, say five, qubits, we can just start with the
state
and apply gates to any one or two of these qubits. For example,
applies the
operation from qubit
to qubit
. Note that the order of
and
in
the label for the
operation matters. In the bra-ket
notation, we simply multiply the state with the bra-ket form of
from the left. One can express everything in
terms of matrices and vectors, but now the vectors have length
, and the Kronecker product expression for
requires some reordering to enable inserting the
operation so as to act on the intended qubits. Nevertheless, to
analyze the properties of all reversible (that is, unitary) operations
on these qubits, it is helpful to think of the matrices, because a lot
of useful properties about unitary matrices are known. One important
result from this analysis is that every matrix that represents a
reversible operation on quantum states can be expressed as a product
of the one- and two-qubit gates introduced so far. We say that this
set of gates is ``universal''.
For general purpose computation, it is necessary to have access to
arbitrarily many qubits. Instead of assuming that there are infinitely
many from the start, it is convenient to have an operation to add a
new qubit, namely,
. To add a new qubit labeled
in the
state
, apply
to the current
state. This operation can only be used if there is not already a
qubit labeled
. In the bra-ket notation, we implement the
operation by multiplying the ket
expression for the current state by
.