What Is Quantum Machine Learning?
Quantum machine learning (QML) sits at the intersection of two of the most active areas in modern science: quantum computing and machine learning. The central question is whether quantum hardware can offer a meaningful advantage — in speed, expressibility, or sample efficiency — on tasks that are economically or scientifically important.
What machine learning is trying to do
Classical machine learning trains a parameterised function on data so that some loss is minimised. The function might be a neural network predicting drug toxicity, a support-vector machine classifying images, or a generative model producing text. Training means adjusting along the gradient .
The bottleneck is often one of three things:
- Data dimension — inputs live in a space so large that classical kernels or networks are expensive to evaluate.
- Model expressibility — the hypothesis class is too restricted to capture the true pattern.
- Optimisation landscape — the loss surface has too many poor local minima.
QML asks whether quantum mechanics can ease any of these three bottlenecks.
The quantum side
A quantum computer works with state vectors in a -dimensional Hilbert space. Even a modest register of qubits has complex amplitudes — far more than the classical memory needed to write them all down explicitly. This exponential dimension is the resource that QML tries to exploit.
The main vehicle is the parameterised quantum circuit (PQC), sometimes called a variational quantum circuit or ansatz. A PQC is a circuit whose gates depend on a vector of real angles . Given an input state , the circuit produces
and a measurement expectation value like is returned as the model's output. Varying is how the model is trained.
Core QML scenarios
Researchers distinguish four rough scenarios, depending on whether the data and the model are classical or quantum:
| Data source | Model | Setting | |-------------|-------|---------| | Classical | Classical | Standard ML (no quantum) | | Classical | Quantum | Quantum-enhanced ML (most near-term work) | | Quantum | Classical | Learning from quantum experiments | | Quantum | Quantum | Fully quantum learning |
Near-term work focuses on the classical data, quantum model setting because it is accessible on today's noisy intermediate-scale quantum (NISQ) devices. The hope is that the large Hilbert space allows the quantum model to represent correlations that would require exponentially many classical parameters.
How data enters the circuit
Before a PQC can process classical features , those features must be encoded into qubits. Three common strategies are:
- Basis encoding — store a binary string as the computational-basis state . Simple, but wastes superposition.
- Amplitude encoding — pack normalised values directly into the amplitudes. Exponentially compact, but state preparation can itself be expensive.
- Angle encoding — apply a single-qubit rotation per feature, one qubit per feature. Shallow and hardware-friendly, used in most near-term experiments.
The lesson on Encoding Classical Data in this module covers these in detail.
Quantum kernels
A particularly clean theoretical framework maps QML onto kernel methods. Define the quantum feature map for some encoding circuit . The quantum kernel is then
This quantity is the squared overlap (fidelity) of two quantum feature vectors — easy to estimate on hardware by running the two circuits in sequence and measuring all zeros. A classical support-vector machine trained with this kernel inherits whatever structure the quantum feature map can express more compactly than any efficient classical kernel.
The optimisation challenge
Training a PQC means minimising with gradient descent. Gradients are accessible via the parameter-shift rule: for a gate (with a Pauli operator), the partial derivative is
Each gradient component therefore costs two circuit evaluations — comparable to back-propagation in classical neural networks, but multiplied by the shot overhead of quantum measurement.
A severe obstacle is the barren plateau: for randomly initialised, sufficiently deep circuits, gradients vanish exponentially in the number of qubits. This is an active area of research; proposed mitigations include local cost functions, layer-by-layer pre-training, and problem-inspired ansatz design.
Where QML stands today
As of the mid-2020s, rigorous quantum advantage for practical ML tasks has not been demonstrated on real data. Several theoretical results show that quantum kernel methods can achieve exponential separation from classical methods on carefully constructed distributions, but translating this to real-world datasets remains an open problem. QML is best understood today as a research frontier rather than a deployed technology.
What this module covers
The remaining lessons in this module walk through the building blocks you need to implement QML pipelines on the simulator:
- Encoding classical data into quantum states (angle, basis, and amplitude encoding).
- Building and training a PQC with the parameter-shift rule.
- Quantum kernels and their connection to kernel SVM.
- A variational quantum classifier on a toy dataset.
Each lesson is hands-on: you will write the circuit code and observe how the loss surface and decision boundary change as training progresses.
Sign in on the full site to ask questions and join the discussion.