Korva
Tech

In theory, a quantum computer can judge similarity by running a circuit forward, then backward

The trick lifts mixed data into higher dimensions, where groups can be separated, and theory says quantum circuits can do the key comparison more efficiently for some data.

AI image
Computerphile · Quantum Machine Learning - Computerphile

Suppose red dots and blue dots are mixed together on a flat page, with reds clustered near the center and blues ringing them. No straight line can separate the two groups.

The fix is to lift the data into a higher dimension. Keep each dot's side to side and front to back positions, but give it a height equal to its distance from the center. The outer blue dots rise higher than the inner red dots, and a flat plane, set at right angles to the height axis, can then slip between them.

In practice, the lift has to reach far more dimensions, and working out that separating plane can become a bottleneck. The classical answer is what is called the kernel trick. Instead of calculating the separating plane precisely, researchers calculate a function, called K, that captures the properties of the plane. In effect, K is a similarity score for pairs of points.

Quantum hardware already gives researchers a useful way to do that embedding with standard circuits. Ordinary data are mapped into qubits, the quantum version of bits, by using the tilt of the qubit as an extra dimension. Some recipes, including one called the ZZ feature map, also link the qubits through entanglement, in which acting on one qubit affects the other, to encode the data in an even larger space.

The similarity score is then calculated directly. Classically it needs a matrix operation called a dot product. In the quantum method, the machine runs the encoding circuit for one data point followed by the reversed encoding circuit for another data point. The combined, larger circuit automatically computes the kernel function.

For certain types of data, papers show that this training step gives a polynomial advantage over the classical counterpart. Whether it will give a practical advantage is still open. Researchers studying biological data say they do not yet have a final answer, classical methods including fast graphics chips are also improving rapidly, and future systems are likely to combine classical and quantum steps.

Questions people ask

What is a qubit, in simple terms?

A qubit is the basic unit of information in a quantum computer, like a bit in an ordinary computer. While a bit is either 0 or 1, a qubit can point anywhere on a sphere until it is measured, when it snaps to 0 or 1 with odds set by its position.

What is entanglement?

Entanglement is a link between two or more qubits so their measurement results are correlated. It has no everyday equivalent, and it lets a group of qubits describe a far larger set of possibilities than the same number of independent bits.

Why does measuring similarity help classify things?

Many classification methods label a new example by weighing its resemblance to known examples. A fast pairwise similarity score lets the computer place the separating boundary without explicitly mapping every detail of the high dimensional space.