1
Why Quantum Computing?
Nature isn’t classical, dammit,
and if you want to make a simulation of nature,
you’d better make it quantum mechanical.
In his 1982 paper ‘‘Simulating Physics with Computers,’’ Richard Feynman, 1965 Nobel Laureate in Physics, said he wanted to ‘‘talk about the possibility that there is to be an exact simulation, that the computer will do exactly the same as nature.’’ He then went on to make the statement above, asserting that nature doesn’t especially make itself amenable for computation via classical binary computers.
In this chapter we begin to explore how quantum computing is different from classical computing. Classical computing is what drives smartphones, laptops, Internet servers, mainframes, high performance computers, and even the processors in automobiles.
We examine several use cases where quantum computing may someday help us solve problems that are today intractable using classical methods on classical computers. This is to motivate you to learn about the underpinnings and details of quantum computers I discuss throughout the book.
No single book on this topic can be complete. The technology and potential use cases are moving targets as we innovate and create better hardware and software. My goal here is to prepare you to delve more deeply into the science, coding, and applications of quantum computing.
Topics covered in this chapter
1.2 I’m awake!
1.3 Why quantum computing is different
1.4 Applications to artificial intelligence
1.5 Applications to financial services
1.6 What about cryptography?
1.7 Summary
1.1 The mysterious quantum bit
Suppose I am standing in a room with a single overhead light and a switch that turns the light on or off. This is just a normal switch, and so I can’t dim the light. It is either fully on or fully off. I can change it at will, but this is the only thing I can do to it. There is a single door to the room and no windows. When the door is closed I cannot see any light.
I can stay in the room or I may leave it. The light is always on or off based on the position of the switch.
Now I’m going to do some rewiring. I’m replacing the switch with one that is in another part of the building. I can’t see the light at all but, once again, its being on or off is determined solely by the two positions of the switch.
If I walk to the room with the light and open the door, I can see whether it is lit or dark. I can walk in and out of the room as many times as I want and the status of the light is still determined by that remote switch being on or off. This is a ‘‘classical’’ light.
Now let’s imagine a quantum light and switch, which I’ll call a ‘‘qu-light’’ and ‘‘qu-switch,’’ respectively.
When I walk into the room with the qu-light it is always on or off, just like before. The qu-switch is unusual in that it is shaped like a sphere with the topmost point (the ‘‘north pole’’) being OFF and the bottommost (the ‘‘south pole’’) being ON. There is a line etched around the middle.
The interesting part happens when I cannot see the qu-light, when I am in the other part of the building with the qu-switch.
I control the qu-switch by placing my index finger on the qu-switch sphere. If I place my finger on the north pole, the qu-light is definitely off. If I put it on the south, the qu-light is definitely on. You can go into the room and check. You will always get these results.
If I move my finger anywhere else on the qu-switch sphere, the qu-light may be on or off when you check. If you do not check, the qu-light is in an indeterminate state. It is not dimmed, it is not on or off, it just exists with some probability of being on or off when seen. This is unusual!
The moment you open the door and see the qu-light, the indeterminacy is removed. It will be on or off. Moreover, if I had my finger on the qu-switch, the finger would be forced to one or other of the poles corresponding to the state of the qu-light when it was seen.
The act of observing the qu-light forced it into either the on or off state. I don’t have to see the qu-light fixture itself. If I open the door a tiny bit, enough to see if any light is shining or not, that is enough.
If I place a video camera in the room with the qu-light and watch it when I try to place my finger on the qu-switch, it behaves just like a normal switch. I will be prevented from touching the qu-switch at anywhere other than the top or bottom. Since I’m making up this example, assume some sort of force field keeps me away from anywhere but the poles!
If you or I are not observing the qu-light in any way, does it make a difference where I touch the qu-switch? Will touching it in the northern or southern hemisphere influence whether it will be on or off when I observe the qu-light?
Yes. Touching it closer to the north pole or the south pole will make the probability of the qu-light being off or on, respectively, be higher. If I put my finger on the circle between the poles, the equator, the probability of the light being on or off will be exactly 50-50.
What I just described is called a two-state quantum system. When it is not being observed, the qu-light is in a superposition of being on and off. We explore superposition in section 7.1.
While this may seem bizarre, evidently nature really works this way. Electrons have a property called ‘‘spin’’ and with this they are two-state quantum systems. The photons that make up light itself are two-state quantum systems. We return to this in section 11.3 when we look at polarization (as in Polaroid® sunglasses).
More to the point of this book, however, a quantum bit, more commonly known as a qubit, is a two-state quantum system. It extends and complements the classical computing notion of bit, which can only be 0 or 1. The qubit is the basic information unit in quantum computing.
This book is about how we manipulate qubits to solve problems that currently appear to be intractable using just classical computing. It seems that just sticking to 0 or 1 will not be sufficient to solve some problems that would otherwise need impractical amounts of time or memory.
With a qubit, we replace the terminology of on or off, 1 or 0, with |1⟩ and |0⟩, respectively. Instead of qu-lights, it’s qubits from now on.
In the diagram above, the position of your finger on the qu-switch is now indicated by two angles, θ and ϕ. The picture itself is called a Bloch sphere and is a standard representation of a qubit, as we shall see in section 7.5.
1.2 I’m awake!
What if we could do chemistry inside a computer instead of in a test tube or beaker in the laboratory? What if running a new experiment was as simple as running an app and having it complete in a few seconds?
For this to really work, we would want it to happen with full fidelity. The atoms and molecules as modeled in the computer should behave exactly like they do in the test tube. The chemical reactions that happen in the physical world would have precise computational analogs. We would need a fully faithful simulation.
If we could do this at scale, we might be able to compute the molecules we want and need. These might be for new materials for shampoos or even alloys for cars and airplanes. Perhaps we could more efficiently discover medicines that are customized to your exact physiology. Maybe we could get better insight into how proteins fold, thereby understanding their function, and possibly creating custom enzymes to positively change our body chemistry.
Is this plausible? We have massive supercomputers that can run all kinds of simulations. Can we model molecules in the above ways today?
Let’s start with C8H10N4O2 -- 1,3,7-Trimethylxanthine. This is a very fancy name for a molecule which millions of people around the world enjoy every day: caffeine. An 8 ounce cup of coffee contains approximately 95 mg of caffeine, and this translates to roughly 2.95 × 1020 molecules. Written out, this is
295,000,000,000,000,000,000 molecules.
A 12 ounce can of a popular cola drink has 32 mg of caffeine, the diet version has 42 mg, and energy drinks often have about 77 mg. [11]
Question 1.2.1
How many molecules of caffeine do you consume a day?
These numbers are large because we are counting physical objects in our universe, which we know is very big. Scientists estimate, for example, that there are between 1049 and 1050 atoms in our planet alone. [4]
To put these values in context, one thousand = 103, one million = 106, one billion = 109, and so on. A gigabyte of storage is one billion bytes, and a terabyte is 1012 bytes.
Getting back to the question I posed at the beginning of this section, can we model caffeine exactly in a computer? We don’t have to model the huge number of caffeine molecules in a cup of coffee, but can we fully represent a single molecule at a single instant?
Caffeine is a small molecule and contains protons, neutrons, and electrons. In particular, if we just look at the energy configuration that determines the structure of the molecule and the bonds that hold it all together, the amount of information to describe this is staggering. In particular, the number of bits, the 0s and 1s, needed is approximately 1048:
This is just one molecule! Yet somehow nature manages to deal quite effectively with all this information. It handles the single caffeine molecule, to all those in your coffee, tea, or soft drink, to every other molecule that makes up you and the world around you.
How does it do this? We don’t know! Of course, there are theories and these live at the intersection of physics and philosophy. We do not need to understand it fully to try to harness its capabilities.
We have no hope of providing enough traditional storage to hold this much information. Our dream of exact representation appears to be dashed. This is what Richard Feynman meant in his quote at the beginning of this chapter: ‘‘Nature isn’t classical.’’
However, 160 qubits (quantum bits) could hold 2160 ≈ 1.46 × 1048 bits while the qubits were involved in computation. To be clear, I’m not saying how we would get all the data into those qubits and I’m also not saying how many more we would need to do something interesting with the information. It does give us hope, however.

Richard Feynman at the California Institute of Technology in 1959. Photo is in the public domain.
In the classical case, we will never fully represent the caffeine molecule. In the future, with enough very high quality qubits in a powerful enough quantum computing system, we may be able to perform chemistry in a computer.
To learn more
Quantum chemistry is not an area of science in which you can say a few words and easily make clear how quantum computers might eventually be used to compute molecular properties and protein folding configurations, for example. Nevertheless, the caffeine example above is an example of quantum simulation.
For an excellent survey of the history and state of the art of quantum computing applied to chemistry as of 2019, see Cao et al. [2] For the specific problem of understanding how to scale quantum simulations of molecules and the crossover from High Performance Computers (HPC), see Kandala et al. [10]