Quantum Computing:
From Concepts to Code


Quantum Computing: From Concepts to Code
introduces you to a radically new way to think about algorithms and data. This is exciting, mind-bending stuff! And you can learn to do it. If you want to understand how quantum computers work — and how to program them — this friendly, self-contained guide is for you.

This approachable, reliable book walks you step-by-step through quantum computing fundamentals, such as superposition, quantum gates, interference, entanglement, and measurement, building up the skills you need to write your own quantum programs. You can run your code on simulators on your own computer, or on real quantum computers available online.

Order your own physical or electronic copy from your favorite bookseller, Amazon, or directly from my wonderful publisher, No Starch Press.

Welcome to the Future!
Quantum computing is an entirely new way to think about programming. You may have read about it in the headlines, where it could seem to belong only in labs. That’s not so! Quantum computers are real, and becoming more common. You can even use quantum computers through your web browser, where large companies offer you some monthly time for free. Quantum computing today is where artificial intelligence was a few decades ago: a radically new idea that will soon burst at the seams and make a huge impact. Reading this book will put you ahead of the curve, ready to lead yourself or your organization in harnessing these new ideas.

Friendly Writing and Figures
The book uses the same friendly and lucid tone that thousands of readers have enjoyed in my other books and my computer graphics column. Some of the many figures in the book are shown on the right.

No Prerequisites
Quantum computing has its own language, symbols, and ways of thinking. I don’t assume you’ve had any exposure to any of the ideas that make up the field. If you remember some high-school math, you’re all set.

An Intuitive Introduction
The world of the quantum is famous for being counterintuitive: our usual ideas of how objects behave just doesn’t apply at these tiny scales. Some people say that quantum scale behavior is “weird” or “strange,” but that’s not fair – it’s just different from what we’re used to. To help you become familiar with how these objects behave, the books starts with a completely non-quantum deck of electronic playing cards. I describe the software we’d write for these cards, which demonstrates the four big principles of quantum computing: superposition, entanglement, measurement, and interference. There won’t be any mystery because these behaviors are just the result of our programming the cards with everyday code to act in these ways. When we move into the real quantum realm, these essential ideas will already be old friends to you.

Gentle Math
The language of quantum computing is written in mathematical notation. I know that this isn’t what a lot of people want to hear, but ultimately there are no alternatives that will enable you to write your own programs. So I take it slow, and introduce each idea in small pieces, with plenty of examples and discussion. Every step is explained. No matter what experiences you’ve had with math before, I promise you that you’ll be able to follow it all, and (gasp) even enjoy it! Really, this stuff is elegant and lovely. By the end you’ll wonder what the fuss was about.

Tried & Tested
I’ve presented this material multiple times at conferences and events, even with people sitting at laptops and using simulators to run quantum programs. The illustrations and the presentation have been refined so that everyone follows and understands. You’ll understand it, too, and it will make you happy because this stuff isn’t just useful, it’s fascinating and useful and just so cool!

Errata

No project of this size is going to be free of errors, from tiny typos to problematic prose. All of the problems that I’ve found, or that have been reported to me, can be found here in the list of errata.

Table of Contents

  • Introduction
  • Part I: States, Operators, and Systems
  • 1 A Curious Deck of Cards
  • 2 Quantum States
  • 3 Operators
  • 4 Working with Qubits
  • 5 Systems
  • 6 Measurement
  • Part II: Quantum Algorithms
  • 7 Quantum Teleportation
  • 8 Deutsch’s Algorithm
  • 9 Deutsch-Jozsa’s Algorithm
  • 10 Bernstein-Vazirani’s Algorithm
  • 11 Simon’s Algorithm
  • 12 Grover’s Algorithm
  • 13 Shor’s Algorithm
  • 14 Next Steps
  • Appendix: Notation
  • Bibliography
  • Index

The book is available now! Just click here.