About

What this is, and how to actually use it

Quantum Cookbook turns lecture notes, Nielsen & Chuang, and a handful of other sources into something you can drag, run, and get quizzed on — instead of just read. Every gate, circuit, and channel on this site is computed live, not animated; if you change a number, the math actually recomputes.

Use this as a supplement, not a substitute

This site is built to sit alongside a real course, a real professor, and a real textbook — not to replace any of them. It's the place to come build intuition for an idea your lecture just covered, check your own derivation against a working widget, or get a different angle on something that didn't click the first time. It is not a substitute for actually attending lectures, doing the problem sets, or reading the source material it's built from. Treat it the way you'd treat a good study partner: useful constantly, authoritative never.

How to use this — a practical guide

1. Follow alongside your course

After each lecture, open the matching chapter here. Read the Basic section first — it restates the core idea in plain language. Then scroll to the widget and play with it: change parameters, click buttons, watch numbers update. The point is to turn the formula you just heard about into something you can see move.

2. Use the three difficulty levels

Every chapter is organized into three tiers. Basic gives you the idea and the vocabulary — enough to follow the rest of the lecture. Intermediate is where the interactive widget lives, plus the math behind it. Advanced covers the edge cases, the deeper "why," and the connections to research. Start from Basic; go as far as you need; come back to Advanced later.

3. Run the code cells

Most chapters have a Python code cell near the bottom that runs directly in your browser (via Pyodide — no install needed). These aren't decorations; they reproduce the exact same computation the widget runs, in readable code you can modify. Change the inputs, re-run, and compare against the widget to build confidence that you understand what's happening.

4. Use the quiz cards for spaced repetition

Every chapter ends with 4–5 quiz cards. Click "Show answer," then rate yourself (Hard / Good / Easy). The site tracks your ratings in your browser's local storage and uses SM-2 spaced repetition to schedule reviews — the "Review" button in the bottom-right corner shows how many cards are due. This is optional but genuinely effective if you use it consistently.

5. Don't read front-to-back unless you want to

Parts are designed to be mostly self-contained. Part I (linear algebra through measurement) is prerequisite for everything else. After that, you can jump to Part V (algorithms) if that's what your course covers next, or to Part II (open systems) if you're in a quantum information theory track. Each chapter lists its prerequisites at the top.

6. Check the Updates page

New chapters and fixes are tracked on the Updates page. You can optionally save your name (locally, in your browser only — not a real account) to see which updates are new to you. An amber dot on the "Updates" link in the nav bar means something's been added since your last visit.

How it's built

Every interactive widget on this site is verified against known results before it ships — the same matrix math you'd do by hand, just run for you and drawn on screen. Nothing here was generated and trusted blindly; if a widget claims a circuit produces a particular state, that claim was checked numerically first. The site itself is free, ad-free, and has no backend — everything runs directly in your browser, including the optional update-tracking on the Updates page, which never leaves your device.

There's also a standalone Quantum Composer — a free-standing 4-qubit circuit builder with live OpenQASM, a Q-sphere, and a gate-matrix inspector, separate from the chapter-by-chapter book. Chapter 3 links to it directly when it first comes up; it's also always reachable from here.

Who built it

Quantum Cookbook is built and maintained by Mujahid Mahfuz, a graduate researcher working in quantum information.

Get in touch mujahid168216@gmail.com mujahidmahfuz@proton.me mujahidmahfuz@tutamail.com 𝕏 @muja1o1

Found a bug, a wrong derivation, or a typo? Email any of the addresses above — corrections to the actual physics and math are taken seriously and fixed directly.