PennyLane Xanadu Quantum Codebook
  • Self-paced (20+ hours)
  • beginner
  • Free
  • PennyLane
  • beginner
  • Free

Xanadu Quantum Codebook

★★★★★ 4.8/5 provider rating Self-paced (20+ hours) By Xanadu

A completely browser-based interactive textbook that teaches quantum computing through PennyLane coding exercises. One of the most polished free learning resources available, with structured chapters and immediate feedback on every exercise.

The Xanadu Quantum Codebook is structured like a proper textbook: it starts from first principles and builds up systematically through single-qubit systems, multi-qubit gates, and into algorithms. The distinguishing feature is that every concept is taught through a coding exercise you complete in the browser, with the PennyLane runtime evaluating your answer on the spot.

What you’ll learn

  • Quantum states from scratch: state vectors, normalisation, the Bloch sphere, and how to represent single-qubit states in PennyLane
  • Single-qubit gates: PauliX, PauliY, PauliZ, Hadamard, S, T, and arbitrary rotations, with their matrix representations and geometric actions on the Bloch sphere
  • Quantum circuits in PennyLane: how to define QNodes, wire quantum operations together, and execute circuits on simulators
  • Multi-qubit systems and entanglement: the tensor product, two-qubit gates (CNOT, CZ, SWAP), and how to prepare and verify entangled states
  • Grover’s search algorithm: oracle circuits, the diffusion operator, amplitude amplification, and how to implement a complete Grover search in PennyLane
  • Variational quantum algorithms: parameterised circuits, optimisation loops, and the structure of the variational quantum eigensolver (VQE)
  • Quantum machine learning foundations: quantum kernels, data encoding strategies, and how classical and quantum computation are combined in hybrid models

Course structure

The Codebook is divided into modules, each covering a coherent topic. Within each module, short explanatory sections alternate with coding exercises that require you to fill in or write PennyLane code to produce a specified quantum state or measurement outcome.

Early modules (single qubits and gates) are accessible to complete beginners. Later modules covering algorithms and QML assume the foundations built in earlier chapters. The self-paced format lets learners move quickly through familiar material and slow down on challenging sections.

All code runs in the browser using a bundled PennyLane environment. There is no setup, no account required, and the exercises validate automatically.

Who is this for?

  • Complete beginners who want to learn quantum computing through hands-on coding
  • Python developers who prefer learning by doing over reading theory
  • Learners who want to work with PennyLane specifically, as opposed to Qiskit
  • Anyone exploring quantum machine learning who needs to build foundational circuit skills first

Prerequisites

Basic Python is the only real prerequisite. The Codebook introduces NumPy concepts as needed. No prior quantum mechanics or quantum computing knowledge is assumed. The mathematical formalism is introduced gently alongside the code.

Hands-on practice

Every section ends in a coding exercise. Across the full Codebook you will:

  • Write PennyLane QNodes to prepare and measure specific quantum states
  • Implement every standard single-qubit gate from its matrix definition
  • Build entangled states and verify them with expectation value measurements
  • Code a complete Grover search circuit for a small database and observe amplitude amplification
  • Build a simple VQE optimisation loop using PennyLane’s built-in optimisers
  • Experiment with data encoding methods for quantum machine learning

Exercises have test cases that give immediate pass or fail feedback, with hints available for learners who get stuck.

Why take this course?

The Xanadu Quantum Codebook stands out in a field where most free resources are either lecture notes you read passively or video courses where you watch without coding. Here every concept requires you to write working code to proceed, which builds genuine understanding rather than familiarity with terminology.

The PennyLane framework is framework-agnostic at the backend level (it supports many quantum simulators and hardware platforms), so skills developed here transfer broadly. PennyLane is also the dominant framework for quantum machine learning research, making this Codebook a natural starting point for anyone heading in that direction.

The production quality of the exercises and the coherent textbook structure make this one of the best free quantum computing courses available anywhere.

Topics covered

Similar Courses

Other courses you might find useful