PennyLane PennyLane Codebook (formerly Xanadu Quantum Codebook)
  • Self-paced
  • beginner
  • Free
  • PennyLane
  • beginner
  • Free

PennyLane Codebook (formerly Xanadu Quantum Codebook)

Self-paced By Xanadu

Level
beginner
Format
Online course
Duration
Self-paced
Provider
PennyLane / Xanadu
Certificate
No
Price
Free

Skills you'll gain

  • PennyLane
  • Quantum Gates
  • Quantum Algorithms
  • Quantum Error Correction

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. Originally launched as the Xanadu Quantum Codebook, it now lives on the PennyLane site as the PennyLane Codebook (the old codebook.xanadu.ai address redirects there).

The 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

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, error correction, and Hamiltonian simulation 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 local setup, the exercises validate automatically, and signing in with a free account saves your progress.

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
  • Implement the quantum Fourier transform and use quantum phase estimation as a subroutine

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

Why take this course?

The PennyLane 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.

One thing to know before starting: the Codebook issues no certificate or formal credential, and its exercises are written specifically against PennyLane syntax, so if your target job or lab works primarily in Qiskit you will need to translate patterns rather than copy code directly.

Topics covered

Similar Courses

Other courses you might find useful