{ "cells": [ { "cell_type": "markdown", "id": "white-energy", "metadata": {}, "source": [ "# Quantum Kernel Methods\n", "\n", " Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved. " ] }, { "cell_type": "markdown", "id": "perfect-marker", "metadata": {}, "source": [ "## Introduction\n", "\n", "One of the most important learning models for quantum machine learning applications in the noisy intermediate-scale quantum (NISQ) era is the parameterized quantum circuit. Although given its obvious analogy to classical neural networks, many refer to such quantum models as \"quantum neural networks\", it was shown that the mathematical form of such quantum machine learning models is actually much closer to kernel methods, a different kind of classical learning approach [1]. By combining classical kernel methods and the power of quantum models, quantum kernel methods can shed new light on how to approach a variety of machine learning problems, thus raising great interest in the field of quantum machine learning [2-7]. In this tutorial, we will introduce the basic ideas of quantum kernel methods and demonstrate how to classify data with two different quantum kernels.\n", "\n", "### Background\n", "\n", "In classical machine learning, kernel methods' basic idea is to map a low-dimensional data vector into a potentially high-dimensional feature space via a feature map, thus giving us the possibility to use linear methods to analyze non-linear features in the original data. As shown in Fig. 1, by mapping linearly inseparable 1D data into a 2D feature space, the feature vectors of the original data become linearly separable.\n", "\n", "![feature map](./figures/Qkernel-fig-featuremap.png \"Figure 1. feature map in kernel methods\")\n", "