Skip to content

Learning quantum computing on my own: what worked

Published: at 10:00 PM

I’ve been learning quantum computing on my own, outside of any class. Over the last couple of months I’ve written up the pieces as I got them: what a qubit actually is, Grover’s algorithm, Shor’s algorithm, and why error correction costs so many qubits. This post is the one underneath all of those. What resources worked, what order I’d do them in if I started over, and where I got stuck.

I want to be upfront about one thing. I’m a high school student, not a physicist. Everything here is “what worked for someone with high school math and a lot of curiosity,” not a curriculum. If you have a physics background, some of this will be too slow for you.

The trap I’d warn you about first

A common introduction to quantum computing starts with a sentence like this: a qubit is 0 and 1 at the same time, so a quantum computer tries every answer at once. It sounds like understanding. It isn’t.

Scott Aaronson has spent years pushing back on that exact framing, and I went through his version of the argument in the qubit post.

The reason this matters for learning is practical. If you start with “it tries everything at once,” every real algorithm will look like it’s cheating or doing something mysterious. Once you replace that picture with “a quantum state is a list of numbers called amplitudes, and algorithms arrange for the wrong answers’ amplitudes to cancel out,” the algorithms start to look like clever bookkeeping. That’s the version you can actually work with.

So my first piece of advice is negative. Don’t spend much time on popular-science videos that lean on “both at once.” That shorthand can make the later algorithms harder to understand.

The order I’d learn it in

Step 1: linear algebra, before anything quantum

This is the part I’d push hardest on. Quantum computing, at the level of algorithms, is linear algebra with complex numbers. That is enough to begin working through small circuits, though mixed states, noise, and measurement need more machinery later.

Here is a single qubit:

state = a|0> + b|1>        where |a|^2 + |b|^2 = 1

That’s a 2D vector [a, b]. A gate is a 2x2 matrix that keeps the vector’s length at 1 (a unitary matrix). Running a gate is a matrix times a vector. The Hadamard gate, the one you’ll see everywhere, is:

H = (1/sqrt(2)) * [[1,  1],
                   [1, -1]]

H [1, 0] = [1/sqrt(2), 1/sqrt(2)]      # |0> becomes an even mix
H [1/sqrt(2), 1/sqrt(2)] = [1, 0]      # apply it again and you're back at |0>

That second line is the whole trick of quantum computing in miniature. Two equal amplitudes went in, and the -1 in the bottom corner made the |1> parts cancel. That’s interference, and you can’t see it unless you’re comfortable multiplying a matrix by a vector without thinking about it.

Two qubits means a 4-entry vector, built with something called a tensor product. Three qubits means 8 entries. n qubits means 2^n. If you can do these by hand for 1 and 2 qubits, you’re ready.

What I’d use for this step:

Quantum Country, which I’ll get to below, says it directly on its front page: you’ll need familiarity and comfort with the basics of linear algebra and complex numbers.3 I’d take that seriously.

Step 2: qubits, gates, and measurement

Once the math is comfortable, the actual quantum rules are short. There are really three:

  1. A state is a unit vector of complex amplitudes.
  2. Gates are unitary matrices acting on that vector.
  3. When you measure, you get outcome x with probability |amplitude_x|^2, and the state collapses to that outcome.

Everything else is consequences. I wrote these up properly in the qubit post, including the Bloch sphere, which is the standard way to picture a single qubit as a point on a sphere.

The Bloch sphere: a unit sphere with |0> at the north pole and |1> at the south pole, and a state vector psi pointing to a point on the surface at polar angle theta and azimuthal angle phi
The Bloch sphere. A single qubit's state is a point on the surface, with |0> at the top and |1> at the bottom. Useful for one qubit, but it doesn't scale to two, which is one reason the linear algebra matters more. Image: Smite-Meister, CC BY-SA 3.0, via Wikimedia Commons.

The resources that fit this step:

Quantum Country by Andy Matuschak and Michael Nielsen.3 It’s a free set of essays that explains quantum computing from the ground up and covers a search algorithm and teleportation. The unusual part is that it has review questions built into the text and brings them back over the following days and weeks, so you actually remember the definitions. For a subject where the vocabulary stacks on itself, that helps a lot.

IBM’s “Basics of quantum information” course by John Watrous.4 It’s free on IBM Quantum Learning, with video lessons plus written text. It goes from single systems to multiple systems to circuits, and finishes with entanglement examples like teleportation and the CHSH game. Watrous is very careful. Nothing gets hand-waved. The same material is also available as a long written text on arXiv if you prefer reading.5

A note on “the Qiskit textbook,” since a lot of older advice points there. IBM retired it. In late 2023 the textbook’s home page started redirecting to IBM Quantum Learning, and the old pages moved to an archived GitHub repo that isn’t maintained anymore.6 The old pages still work and plenty of them are good, but they may use outdated Qiskit code. If you want the current IBM material, use the Learning platform.

Quirk, Craig Gidney’s drag-and-drop circuit simulator, is the tool I’d pair with all of this.7 It runs in the browser, needs no install, and updates the state display live as you drag gates onto wires. Put an H on one wire and watch the amplitudes split. Put a second H on it and watch them come back together. That’s the interference example from Step 1, and it’s very different to see it happen than to read about it.

Step 3: Grover

Grover’s algorithm is the right first real algorithm, in my opinion. It’s useful (unstructured search), it’s short, and the smallest case is small enough to do with a pencil.

This was the one that humbled me. For a while I could recite the circuit and say “it searches in sqrt(N) steps,” and I could not explain why it worked. That’s a bad place to be.

What fixed it was doing the 4-entry case by hand: start with all amplitudes at 0.5, flip the target’s sign, reflect every amplitude about the mean, and the target lands at exactly 1.0. Seeing the target land at exactly 1.0 on paper is what turned Grover from a recited circuit into something I understood. The full walkthrough, plus the geometric picture where each step is a rotation, is in the Grover post.

Two resources that helped for this step specifically:

Then run it. I ran the 2-qubit version in Qiskit and got the target on every shot of the simulator. It’s about fifteen lines of code. There’s a version of understanding that only shows up when the code prints the number you predicted by hand.

Step 4: Shor

Shor’s algorithm is the famous one, and it’s a big step up. It needs everything above plus some number theory (modular arithmetic, why finding the period of a^x mod N helps you factor N) plus the quantum Fourier transform.

Circuit diagram for the quantum part of Shor's algorithm: a register of qubits put into superposition with Hadamard gates, a modular exponentiation block acting on a second register, an inverse quantum Fourier transform on the first register, and measurement
The quantum part of Shor's algorithm: superposition, modular exponentiation, an inverse quantum Fourier transform, then measurement. Every box here assumes the vocabulary from the earlier steps. Image: Bender2k14, CC BY-SA 4.0, via Wikimedia Commons.

The reason I’d put Shor after Grover is that Grover teaches you the core move, interference that boosts the right answer, in a setting with almost no other math in the way. Shor uses the same move, but it’s buried under number theory and the Fourier transform. If you meet it first, it’s hard to tell which part is the quantum part.

What I’d read:

My summary of Shor, and how it connects to RSA and why banks care, is here.

Step 5: error correction

After Shor, the natural question is “so why can’t we run this yet?” The answer is noise, and the answer to noise is error correction. That’s where you find out why a useful machine needs so many physical qubits per logical one. My attempt at explaining it is here.

Four boxes in a row connected by arrows: Linear algebra (vectors, matrices, complex numbers), then Qubits and gates (amplitudes, measurement, circuits, interference), then Grover (first real algorithm, small enough to do by hand), then Shor (number theory and QFT, then error correction)
The order I'd recommend, with error correction riding along in the last box. Each step uses the vocabulary of the one before it. Diagram by me.

The big-picture book: Aaronson

There’s one resource I’d keep running alongside all five steps instead of slotting into one: Scott Aaronson.

His book “Quantum Computing Since Democritus” is not a textbook in the usual sense.11 It wanders through computability, complexity, cryptography, and quantum mechanics, and it’s opinionated and funny. What it’s good for is the “why should anyone care” layer: what problems quantum computers are and aren’t expected to help with, and why. That’s the context that keeps you from overhyping what you just learned.

He also has free lecture notes from his undergraduate course at UT Austin, “Introduction to Quantum Information Science.”12 They cover qubits, gates, entanglement, Shor, Grover, and error correction, in a much more structured way than the book. If you want one free document that walks the whole path from Step 2 to Step 5, that’s a good candidate.

What confused me

Some of this was confusing for a while. Listing it in case you hit the same walls.

Amplitudes versus probabilities. For a while I kept thinking of amplitudes as “probabilities with extra steps.” They aren’t. Probabilities are always positive, so they can only add up. Amplitudes can be negative (or complex), so they can cancel. Interference only exists because of that, and every algorithm depends on it.

Global phase. A state multiplied by -1 is physically the same state. But a -1 on just one part of the state is a huge deal, because that’s exactly what Grover’s oracle does. It took me a bit to separate “a sign on everything” from “a sign on one piece.”

Tensor products and qubit ordering. Different sources order the qubits differently. Qiskit, for example, writes bitstrings with qubit 0 as the rightmost bit.13 If you’re comparing a hand calculation to Qiskit output and the bits look reversed, that’s probably why.

Why measurement ruins everything. You can’t peek at the amplitudes. You get one outcome per run and the state is gone. Once that really sinks in, you understand why algorithms work so hard to push nearly all the probability onto the right answer before measuring.

Habits that helped

The resources matter less than how you use them. These are the habits I’d recommend, roughly in order of how much they helped.

Do the smallest case by hand. One qubit, then two. Grover with 4 entries. Shor with N = 15. Doing the tiny case on paper is a useful check on what a fluent explanation might be hiding.

Predict, then run. Before you hit run in Quirk or Qiskit, write down what you expect. When the simulator disagrees with you, that’s the most useful moment in the whole process, because it points straight at the thing you don’t get yet.

Explain it in writing. Writing these blog posts did more for my understanding than reading did. Every time I tried to explain something and couldn’t write the next sentence, I’d found a gap. That’s honestly a big part of why this blog has a quantum section at all.

Don’t skip ahead to the famous algorithm. I know Shor is the exciting one. But going straight to Shor without the earlier steps means memorizing a diagram you can’t reason about. For me, the earlier steps make Shor easier to reason about.

If I started over

I’d start with one qubit, calculate a few gate operations by hand, and check them in a simulator. Once that felt familiar, I’d move to two qubits and then work through a small algorithm. The books and courses above would still be useful, but I’d give myself a concrete calculation to return to whenever the explanation became too abstract.

What I like about learning this way is that I can try something before I feel ready to understand the whole subject. A sign changes, an outcome disappears, and suddenly there is a specific thing to figure out. I’d like to keep following those moments into harder examples, because they make the next question feel worth asking.

Sources

Footnotes

  1. Grant Sanderson (3Blue1Brown), “Essence of linear algebra” (video series). https://www.3blue1brown.com/topics/linear-algebra ↩

  2. Michael A. Nielsen and Isaac L. Chuang, “Quantum Computation and Quantum Information: 10th Anniversary Edition”, Cambridge University Press, 2010 (Ch. 2 linear algebra review, Ch. 5 quantum Fourier transform, Ch. 6 quantum search). https://doi.org/10.1017/CBO9780511976667 ↩ ↩2 ↩3

  3. Andy Matuschak and Michael Nielsen, “Quantum Country”, 2019. https://quantum.country/ ↩ ↩2

  4. John Watrous, “Basics of quantum information”, IBM Quantum Learning. https://quantum.cloud.ibm.com/learning/en/courses/basics-of-quantum-information ↩

  5. John Watrous, “Understanding Quantum Information and Computation”, arXiv:2507.11536, 2025. https://arxiv.org/abs/2507.11536 ↩

  6. Qiskit, “qiskit-community/qiskit-textbook” README (notes the textbook is deprecated in favor of IBM Quantum Learning), GitHub. https://github.com/qiskit-community/qiskit-textbooks-and-content-migration ↩

  7. Craig Gidney, “Quirk: a drag-and-drop quantum circuit simulator”, Algorithmic Assertions, 2016; source at https://github.com/Strilanc/Quirk. https://algassert.com/2016/05/22/quirk.html ↩

  8. Grant Sanderson (3Blue1Brown), “But what is quantum computing? (Grover’s Algorithm)”, April 2025. https://www.3blue1brown.com/lessons/grover ↩

  9. Peter W. Shor, “Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer”, SIAM Journal on Computing 26(5), 1997 (conference version FOCS 1994). https://arxiv.org/abs/quant-ph/9508027 ↩

  10. N. David Mermin, “Quantum Computer Science: An Introduction”, Cambridge University Press, 2007. https://doi.org/10.1017/CBO9780511813870 ↩

  11. Scott Aaronson, “Quantum Computing Since Democritus”, Cambridge University Press, 2013. https://doi.org/10.1017/CBO9780511979309 ↩

  12. Scott Aaronson, “Introduction to Quantum Information Science” lecture notes, UT Austin. https://www.scottaaronson.com/qclec.pdf ↩

  13. Qiskit documentation, “Bit-ordering in the Qiskit SDK”. https://quantum.cloud.ibm.com/docs/en/guides/bit-ordering ↩