Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Dancing with Qubits
Dancing with Qubits

Dancing with Qubits: How quantum computing works and how it can change the world

eBook
$9.99 $75.99
Paperback
$94.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Dancing with Qubits

2
They’re Not Old, They’re Classics

No simplicity of mind, no obscurity of station, can escape the universal duty of questioning all that we believe.

William Kingdon Clifford

When introducing quantum computing, it’s easy to say ‘‘It’s completely different from classical computing in every way!’’ Well that’s fine, but to what exactly are you comparing it?

We start things off by looking at what a classical computer is and how it works to solve problems. This sets us up to later show how quantum computing replaces even the most basic classical operations with ones involving qubits, superposition, and entanglement.

Topics covered in this chapter

2.1 What’s inside a computer?
2.2 The power of two
2.3 True or false?
2.4 Logic circuits
2.5 Addition, logically
2.6 Algorithmically speaking
2.7 Growth, exponential and...

2.1 What’s inside a computer?

If I were to buy a laptop today, I would need to think about the following kinds of hardware options:

  • size and weight of the machine
  • quality of the display
  • processor and its speed
  • memory and storage capacity

Three years ago I built a desktop gaming PC. I had to purchase and assemble and connect:

  • the case
  • power supply
  • motherboard
  • processor
  • internal memory
  • video card with a graphics processing unit (GPU) and memory
  • internal hard drive and solid state storage
  • internal Blu-ray drive
  • wireless network USB device
  • display
  • speakers
  • mouse and keyboard

As you can see, I had to make many choices. In the case of the laptop, you think about why you want the machine and what you want to do, and much less about the particular hardware. You don’t have to make a choice about the manufacturers of the parts nor the...

2.2 The power of two

For a system based on 0s and 1s, the number 2 shows up a lot in classical computing. This is not surprising because we use binary arithmetic, which is a set of operations on base 2 numbers.

Most people use base 10 for their numbers. These are also called decimal numbers. We construct such numbers from the symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9, which we often call digits. Note that the largest digit, 9, is one less than 10, the base.

A number such as 247 is really shorthand for the longer 2 × 102 + 4 × 101 + 7 ×100. For 1,003 we expand to 1 × 103 + 0 × 102 + 0 × 101 + 3×100. In these expansions we write a sum of digits between 0 and 9 multiplied by powers of 10 in decreasing order with no intermediate powers omitted.

We do something similar for binary. A binary number is written as a sum of bits (0 or 1) multiplied by powers of 2 in decreasing order with no intermediate powers omitted. Here are some examples...

2.3 True or false?

From arithmetic let’s turn to basic logic. Here there are only two values: true and false. We want to know what kinds of things we can do with one or two of these values.

The most interesting thing you can do to a single logical value is to replace it with the other. Thus, the not operation turns true into false, and false into true:

not true = false

not false = true

For two inputs, which I call p and q, there are three primary operations and, or, and xor. Consider the statement ‘‘We will get ice cream only if you and your sister clean your rooms.’’ The result is the truth or falsity of the statement ‘‘we will get ice cream.’’

If neither you nor your sister clean your rooms, or if only one of you clean your room, then the result is false. If both of you are tidy, the result is true, and you can start thinking about ice cream flavors and whether you want a cup...

2.4 Logic circuits

Now that we have a sense of how the logic works, we can look at logic circuits. The most basic logic circuits look like binary relationships but more advanced ones implement operations for addition, multiplication, and many other mathematical operations. They also manipulate basic data. Logic circuits implement algorithms and ultimately the apps on your computer or device.

We begin with examples of the core operations, also called gates.

To me, the standard gate shapes used in the United States look like variations on spaceship designs.

Rather than use true and false, we use 1 and 0 as the values of the bits coming into and out of gates.

tikz JPG figure   tikz JPG figure

This gate has two inputs and one output. It is not reversible because it produces the same output with different inputs. Given the 0 output, we cannot know which example produced it. Here are the other gates we use, with example inputs:

tikz JPG figure   tikz JPG figure   tikz JPG figure

The symbol...

2.5 Addition, logically

Using binary arithmetic as we discussed in section 2.2

0 + 0 = 0
1 + 0 = 1
0 + 1 = 1
1 + 1 = 0 carry 1

Focusing on the value after the equal signs and temporarily forgetting the carrying in the last case, this is the same as what xor does with two inputs.

tikz JPG figure

tikz JPG figure

We did lose the carry bit but we limited ourself to having only one output bit. What gate operation would give us that 1 carry bit only if both inputs were also 1, and otherwise return 0? Correct, it’s and! So if we can combine the xor and the and and give ourselves two bits of output, we can do simple addition of two bits.

Question 2.5.1

Try drawing a circuit...

2.6 Algorithmically speaking

The word ‘‘algorithm’’ is often used generically to mean ‘‘something a computer does.’’ Algorithms are employed in the financial markets to try to calculate the exact right moment and price at which to sell a stock or bond. They are used in artificial intelligence to find patterns in data to understand natural language, construct responses in human conversation, find manufacturing anomalies, detect financial fraud, and even to create new spice mixtures for cooking.

Informally, an algorithm is a recipe. Like a recipe for food, an algorithm states what inputs you need (water, flour, butter, eggs, etc.), the expected outcome (for example, bread), the sequence of steps you take, the subprocesses you should use (stir, knead, bake, cool), and what to do when a choice presents itself (‘‘if the dough is too wet, add more flour’’).

We call each step an operation and give...

2.7 Growth, exponential and otherwise

Many people who use the phrase ‘‘exponential growth’’ use it incorrectly, somehow thinking it only means ‘‘very fast.’’ Exponential growth involves, well, exponents. Here’s a plot showing four kinds of growth: exponential, quadratic, linear, and logarithmic.

tikz JPG figure

I’ve drawn them so they all intersect at a point but afterwards diverge. After the convergence, the logarithmic plot (dot dashed) grows slowly, the linear plot (dashed) continues as it did, the quadratic plot (dotted) continues upward as a parabola, and the exponential one shoots up rapidly.

Take a look at the change in the vertical axis, the one I’ve labeled resources with respect to the horizontal axis, labeled problem size. As the size of the problem increases, how fast does the amount of resources needed increase? Here a resource might be the time required for the algorithm...

2.8 How hard can that be?

Once you decide to do something, how long does it take you? How much money or other resources does it involve? How do you compare the worst way of doing it with the best?

When you try to accomplish tasks on a computer, all these questions come to bear. The point about money may not be obvious, but when you are running an application you need to pay for the processing, storage, and memory you use. This is true whether you paid to get a more powerful laptop or have ongoing cloud costs.

To end this chapter we look at classical complexity. To start, we consider sorting and searching and some algorithms for doing them.

Whenever I hear ‘‘sorting and searching’’ I get a musical ear worm for Bobby Lewis’ 1960 classic rock song ‘‘Tossin’ and Turnin’.’’ Let me know if it is contagious.

2.8.1 Sorting

Sorting involves taking multiple items and putting them in some kind...

2.9 Summary

Classical computers have been around since the 1940s and are based on using bits, 0s and 1s, to store and manipulate information. This is naturally connected to logic as we can think of a 1 or 0 as true or false, respectively, and vice versa. From logical operators like and we created real circuits that can perform higher-level operations like addition. Circuits implement portions of algorithms.

Since all algorithms to accomplish a goal are not equal, we saw that having some idea of measuring the time and memory complexity of what we are doing is important. By understanding the classical case we’ll later be able to show where we can get a quantum improvement.

References

[1]

Thomas H. Cormen et al. Introduction to Algorithms. 3rd ed. The MIT Press, 2009.

[2]

R.W. Hamming. ‘‘Error Detecting and Error Correcting Codes’’. In: Bell System Technical Journal...

Left arrow icon Right arrow icon

Key benefits

  • Discover how quantum computing works and delve into the math behind it with this quantum computing textbook
  • Learn how it may become the most important new computer technology of the century
  • Explore the inner workings of quantum computing technology to quickly process complex cloud data and solve problems

Description

Quantum computing is making us change the way we think about computers. Quantum bits, a.k.a. qubits, can make it possible to solve problems that would otherwise be intractable with current computing technology. Dancing with Qubits is a quantum computing textbook that starts with an overview of why quantum computing is so different from classical computing and describes several industry use cases where it can have a major impact. From there it moves on to a fuller description of classical computing and the mathematical underpinnings necessary to understand such concepts as superposition, entanglement, and interference. Next up is circuits and algorithms, both basic and more sophisticated. It then nicely moves on to provide a survey of the physics and engineering ideas behind how quantum computing hardware is built. Finally, the book looks to the future and gives you guidance on understanding how further developments will affect you. Really understanding quantum computing requires a lot of math, and this book doesn't shy away from the necessary math concepts you'll need. Each topic is introduced and explained thoroughly, in clear English with helpful examples.

Who is this book for?

Dancing with Qubits is a quantum computing textbook for those who want to deeply explore the inner workings of quantum computing. This entails some sophisticated mathematical exposition and is therefore best suited for those with a healthy interest in mathematics, physics, engineering, and computer science.

What you will learn

  • See how quantum computing works, delve into the math behind it, what makes it different, and why it is so powerful with this quantum computing textbook
  • Discover the complex, mind-bending mechanics that underpin quantum systems
  • Understand the necessary concepts behind classical and quantum computing
  • Refresh and extend your grasp of essential mathematics, computing, and quantum theory
  • Explore the main applications of quantum computing to the fields of scientific computing, AI, and elsewhere
  • Examine a detailed overview of qubits, quantum circuits, and quantum algorithm

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 28, 2019
Length: 516 pages
Edition : 1st
Language : English
ISBN-13 : 9781838825256
Category :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Nov 28, 2019
Length: 516 pages
Edition : 1st
Language : English
ISBN-13 : 9781838825256
Category :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 188.97
40 Algorithms Every Programmer Should Know
$49.99
Learn Quantum Computing with Python and IBM Quantum Experience
$43.99
Dancing with Qubits
$94.99
Total $ 188.97 Stars icon
Banner background image

Table of Contents

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

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4
(47 Ratings)
5 star 70.2%
4 star 14.9%
3 star 4.3%
2 star 4.3%
1 star 6.4%
Filter icon Filter
Top Reviews

Filter reviews by




James L. Weaver Dec 09, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
After a brief intro to quantum computing, most of the first half of Dances with Qubits covers the fundamentals required for increasing understanding of quantum computing. These fundamentals are taught in an approachable manner, and include basic computer science and relevant math, geometric representations, linear algebra, probability, and complexity theory.Dances with Qubits is an excellent resource, including as a textbook in the classroom, and as a reference for those learning and experimenting with quantum computing.
Amazon Verified review Amazon
Christian Eiler Oct 01, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great intro with great review of topics needed.
Amazon Verified review Amazon
JSBookworm Jan 02, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
A very detailed and complex book, requested by my son for his career. He was please with it and got straight into it.
Amazon Verified review Amazon
Amazon Customer Nov 06, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Awesome book. The way author explained quantum computing is the best way to learn it. All the mathematical derivations are there. If someone finishes reading this book all the concepts will be very clear. Very helpful in my experience.
Amazon Verified review Amazon
ironfrown Jan 17, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is very comprehensive. It explains circuit diagrams, basic quantum algorithms and their physical implementation. In doing so, it does not shy away from mathematical foundations of quantum concepts - it discusses the mechanics of the quantum circuits and explains their mathematical representation. However, in contrast to many other books in this field, it provides a complete and excellent introduction to all mathematics needed to understand these key concepts. This is the strongest point of the book, especially for those who did their math training a while ago or missed on some of its important parts, such as complex numbers, geometry, linear algebra or probability theory. Great book to keep as a reference for your future readings.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.