An equal superposition of states is created by the application
of the well known Walsh-Hadamard operator. The matrix
representing the Walsh-Hadamard operator for an
bit
quantum register is a
matrix whose
elements are defined to be:
, where
is the binary representation
of
, and
is the bitwise dot product
of the
bit strings
and
,
and
range from 0
to
, [Grover96] Put another way,
, where the sign is positive if the bitwise AND of
and
has an even number of 1's and negative
otherwise. [Grover00]
The reason the Walsh-Hadamard operator inverts the sign (or
rotates the phase
radians) in certain states is to allow
it to be reversible. We are asking for an operator which
places a quantum system in an equal superposition of states.
For a classical probabilistic system this would necessarily be
a irreversible process, as the resultant state would be the
same for any input. Since the amplitudes of a quantum state
can be complex, the probability of measuring the a system in a
given state is the absolute square of the amplitude in the
given state. Thus the Walsh-Hadamard operation can encode
information in the phases of the states to make it reversible,
while still placing the register in a state where if measured
any basis state will be found with equal
probability. [Grover00]
We may assume that prior to step 1 of our algorithm that our
state is prepared to be identically in one of the
basis states. Assume that we place our register initially in
the state where each of the bits is zero, then the state
vector for our
bit register is:
. As a reminder, the state vector
has
components, representing each of the states our
bit
quantum register can be measured in. After application of the
Walsh-Hadamard transformation the j'th element of the state
vector is
, note
that the bitwise dot product of the zero vector and any
vector is 0, thus the sign of each amplitude is positive.
The result is an equal superposition of each state, all with positive amplitude. This was attained by performing the Walsh-Hadamard operator to the register prepared solely in the first state.
Note that this can be done for a
bit quantum register in
time, although to simulate this on a
classical computer we must perform no less than
operations. Here we see an example of the kind of exponential
slowdown in classical simulation of quantum systems that
Feynman observed.