• K-Means

    Separating data into distinct clusters, organizing diverse information and simplifying complexity with vibrant clarity

  • Random Forest for Regression

    Combining decision trees, it provides predictive accuracy that illuminates the path to regression analysis

  • Support Vector Machines for Regression

    Leveraging mathematical precision, it excels in predicting values by carving precise pathways through data complexities

Sunday, February 15, 2026

Quantum Kernels

The quantum version of SVM was initially proposed by Rebentrost et al. (2014), but this formulation requires the input data to be provided in coherent superposition states. Therefore, when the data are generated on a classical computer, the efficient application of this approach becomes impractical. 

A different approach was proposed by Havlíček et al. (2019), where the data are provided purely classically, while the feature space is mapped by the quantum state $ \Phi: \mathbb{R}^n \rightarrow \vert \Phi(\vec{x}) \rangle \langle \Phi(\vec{x}) \vert $.

A commonly used feature map is ZZFeatureMap, this is a module of qiskit library, which involves a non-linear mapping of the input features. The encoding process works as follows: 

  • Initial State: The process begins by preparing all qubits in the initial state $ \vert 0^{\otimes n} \rangle $, followed by the application of Hadamard gates to create a uniform superposition.
  • Single-Qubit Rotations: The classical data points are encoded into the rotation angles of single-qubit phase gates.
  • Two-Qubit Entanglement/Rotations: Entangling layers, typically using CNOT gates, are applied between specified pairs of qubits to introduce two-qubit interactions.

The following equation describes the ZZFeatureMap\begin{equation*} \mathcal{U}_{\Phi(\vec{x})} = \left[ \exp\left(i \sum_{1 \le j <k \le n} \phi_{\{j,k\}}(\vec{x})\, Z_j \otimes Z_k\right) \exp\left(i \sum_{j=1}^n \phi_{\{j\}}(\vec{x})\, Z_j \right)  H^{\otimes n} \right]^d \end{equation*} Here, $Z$ denotes the Pauli-$Z$ operator, $n$ denotes the number of qubits (corresponding to the number of features), $d$ is the number of repetitions, and $\phi_S(\vec{x})$ is defined as: \begin{equation*} \phi_{S}(\vec{x}) = \begin{cases} x_i, & S = \{i\} \\ (\pi - x_i) (\pi - x_j), & S = \{i, j\} \end{cases} \end{equation*} With these ingredients, we can construct the quantum kernel as shown in the following equation: \begin{equation*} K(\vec{x}, \vec{y}) = \lvert \langle \Phi(\vec{x}) \vert \Phi(\vec{y}) \rangle \rvert^2  = \langle 0^{\otimes n} \vert \mathcal{U}_{\Phi(\vec{x})}^\dagger \mathcal{U}_{\Phi(\vec{y})} \vert 0^{\otimes n} \rangle\end{equation*} where $ \mathcal{U}_{\Phi(\vec{x})}^\dagger $ denotes the Hermitian adjoint of $ \mathcal{U}_{\Phi(\vec{x})}$ .


Share:

About Me

My photo
I am an Engineering Physicist, graduated with academic excellence as the top of my class. I have experience programming in several languages, including C++, MATLAB, and especially Python. I have worked on projects in image and signal processing, as well as in machine learning and data analysis.

Recent Post

Quantum Kernels

The quantum version of SVM was initially proposed by  Rebentrost et al. (2014) , but this formulation requires the input data to be provided...

Pages