EquationAdvancedEquations

Quantum Fidelity Kernel

The quantum kernel is the squared overlap of two encoded states.

$$k(x,x')=|\langle\Phi(x)|\Phi(x')\rangle|^2=\left|\langle0^n|U_\Phi^{\dagger}(x)\,U_\Phi(x')|0^n\rangle\right|^2$$

Symbols

$k(x,x')$Kernel value
$U_\Phi(x)$Feature-map circuit
$|\Phi(x)\rangle$Encoded state
$|0^n\rangle$All-zero state of n qubits

$x,x'$ are two samples, $U_\Phi$ is the feature-map circuit, and $|\Phi(x)\rangle=U_\Phi(x)|0^n\rangle$. The second formula is the probability of getting the all-zero string in the compute–uncompute circuit, which is how it is estimated on hardware. $0\le k\le1$ and $k(x,x)=1$, and the kernel is positive semidefinite. It applies to Fidelity Kernels; estimating them requires shots that grow when the values concentrate.

Example

$R_Y(x)$ encoding on one qubit: $k=\cos^2\tfrac{x-x'}{2}$. For $x=0.4$, $x'=1.9$: $\cos^2(0.75)\approx0.5354$. Checking the second formula: $R_Y(-0.4)R_Y(1.9)|0\rangle=R_Y(1.5)|0\rangle$, and the probability of 0 is $\cos^2(0.75)$ (verified).

Test your understanding

The quiz needs JavaScript.

Related topics

References

  1. Vojtěch Havlíček et al. (2019). Supervised learning with quantum-enhanced feature spaces. Nature 567:209–212 doi:10.1038/s41586-019-0980-2
  2. Maria Schuld; Nathan Killoran (2019). Quantum Machine Learning in Feature Hilbert Spaces. Phys. Rev. Lett. 122:040504 doi:10.1103/PhysRevLett.122.040504
  3. Xanadu (2025). Kernel-based training of quantum models with scikit-learn. PennyLane Demos pennylane.ai