
Compare quantum, RBF, and linear kernels on the same feature set
Source:R/quantum_foundation.R
qf_kernel_compare.RdComputes three Gram matrices on the same PCA-reduced embeddings and reports their pairwise Frobenius distance and eigenvalue divergence. Useful for understanding whether the quantum kernel is materially different from the classical RBF at the same feature space (if not, the quantum lift is cosmetic).
Arguments
- X_q
PCA-reduced, pi-scaled feature matrix (the
X_qelement ofqf_embed_reduce()).- reps
Integer; ZZFeatureMap repetitions. Default
2L.- rbf_sigma
Numeric; RBF kernel bandwidth. If
NULL, uses the median heuristicmedian( || x_i - x_j || )over the training set.