Source-linked AI summary
Training Quantum Embedding Kernels on Near-Term Quantum Computers
Thomas Hubregtsen, David Wierichs, Elies Gil-Fuster, Peter-Jan H. S. Derks, Paul K. Faehrmann, Johannes Jakob Meyer
TL;DR
Quantum embedding kernels offer a NISQ-compatible route to kernel-based learning, but their practical use requires training, noise handling, and finite-sampling analysis. This paper develops an accessible treatment of the full pipeline, trains variational embeddings with kernel-target alignment, and reports improved classification and hardware-oriented mitigation results while identifying important limitations and caveats.
Problem
Quantum embedding kernels need practical methods for parameter selection and reliable realization on noisy near-term quantum computers.
Method
The paper analyzes QEK construction, trains variational parameters by maximizing kernel-target alignment, and studies device noise, finite sampling, post-processing, and kernel regularization.
Results
Training improved accuracy over the untrained kernel with minimum accuracy, while hardware post-processing produced alignment improvements ranging from 10.1% to 25.4%, averaging 14.9%.
Takeaways & Limitations
Kernel-target alignment can serve as a practical training objective, and QEK-specific post-processing can substantially improve kernel alignment in hardware experiments.
Takeaways & Limitations
Kernel-target alignment is a heuristic: adversarial datasets can achieve perfect accuracy with very low alignment.
Abstract
from arXiv · showhide
Kernel methods are a cornerstone of classical machine learning. The idea of using quantum computers to compute kernels has recently attracted attention. Quantum embedding kernels (QEKs) constructed by embedding data into the Hilbert space of a quantum computer are a particular quantum kernel technique that allows to gather insights into learning problems and that are particularly suitable for noisy intermediate-scale quantum devices. In this work, we first provide an accessible introduction to quantum embedding kernels and then analyze the practical issues arising when realizing them on a noisy near-term quantum computer. We focus on quantum embedding kernels with variational parameters. These variational parameters are optimized for a given dataset by increasing the kernel-target alignment, a heuristic connected to the achievable classification accuracy. We further show under which conditions noise from device imperfections influences the predicted kernel and provide a strategy to mitigate these detrimental effects which is tailored to quantum embedding kernels. We also address the influence of finite sampling and derive bounds that put guarantees on the quality of the kernel matrix. We illustrate our findings by numerical experiments and tests on actual hardware.
I. INTRODUCTION
The paper introduces quantum embedding kernels as a NISQ-compatible approach that combines quantum feature maps with classical kernel methods. It motivates kernel-target alignment as a way to train embeddings while highlighting kernel methods’ computational and model-selection limitations.
- Kernel-method motivation: Kernel methods provide theoretical performance guarantees and interpretability, but require constructing a quadratic-size kernel matrix and selecting a suitable kernel.These limitations become especially significant for datasets with millions of datapoints.
- Quantum embedding kernels: Quantum embedding kernels use parametrized quantum circuits to embed datapoints into a quantum-state Hilbert space for kernel-based learning.They can serve as quantum subroutines within classical methods such as support vector machines.
- Quantum embedding kernels: NISQ suitability follows from shallow kernel-evaluation subroutines, hardware-tailored circuits, and well-defined kernels even under noisy operations.Their main practical limitation is that kernel construction still scales quadratically with the number of training samples.
- Paper contributions: Kernel-target alignment is proposed as a cost function for optimizing embedding parameters toward better classification on a given dataset.The paper presents this as an accessible, end-to-end treatment including optimization, post-processing, and error mitigation.
- Kernel-method motivation: Feature maps enlarge the representation space so that linear classification can realize nonlinear decision boundaries in the original data space.The resulting classifier can be implemented through inner products in the feature space.
III. QUANTUM EMBEDDING KERNELS
Quantum embedding kernels map datapoints to quantum states and evaluate their overlaps as kernel values. The paper compares an adjoint circuit requiring greater depth with a SWAP-test alternative that supports mixed states at greater width.
- Quantum feature maps: A quantum feature map embeds each datapoint into a quantum state, whose overlap defines the associated quantum embedding kernel.With noise, the embedding is represented by a data-dependent density matrix and the kernel uses the Hilbert-Schmidt inner product.
- Hybrid learning: QEKs can be used as quantum kernel subroutines inside classical methods such as SVMs, leaving hyperplane construction classical.Only kernel evaluations between training datapoints are performed on the quantum computer.
- Overlap estimation: Exploiting QEK structure can provide more suitable overlap-estimation procedures than algorithms designed for arbitrary quantum states.The paper frames this specialization as important for implementing kernels on near-term hardware.
- Overlap estimation: The adjoint approach estimates pure-state overlap by applying U(x) followed by U†(x′) and measuring the probability of the all-zero state.It avoids auxiliary qubits but doubles circuit depth and does not directly apply to mixed states.
- Overlap estimation: The SWAP test estimates overlap through a controlled-SWAP operation and an auxiliary-qubit Pauli-Z expectation value.It roughly doubles circuit width, adds an auxiliary qubit, and works for mixed states.
IV. TRAINING QUANTUM EMBEDDING KERNELS
The paper trains variational quantum embedding kernels by maximizing kernel-target alignment, which compares the learned kernel with label-based similarity. This objective favors high similarity within classes and low similarity across classes, while exhaustive parameter search scales exponentially with parameter dimension.
- Training objective: Variational quantum feature-map parameters are adjusted to improve the classification capabilities of quantum embedding kernels.The resulting optimization is treated as kernel selection followed by kernel optimization.
- Optimization strategies: Exhaustive parameter search has complexity O(exp(r)) for a parameter vector of dimension r.An ε-net over each parameter dimension creates approximately p^r candidate sites, making the approach suitable only for few parameters.
- Kernel-target alignment: Kernel-target alignment compares the kernel matrix with an ideal label kernel using normalized matrix inner products.For balanced datasets, the ideal kernel assigns +1 to same-class pairs and −1 to different-class pairs.
- Kernel-target alignment: For unbalanced datasets, naive alignment can be dominated by the larger class, so labels must be rescaled by class size.The balanced-dataset formula cannot be used unchanged in that setting.
- Kernel-target alignment: Increasing alignment increases kernel values for same-class datapoints and decreases them for different-class datapoints, supporting easier linear classification.The geometric interpretation is that same-class feature vectors cluster while opposite-class vectors point in opposing directions.
- Optimization strategies: Kernel-target alignment can be optimized through a hybrid quantum-classical loop in which the QPU evaluates the kernel matrix at each iteration.Kernel evaluation itself retains quadratic complexity in the number of datapoints.
V. THE EFFECTS OF NOISE
The paper treats device noise and finite sampling as distinct sources of error in quantum embedding kernels. It analyzes how these effects alter kernel estimates and how they can be mitigated.
- Noise sources: QEK implementations must account for both imperfect quantum operations and finite-sample estimation noise.Finite experimental resources create additional uncertainty when kernel values are estimated from limited runs.
A. Device Noise
Device noise prevents direct implementation of the adjoint of a noisy embedding circuit in general, complicating overlap estimation for QEKs on NISQ hardware. The naive adjoint works reliably only under restrictive noise conditions, notably when the noise is self-adjoint and commutes with the unitary.
- Device noise: NISQ noise prevents preparation of pure embedded states and changes how QEK overlaps must be computed.Noise arises from environmental interactions and imperfect control, so the resulting states may be mixed.
- Adjoint overlap estimation: The adjoint method estimates overlaps by applying the embedding circuit followed by its adjoint, but noisy gates generally cannot be inverted by reversing their parameters.For a noisy gate V(θ), the available operation V(−θ) only approximates V(θ)† because the noise timing and channel cannot be controlled.
- Validity conditions: The adjoint of a noisy unitary equals the implemented reversed circuit only when the noise channel is self-adjoint and commutes with the unitary.Depolarizing noise satisfies these conditions in the model discussed by the authors.
- Hardware implications: On actual NISQ devices, gate-level control assumes perfect unitaries, so naive adjoining computes the intended overlap only when device noise is well modeled by depolarization.The SWAP test remains an alternative for mixed states, but it requires additional qubits.
B. Mitigating Depolarizing Noise
The paper mitigates depolarizing noise by inferring state-survival probabilities from known kernel diagonals and correcting the noisy entries. It also derives finite-sampling bounds showing that estimating an entire kernel matrix requires quadratically many entries and measurements.
- Depolarizing-noise mitigation: M-SPLIT infers each datapoint’s survival probability from noisy diagonal entries and uses those values to recover noiseless kernel entries.The method exploits that every diagonal entry of the ideal QEK matrix equals 1.
- Resource-saving variants: M-MEAN estimates a shared survival probability by averaging inferred values, while M-SINGLE estimates it from one diagonal entry to reduce measurement resources.Both methods assume all datapoints have the same survival probability; M-SINGLE uses the first entry for reproducibility.
- Finite sampling: Finite sampling introduces uncertainty because each kernel entry is estimated from Bernoulli circuit outcomes rather than known exactly.The entire kernel matrix contains n(n − 1)/2 = O(n^2) independent entries.
- Sampling guarantees: M = O(n/ε^2) measurements per kernel entry suffice to ensure operator-distance error ε, implying quadratic total circuit-evaluation scaling for the full matrix.The resulting asymptotic scaling is supported as optimal under the random-matrix argument presented.
D. Regularizing the Kernel Matrix
Sampling error and noise mitigation can produce matrices that are not positive semidefinite, preventing their direct use as kernel matrices. The paper therefore regularizes them by projecting or optimizing toward a nearby positive semidefinite matrix.
- Why regularization is needed: Noisy and finitely sampled kernel estimates may lose positive semidefiniteness, although valid kernel matrices must retain this property for classification.Regularization brings the estimate closer to the ideal kernel while restoring validity.
- Regularization methods: Tikhonov regularization shifts the spectrum by correcting the smallest negative eigenvalue, producing a positive semidefinite matrix.The shift can equivalently be applied to the matrix diagonal.
- Regularization methods: Thresholding sets negative eigenvalues to zero while retaining the original eigenvectors.This yields the positive semidefinite matrix closest to the input under any unitarily invariant norm and maximizes alignment with it.
- Regularization methods: The SDP method searches for the closest matrix in Frobenius norm while constraining every diagonal element to equal one.The unit-diagonal constraint incorporates known structure of the exact kernel.
- Combination with other methods: These regularization procedures can be combined with other mitigation techniques that operate at different abstraction levels.The paper specifically mentions zero-noise interpolation and circuit-duplication methods as compatible approaches.
VI. QEK PIPELINE
The QEK pipeline trains a parameterized quantum feature map for a dataset, optionally mitigates and regularizes its kernel matrix, and then uses the processed kernel in a classical SVM. Experiments span noiseless simulation, noisy simulation, and hardware execution.
- QEK pipeline: A training loop adjusts feature-map parameters using a kernel matrix obtained from a NISQ device and optionally post-processed for noise and sampling.The optimized kernel is then used to train the classifier.
- QEK pipeline: The final prediction stage is classical SVM training followed by quantum-kernel evaluations between new datapoints and the learned support vectors.Training the SVM itself is purely classical.
- Experimental design: The experiments use two-dimensional datasets, including artificial and semi-artificial data, with dataset-specific QEKs and experimental repetitions.The checkerboard dataset is used to benchmark mitigation and regularization techniques.
- QEK ansatz: The feature map uses data re-uploading, with Hadamard gates, data-encoding Pauli-Z rotations, trainable Pauli-Y rotations, and ring-connected controlled Pauli-Z rotations.Features are encoded cyclically across repeated blocks when the feature count exceeds the qubit count.
- QEK ansatz: The number of qubits and repeated circuit blocks are treated as width and depth hyperparameters, respectively.The elementary ansatz block is illustrated for N = 5 qubits and m = 2 features.
- Experimental stages: The three experiments validate QEK training without noise, test mitigation and regularization under simulated noise, and demonstrate mitigation on an IonQ quantum processor.The implementation uses PennyLane, with hardware experiments executed through Amazon Braket.
A. Noiseless simulations
In noiseless simulations, training QEK parameters with kernel-target alignment improved decision boundaries and classification accuracy, while post-processing substantially improved noisy kernel matrices under simulated device noise.
- Noiseless QEK training: Training improved the quality of SVM decision boundaries across the simulated datasets, although some points remained misclassified.The authors attribute the remaining errors to limited expressivity of the underlying kernel functions.
- Noiseless QEK training: Trained accuracies ranged from 0.75 for the smallest QEK to 0.97 for larger circuits, with a perfect score in the ensemble experiment.The ensemble experiment had no untrained-kernel baseline by construction.
- Noiseless QEK training: Training always exceeded the minimum untrained accuracy, but maximum untrained accuracy matched or exceeded trained accuracy in some repetitions.For the larger symmetric-donuts circuit, trained accuracy exceeded the maximum untrained accuracy.
- Noiseless QEK training: Kernel-target alignment optimization is a heuristic for good classification and generalization, not a guarantee of better performance.The paper notes adversarial datasets where perfect accuracy can coexist with very low alignment.
- Noise mitigation and regularization: Under simulated local depolarizing noise, the best of 42 post-processing combinations improved alignment by 0%–43.5%, especially with fewer circuit evaluations.The evaluation compares post-processed sampled kernels with the noiseless kernel matrix.
- Noise mitigation and regularization: Post-processing improved kernel quality, but the best mitigation or regularization strategy depended on circuit-evaluation count and device-noise level.When noise estimates are unavailable, thresholding offers systematic improvement; at realistic noise levels, device-noise mitigation typically performs better.
C. Hardware experiments
Hardware experiments on an IonQ ion-trap QPU showed that post-processing increased alignment with the noiseless kernel matrix, with relative improvements averaging 14.9%.
- Experimental setup: The hardware experiment computed a three-qubit symmetric-donuts kernel on an IonQ ion-trap QPU using M = 175 evaluations per matrix entry.The total number of circuit evaluations was about 3.2 · 10^5 because diagonal entries were also measured.
- Alignment results: Post-processing increased alignment between the measured and noiseless kernel matrices across the tested numbers of circuit evaluations.Figure 11 compares raw and post-processed matrices against the simulated noiseless matrix.
- Alignment results: Hardware relative improvements ranged from 10.1% to 25.4%, with a mean of 14.9%.The M-MEAN and R-SDP combination was either best or second best in the hardware results.
- Alignment results: The simulations correctly predicted strong performance of M-MEAN with R-SDP at small device-noise levels despite differences in dataset, circuit, and gate set.This supports the relevance of the depolarizing-noise model for some QPU kernel-matrix noise properties.
- Implications and limitations: Improved kernel-matrix quality may support higher classification accuracy or fewer circuit evaluations at fixed classification performance.The paper presents these as alternative potential benefits of hardware post-processing.
- Implications and limitations: Remaining challenges include evaluating methods without access to the noiseless matrix and determining their effect on classification accuracy.The paper also identifies ansatz choice, barren plateaus, and transfer to broader task types as open directions.
Appendix A: Connection to quantum feature map optimization
The appendix connects kernel-target alignment with quantum feature-map optimization by relating polarity to class-state separation, while also detailing practical costs and limitations of kernel mitigation.
- Connection to feature-map optimization: Kernel-target alignment optimization is closely related to metric learning for quantum feature embeddings.
- Connection to feature-map optimization: Polarity equals the squared norm of a weighted sum of embedded datapoints and, for QEKs, the Hilbert-Schmidt distance between class matrices.
- Connection to feature-map optimization: Increasing polarity increases class-state purity, clusters same-class datapoints in feature space, and reduces overlap between the two class states.
- Mitigation properties: Mitigation methods differ in computational cost and output properties: spectral methods preserve the eigenbasis, whereas semidefinite regularization enforces correct diagonal entries.
- Limitations: Extreme noise can produce invalid kernel entries, but such conditions are expected to make the QPU output unusable; regularization also incurs substantial classical cost.R-TIK and R-THR scale as O(n^2.8) with Strassen multiplication, while R-SDP scales as O(n^3.8).
- Limitations: Post-processing can invalidate operator-distance error guarantees, so mitigation may worsen the analytic bound despite addressing device and sampling noise.
2. Comparison of post-processing strategies
The study compares 42 distinct post-processing strategies combining regularization and device-noise mitigation. The best strategy depends strongly on device noise and circuit-sampling effort, with careful selection substantially improving kernel alignment.
- Strategy space: 42 distinct post-processing strategies remain after excluding duplicate and reducible combinations.Strategies combine an initial regularization step, mitigation, and a second regularization step.
- Overall comparison: Up to 43.5% alignment improvement is achieved in the small-M regime, with negligible deterioration as M →∞.This strategy improves the kernel estimate while requiring fewer circuit evaluations.
- Noise-dependent choices: In high-noise conditions, thresholding is consistently best, whereas lower noise with larger M favors Tikhonov regularization.At higher survival probabilities, diagonal survival-probability estimation followed by SDP regularization is best for most points.
- Noise-dependent choices: For matrices without sampling noise, device-noise mitigation combined with Tikhonov regularization outperforms simple regularization.This supports the ability of the global-depolarization model to capture essential effects of the realistic noise model.
- Overall comparison: 84.6% alignment improvement is achieved with point-specific post-processing, rising to 90.2% without sampling noise.The corresponding simple rating achieved 43.5%.
- Practical limitations: Selecting post-processing remains challenging because practical ranking against the noiseless kernel is unavailable on applications that require the QPU.The application-oriented surrogate based on an ideal target matrix showed no systematic relation to the original ranking, and classification effects remain open.
Appendix C: Additional information on numerical experiments
The numerical experiments use synthetic checkerboard and symmetric-donuts datasets, semi-artificial MNIST data, and simulations of gate-level depolarizing noise. The appendix also documents dataset construction, noise assumptions, and computational emissions.
- Datasets: The checkerboard dataset contains 30 training and 30 test datapoints for simulator-based mitigation and noiseless-kernel experiments.Points are generated around sites on a 4 × 4 grid in [0,1]^2.
- Datasets: The symmetric-donuts dataset contains 60 training and 60 test datapoints for a smaller-kernel experiment on quantum hardware.Labels depend on whether points fall inside or outside circles centered at (1,0) and (-1,0).
- Datasets: The MNIST data comprise 28 × 28 grayscale digit images normalized from [0,255] to [0,1].A semi-artificial dataset is constructed from 500 images per selected digit by sampling high-intensity pixel coordinates.
- Datasets: The MNIST ensemble classifies individual images by sampling 15 high-intensity pixels and applying classifiers for “zero” versus “not zero” and “one” versus “not one.”The sampled pixel coordinates are used as inputs to the trained kernel classifiers.
- Noise model: The device-noise simulation applies single-qubit depolarizing channels after each unitary gate on every acted-on qubit.The channel commutes with single-qubit gates but not multi-qubit gates, potentially invalidating the adjoint approach and positive semidefiniteness.
- Noise model: The base survival probability λ0 represents overall noise strength, while gate duration produces gate-dependent effective noise levels.Hadamard and idling gates use survival probabilities (1 + λ0)/2 and (1 + 3λ0)/4, respectively.
- Noise model: The simulations omit explicit readout error and assume depolarizing noise sufficiently represents full device noise.The authors justify this assumption by reported agreement between the relevant experimental results.
- Computational cost: Numerical simulations consumed 32.8 kWh and produced an estimated total CO2 emission of 36.9 kg including QPU usage.The estimated QPU contribution is 21.4 kg.