ApX logoApX logo
ModelsCalculatorHardwareCoursesPricing
ApX logoApX logo
ModelsCalculatorHardwareCoursesPricing

All Courses

Advanced Quantum Machine Learning Algorithms and Implementation
Chapter 1: Revisiting Quantum Computing and ML Foundations
Advanced Linear Algebra for Quantum States
Quantum Circuits and Universal Gate Sets Revisited
Entanglement and Non-locality Implications for QML
Density Matrices and Mixed States in QML
Classical ML Optimization Techniques Refresher
Information Geometry in Classical and Quantum Models
Complexity Theory for Classical and Quantum Algorithms
Chapter 2: Advanced Quantum Data Encoding and Feature Maps
Mathematical Foundations of Quantum Feature Maps
Higher-Order Polynomial Quantum Feature Maps
Data Re-uploading Techniques for Expressivity
Analyzing Feature Map Expressibility and Entangling Capability
Kernel Alignment and Quantum Feature Spaces
Encoding High-Dimensional Classical Data
Hands-on Practical: Implementing Custom Quantum Feature Maps
Chapter 3: Quantum Kernel Methods: Theory and Implementation
The Quantum Kernel Trick Formalism
Calculating Quantum Kernel Matrices
Properties of Quantum Kernels
Geometric Differences between Classical and Quantum Kernels
Kernel Concentration Phenomena and Mitigation
Support Vector Machines with Quantum Kernels (QSVM)
Implementation of QSVM for Complex Datasets
Hands-on Practical: Comparing Quantum Kernels
Chapter 4: Variational Quantum Algorithms for Machine Learning
The Variational Principle in Quantum Computation
Parameterized Quantum Circuits (PQC) Design Strategies
Cost Functions for QML Tasks
Gradient Calculation Methods
Advanced Classical Optimizers for VQAs
Quantum Natural Gradient Descent
Barren Plateaus Analysis and Mitigation
Hands-on Practical: Implementing a Variational Quantum Classifier
Chapter 5: Quantum Neural Networks: Architectures and Training
Models of Quantum Neurons and Layers
Quantum Circuit Born Machines (QCBMs)
Quantum Convolutional Neural Networks (QCNNs)
Quantum Graph Neural Networks (QGNNs)
Hybrid Quantum-Classical Neural Network Architectures
Training QNNs Challenges and Strategies
Overfitting and Generalization in QNNs
Practice: Building and Training a Simple QNN
Chapter 6: Quantum Generative Models
Classical Generative Models Review
Quantum Circuit Born Machines for Distribution Learning
Quantum Generative Adversarial Networks (QGANs)
Training QGANs Challenges and Architectures
Evaluating Quantum Generative Models
Sampling from Quantum Generative Models
Hands-on Practical: Implementing a Basic QGAN
Chapter 7: Hardware Considerations and Error Mitigation in QML
Characterizing Quantum Hardware Noise
Impact of Noise on QML Algorithm Performance
Quantum Error Mitigation Techniques
Circuit Optimization and Transpilation
Hardware-Efficient Ansätze Design
Benchmarking QML Algorithms on Real Quantum Devices
Practice: Applying Error Mitigation to a VQC

Properties of Quantum Kernels

Having established how quantum kernels k(x,x′)k(x, x')k(x,x′) arise from inner products in quantum feature spaces, let's examine their essential mathematical properties. Just like their classical counterparts, understanding these characteristics is fundamental to effectively using quantum kernels in machine learning algorithms like Support Vector Machines (SVMs). These properties dictate the behavior of the kernel function and influence the geometry of the induced feature space, which in turn affects model performance and trainability.

Relationship between classical data, quantum feature states, their inner product, and the resulting kernel value.

Positive Semi-Definiteness (PSD)

A core requirement for any function to be a valid kernel in the context of SVMs and other kernel methods is that it must be positive semi-definite (PSD). This property ensures that the matrix formed by evaluating the kernel on any set of data points, known as the Gram matrix KKK, has non-negative eigenvalues. Formally, for any dataset {x1,...,xN}\{x_1, ..., x_N\}{x1​,...,xN​} and any complex coefficients {c1,...,cN}\{c_1, ..., c_N\}{c1​,...,cN​}, the following condition must hold:

∑i=1N∑j=1NcˉiKijcj≥0\sum_{i=1}^{N} \sum_{j=1}^{N} \bar{c}_i K_{ij} c_j \ge 0i=1∑N​j=1∑N​cˉi​Kij​cj​≥0

where Kij=k(xi,xj)K_{ij} = k(x_i, x_j)Kij​=k(xi​,xj​). This condition is intrinsically linked to the existence of an underlying feature map ϕ\phiϕ such that k(x,x′)=⟨ϕ(x)∣ϕ(x′)⟩k(x, x') = \langle \phi(x) | \phi(x') \ranglek(x,x′)=⟨ϕ(x)∣ϕ(x′)⟩.

Let's verify this for quantum kernels. If we define the kernel directly as the inner product: k(x,x′)=⟨ϕ(x)∣ϕ(x′)⟩k(x, x') = \langle \phi(x) | \phi(x') \ranglek(x,x′)=⟨ϕ(x)∣ϕ(x′)⟩ where ∣ϕ(x)⟩|\phi(x)\rangle∣ϕ(x)⟩ is the quantum state corresponding to data point xxx. Then, the sum becomes:

∑i,jcˉi⟨ϕ(xi)∣ϕ(xj)⟩cj=⟨∑iciϕ(xi)  |  ∑jcjϕ(xj)⟩=∥∑ici∣ϕ(xi)⟩∥2\sum_{i,j} \bar{c}_i \langle \phi(x_i) | \phi(x_j) \rangle c_j = \left\langle \sum_i c_i \phi(x_i) \;\middle|\; \sum_j c_j \phi(x_j) \right\rangle = \left\| \sum_i c_i |\phi(x_i)\rangle \right\|^2i,j∑​cˉi​⟨ϕ(xi​)∣ϕ(xj​)⟩cj​=⟨i∑​ci​ϕ(xi​)​j∑​cj​ϕ(xj​)⟩=​i∑​ci​∣ϕ(xi​)⟩​2

Since the norm squared of any vector in Hilbert space is non-negative, the condition is satisfied. Thus, kernels defined directly as inner products in Hilbert space are always PSD.

Often in quantum machine learning, the kernel is defined based on the measurement probability or fidelity between the feature states, commonly taking the form: k(x,x′)=∣⟨ϕ(x)∣ϕ(x′)⟩∣2k(x, x') = |\langle \phi(x) | \phi(x') \rangle|^2k(x,x′)=∣⟨ϕ(x)∣ϕ(x′)⟩∣2

Is this function still PSD? Yes, it is. For example, the Gram matrix GGG where Gij=⟨ϕ(xi)∣ϕ(xj)⟩G_{ij} = \langle \phi(x_i) | \phi(x_j) \rangleGij​=⟨ϕ(xi​)∣ϕ(xj​)⟩. We know GGG is PSD. The kernel matrix KKK we are interested in has elements Kij=∣⟨ϕ(xi)∣ϕ(xj)⟩∣2=GijGij‾K_{ij} = |\langle \phi(x_i) | \phi(x_j) \rangle|^2 = G_{ij} \overline{G_{ij}}Kij​=∣⟨ϕ(xi​)∣ϕ(xj​)⟩∣2=Gij​Gij​​. This can be seen as the element-wise product (Hadamard product) of GGG and its complex conjugate Gˉ\bar{G}Gˉ. Since GGG is PSD, Gˉ\bar{G}Gˉ is also PSD. The Schur Product Theorem states that the Hadamard product of two PSD matrices is also PSD. Therefore, quantum kernels defined as k(x,x′)=∣⟨ϕ(x)∣ϕ(x′)⟩∣2k(x, x') = |\langle \phi(x) | \phi(x') \rangle|^2k(x,x′)=∣⟨ϕ(x)∣ϕ(x′)⟩∣2 are guaranteed to be valid, PSD kernels.

This PSD property is significant because it guarantees that the optimization problem underlying SVMs remains convex, ensuring that we can find a unique global minimum.

Normalization and Boundedness

Quantum kernels, particularly those defined as k(x,x′)=∣⟨ϕ(x)∣ϕ(x′)⟩∣2k(x, x') = |\langle \phi(x) | \phi(x') \rangle|^2k(x,x′)=∣⟨ϕ(x)∣ϕ(x′)⟩∣2, often exhibit natural normalization properties stemming from the nature of quantum states. Assuming the quantum feature states ∣ϕ(x)⟩|\phi(x)\rangle∣ϕ(x)⟩ are normalized states (i.e., ⟨ϕ(x)∣ϕ(x)⟩=1\langle \phi(x) | \phi(x) \rangle = 1⟨ϕ(x)∣ϕ(x)⟩=1), we have:

  • Diagonal Elements: k(x,x)=∣⟨ϕ(x)∣ϕ(x)⟩∣2=12=1k(x, x) = |\langle \phi(x) | \phi(x) \rangle|^2 = 1^2 = 1k(x,x)=∣⟨ϕ(x)∣ϕ(x)⟩∣2=12=1. The kernel value of a data point with itself is always 1.
  • Off-Diagonal Elements: By the Cauchy-Schwarz inequality, ∣⟨ϕ(x)∣ϕ(x′)⟩∣≤⟨ϕ(x)∣ϕ(x)⟩⟨ϕ(x′)∣ϕ(x′)⟩=1|\langle \phi(x) | \phi(x') \rangle| \le \sqrt{\langle \phi(x) | \phi(x) \rangle} \sqrt{\langle \phi(x') | \phi(x') \rangle} = 1∣⟨ϕ(x)∣ϕ(x′)⟩∣≤⟨ϕ(x)∣ϕ(x)⟩​⟨ϕ(x′)∣ϕ(x′)⟩​=1. Therefore, 0≤∣⟨ϕ(x)∣ϕ(x′)⟩∣2≤10 \le |\langle \phi(x) | \phi(x') \rangle|^2 \le 10≤∣⟨ϕ(x)∣ϕ(x′)⟩∣2≤1.

So, this common form of the quantum kernel naturally produces values between 0 and 1, where 1 indicates identical feature states (up to a global phase) and values closer to 0 indicate more dissimilar (orthogonal) states. This boundedness can be helpful in practice, preventing numerical issues and providing an intuitive scale for similarity. However, normalization of the input states ∣ϕ(x)⟩|\phi(x)\rangle∣ϕ(x)⟩ is a prerequisite, which is standard practice in quantum computation.

Universality

In classical machine learning, a kernel is called universal if the corresponding Reproducing Kernel Hilbert Space (RKHS) is dense in the space of continuous functions on the input domain. Practically, this means an SVM with a universal kernel can approximate any arbitrary decision boundary, given enough data. The Gaussian (RBF) kernel is a well-known example of a universal classical kernel.

Can quantum kernels be universal? The answer depends entirely on the expressivity of the quantum feature map ϕ\phiϕ.

  • If the feature map ϕ\phiϕ is restricted and can only generate a limited subset of states in the Hilbert space, the resulting kernel might not be universal.
  • If the feature map ϕ\phiϕ is sufficiently powerful or expressive, meaning it can approximate any unitary transformation or generate states that densely cover the Hilbert space, then the resulting kernel has the potential to be universal.

Research suggests that certain quantum feature maps, especially those involving sufficient entanglement and data re-uploading structures (as discussed in Chapter 2), can indeed lead to universal kernels. Proving universality often involves analyzing the richness of the functions x↦∣ϕ(x)⟩x \mapsto |\phi(x)\ranglex↦∣ϕ(x)⟩ and relating it to Fourier analysis or function approximation theory. The ability to generate high-frequency components in the kernel function is often linked to universality. Achieving universality might require feature maps with a number of parameters growing with the size of the dataset or the complexity of the target function.

Dependence on Feature Map Choice

It cannot be stressed enough: The properties and performance of a quantum kernel are entirely determined by the choice of the quantum feature map ϕ\phiϕ. Different circuits used for encoding xxx into ∣ϕ(x)⟩|\phi(x)\rangle∣ϕ(x)⟩ will lead to different kernels. Here are the factors influenced by the feature map design:

  • Dimensionality: The number of qubits used determines the nominal dimension of the Hilbert space.
  • Entanglement: The amount and structure of entanglement generated by the circuit significantly impact the correlations captured by the inner product.
  • Non-linearity: How the parameters derived from xxx are loaded into the circuit gates introduces non-linear dependencies, shaping the geometry of the feature space. Circuits using data re-uploading can create highly complex, non-linear feature maps.

Therefore, designing or choosing an appropriate feature map is a central task in quantum kernel methods. A feature map that works well for one dataset might perform poorly on another. This connects back strongly to the topics covered in Chapter 2 on encoding strategies and their expressibility.

Computational Challenges and Noise

While mathematically elegant, the practical estimation of quantum kernels k(x,x′)=∣⟨ϕ(x)∣ϕ(x′)⟩∣2k(x, x') = |\langle \phi(x) | \phi(x') \rangle|^2k(x,x′)=∣⟨ϕ(x)∣ϕ(x′)⟩∣2 on quantum hardware introduces complications:

  • Estimation: We don't get the exact value but an estimate based on repeated measurements (e.g., using the SWAP test or inversion test circuits). This requires a number of circuit executions and measurements, introducing statistical uncertainty.
  • Noise: Decoherence, gate errors, and readout errors on current quantum processors will corrupt the computation, leading to biased or noisy estimates of the kernel entries.
  • Impact on Properties: Noise and statistical error mean that an empirically estimated kernel matrix might slightly deviate from perfect positive semi-definiteness. This may require mitigation techniques or careful handling in the classical optimization part of the algorithm (e.g., by adding a small value to the diagonal of the estimated kernel matrix).

These practical aspects related to hardware noise and estimation will be discussed in greater detail in Chapter 7.

In summary, quantum kernels inherit the essential PSD property from their definition via inner products in Hilbert space. Their normalization depends on the normalization of feature states, and their potential universality relies on the expressivity of the chosen quantum feature map. The tight coupling between the feature map design and the kernel's properties makes feature map engineering a critical aspect of applying these methods successfully.

  • Supervised learning with quantum-enhanced feature spaces, Vojtěch Havlíček, Antonio D. Córcoles, Kristan Temme, Aram W. Harrow, Abhinav Kandala, Jerry M. Chow, and Jay M. Gambetta, 2019 Nature, Vol. 567 DOI: 10.1038/s41586-019-0980-2 - This foundational paper introduces quantum-enhanced feature spaces and the concept of quantum kernels for supervised learning, demonstrating their use in support vector machines.
  • Learning with Kernels: Support Vector Machines, Regularization, Optimization, and Beyond, Bernhard Schölkopf, Alexander J. Smola, 2002 (MIT Press) - A seminal textbook on classical kernel methods, providing a comprehensive mathematical foundation for support vector machines, positive semi-definite kernels, and Reproducing Kernel Hilbert Spaces.
  • A universal quantum kernel for quantum machine learning, Basil Bichsel, Thomas B. Bäck, Tobias J. Osborne, and Moritz Weber, 2022 Quantum Science and Technology, Vol. 7 (IOP Publishing) DOI: 10.1088/2058-9565/ac771d - This paper investigates the conditions for universality in quantum kernels, linking the expressivity of quantum feature maps to their ability to approximate arbitrary continuous functions.

© 2026 ApX Machine Learning