Skip to content

cezaris13/Variational-Quantum-Linear-Solver-enhanced-Quantum-Support-Vector-Machine

Repository files navigation

Bachelor thesis on Variational quantum system of linear equations applied for support vector machines algorithm

Main contents of this repository:

  • SVMLearning Jupyter notebook to learn the Support vector machines algotithm
  • VQLS-QSVM-Implementation Implementation of https://arxiv.org/pdf/2309.07770 article. Added generalization for the $n$ qubits and some solution vector post processing.
  • Bakalaurinis_darbas.pdf
    • Contains the bachelor thesis(in lithuanian) where the VQLS-SVM algorithm is explored and experiment results can be seen.

VQLS-SVM algorithm

  1. Take training data and prepare it to be LS-SVM matrix form

  2. Convert LS-SVM matrix into all combinations of

    $$|\langle b | \Phi \rangle|^2 \ = \ \displaystyle\sum_{m} \displaystyle\sum_{n} c_m c_n \langle 0 | U^{\dagger} A_n V(k) | 0 \rangle \langle 0 | U^{\dagger} A_m V(k) | 0 \rangle$$

    and

    $$\langle \Phi | \Phi \rangle \ = \ \displaystyle\sum_{m} \displaystyle\sum_{n} c_m^{*} c_n \langle 0 | V(k)^{\dagger} A_m^{\dagger} A_n V(k) |0\rangle$$

  3. Calculate cost function using

    $$\hat{C}_P \ = 1 \ - \ \frac{|\langle b | \Phi \rangle|^2}{\langle \Phi | \Phi \rangle}$$

  4. Apply minimization function (COBYLA, etc.) to modify $\alpha$ values, for the ansatz gate.

  5. When $\alpha_{min}$ is retrieved apply once more to ansatz circuit to retrieve normalized estimated solution vector.

  6. Apply post processing to the normalized estimated solution vector to retrieve estimated vector.

More details of how the VQLS algorithm works can be found here.

SimulationTests folder

All of these test results have been used in the bachelor thesis.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published