Part I: Getting Started

"Nature isn't classical, dammit, and if you want to make a simulation of nature, you'd better make it quantum mechanical." — Richard Feynman, "Simulating Physics with Computers," 1981

The goal of this part is narrow and concrete: to get you from an empty terminal to a person who has written quantum programs, run them on a real quantum processor, and can read the results without fooling themselves.

That last clause is the hard one. Running a quantum program is easy — six chapters from now it will feel routine. Interpreting what comes back is where quantum programming diverges permanently from every other kind of programming you have done. A classical program that returns the wrong answer has a bug. A quantum program that returns the wrong answer might have a bug, or might be working perfectly and telling you about the physical imperfection of a device in a refrigerator in Poughkeepsie. Part I builds the habits that let you tell those apart, starting on the very first hardware run in Chapter 2.

We go fast on setup and slow on the two things everyone rushes: bit ordering and statistics. Those are not trivia. Chapter 5 exists because misreading a bitstring is the most common conceptual error in the entire field, and because a reader who does not know how many shots they need will spend a career mistaking sampling noise for physics.

What You Will Learn

Chapter 1 — The Quantum Programming Landscape. The five frameworks and why five exist; the quantum software stack from application down to pulses; and a precise account of the four things that make quantum programming genuinely different from classical programming.

Chapter 2 — Setting Up. A working environment, a free IBM Quantum account, and your first program on a real quantum processor — plus the first honest look at what "the result was almost right" means.

Chapter 3 — Qubit Manipulation in Code. Circuits, registers, and the single-qubit gates: X, H, Z, S, T, and the continuous rotations. Inspecting the statevector. Watching the Bloch sphere move. The bridge between "a gate" and "a $2\times2$ matrix."

Chapter 4 — Multi-Qubit Programming. The tensor product in code, CNOT, and entanglement. Bell states, GHZ states, and the exponential wall that makes classical simulation give out around fifty qubits.

Chapter 5 — Measurement, Shots, and Statistics. What measurement actually does; how to read a bitstring (Qiskit is little-endian, and this will bite you); sampling error and how many shots you need; counts versus probabilities versus expectation values; and how to decide whether a distribution is the one you expected.

Chapter 6 — OpenQASM. The assembly language underneath every framework. Reading it, writing it, and using it to move circuits between tools — and to see what the transpiler did to your work.

How This Part Fits

Part I is load-bearing for everything after it. Part II goes deep on Qiskit and assumes you can already build and read a circuit. Part III's other frameworks are taught by contrast with what you learn here. Part IV's algorithms are assembled from the gates of Chapters 3 and 4 and are debugged with the statistics of Chapter 5.

Read these six chapters in order, at a keyboard, running everything. This is the one part of the book where skipping ahead reliably costs more time than it saves.

Time Investment

Chapter Title Difficulty Est. hours
1 The Quantum Programming Landscape Beginner 3
2 Setting Up Beginner 4
3 Qubit Manipulation in Code Beginner 6
4 Multi-Qubit Programming Beginner 6
5 Measurement, Shots, and Statistics Intermediate 6
6 OpenQASM Intermediate 5
Part I total ~30 hours

The Project Starts Here

The running project — vqelab, a variational quantum eigensolver that will eventually compute the ground-state energy of a hydrogen molecule on real hardware — begins in Chapter 1 as a stated goal and a testable success criterion, and by the end of Chapter 6 has a backend selector, a parameterized circuit, an expectation-value routine, and an archival export to OpenQASM. Six chapters in, you will have the skeleton of a real quantum application.

Turn to Chapter 1: why there are five quantum programming frameworks, and what that tells you about the state of the field.

Chapters in This Part