An Introduction to Quantum Computing For Computer Science Undergraduates

farrowbrainUrban and Civil

Nov 15, 2013 (4 years and 8 months ago)


An Introduction to Quantum Computing


Computer Science Undergraduates

Aria Schultz


Quantum computing is still in its infancy. The world is still waiting for the first quantum
computer to be built. It would be naive to try and speculate as to when hardware for quantum
computing will become a reality; however, it would also be naive to f
orgo exposing oneself to
the unique benefits and problems of quantum computing under the assumption that quantum
computers are a long ways away.

This paper will strive to provide a cursory overview of the key points of quantum computing and
is aimed at
the computer science undergraduate. Because of this, many o
f the concepts will be
basic overviews

namely the underlying mathematical basis for quantum computing


In order to begin exploring the world of quantum computing it is useful to
first compare and
contrast it with classical computing. Within the context of this paper

“classical computing” will
refer to the standard computing model that has memory composed of a series of bits. These bits
(which shall be referred to as Cbits hence
forth) have a value of either 0 or 1. The state of a
classical computer can be seen as the state of all of the Cbits in the computer's memory. When
working with Cbits in a classical computer it is a trivial operation to read the state of the Cbit and
h an operation has no effect on the value the Cbit holds.

In contrast

the idea of a state has a very different meaning for a quantum bit (which shall be
denoted as Qbit henceforth). Before delving into that

it seems important to dispel a popular
misconception that whereas a Cbit holds the state of 0 or 1, a Qbit can hold a state of any number
between 0 and 1. This idea is a fundamental misunderstanding of how a Qbit works.

To begin understanding how a Qb
it works it is important to start with the key concept that it is
impossible to read the state of a Qbit. In order to get any information from a Qbit one must
invoke a process known as measuring. The act of measuring a Qbit does not yield the state of
e Qbit (as was just pointed out, this is impossible) instead the process of measuring a Qbit
causes it to collapse into either the state of 0 or 1. Therefore

it is of utmost importance to
understand that although a Qbit is capable of holding very complex

information, once one tries to
retrieve this information the Qbit will collapse down to a 0 or 1.




So what information does a Qbit have in its state? The answer to that is both simple, and
complex. The state of a Qbit can be 0 or 1. It can also be 0 AND 1, or 0 AND 1 AND 0, etc. In
other words a Qbit can hold multiple states
through quantum

siton. Superpositon is a
basic concept of quantum mechanics. The logic of superpositon flies in the face of everything
we experience in the macro world. Our brains are sure of the idea that an object can only be in
one definite state at any given time.

A light switch is either on or off, it cannot be on and off at
the same time. This simple rule that we often take for granted fails to characterize how things
behave at a quantum level. At that level it is possible, say, for an atom to be rotating clock
and counter
clockwise at the same time. This is known as quantum superpositon, the concept
that at the quantum level an object may not have one simple state, but instead multiple states that
all exist concurrently. It is this fundamental idea that g
ives quantum computing its power.



In classical computing Cbits are manipulated through the application of logic gates (AND, XOR,
etc.). The majority of these logic gates cannot be reversed once they have been applied with the
on of something like NOT which can simply be applied a second time to reverse the
operation. When working with Qbits all operations can be reversed with the exception of
measuring the Qbits. Since measurement can be put off

calculations are complet
ed this is
not a big issue.

The exact mechanic of the Qbits logic gates all being reversible has its explanation in linear
algebra. Given that linear algebra is not a required course for computer science undergraduates,
and trying to write a summary with

enough brevity to allow room for the real meat of this article
(the portion on that chiefly pertains to computer science) the underlying mathematical formulas
and their notation will have to be replaced with a bit of hand waving

The basic point that
should be understood is that a Qbit's state is represented mathematically as
any two
dimensional unit vector spanned by the vectors (0) and (1) over the complex numbers .
Thus the state of a Qbit can be generalize as

S =
(0) + α


complex number coefficients.

the state S associated with a Qbit is
the superpositon of the states 0 and 1 with amplitudes


The state of a single Cbit can
only hold one bit of information (a 0 or 2), but a Qbit is represented by two

complex numbers


I will try to indicate points in this paper where I oversimplify or understate what is going on “behind the scenes.”
In other words I will try to make it apparent where further explanation of linear algebra as it applies to quantum
computing has been lef
t out in order to make this paper more comprehensible for a computer science


and in order to represent it with an arbitrary amount of precision one requires an arbitrary
number of bits to specify the two
complex numbers α

and α

In the case of Qbits

the logic gates that are applied are unitary matrices.
These matrices are
basically rotations that act on a Qbit, and as such they can all be undone easily by applying the
opposite rotation. The benefits of this will be expanded on later, when I discuss the
computational process of a quantum computer.

that Qbits have far more complex states it would seem as though a quantum computer has
vastly superior computational power when compared to a classical computer, but there is a major
As previously stated


Qbit may contain a plethora of information
there is no way to “read”
that information from the Qbit as one would with a Cbit in classical computing. You cannot get
the amplitudes


and α

instead your perform something called “measuring” to obtain a value
from a Qbit. This measurement will collapse the Qbit to either a 0 or 1.

Applying a measurement to a Qbit does

determine the result held in a Qbit. Instead

superpositon of st
ates that a Qbit is in determines the probability that it will collapse into a
particular state. The probability of a particular result is the square of the magnitude of the
amplitude. In the example above of a single Qbit with amplitudes


the p
robability that
measuring this Qbit will yield a 0 is |

One should avoid thinking of measuring a Qbit as the same thing as measuring someone's weight.
This is not the case. It would be more correct to compare it with measuring a

Having someone take an IQ test will not yield any preexisting numerical property of a person,
just what happens when you give someone an IQ test

Given these conditions it may be hard to imagine how anything of significance can be computed

a Qbit. The trick is to use the unitary transformations to most amplitudes at or near zero,
and have useful information carried in any amplitude that has a decent chance of yielding the
correct result. As such

quantum computers are most useful at findi
ng solutions that can then be
easily checked using some other method to verify the
r accuracy. Additionally

note that the
chance of getting an incorrect result often has a low probability.


Process in a Quantum Computer


how a Qbit stores information and how information

manipulated and
retrieved from a Qbit it is time to talk about how one computes with a Qbit. Considering what
has been said so far about the Qbit,

may be wondering how a quantum computer could offer
any advantage over a classical one. In truth, if this was all a quantum computer had to offer it
would not be worth the effort of actually trying to build one, but the true beauty of a quantum
comes from the interesting computations that can be

with a Qbit that are not
possible on classical computers. By taking advantage of quantum superpositon a programmer
can sacrifice gaining one piece of information for another. This trade
off is

typical of quantum
computing, and leads to its most powerful features.


The basis of this kind of trade
off is to set the input of a function to be the superpositon of all
possible inputs the function can take,
then execute the function. Thus

the ou
tput of the
function will be all the calculations of the function. With a 100 bit input register

this would
result in 10

evaluations for the price of one. Of course, as has been reiterated throughout this
paper, there is no way to extract that informa
tion from the Qbits. All that one can do is measure
the output of the function

which will cause the Qbits complex state to collapse down do a simple
0 or 1. Thus

one can only learn a random value of the function this way, but there are some

implications to this sort of parallelism if


willing to give up the actual results of
a computation.

Deutsch's Problem

The first example of this quantum trade
off, and the example that got the whole field of quantum
computing started, is the Deu
tsch's Problem. The problem goes like this. Say
there is

a function


takes a single Qbit of input and returns a single Qbit as output. The function

will perform
some action on the input in order to produce an output. On a classical computer if
one wanted to
know the result of
(0) they would have to run the function and check the output (which would be
a 0 or 1), and similarly one would call
(1) to obtain that result.

Things work the same on a quantum computer as well. Calling
(0) will ret
urn the computed
value of
(0). Now suppose all

wanted to know was whether
(0) was equal to
(1). On a
classical computer


no choice but to call

twice, passing 0 and 1, then compare the
results. A quantum computer, on the other hand, can make the determination with only one call

Of course

there is the quantum trade
off to keep in mind. In this case, what is lost is the actual
values of
(0) and
(1), but that information is irrelevant to answering the question of whether or
not the values are equal. In this way a quantum computer can trade one piece of information for

The way one accomplishes this feat is by using superposito
n to set the input register to be 0 and
Now if

is executed on the input that is a superpositon of both the inputs we wish to check an
interesting thing happens. The output register will just have a copy of the input register from

was called
, and the input register will have either a 0 or a 1 depending on whether


Simon's Problem

The next problem that we are going to examine is called Simon's problem. It is an extension of
the trick used in Deutsch's problem with the ad
ded benefit of being able to clearly see the speed
up that a quantum computer can offer over a classical machine.


The Problem

In Simon's problem we have a function
(x) that takes an integer

as its input. The function then
computes the bitwise modulo
2 sum

and sum unknown integer
. The goal is to find the
value of

or in other words find the period of

In order to solve this problem on a classical computer all

can really
be done

is start putting
in values for x and keep going until you find a value for
) that is equal to some previous value
) obtained from the function. Then you would know that
equals the bitwise modulo
addition of

The number of ti
mes you must call this method in order to have an
appreciable chance of finding the value of

grows exponentially with the number of bits in


had 100 bits a classical computer would have to call

about 10

times. At ten million calls per

it would take about three years

The Solution

A quantum computer can determine the value of

with high probability (less than one in a
million chance of failing) by calling

about 120 times given an

with 100 bits. This can be
accomplished by the trick we used in Deutsch's problem and set all the bits of the input

to be a
superpositon of all possible inputs
. Now when the function
is run and we measure the input
register we will learn (with equa
l probability) a random number
for which the modulo
2 sum of

is 0. This value

gives us a subset of the bits in
hose modulo
2 sum is 0. Therefore, if
is the number of bits in

we can lean the value of

with high probability by invoking t

n +
20 times. This is a clear case where a quantum computer calculates the correct
result with a high probability and the result can be confirmed by a classical computer in far less
time than a classical computer could ever calculate the resul

Implications of Quantum Computing Techniques

These two problems may seem a bit artificial; however, they are intentionally simple in order to
give you an idea of the types of things one can do on a quantum computer, and how this can lead
to massive

performance increases. The trick of using quantum superpositon to perform
calculations in parallel is at the heart of what gives quantum computing i
s allure. Always keep
in mind though, that the results of a parallel computation cannot be obtained, but

we can set
things up so that by giving up learning the results of any of the calculations we can learn other
information about a function.

The concept of quantum parallelism can be used in some truly amazing ways from Groover's
algorithm, a search alg
orithm that runs in (π/4) √N time, to an algorithm that utterly defeats the


If you are unsure what is meant by bitwise modulo
2 addition have no fear it is equivalent to the XOR bitwise
logical operator.


Like in Deutsch's problem, the
re is a bit of additional overhead besides setting the input register as the
superpositon of all possible inputs. Again this amount to nothing more than applying some unitary logic gates to
the input register.


one of the most widely used encryption scheme today RSA
This is only a quick overview
the usefulness of quantum computation and how one computes at the quantum level. From h
we can begin discussing some of the recent progress that has been made in the hardware side of
the field.

Quantum Hardware

During the past several years there have been a number of very important break
throughs in the
quest to build the first true quantum computer.
hese discoveries give a decent picture of what
the current issues with building a quantum computer are.

They h
ighlight the progress that has
been made, and the obstacles that need to be overcome. The also demonstrate the major issues
that must be solved in order to build a full scale quantum computer.


The main issue that one must contend with when the
y try to build a quantum computer is how to
make a Qbit. The majority of problems dealing with quantum hardware

creating and
maintaining a Qbit. There are many different ways a Qbit can be created, and the only real
restriction is that you need s
omething that can be in a superpositon of states

. Current
physical implementations are based on a variety of approaches including superconductors, ions,
the magnetic resonance of molecules in a solution, and the list goes on. The basic problem that
ll these methods
un into

is not how to create a Qbit, but how to get that Qbit to maintain

state for sufficiently long enough time to perform calculations.

In order for a Qbit to properly hold


it must be completely isolate from the outside world.
Any interference will cause the state of the Qbit to decay, and become unusable. IBM has been
working on an implementation of Qbits. The IBM group announced earlier this year that they
have made a n
umber of break
throughs which have allowed them to keep a Qbit free from any
outside interference for a longer period of time allowing the group to run some simple
calculations on them.

Another group of researchers at Yale created the first solid
state qu
antum processor back in 2009.
The chip had a 2
Qbit register and the Qbits could only maintain their states for a microsecond
which is considerably longer than what previous Qbits were capable of

in the past

I highlight these two groups because I think
they illustrate the problem with building a full scale
quantum computer quite well. Even though both groups have very different approaches they
have the same basic problem: the Qbits are being interfered with by the outside environment
which causes them t
o decay and become useless. As you add more and more Qbits to a machine,
the likelihood that any one of those Qbits will decay before your calculation completes increases


Unfortunately we again have reached the boa
rders of this paper. Quantum computer science is an amazingly vast
field and many of the topics that have been covered here deserve a paper all to themselves.



Currently there is a lot of controversy surrounding a company named D
Wave. D
Wave claims
that they have built a full scale quantum computer; however, the company has not allowed for
any peer review of this so called quantum computer. As a result there i
s a great deal of debate in
the scientific community about whether this machine is truly a quantum computer or not.
Though the machine certainly has an interesting story, there is no consensus on whether D
Systems has actually produced a quantum comp
uter or not.

Recently a lead scientist for the aerospace company Lockheed Martin gave the group at D
code from their F
16 fighter jet. The group at Lockheed knew there was a bug in the code, and
they wanted to see if D
Wave’s quantum computer coul
d analyze the code and find the bug.

After taking the code from Lockheed D
Wave came back and announced they had found the bug.
Lockheed was so impressed by this that they paid $10 million for a quantum computer that is
now set up in a Lockheed research

Looking Ahead

So that is a glimpse into current attempts to build a quantum computer.

As was mentioned at the
beginning of this paper, there is no clear idea of when the first true quantum computer will be
built. There are many research groups
working hard on the problems that face quantum
computer hardware.


While quantum computers may still be a purely theoretical concept many groups have shown a
great deal of interest in acquiring a quantum computer. The biggest of these gro
ups would be
national governments who are interested in acquiring a quantum computer in order to decrypt
data from other nations.


Because of the advantages that a quantum computer has over a classical computer in the speed
at which it can
perform calculations, a quantum computer is very capable of factoring large
numbers. This means that quantum computers can break encry
ption schemes making them very
valuable to intelligence agencies across the world.



Another potential use for quantum computers is in simulating quantum chemistry. Classical
computers simply do not have the necessary memory or speed to simulate how atoms and
molecules behave. A quantum computer, on the other hand, has at the core of its

quantum mechanics. As a result a quantum computer is uniquely able to run simulations for
quantum chemists [3].


The first quantum computers will not be around any time soon, but it is not unreasonable to think
they will be a

reality within 50 years (or less, by some estimates).
This paper

tried to cover
h much brevity) the way in which a quantum computer performs calculations and how those
calculations can be

with amazing speed when compared to a classical
computer. As a
result, many governments are interested in quantum computing as a way to break encryption.
Others are interested in quantum computing's potent ability to simulate quantum mechanics, a
task not feasible on classical computers. Given all thi
s interest it is not hard to imagine how the
demand for computer scientists capable of developing programs for a quantum computer will
increase dramatically once these machines become available.

a basic understanding
how a quantum computer works

and how it matches up to a classical computer

can be a great
benefit in the future


Mermin, N. D. (2007).

Quantum Computer Science
. Cambridge: Cambridge University Press.

Nielsen, M. A., & Chuang, I. L. (2000).

Quantum Computati
on and Quantum Information.

Cambridge: Press Syndicate of the

University of Cambridge.


Le, B. M. (2006).

A short introduction to quantum information and quantum computation

Cambridge: Cambridge University Press.

Yanofsky, N. S., & Mannucci,

M. A. (2008).

Quantum Computing for Computer Scientist


Cambridge University Press.


Quantum Computing
. (n.d.). Retrieved from

Poeter, D. (2012, February 28).

IBM says it's 'on

the cusp' of building a quantum computer

Retrieved from,2817,2400930,00.asp

Muzzin, S. (2009, June 28).

Scientists create first electronic quantum processor
. Retrieved from

Smalley, E. (2012, February 22).

wave defies world of critics with ‘first quantum cloud’

Retrieved from