Prerequisites
A short, honest inventory of what you need before Chapter 1 — and, just as important, what you do not need, because the folklore around quantum computing scares away people who are entirely ready for it.
What you need
Python, at working fluency
You should be able to read and write code like this without looking anything up:
import numpy as np
class Ansatz:
def __init__(self, n_qubits: int, depth: int = 1) -> None:
self.n_qubits = n_qubits
self.depth = depth
def n_params(self) -> int:
return self.n_qubits * (self.depth + 1)
angles = np.linspace(0, np.pi, 5)
best = min(angles, key=lambda a: abs(np.cos(a) + 0.5))
print(f"best angle: {best:.3f}")
Specifically: functions and keyword arguments, classes and methods, list and dict comprehensions,
f-strings, import and virtual environments, and NumPy arrays with indexing and broadcasting. If
np.kron is unfamiliar, that is fine — you will meet it in Chapter 4 — but np.array should not be.
You do not need to be a Python expert. You do need to be past the stage where syntax itself is the obstacle, because from Chapter 2 onward the difficulty is entirely conceptual and you want your whole attention on that.
Linear algebra, at the level of one course you may have forgotten
Quantum states are vectors. Quantum gates are matrices. Applying a gate is a matrix–vector product. That is the entire mathematical core of this book, and everything else is bookkeeping on top of it.
You need to recognize and be roughly comfortable with:
- Vectors and matrices, and the fact that matrices act on vectors.
- Matrix multiplication — including that it does not commute, which turns out to matter a great deal.
- Complex numbers — addition, multiplication, magnitude, and the fact that $e^{i\theta}$ traces the unit circle. Quantum amplitudes are complex, and the complexity is the point.
- The inner product $\langle\psi|\phi\rangle$, at least as "the dot product, with a conjugate."
You do not need eigendecomposition, Jordan form, or a proof-based understanding of vector spaces. Where the book needs an eigenvalue (Chapter 22, Chapter 24), it explains what it needs on the spot.
If any of this feels rusty, read Appendix D first. It is about twenty pages and covers exactly what the book uses and nothing else — including the tensor product, which is the one operation most readers have genuinely never seen and which Chapter 4 depends on completely.
A computer and about 4 GB of free disk
Any machine from the last decade running Linux, macOS, or Windows. Quantum simulation is memory-hungry — a 25-qubit statevector is 512 MB — but every example in this book stays well below what a laptop can hold, and the ones that would not are run on hardware instead.
Python 3.10 or newer. Appendix C walks through installation on all three operating systems, including the traps (Windows and the chemistry driver; macOS and Apple Silicon wheels; the Q# toolchain).
An internet connection and a free IBM Quantum account
Free, no credit card, and it is what gets you onto real hardware. Chapter 2 walks through the signup and token setup in detail.
What you do NOT need
Quantum mechanics
Genuinely, none. This is the prerequisite people assume and it is not one.
The book teaches the quantum concepts it needs, in the order the code needs them, in ⚛️ The Physics Underneath callouts that stay ruthlessly brief. Superposition arrives in Chapter 3 because that is when you first apply a Hadamard gate. Entanglement arrives in Chapter 4 because that is when you first write a CNOT. Nothing is introduced before there is code that requires it.
You will finish the book with a working, operational understanding of quantum information — the kind a programmer has of floating-point arithmetic. That is a different thing from a physicist's understanding, and it is the right thing for this job.
A physics degree
Many working quantum software engineers came from computer science, not physics. Chapter 40 makes this case with the actual hiring picture. The skills that transfer best are ordinary good software engineering: decomposition, testing, debugging discipline, and the willingness to read a specification.
Prior quantum programming experience
None assumed. Chapter 2 starts from pip install.
A companion theory textbook
Helpful, not required. A theory text will deepen everything here, and Appendix H recommends specific ones for specific purposes. But this book is self-contained: it teaches the theory it uses.
Money
Every framework in this book is free and open source. IBM Quantum's free tier provides enough real hardware time for every hardware exercise. Amazon Braket and Azure Quantum charge for hardware, and Chapters 17 and 39 are explicit about what those costs look like — but every Braket example also runs on Braket's local simulator, which is free, and no exercise in this book requires you to spend anything.
A calibration check
If you can answer these four, you are ready. If you cannot answer one or two, the pointer beside it will fix that faster than worrying about it will.
-
What does this print?
python xs = [i**2 for i in range(4)] print(xs[-1], len(xs))(If unsure: any introductory Python resource. This is the level assumed.) -
If $A$ is a $2\times2$ matrix and $v$ is a length-2 vector, what shape is $Av$? Is $Av$ generally equal to $vA$? (If unsure: Appendix D, §D.2.)
-
What is $|e^{i\pi/4}|$? (If unsure: Appendix D, §D.1. The answer is 1, and the fact that every $e^{i\theta}$ has magnitude 1 is why phases can be invisible — a theme from Chapter 3 onward.)
-
Can you create and activate a Python virtual environment on your machine right now? (If unsure: Appendix C, §C.1. Do this one before Chapter 2; the quantum SDKs have deep dependency trees and you do not want them in your system Python.)
Number 3 is the only one with a genuinely quantum flavor, and even it is just complex numbers. That is the honest size of the mathematical entry fee.
Turn to Chapter 1.