← Quantum Store · Guides · Lessons · Glossary · About · Türkçe

Guide · Hakan Erdoğan

What is quantum machine learning?

What quantum machine learning is, how it works and whether it really helps: variational circuits, quantum classifiers, realistic limits and first steps with PennyLane.

The short answer

Quantum machine learning studies the use of quantum circuits for machine-learning problems. The most common approach today uses short quantum circuits whose parameters are trained by classical optimisation (variational circuits). The field is exciting, but no proven advantage over classical methods on real-world problems exists yet.

How does it work?

Data encoding: classical data (for example the features of an image) is loaded into qubits by turning it into gate angles.

Parameterised circuit: a circuit of gates with adjustable angles follows. These angles play the role of the weights in a neural network.

Measurement and training: the qubits are measured, a prediction is computed from the result and its error is evaluated. A classical optimiser updates the angles to reduce the error. Gradients can be computed from the quantum circuit itself with the parameter-shift rule.

Why is it exciting?

Quantum circuits operate in very high-dimensional state spaces that are hard to handle classically. For some artificially constructed problems, quantum kernel methods have been shown to give a provable advantage. Processing data that comes from quantum systems (for example the output of a quantum experiment) directly on a quantum computer is seen as one of the most promising uses.

Realistic limits

Data-loading bottleneck: loading large classical data sets into qubits is often expensive enough to wipe out any speed-up.

Barren plateaus: as the number of qubits and circuit depth grow, gradients can shrink exponentially and training stalls. Circuit design matters a lot.

Dequantisation: in 2018 Ewin Tang showed that some proposed quantum speed-ups, such as the quantum recommendation-system algorithm, can be matched by similar classical algorithms. Later work found similar results for other algorithms. Any claim of quantum advantage should be compared carefully with the best classical method.

Noise: on today’s hardware noise limits circuit size and therefore model power.

How do I start?

Xanadu’s open-source library PennyLane combines quantum circuits with familiar machine-learning tools such as PyTorch and JAX and differentiates them automatically. Quantum Store’s PennyLane classifier package walks through a variational quantum classifier trained on a small data set.

Frequently asked questions

Will quantum machine learning speed up AI?

It is unclear today. No quantum advantage has been shown for systems that work with classical data, such as large language models. The strongest candidates are problems with quantum data or special structure.

Which library should I use for quantum machine learning?

PennyLane is one of the easiest to start with and works with PyTorch and JAX. Qiskit Machine Learning and TensorFlow Quantum are alternatives.

Do I need a quantum computer for quantum machine learning?

Not for learning and experimenting. Small models run on a simulator on your own computer; you can also run them on real hardware over the cloud.

Concepts in this guide

Full quantum computing glossary →

More guides

Share: X · LinkedIn