Bachelor thesis on Variational quantum system of linear equations applied for support vector machines algorithm
- 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.
-
Take training data and prepare it to be LS-SVM matrix form
-
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$$ -
Calculate cost function using
$$\hat{C}_P \ = 1 \ - \ \frac{|\langle b | \Phi \rangle|^2}{\langle \Phi | \Phi \rangle}$$ -
Apply minimization function (COBYLA, etc.) to modify
$\alpha$ values, for the ansatz gate. -
When
$\alpha_{min}$ is retrieved apply once more to ansatz circuit to retrieve normalized estimated solution vector. -
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.
All of these test results have been used in the bachelor thesis.
- TPDTest Used to compare Sparse Pauli operator and Tensorized Pauli decomposition (TPD) performance using qubits up to 10.
- VQLSOptimizersTest Ran tests for qubit size up to 5 qubits with different non gradient and gradient optimizers (COBYLA,SLSQP, BFGS, L-BFGS-B,trust-constr)
- VQLSSVMTest Testing VQLS-SVM algorithm with qubits up to 5, with iris and breast cancer datasets.
- ThreadsVQLS Notebook used to test verious job size and thead combinations to find which option is the fastest