Back to Library

Quantum Programming

307
Sections
66
Chapters
9
Parts
Free
Always
Start Reading

About This Book

Most quantum computing books teach the mathematics and stop at the edge of a real machine. Quantum Programming starts there. This free, 40-chapter textbook is about the software engineering of quantum computers — how to write, debug, test, optimize, transpile, benchmark, and ship quantum programs that run on actual quantum processors today. You run code on a real quantum computer in Chapter 2, and the gap between the simulator histogram and the hardware histogram becomes the book's central teaching device.

Part I gets you working: what a quantum program actually is, the quantum software stack layer by layer, environment setup and an IBM Quantum account, qubit manipulation in code, multi-qubit programming and entanglement, measurement and the statistics of shot-based sampling — including little-endian bitstring ordering, the trap that catches everyone — and OpenQASM as the assembly language underneath. Part II is Qiskit in depth: circuit construction and parameterization, the transpiler and its optimization levels, primitives, backends and job management, noise models, error mitigation, and visualization. Part III surveys the rest of the ecosystem — Cirq, PennyLane and differentiable quantum programming, Q# and Azure Quantum, Amazon Braket, and the translation layer between them, so that a program written in one framework is not a program locked to one vendor.

Later parts implement the canonical algorithms as working software rather than as equations, and address the craft problems that only appear in practice: testing quantum code whose output is a probability distribution, debugging a circuit you cannot step through, profiling depth and gate counts, managing qubit connectivity and routing, and building hybrid quantum-classical programs where a classical optimizer drives a quantum kernel. A progressive project runs throughout, culminating in a complete variational quantum eigensolver implemented, executed on hardware, and analyzed against the noise that makes real results differ from ideal ones.

Fourteen appendices supply a Qiskit quick reference, a gate reference, environment setup, a math refresher, a framework translation table, an OpenQASM reference, hardware specifications, ecosystem notes, the complete project code, a field timeline, a glossary, and answers to selected exercises. Written for software engineers entering quantum computing, physicists who need production-quality code rather than notebook sketches, and students who want to program real quantum hardware for free.

Table of Contents

Share This Book