Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Dancing with Qubits

You're reading from   Dancing with Qubits How quantum computing works and how it can change the world

Arrow left icon
Product type Paperback
Published in Nov 2019
Publisher Packt
ISBN-13 9781838827366
Length 516 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Robert S. Sutor Robert S. Sutor
Author Profile Icon Robert S. Sutor
Robert S. Sutor
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface
1 Why Quantum Computing? FREE CHAPTER 2 They’re Not Old, They’re Classics 3 More Numbers than You Can Imagine 4 Planes and Circles and Spheres, Oh My 5 Dimensions 6 What Do You Mean ‘‘Probably’’? 7 One Qubit 8 Two Qubits, Three 9 Wiring Up the Circuits 10 From Circuits to Algorithms 11 Getting Physical 12 Questions about the Future Afterword
Other Books You May Enjoy Appendices

1.3 Why quantum computing is different

I can write a little app on a classical computer that can simulate a coin flip. This might be for my phone or laptop.

Instead of heads or tails, let’s use 1 and 0. The routine, which I call R, starts with one of those values and randomly returns one or the other. That is, 50% of the time it returns 1 and 50% of the time it returns 0. We have no knowledge whatsoever of how R does what it does. When you see ‘‘R,’’ think ‘‘random.’’

This is called a ‘‘fair flip.’’ It is not weighted to slightly prefer one result or the other. Whether we can produce a truly random result on a classical computer is another question. Let’s assume our app is fair.

If I apply R to 1, half the time I expect that same value and the other half 0. The same is true if I apply R to 0. I’ll call these applications R(1) and R(0), respectively.

If I look at the result of R(1) or R(0), there is no way to tell if I started with 1 or 0. This is just as in a secret coin flip where I can’t tell whether I began with heads or tails just by looking at how the coin has landed. By ‘‘secret coin flip,’’ I mean that someone else does it and I can see the result, but I have no knowledge of the mechanics of the flip itself or the starting state of the coin.

If R(1) and R(0) are randomly 1 and 0, what happens when I apply R twice?

tikz JPG figure

I write this as R(R(1)) and R(R(0)). It’s the same answer: random result with an equal split. The same thing happens no matter how many times we apply R. The result is random and we can’t reverse things to learn the initial value. In the language of section 4.1, R is not invertible.

Now for the quantum version. Instead of R, I use H, which we learn about in section 7.6. It too returns 0 or 1 with equal chance but it has two interesting properties:

  1. It is reversible. Though it produces a random 1 or 0 starting from either of them, we can always go back and see the value with which we began.
  2. It is its own reverse (or inverse) operation. Applying it two times in a row is the same as having done nothing at all.

There is a catch, though. You are not allowed to look at the result of what H does if you want to reverse its effect.

tikz JPG figure

If you apply H to 0 or 1, peek at the result, and apply H again to that, it is the same as if you had used R. If you observe what is going on in the quantum case at the wrong time, you are right back at strictly classical behavior.

To summarize using the coin language: if you flip a quantum coin and then don’t look at it, flipping it again will yield the heads or tails with which you started. If you do look, you get classical randomness.

Question 1.3.1

Compare this behavior with that of the qu-switch and qu-light in section 1.1 .

A second area where quantum is different is in how we can work with simultaneous values. Your phone or laptop uses bytes as the individual units of memory or storage. That’s where we get phrases like ‘‘megabyte,’’ which means one million bytes of information.

A byte is further broken down into eight bits, which we’ve see before. Each bit can be 0 or 1. Doing the math, each byte can represent 28 = 256 different numbers composed of eight 0s or 1s, but it can only hold one value at a time.

Eight qubits can represent all 256 values at the same time.

This is through superposition, but also through entanglement, the way we can tightly tie together the behavior of two or more qubits. This is what gives us the (literally) exponential growth in the amount of working memory that we saw with a quantum representation of caffeine in section 1.2. We explore entanglement in section 8.2.

You have been reading a chapter from
Dancing with Qubits
Published in: Nov 2019
Publisher: Packt
ISBN-13: 9781838827366
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime