Closed-form dual solution
$$\boldsymbol{\alpha} = (K + \lambda I)^{-1}\mathbf{y}$$
using the quantum Gram matrix from quantum_kernel(). Works both
for regression (y numeric) and binary classification (encode
y \in \{-1, +1\} and threshold the prediction at zero).
Arguments
- X
Feature matrix already rescaled to
[0, pi]—quantum_scale()is the recommended preprocessor.- y
Numeric response vector (or
\pm 1for classification).- reps
Integer, encoding depth of the ZZFeatureMap.
- lambda
Numeric ridge regulariser (
> 0).
