Quantum kernel algorithms
Machine-learning methods using similarities computed from quantum feature-state overlaps.
On this page
Definition, purpose and input assumptions
A quantum feature map encodes classical data x into a state |phi(x)>. A kernel can be defined as K(x,y)=|<phi(x)|phi(y)>|^2, then supplied to a classical kernel method. The scientific question is whether the feature map and estimator provide useful, efficiently obtained similarities for a stated task, not merely whether the Hilbert space is large.
Mathematical mechanism
For this squared-overlap kernel, K is positive semidefinite because it is an inner product between density operators rho_x and rho_y in operator space: K=Tr(rho_x rho_y). If feature-state preparation is known, applying U(y) dagger U(x) to zero and measuring the all-zero probability estimates the overlap kernel. Finite shots and noise can make an estimated Gram matrix slightly indefinite.
Fully solved reference example
Choose a one-qubit map|phi(x)>=R_Y(x)|0>. Then <phi(x)|phi(y)>=cos((x-y)/2), so K(x,y)=cos^2((x-y)/2). For data points0,pi/2,pi, the Gram matrix is [[1,1/2,0],[1/2,1,1/2],[0,1/2,1]]. Its eigenvalues are 1,1+1/sqrt(2),1-1/sqrt(2), all nonnegative.
This kernel is easy to compute classically from one cosine, so using a quantum processor gives no computational advantage for this example. It provides a complete reference calculation for checking overlap and Gram-matrix semantics.
Limitations and classical comparison
Hard-to-simulate feature states do not guarantee useful generalization, and a useful kernel need not be classically hard. Comparisons should include strong classical kernels, preprocessing and total kernel-evaluation cost. Application evidence belongs alongside the algorithmic definition, not inside an unqualified speedup label.
Scientific relationships
Quantum kernel algorithms use state preparation and overlap estimation. The application-evidence treatment has been consolidated into this canonical entry. Quantum data encoding (QW-030017) remains a distinct related concept; this record includes the algorithmic Gram-matrix derivation.
Additional treatment: statistical cost
Estimating a probability-valued kernel by independent circuit shots gives sampling uncertainty. For a true kernel value 1/2 and N=2,500 shots, the standard error is 0.01. A dense Gram matrix for m examples has order m squared pair values; exploiting symmetry reduces the constant but not the general quadratic count. State-preparation and measurement costs remain part of the learning workflow.
Additional treatment: limitations and alternatives
A kernel can be hard to evaluate in the worst case yet unhelpful for prediction on the chosen data. Excessively concentrated similarities can reduce useful discrimination. Classical kernels, tensor-network approximations or classical feature models may reproduce relevant behavior. Compare held-out predictive performance and total computational cost under the same evaluation protocol.
A four-point kernel with an explicit classical feature space
Use the same one-qubit rotation feature map but choose four inputs x_j = 0, pi/2, pi, 3pi/2. Its kernel is K(x,y) = [1 + cos(x - y)]/2. An exact classical feature vector is phi(x) = (1, cos x, sin x)/sqrt(2), since its ordinary Euclidean inner product equals K. Thus the entire kernel has a three-dimensional real feature representation despite originating from quantum-state overlaps.
The four-point Gram matrix has first row (1, 1/2, 0, 1/2) and successive cyclic shifts. Its eigenvalues are 2, 1, 0, 1. The alternating vector (1, -1, 1, -1) spans its null space. The constant vector has eigenvalue two, while sampled cosine and sine vectors each have eigenvalue one. These eigendirections explain exactly what label patterns the kernel can represent on this dataset; matrix positivity alone does not guarantee that every classification pattern is accessible.
Centering the features removes the constant coordinate because the four cosines and four sines each sum to zero. If H = I minus the all-ones matrix divided by four, the centered Gram matrix H K H has entries cos(x_j - x_k)/2 and eigenvalues 1, 1, 0, 0. Centering therefore changes the rank from three to two. It must be applied consistently to training and test features; subtracting training means from only one side of a test kernel changes the model.
A complete kernel-ridge solution
Choose labels y = (1, 1, -1, -1) and regularization lambda = 1/2 under the convention alpha = (K + lambda I) inverse y. This label vector lies in the eigenvalue-one subspace, so alpha = (2/3)y. The prediction at a new input is f(x) = sum_j alpha_j K(x, x_j) = (2/3)(cos x + sin x). Training predictions are two thirds times the labels, and residuals are one third times the labels.
At x = pi/4 the prediction is 2 sqrt(2)/3; at x = 5pi/4 it is its negative. A sign decision rule therefore classifies those two points oppositely. The calculation fixes the regularization convention explicitly: some software instead uses K plus m lambda I, which would change the coefficient for the same numeric lambda. No trained software output or generalization experiment is implied by this analytic fit.
For the alternative labels y_alt = (1, -1, 1, -1), the kernel gives K y_alt = 0. Ridge coefficients are then 2 y_alt, but predictions on every input are zero because the corresponding feature combination vanishes identically. Large coefficients do not create a missing feature direction. Increasing shot counts cannot repair this representational limitation; changing the feature map or choosing a different classical model addresses a different hypothesis class.
Finite-shot entries can violate matrix consistency
Every ideal Gram matrix from one common feature map is positive semidefinite. Individually plausible noisy estimates need not preserve that joint constraint. Starting from the displayed exact matrix, change only the symmetric entries K_01 and K_10 from one half to 0.6. All entries remain between zero and one and the diagonal remains one. Yet for normalized vector v = (1, -1, 1, -1)/2, the quadratic form becomes v transpose K_est v = -0.05. The estimated matrix is therefore indefinite.
The example does not require an eigenvalue calculation to expose the defect; one negative quadratic form is enough. Symmetrizing an estimate repairs asymmetric entries but would not fix this symmetric perturbation. Projecting onto a positive semidefinite matrix or adding a diagonal regularizer changes the statistical procedure and should be recorded. Such repair can improve numerical behavior without proving that the repaired entries equal the ideal quantum kernel or preserve an intended predictive model.
Total learning cost and comparison
For four points there are six distinct off-diagonal pair values. Under independent Bernoulli sampling, a pair value near one half has standard error at most 1/(2 sqrt(N)) after N shots. At N = 2500 that is 0.01. Estimating all six pairs at that allocation uses 15,000 shots before any test-set evaluations, repetitions, or noise-characterization overhead. The ideal diagonal values can be known analytically, although an experimental overlap circuit may not return one because of noise.
The exact three-feature classical model evaluates the same kernel with elementary trigonometry and solves the same learning problem without quantum sampling. This is a concrete matched alternative, not a claim about every quantum kernel. For larger feature circuits, evaluation difficulty, statistical usefulness, data encoding, and output prediction cost remain separate questions. The consolidated application evidence for this canonical entry should be interpreted at the scale and assumptions actually reported, rather than transferred to this analytically solvable toy model.
Sources
Verification scope
Recorded source check ·
Feature-overlap kernel and learning-task framing inspected; arXiv history and journal DOI verified.
PDF header June 7 differs from the June 5 revision date. The four-point ridge example, noisy Gram witness and classical embedding are independent analytic constructions, not reported experimental results.
Verification scope
Metadata and abstract checked ·
Version-specific publication metadata beyond the first submission are not asserted. Learning with data and computing a function are different comparison tasks.
Verification scope
Available excerpt checked ·
Perspective about evaluation goals and assumptions, not a no-go theorem against quantum machine learning.