Quantum Feature Maps
Classical machine learning often succeeds by lifting data into a richer representation where patterns become linearly separable. The same idea drives quantum feature maps: a parameterised quantum circuit embeds a data point into a quantum state inside a Hilbert space whose dimension grows exponentially with the number of qubits. The inner product between two such states defines a quantum kernel
which a classical support-vector machine can use without ever writing down the full feature vector.
Why Hilbert space is large
An -qubit state lives in a -dimensional complex vector space. Even for that is dimensions. Encoding a single real number per qubit already creates a -dimensional feature map from a ten-dimensional input — a compression ratio impossible to replicate classically without specialised structure.
Angle encoding
The simplest quantum feature map rotates each qubit by one data coordinate. For a single feature , an rotation encodes as
For a -dimensional input applied qubit-by-qubit, the product state is
This is a separable (unentangled) embedding. The kernel it induces is
which is a product of squared cosine similarities — a well-known classical kernel. Angle encoding alone therefore gives no quantum advantage; we need entanglement to create cross-feature correlations that classical kernels cannot reproduce cheaply.
The ZZ feature map
Havlicek et al. (2019) introduced the ZZ feature map, which adds entangling layers between the rotation layers. For two qubits and features , one layer of the ZZ map is:
- Apply to every qubit to create an equal superposition.
- Apply (a -axis phase rotation by ) to each qubit .
- Apply followed by on qubit 1, then again. This two-qubit term encodes cross-products of the features.
The entangling step creates amplitudes that depend on products of features, which effectively gives access to polynomial and interaction features without enumerating them explicitly. The quantum kernel then lives in a space spanned by states like , , , weighted by trigonometric polynomials in the products .
Expressibility and trainability
Not every feature map is useful. Two important properties guide the choice:
Expressibility measures how well the set of states covers the Hilbert space. A highly expressible map can represent complex decision boundaries, but also risks being unstructured enough that the kernel loses any inductive bias useful for the task.
Trainability (in the variational setting where the encoding includes learnable parameters ) is limited by the barren plateau phenomenon: as grows, the gradient of an expressible circuit concentrates exponentially close to zero, making gradient-based optimisation hard.
These two concerns pull in opposite directions, which is why quantum machine learning practitioners carefully design shallow, structured feature maps rather than simply maximising expressibility.
Summary
| Property | Angle encoding | ZZ feature map | |---|---|---| | Entanglement | None | Yes (CNOT layers) | | Classical kernel match | Yes (cosine product) | Conjectured hard to simulate | | Feature interactions | None | Pairwise and higher | | Depth for qubits | | per layer |
Quantum feature maps are the bridge between raw data and quantum computation. Choosing the right map is as important as choosing the right architecture in classical deep learning — and it is still an open problem to know when a quantum kernel will truly outperform its classical counterparts.
Sign in on the full site to ask questions and join the discussion.