OQCL   HomeStart Here7 SessionsTextbookProjectsQUEST LabSubmitUse CasesInstructor GuideReferences

Chapter 10 — Quantum Machine Learning

Chapter purpose. Build enough conceptual and mathematical understanding to predict an experiment before running it. The projects below are applications of the chapter, not substitutes for the theory.

1. A quantum model is still a model

Quantum machine learning combines data encoding, a parameterized quantum transformation, measurement, and a classical training objective. The same experimental discipline used in classical ML—held-out evaluation, baselines, repeated trials, and avoidance of leakage—still applies.

2. Data encoding

Classical features may be mapped into rotation angles, amplitudes, basis states, or other circuit structures. Encoding choices consume qubits and gates and can strongly influence what functions the model can represent.

3. Variational classifiers

A typical variational quantum classifier encodes an input, applies trainable gates, measures an observable, and converts the resulting expectation into a prediction. Gradients or derivative-free methods can update the parameters.

4. Baselines and claims

On small educational datasets, a simple classical classifier may perform extremely well. Comparing with that baseline is scientifically more informative than reporting quantum-model accuracy alone. OQCL experiments must not label a result 'quantum advantage' without evidence that supports that much stronger claim.

Student exploration and activities

Use cases: classification and quantum-enhanced modeling research

Quantum machine learning explores how quantum state preparation, parameterized circuits, kernels, and measurements can participate in learning pipelines. It is an active research area and a good setting for teaching experimental controls.

Problem: hype and weak baselines

A high accuracy on a tiny dataset does not demonstrate a quantum benefit. Data leakage, flexible preprocessing, parameter count, and missing classical baselines can produce misleading comparisons.

Suggested student activity

Students can select a train/test split and a classical baseline before training a quantum model. They can then identify what evidence would support or challenge the usefulness of the quantum approach.

Questions for exploration

Students can make a prediction, explain the reasoning in plain language, and identify an observation that would challenge the prediction. The outcome can then be connected to the mathematical model introduced in this chapter.

Optional reading and references: PennyLane Demonstrations · Q-CTRL Black Opal · IBM Quantum Learning · CERN Quantum Technology Initiative — Education. These are external resources used for comparison, further reading, and pedagogical inspiration; OQCL prose, examples, and project prompts are independently written.

Worked example

Choose two features from a small binary dataset, normalize them consistently, encode them as rotation angles, train a compact variational circuit, and compare test performance with a simple logistic or linear baseline using the same split.

How to reason about the result

Separate three layers: (1) the ideal mathematical prediction, (2) finite-shot sampling, and (3) implementation effects such as noise or compilation. A good laboratory report identifies which layer can plausibly explain an observed discrepancy.

Check your understanding

  1. Why is train/test separation still necessary for a quantum classifier?
  2. How can an encoding scheme affect circuit depth?
  3. What evidence would be missing if only training accuracy were reported?

Projects unlocked

Q20 — Continue from the chapter into the corresponding reproducible experiment.

Before moving on

You should be able to explain the central idea in your own words, perform the worked example without copying it, and make a falsifiable prediction for the first linked project.