Curriculum / Quantum Machine Learning / Classical ML Refresher

Lesson 1 of 15ReadingPro+75 XP

Classical ML Refresher

Key machine learning concepts you need for quantum ML.

Classical ML Refresher

Quantum Machine Learning (QML) fuses two mature fields: quantum computing and machine learning. To understand QML, you first need a clear mental model of what classical ML actually does at its core, not the implementation details, but the mathematical skeleton that quantum circuits will later replicate and potentially extend.

Everything Is Optimization

At the heart of nearly every ML algorithm is an optimization problem: find parameter values that minimize some loss function .

For a simple linear model predicting output y from input x:

The loss function measures how wrong the predictions are. Mean squared error (MSE) is the classic choice:

Gradient descent finds the minimum by iteratively moving in the direction of the steepest descent:

This core loop (compute gradient, update parameters, repeat) is the engine behind linear regression, neural networks, and variational quantum circuits.

Supervised Learning

In supervised learning, you have a dataset of (input, label) pairs and want to learn a mapping function f such that f(x) approximates y. Three key concepts:

Model: The parameterized function : could be a linear function, a neural network, or a quantum circuit.

Loss function: Measures prediction quality. For classification, cross-entropy. For regression, MSE.

Optimizer: The algorithm that adjusts . Gradient descent, Adam, RMSProp, or quantum-native parameter shift rules.

Neural Networks: A Quick Sketch

A neural network stacks layers of the form:

h = activation(W * x + b)

where W is a weight matrix, b is a bias vector, and activation is a nonlinear function (ReLU, sigmoid, tanh). By composing many such layers, networks can approximate arbitrarily complex functions.

The analogy to quantum circuits is direct: variational quantum circuits are quantum neural networks. The weights become rotation angles . The matrix multiplication becomes unitary evolution. The activation function is replaced by entanglement and quantum interference.

This is the opening of the lesson. The full walkthrough, the interactive circuit, and the graded challenge continue inside myqubit.

How this lesson works

A guided reading lesson with interactive knowledge checks. Concepts are explained step by step with circuit diagrams and runnable examples, and you confirm understanding before moving on.

Part of: Quantum Machine Learning

Apply quantum computing to machine learning with variational circuits and optimization.

This lesson is part of Pro

Unlock Quantum Machine Learning and all 10 tracks with Pro: $12.99/month, $79/year, or $97 lifetime. Start with the free track first if you are new.