Last revised 4/30/05
LECTURE NOTES ON QUANTUM COMPUTATION
Cornell University, Physics 481681, CS 483; Spring, 2005
c
±
2005, N. David Mermin
II. Quantum Computation
A. The general computational process
We would like a suitably programmed quantum computer to act on a number
x
to
produce another number
f
(
x
) for some speciFed function
f
.
Appropriately interpreted,
with an accuracy that increases with increasing
k
, we can treat all such numbers as non
negative integers less than 2
k
. Each integer is represented in the quantum computer by
the corresponding computationalbasis state of
k
qubits:
1
x
↔ 
x
i
k
.
If we specify
x
as an
n
bit integer and
f
(
x
) as an
m
bit integer, then we shall need
at least
n
+
m
qubits: an group of
n
qubits, called the
input register
, to represent
x
, and
another set of
m
qubits, called the
output register
, to represent
f
(
x
). Qubits being a scarce
commodity, you might wonder why we need separate registers for input and output. One
important reason is that if
f
(
x
) assigns the same value to di±erent values of
x
, as many
interesting functions do, then the computation cannot be inverted if its the only e±ect is
to transform the contents of a single register from
x
to
f
(
x
).
Having separate registers
for input and output is standard practice in the classical theory of reversible computation.
Since (as remarked in Chapter 1 and expanded on in Section C of this chapter) quantum
computers must operate reversibly (except for measurement gates) to perform their magic,
quantum computers are generally designed to operate on input and output registers. We
shall Fnd that this procedure can be exploited by a quantum computer in some strikingly
nonclassical ways.
The computational process will generally require many qubits besides the
n
+
m
in
the input and output registers, but we shall ignore these additional qubits for the moment,
viewing a computation as doing nothing more than applying a unitary transformation,
U
f
to the
n
+
m
qubits of the input and output registers. We shall return to the fundamental
question of why the additional qubits can be ignored in Section C.
To deFne unitary transformations
U
it is enough to deFne their action on any basis,
since any other state

Ψ
i
must be a linear superposition of basis states, and therefore,
since unitary transformations are linear, their action on Ψ is entirely determined by their
action on the basis.
In most cases of interest one takes the basis in which
U
is deFned
to be the computational (classical) basis.
In many cases (such as the deFnition below
1
²rom here on Cbits will pretty much vanish from the scene, so I shall (reluctantly)
replace “Qbit” with the ridiculous term “qubit” used by everybody else.
1