Skip to main content

Module projected

Module projected 

Source
Expand description

Projected quantum kernels (PQK) beyond global overlap fidelity.

Reference: Huang, Broughton, Mohseni, Babbush, Boixo, Neven & McClean, “Power of data in quantum machine learning”, Nat. Commun. 12, 2631 (2021), §“Projected quantum kernels”.

The global overlap (fidelity) kernel k(x,y) = |⟨ψ(x)|ψ(y)⟩|² concentrates exponentially: for many qubits, off-diagonal entries collapse to ≈0 and the Gram matrix approaches the identity, destroying generalization. The projected quantum kernel instead measures only local (reduced) information about the embedded state and compares data points in that low-dimensional classical feature space.

Concretely, for each data point x we embed |ψ(x)⟩ and record the single-qubit Pauli expectation vector

ρ₁(x) = ( ⟨X_q⟩, ⟨Y_q⟩, ⟨Z_q⟩ )_{q=0..n-1}  ∈ ℝ^{3n},

(equivalent to the Bloch vectors of all single-qubit reduced density matrices). The PQK is the Gaussian (RBF) kernel over these classical feature vectors:

k_PQK(x,y) = exp( -γ · Σ_q Σ_{P∈{X,Y,Z}} ( ⟨P_q⟩_x − ⟨P_q⟩_y )² ).

This is positive-semidefinite by construction (an RBF kernel on real feature vectors) and provably avoids the exponential concentration of the fidelity kernel.

Structs§

ProjectedKernelConfig
Configuration for a projected quantum kernel.

Enums§

PqkEmbedding
How a data vector is embedded into a quantum state before its local observables are read out.

Functions§

local_pauli_features
Embed data and return the 3·n vector of single-qubit Pauli expectations (⟨X_0⟩,⟨Y_0⟩,⟨Z_0⟩, ⟨X_1⟩,…) — the concatenated Bloch vectors.
projected_kernel
Compute the projected quantum kernel value k_PQK(x, y).
projected_kernel_matrix
Build the full PQK Gram matrix K[i][j] = k_PQK(xs[i], xs[j]).