9.3 Quantum support vector machines in PennyLane
It has been a long journey but, finally, we are ready to see QSVMs in action. In this section, we are going to train and run a bunch of QSVM models using PennyLane. Just to get started, let’s import NumPy and set a seed so that our results are reproducible:
import numpy as np seed = 1234 np.random.seed(seed)
9.3.1 Setting the scene for training a QSVM
Now, if we want to train QSVMs, we need some data to work with. In today’s ever-changing job market, you should always keep your options open and, as promising as quantum machine learning may be, you may want to have a backup career plan. Well, we’ve got you covered. Have you ever dreamed of becoming a world-class sommelier? Today is your lucky day! (We are just kidding, of course, but we will use this wine theme to give some flavor to our example!)
We’ve already seen how the scikit-learn package offers lots of tools and resources for machine learning...