Acknowledgments

This book exists because a remarkable amount of quantum computing infrastructure is free, open, and maintained by people who did not have to make it so.

IBM Quantum put real quantum processors on the open internet in 2016 and has kept them there, at no cost, ever since. Nearly every hardware exercise in this book runs on that free tier. Whatever one thinks about the commercial race, the decision to let anyone with a browser submit a circuit to a dilution refrigerator changed who gets to learn this subject — and this book would be impossible without it. The Qiskit maintainers and the enormous community around them built the tool that carries most of these pages, and did it in the open, with the review threads and design debates visible to anyone who wants to learn how a compiler for quantum hardware is actually made.

Google Quantum AI open-sourced Cirq and, with it, a genuinely different design philosophy — explicit moments, explicit qubit placement, hardware honesty at the API level — that sharpened this book's thinking about what a circuit is. Xanadu built PennyLane and, in doing so, made the case that quantum circuits are differentiable programs; Part VI is downstream of that idea. Microsoft built Q#, the only serious attempt at a purpose-designed quantum language, and its resource estimator is the most sobering and useful tool in the field. Amazon Braket made it possible to run the same circuit on trapped ions, superconducting qubits, and neutral atoms in an afternoon, which is the only reason Chapter 17 could be written at all.

The OpenQASM specification authors gave the field a common tongue. Chapter 6 and Appendix F are a long thank-you note.

The intellectual debts are older and larger. Peter Shor, Lov Grover, David Deutsch, Richard Jozsa, Ethan Bernstein, Umesh Vazirani, and Daniel Simon wrote the algorithms that Part IV implements; every one of those chapters is a translation of someone else's insight into Python. Charles Bennett and Gilles Brassard designed BB84 in 1984, four decades before Chapter 38 could implement it in twenty lines. Alberto Peruzzo and colleagues introduced VQE in 2014, and Edward Farhi, Jeffrey Goldstone, and Sam Gutmann introduced QAOA the same year; between them they defined what near-term quantum programming actually looks like, and this book's running project is built on the first of them. Jarrod McClean and coauthors named barren plateaus in 2018 and saved an enormous amount of wasted compute, including some of ours.

Michael Nielsen and Isaac Chuang wrote the book that taught most of the field, and any textbook in this area is written in its shadow with gratitude.

Thanks are owed to the maintainers of NumPy, SciPy, matplotlib, pandas, PyTorch, scikit-learn, pytest, and Hypothesis. Quantum programming is, in practice, mostly classical programming, and it stands on this stack.

Finally: to every person who has posted a minimal reproducible example to a quantum SDK's issue tracker at two in the morning, and to everyone who answered one. A disproportionate share of what is practically true about quantum programming — the things that are in no specification and no paper — lives in those threads. Several of this book's 🐛 Debug This callouts are, in essence, transcriptions of bugs that community found and documented first.


On errors. Any that remain are the author's. The quantum SDKs move fast enough that some of this book's code will drift out of date; corrections, especially those, are genuinely welcome. See CONTRIBUTING.md.

On honesty. Several chapters conclude that a much-discussed quantum technique does not currently beat a classical alternative. Those conclusions are the book's, drawn from published evidence available at the time of writing, and they are stated in 🔬 Honest Assessment callouts so you can find and re-evaluate every one of them as the hardware improves. It will improve. When it does, those callouts are the parts of this book to revisit first.