Computing Library › Quantum Algorithms
Quantum Algorithms

Quantum Feature Maps and Kernels

Encoding classical data into quantum states to define similarity measures that may be hard to compute classically.

Feature maps

A feature map sends a classical input x to a quantum state |phi(x)> = U_phi(x)|0> via a data-dependent circuit U_phi(x). The choice of U_phi determines the geometry of the feature space. Common encodings include angle encoding (data values become rotation angles) and more elaborate circuits that interleave data-dependent rotations with entangling layers to reach a rich, high-dimensional Hilbert space.

The quantum kernel

Kronos motion — classical vs quantum

A kernel measures similarity: K(x,x') = ||^2. It is estimated by preparing |phi(x')> then applying U_phi(x)^dagger and measuring the probability of returning to |0>, or via a swap test. Because Hilbert space dimension grows exponentially with qubit count, the feature space can be vast, and for well-chosen maps the kernel may be classically hard to evaluate.

Design considerations

Kernel concentration

A known pitfall is exponential concentration: as qubit count grows, off-diagonal kernel entries can shrink toward a constant, so the kernel matrix approaches the identity and carries little information. Data-dependent structure, limited encoding depth, and problem-tailored maps counter this, but it constrains how large and deep useful feature maps can be.

Use in learning

Quantum kernels plug directly into classical kernel machines such as the support vector machine. They also connect to the idea that a good feature map is one matched to the data-generating process; when data arise from a quantum process, a quantum feature map is a natural fit. Establishing a provable, practical learning advantage from quantum kernels remains an open and actively studied problem.