Quantum Computing
Why This Article?
The way we write software is driven by advances in computing architecture & technology. As computing technology progressed, developers geared up from writing assembly code to higher level C/C++ code to massively parallel algorithms to very large scale distributed SETI like software. One of next generation technologies is Quantum Computing. Researched since 1960s, Quantum Computers have made debut in Cryptography and Communications Servers.Quantum computers have unique working principles and bring about completely new algorithms that run on Quantum Turing Machines. Many of our today's developer community may actually get to write software for quantum computers. So thought I would share my learning with Code Project community and ignite some interest in Quantum Computing.
Sorry, No source code as of now. Don't have quantum hardware & compiler at home yet :)
Contents
- Computing : Different Perspective
- Square Computing Machine
- Classical Computer vs. Physical System
- Qubit
- Qubit Operation Example
- Applications of Quantum Computing
- Resources
- Credits
Computing : Different Perspective
Imagine that we are writing a C++ program to simulate trajectory of a metal ball thrown by hand. Our software takesheight, velocity, mass as input and using gravity & some equations,
it computes distance traveled as output. Now all the complicated fancy stuff that we
just wrote in our source code, actually "comes naturally" to the Nature. So we could "just
throw a ball" of given mass at given height and velocity, and "measure"
where it hits the ground - the Nature would "compute" distance traveled for us. Interesting, isn't it?
And the Nature has been doing this since pretty long time.
So why not take the Nature's advantage in computing? This is exactly what physicists thought
and as an alternative approach to today's transistor & flip-flop based computers, they have
devised newer mechanisms to "do computation" using physical systems.
Let's understand a physical system computer by example.
Square Computing Machine
Figure 1, shows a ball on a slope. Galileo performed this experiment in 17th century. He measured distance,
by which, the ball falls down with respect to time. The results - at t= 1, 2, 3 units the distance
fallen was 1, 4, 9 times distance fallen in unit time.

Note ---- Later Newton demonstrated with <code>Laws of Motion that governing equation is Distance Fallen = u*t - 0.5*g*t2 u = 0, when ball starts from rest.
Now, let's consider ourselves to be operator of this system. So users can tell us a number,
we can roll a ball and tell them square of that number. This is how physical systems do "computation".
Let's understand how physical system compares with classical computer.
Classical Computer vs. Physical System
Figure 2, compares these two entities.

Classical computer takes some input, applies a set of rules, and gives
output and thus performs computation. Physical system in comparison has
initial state, it follows Laws of Motion (Physics), and it results in
final state of the system through some motion or physical action.
Any final state of the system contains information about system's initial state & what has happened
to it since then. And since the motion of any object is governed by definite laws, it can be regarded
as information processing. Hence Reaching to final state from initial state is Information Processing.
Now we have a different perspective of looking at computations. Let's get into understanding Quantum Computing
terminology.
Qubit
Before we define some terms, here is brief background and apparatus.
Photons (Light Particles) are elementary functional unit of Quantum Computers. Photons are governed by Laws
of Quantum Mechanics. Photons and their behavior within a quantum computer is modeled by
Multiverse Theory. Hugh Everett proposed Multiverse Theory in 1957. Classical physics that
explains day-to-day life objects in real world is an approximation of Multiverse theory. Classical
computations are also known as Turing Computations.
Apparatus is shown in Figure 3. Beam splitter splits the incident photon into two parts. Each part is
known as "Unsharp" photon. The beam splitter can also combine unsharp photons into a sharp photon.
The mirror reflects the photon with same "sharpness" - so if an unsharp photon strikes mirror, the
reflected photon is also unsharp and same is true for sharp photon.

The output is detected by another interesting apparatus called as Photon Detector. It gives a high voltage if photon is incident upon it otherwise outputs a low voltage. Photon detector is a destructive way of measuring outcome of quantum experiments, but nonetheless very useful to start with.
On a lighter note Neils Bohr (Nobel Laureate) once said, "Anybody who has not been shocked by Quantum theory, has not understood it!". :)Qubit
Is a Quantum bit. Qubit can be as simple as a single photon. Qubit is a quantum system that is governed by laws of quantum mechanics. As with flip-flop based classical bit, we can perform four fundamental operations on Qubit.
- Set Qubit.
- Reset Qubit.
- Toggle Qubit.
- NULL Operation. (Do nothing)
static constitution of
qubit. The dynamic constitution of system is the laws of motion.
Quantum Observable
Is an entity that can be observed in quantum system. Its equivalent in classical real world is length,
angle, temperature, etc. Quantum observable is however much more than just a number. It is what we observe
in one universe, and all of its counterparts in multiverse. Quantum observable contains information about
structure of multiversal object.
Qubit is a minimal physical system in which all observables either can be Boolean or multiples
of Unit Observables.
There are some very unique operations applicable to qubit. These operations can not be performed on classical
bits.
Let's learn one of such unique operations.
Qubit Operation Example
Figure 4, shows a quantum computing setup. Beam splitters B1, and B2 are in one plane. Mirrors M1, and M2
are opposite to each other. There are two Photon Detectors - one on top and other one on right side.
Photon is incident from left side.

Quantum Observable (Q)
- Q is 1 if photon moves in screen X direction i.e. left to right.
- Q is 0 if photon moves in screen Y direction i.e. bottom to top.
Analysis of Experiment
- Photon is incident on B1 from left to right. This is Beam operation
B. Q is 1. - B1 splits the photon into two unsharp photons - P1 & P2.
- Unsharp P1 is incident on mirror M1 and Unsharp P2 is incident on mirror M2.
- M1 is changing P1 direction from 1 to 0. And M2 is changing P2 direction from 0 to 1.
This is a
NOToperation. - B2 joins P1 & P2 into a sharp photon.
- Experiments show that right side photon detector always fires up - indicating that outcome is a photon moving in right direction. This can also be proved using Quantum Algebra, Hermitian matrices, and expectation value functions - skipped for simplicity. Remember Bohr :)? This is also Beam operation B.Q is 1.
- Observe that quantum observable Q has remained unchanged.
For above experiment, we can write quantum operation as: B·NOT·B = I (read as B followed by NOT followed by B results in I) I is identity observable (similar to 1 in classical algebra). I indicates unchanged.Observe that
B·NOT·B does not have any equivalent in classical computers. There is no
operation in classical computers which, when performed before and after negation, produces unchanged results.

Also note that another conclusion of the experiment is pretty weird:

This square root of NOT is also an interesting operation that find many useful applications
in quantum compputing theory - deserves another article! :)
At this point, it is enough even if you appreciate the idea that quantum computing is pretty different,
and that it systematically build rules of computing. Classical computers are just one approximation of Quantum
Computers.
Applications of Quantum Computing
Quantum computing will NOT help us in doing a+b, or implementing MFC/C++ applications.
Researcher are working to figure out computational problems, for which quantum computers will provide
a significant speedup.
- There is some evidence that even for a quantum computer NP-hard problems remain difficult, these include the travaling salesman problem, or many other optimization problems.
- Exponential speedup in computation time will be possible for some problems which are not NP-hard, but not known to be solvable in polynomial time on a classical computer. The most important one is Shor's Algorithm: Factoring 100 digit number. Classical computer would take 1024 years & quantum computer can do it in 20 minutes! This is a big deal if you realize that Shor's (and similar such) algorithm(s) are a key to robust cryptography applications.
- Finger printing for data security & search applications. Just 40 Qubits can fingerprint 1000 page novel.
- Quantum communications & high speed, secure networks.
Certainly, possibilities are endless. The future will be far more exciting, that what we have possibly imagined!
Resources
Good reference on Quantum Computing can be found at below places:
- Institute for Quantum Computing http://www.iqc.ca
- Centre for Quantum Computation http://www.qubit.org
- IBM Research on Quantum Computing.
- Quantum Turing Machine by Christoph Dürr.
Credits
Christoph Dürr provided exact details of computational problems that quantum computers can solve. Thanks Christoph. Christoph is here.Your comments, suggestions are all welcome! Either drop me a line Suchit.Tiwari@Ge.com or post a comment here. I would be more than happy to get in touch.