Skip to main content
Advanced16 min read

Quantum Machine Learning

A parameterised circuit is a machine-learning model you train with a classical optimiser. Whether it is ever a *better* model is the most oversold open question in the field — here is what is actually known.

Before this: NISQ Algorithms and VQE

In this lesson you’ll learn

  • Describe a variational quantum classifier as encoding, parameterised circuit and measurement — and say which classical piece does the training
  • Compare angle and amplitude encoding, and explain why data encoding, not circuit power, dominates what the model can learn
  • Explain why barren plateaus apply to QML circuits exactly as they do to VQE
  • State honestly what quantum kernels are proven to do — and that no exponential advantage on classical data has been demonstrated

What QML actually is — and the sentence to unlearn first

Strip away the branding and quantum machine learning, in its dominant near-term form, is one specific idea: use a parameterised quantum circuit as the model inside an otherwise ordinary machine-learning pipeline. Encode a data point x into a quantum state, run a circuit with tunable angles θ, measure an observable, and call the expectation value f(x, θ) the model's output. Train by having a classical optimiser adjust θ to minimise a loss over a labelled dataset. If that loop sounds familiar, it should — it is the VQE loop from the previous lesson with the Hamiltonian swapped for a loss function and a dataset threaded through the circuit. Same ansatz design questions, same classical optimiser, same shot-noise economics, and, as we will see, the same barren plateaus.

The sentence to unlearn is the one every popular article opens with: "quantum computers try all possibilities at once, so they learn faster." You already know from the interference lesson why this is wrong, but it is worth restating in ML terms because the misconception does real damage here. A superposition over states is not a parallel evaluation you can harvest: measurement returns one outcome, sampled by the Born rule, and everything the model "computed" in the other branches is gone. A quantum model is not a classical model with free parallelism. It is a different hypothesis class — a different family of functions f(x, θ) — that may or may not fit your data better, and whose every evaluation costs many shots of a physical experiment.

Put precisely: training is not faster. Each gradient step needs the circuit run thousands of times per data point (expectation values are estimated from samples, and the parameter-shift rule needs two such estimates per parameter), where a GPU evaluates a neural network's exact gradient in one backward pass. On today's hardware a quantum model is slower to train than a classical one by orders of magnitude. The only honest pitch for QML is not speed but expressivity: perhaps some datasets have structure that a quantum hypothesis class captures with fewer parameters or better generalisation than any efficient classical class. Whether such datasets exist outside cryptography is the open question this lesson keeps returning to.

Predict before you read on

You encode a feature x into the circuit exactly once, through a single rotation gate RY(x), then stack twenty layers of trainable gates on top. Predict: which functions of x can the trained model's output f(x) express?

Commit to an answer — the next section is the payoff.

The rest of this lesson is part of the Advanced track

You have read the opening of Quantum Machine Learning, and 9 more sections are waiting — the part where the idea actually gets built. The Advanced track picks up exactly where Quantum Foundations stops, and Pro opens all of it.

  • The other three Advanced lessons — error correction, VQE, and quantum cryptography
  • Certification for the Advanced track, with a shareable certificate
  • Runs on real IBM Quantum hardware, not just the simulator
  • The live Claude-powered tutor, on every lesson and every circuit

The whole Quantum Foundations course stays free, forever, with no account required.