QMLquantum kernelsvariational quantum circuitsVQCquantum machine learningbarren plateausquantum neural networkquantum feature map

Quantum Machine Learning: Kernels, Feature Maps, and VQCs

Explore the core algorithms of QML. Learn how Quantum Kernels estimate data overlap, how Feature Maps utilize entanglement, and the mechanics of Variational Quantum Circuits.

June 15, 2026•15 min read
On This Page (6 sections)▼

The Classical Kernel Trick#

In classical Machine Learning, the Kernel Trick is used when NN-dimensional data cannot be separated by a simple linear boundary (like a hyperplane). To solve this, we use a feature map to project the data into a higher MM-dimensional space (where M>NM > N) where a linear cut becomes possible.

The bottleneck of this process is calculating the dot product in that massive MM-dimensional space. The "trick" is finding a kernel function that equates to the high-dimensional inner product without explicitly doing the expensive math:

ϕ(xi)Tϕ(xj)=k(xi,xj)\phi(x_i)^T \phi(x_j) = k(x_i, x_j)

However, classical kernel functions come with mathematical restrictions and can be inefficient with sparse data or extremely complex feature spaces.


Quantum Kernels and Feature Maps#

This is where Quantum Machine Learning (QML) can step in.

Because the Hilbert space of a quantum system scales exponentially with the number of qubits, it naturally acts as an unimaginably vast, high-dimensional feature space.

If we map two classical data points xx and yy into quantum states ∣Φ(x)⟩|\Phi(x)\rangle and ∣Φ(y)⟩|\Phi(y)\rangle, their inner product is directly related to the probability of measuring their overlap:

k(x,y)=∣⟨Φ(x)∣Φ(y)⟩∣2k(x, y) = |\langle\Phi(x) | \Phi(y)\rangle|^2

This probability is the Quantum Kernel entry. We estimate it by running a quantum circuit and measuring how often it collapses to the all-zero state ∣0…0⟩|0\dots 0\rangle.

Built-in Feature Maps#

To encode the data and create this massive feature space, we rely on specialized quantum circuits called Feature Maps.

  1. Z-Feature Map: Uses layers of Hadamard gates followed by Phase (Z) rotations. It rotates the qubit based on the feature value but does not entangle qubits.
  2. ZZ-Feature Map: Extends the Z-Feature map by introducing two-qubit entangled states (via CNOTs and parameterized RzzR_{zz} gates). This maps correlations between different features, increasing the complexity of the kernel.
  3. Pauli Feature Map: A generalization allowing the use of any Pauli gate combinations (X,Y,ZX, Y, Z) to construct custom entanglements.
TIPTip

Why Entanglement Matters: A quantum state without entanglement can often be efficiently simulated classically. The true power of a Quantum Kernel arises when the Feature Map heavily entangles the qubits, pushing the inner-product calculation beyond classical reach.


Variational Quantum Circuits (VQCs)#

While Quantum Kernels are powerful, another dominant QML architecture is the Variational Quantum Circuit (VQC), also known as a Quantum Neural Network (QNN).

A VQC follows a distinct workflow:

  1. Load Data: Encode classical data into a quantum state using a Feature Map.
  2. Ansatz (Trainable Circuit): Apply a parameterized quantum circuit W(θ)W(\theta) with trainable weights (usually RyR_y and RzR_z rotation angles).
  3. Measure Observable: Measure a specific physical property (like the Pauli-Z observable O^\hat{O}) to get an expectation value.
  4. Classical Optimization: A classical computer calculates the cost function and uses an optimizer (like COBYLA) to update the angles θ\theta, repeating the process until the model converges.

The final prediction f(x)f(x) is the expectation value:

f(x)=⟨0∣U†(x)W†(θ)O^W(θ)U(x)∣0⟩f(x) = \langle 0| U^\dagger(x) W^\dagger(\theta) \hat{O} W(\theta) U(x) |0\rangle

The Enemy of QML: Barren Plateaus#

As you scale VQCs by adding more qubits and deeper ansatz circuits, you will inevitably run into the Barren Plateau problem.

A barren plateau occurs when the gradients of your cost function vanish exponentially as the number of qubits increases:

Varθ[∂⟨O⟩∂θk]∈O(12n)\text{Var}_{\theta} \left[ \frac{\partial \langle O \rangle}{\partial \theta_k} \right] \in \mathcal{O}\left( \frac{1}{2^n} \right)

The optimization landscape becomes entirely flat, making it impossible for classical optimizers to figure out how to adjust the weights to find the minimum.

Triggers for Barren Plateaus:

  1. High Parameter Count: If the probability amplitudes spread out too thinly across the vast Hilbert space, measurements look like pure random noise.
  2. Global Cost Functions: Expecting 100 qubits to "perfectly align" all at once. (Using local cost functions mitigates this).
  3. Random Initialization: Starting with highly entangled, random parameters practically guarantees a flat optimization landscape.
WARNINGWarning

Hardware vs Theory: In theory, deeper circuits provide more expressibility. On real hardware, excessive depth introduces high two-qubit error rates, compounding noise and destroying the signal before you ever hit a barren plateau. Always build custom, shallow ansatz designs tailored to your specific data layout!


Test Your Knowledge#

Interactive Quiz
Question 1 of 2
Knowledge Check

What is the output of a Quantum Kernel between two data points x and y?

Knowledge Check

Why might a ZZ-Feature Map be preferred over a Z-Feature Map?

Next Lesson in Quantum Machine Learning & Optimization (Part 4 of 4)
Stop Treating the QAOA Mixer Like Adam or Gradient Descent
View all 4 lessons in this series →
Continue to Next Lesson →

Continue Reading

Quantum Data Encoding: Translating Classical Data to Quantum States

Learn quantum data encoding through interactive visualization and simulation. A comprehensive guide to Basis, Amplitude, Angle, Phase, and Dense Angle encoding strategies for quantum machine learning (QML).