1
$\begingroup$

I am trying to practice QSVM from the following tutorial

Introduction into Quantum Support Vector Machines

The author has used 2 feature_dimension with 2 component PCA

feature_dimension =2

Now my question is, why?

Is it because of the limitation of the number of qubits?

When I tried to increase both to 3 the testing success ratio decreased to 0.45

How can I use more feature sets

$\endgroup$
2
  • $\begingroup$ PCA is used to reduce the 32 features of the dataset to 2. Therefore, after PCA feature_dimension = PCA_dim = 2. $\endgroup$ – Cuhrazatee Mar 28 at 23:40
  • $\begingroup$ Yes that I understand. Is there any practical cause of doing that? What is my data has more features? Thanks $\endgroup$ – Protima Rani Paul Mar 29 at 1:43
3
$\begingroup$

Practically, it can be (quite often) a limitation of number of qubits/hardware, but also it is a hyperparameter to play with. So it may be that using more qubits gives you better results or worse.

Also, in the QSVM, there is or may be a parameterized part you have to optimize over. So increasing the number of qubits results in more optimization (more parameters), that makes it harder. You may need to play on the depth of the variational part to improve results (so more parameters to optimize).

But if you are limited in the number of qubits, you can change the data encoding. For instance, in this paper Fig.2, they use a quantum circuit with $17$ qubits and loaded $67-$dimensional data without dimensionality reduction. This results in a deeper circuit.

$\endgroup$
4
  • $\begingroup$ I cannot thank you enough for the reference paper that you attached, I am going through it. $\endgroup$ – Protima Rani Paul Mar 29 at 20:06
  • $\begingroup$ I read through the paper still did not get a full grasp of it. Anyway, I am looking to implement a similar algorithm using the QISKIT library. Let's see. Any idea of using something other than QSVM also? VQE maybe or? $\endgroup$ – Protima Rani Paul Mar 29 at 21:03
  • $\begingroup$ @ProtimaRaniPaul It does not hurt to try a bit of everything but you should not be afraid of getting your hands dirty with code. Most of things need more implementation. If you think Qiskit is restrictive, you can try pennylane or another framework. $\endgroup$ – cnada Mar 30 at 7:13
  • $\begingroup$ thank you for the motivation. $\endgroup$ – Protima Rani Paul Mar 31 at 2:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.