机器学习 量子_量子机器学习101

这篇博客介绍了量子机器学习的基础知识,翻译自《Quantum Machine Learning 101》。文章探讨了量子计算与传统机器学习的结合,为读者提供了一个入门级别的理解。
摘要由CSDN通过智能技术生成

机器学习 量子

As part of the peer learning series, Quantum Computing India had a session on Quantum Machine Learning 101 hosted by me. Here’s a quick log of the session. In the end, you will find full video link.

作为对等学习系列的一部分,印度的Quantum Computing印度公司举办了一场有关Quantum Machine Learning 101的会议。 这是会话的快速日志。 最后,您将找到完整的视频链接。

目录 (Table of Contents)

  • What is Quantum Machine Learning and Why do we need it?

    什么是量子机器学习,为什么我们需要它?
  • What all Problems can Quantum Machine Learning Solve?

    量子机器学习可以解决所有哪些问题?
  • What is Quantum Data and how is it useful?

    什么是Quantum Data及其有用?
  • How is that data getting generated and fed?

    数据如何生成和馈送?
  • What is Hybrid Quantum Classical Model?

    什么是混合量子经典模型?
  • Applications of Quantum Machine Learning

    量子机器学习的应用
  • How to Learn Quantum Machine Learning?

    如何学习量子机器学习?

量子机器学习 (Quantum Machine Learning)

这是什么?为什么我们需要它? (What is it & Why do we need it?)

In Short Quantum Machine Learning is Machine learning performed over Quantum Computer. The properties of Quantum mechanics make it special explained later.

简而言之,量子机器学习是通过量子计算机执行的机器学习。 量子力学的性质使其在后面有特别说明。

Quantum Machine learning is build on two concepts i.e. Quantum Data and Hybrid Quantum Classical Model.

量子机器学习建立在两个概念上,即量子数据和混合量子经典模型。

它可以解决的问题 (The Problems it can solve..)

Current Neural Networks are able to easily create a classification model with parallel computing. This is an easy problem and Quantum Machine Learning will not be solving this.. It is MADE FOR SOMETHING BIG. For example: Currently Facial Recognition happens in fraction of seconds and is more than 99% accurate.. QML will not be targeting this problem

当前的神经网络能够通过并行计算轻松创建分类模型。 这是一个简单的问题,量子机器学习不会解决这个..它是专为一件大事 。 例如:当前的面部识别只需几秒钟即可完成,并且准确率超过99%。.QML不会针对此问题

Quantum Machine Learning Deal with solving probabilistic models or graph structures that are not feasible in classical computers i.e. they fall in the category of NP Hard or NP Complete problem.

量子机器学习处理求解经典计算机中不可行的概率模型或图结构,即它们属于NP Hard或NP Complete问题。

In One sentence: It is used for Solving problem which have a finite input and output but infinite possibilities.

在一个句子中:它用于解决输入和输出有限但可能性无限的问题。

Quantum Machine Learning Consists of two parts:

量子机器学习包括两个部分:

  • Quantum Data

    量子数据
  • Hybrid Quantum Classical Model

    混合量子经典模型

量子数据 (Quantum Data)

Quantum data is a type of data which exhibits entanglement and superposition leading to a probability distribution that classical computer will take exponential amount of resource to store and represent.

量子数据是表现出纠缠和叠加的数据类型,导致经典计算机将以指数量的资源来存储和表示的概率分布。

了解量子数据 (Understanding Quantum Data)

Lets dive in to example comparing with classical computers (CC):

让我们来看一下与经典计算机(CC)进行比较的示例:

  • CC stores either 1 or 0 in a bit, 8 bits make a byte, 1024 bytes makes a kilo byte, etc.

    CC会以1或0的形式存储一个位,以8位为一个字节,以1024个字节为千字节,依此类推。
  • each bit stores electric current i.e. 0 represents no current and 1 represents presence of current.

    每个位存储电流,即0表示无电流,而1表示存在电流。
  • Qubits are basic building block of quantum computers, which stores the measure of 1 amplitude and measure of 0 amplitude. These amplitudes can be turned into probabilities when entangled with other Qubits which can represents a lot of information.

    量子位是量子计算机的基本构建块,它存储1个幅度的量度和0个幅度的量度。 当与其他可以表示很多信息的量子位纠缠在一起时,这些幅度可以转换为概率。

The Beauty:

美丽:

  • Qubit can represents 2 bits i.e. either 1 or 0

    Qubit可以表示2位,即1或0
  • If we have 2 qubits we can represents 4 bits

    如果我们有2个量子位,我们可以代表4个位
  • 29 Bits can represents about 540 million numbers i.e. 2²⁹ = 540 M where as 29 qubits can represent about 540 M bits.

    29位可以表示大约5.4亿个数字,即2²= 540 M,其中29量子位可以表示大约540 M的位。
  • So n bits is classical meaning 2ⁿ in Quantum at a time.

    因此n位是经典的,一次在Quantum中的含义为2ⁿ。

This big amount of resource is far beyond classical super computers.

如此大量的资源远远超出了传统的超级计算机。

Data is core of Machine Learning, Machine Learning requires huge amount of data, and if the data stored is in quantum space then we can store a lot of it with very less space required.

数据是机器学习的核心,机器学习需要大量的数据,如果存储的数据在量子空间中,那么我们可以用很少的空间来存储大量数据。

Lets take another example to understand this concept of Quantum Data

让我们再举一个例子来理解量子数据的概念

  • There are 8 wires which represents 8 bits in a Classical Computer.

    在经典计算机中,有8条线代表8位。
  • Total amount of information that can be stored is 2⁸= 256

    可以存储的总信息量为2⁸= 256
  • Signals in the wire can be either 0 or 1 i.e. no electricity and electricity is present.

    电线中的信号可以是0或1,即不通电。
  • In quantum information is encoded in particles like electrons. electrons can be in 2 states i.e. 0 and 1. But when we come to quantum mechanics it exhibits a property called super position which allows the electron to be partially present in both the states.

    在量子信息中,信息被编码在像电子这样的粒子中。 电子可以处于2个状态,即0和1。但是,当我们进入量子力学时,它表现出一种称为超位置的特性,该特性使电子可以在两种状态下部分存在。
  • This means that the electron can be both in partial 0 and partial 1.

    这意味着电子可以同时处于0部分和1部分。
  • So instead if 2 wires a single qubit can do that task of storing two bits. Thus in this way huge amount of resources can be saved.

    因此,取而代之的是,如果有2条导线,那么单个qubit可以完成存储两位的任务。 因此,可以节省大量资源。
  • Even accessing those big amount of data via Quantum Computer will be fast.

    即使通过Quantum Computer访问大量数据也将很快。

数据如何生成和馈送? (How is that data getting generated and fed?)

Quantum data is any data which is either generated by any quantum computer or any other quantum mechanical device.

量子数据是由任何量子计算机或任何其他量子机械设备生成的任何数据。

Currently there is no way in which this external quantum data to the Quantum Machine.

当前,没有办法将外部量子数据发送到量子机器。

So either it has to be classical data or has to be generated by the machine itself(as done by google to prove quantum Supremacy).

因此,要么必须是经典数据,要么必须由机器本身生成(就像Google证明量子霸权一样)。

So for the Quantum Supremacy experiment Google used quantum data

因此,对于量子至上实验,Google使用了量子数据

Image for post
Quantum Circuit
量子电路

Which was prepared by Cirq Circuits using sycamore processor.

这是由Cirq Circuits使用无花果处理器编写的。

混合量子经典模型 (Hybrid Quantum Classical Model)

Image for post
Fusion resulting in Something Incredibly strong!!
融合产生了难以置信的强大!!

It is a combination of Quantum Circuits with classical Models, leveraging the power of both computing.

它是量子电路与经典模型的结合,充分利用了两种计算的强大功能。

Image for post
Existing Libraries and their integration
现有图书馆及其整合

This image contains the list of existing libraries where one can build their QML Solutions.

该图像包含现有库的列表,可以在其中构建其QML解决方案。

Algorithms Implemented

实现的算法

  • Q SVM

    Q支持向量机
  • Q Means

    Q均值
  • QNN

    人工神经网络
  • QGANs

    量子网络

Q-Means

Q均值

  • At a high level q-means algorithm has similar steps as that of classical k-means algorithm.

    在较高的层次上,q均值算法具有与经典k均值算法相似的步骤。
  • It is specifically developed to address clustering problem on large datasets and aimed to bring in savings with respect to time.

    它是专门为解决大型数据集上的聚类问题而开发的,旨在节省时间。
  • It can also be considered to be a robust version of classical k-means algorithm.

    它也可以被认为是经典k均值算法的可靠版本。

QSVM

支持向量机

  • In simple, Quantum feature maps are non linear transformation function to find hyperplane

    简单来说,量子特征图是非线性变换函数,可以找到超平面
  • Quantum feature maps are used to convert classical data to quantum states and build the kernel on these states.

    量子特征图用于将经典数据转换为量子状态,并在这些状态上构建内核。
  • once we get kernel matrix, the training is same as classical

    一旦我们得到核矩阵,训练就和经典的一样

Quantum Neural Networks

量子神经网络

  • A QNN is a parametrized Quantum Computational model/ parameterized Quantum Circuit that is run over a Quantum Computer

    QNN是在量子计算机上运行的参数化量子计算模型/参数化量子电路
  • The backpropagation for the quantum circuit is :

    量子电路的反向传播为:
  • ∇_θ QuantumCircuit (θ) = QuantumCircuit( θ + s) — QuantumCircuit( θ- s)

    ∇_θQuantumCircuit(θ)= QuantumCircuit(θ+ s)— QuantumCircuit(θ-s)
  • here the gradient is calculated from the difference of the output produced from the shift of angle

    在这里,梯度是根据角度偏移产生的输出差计算得出的
Image for post

Here σ represents the activation function.

在此,σ表示激活函数。

By parameterized circuit we mean that the rotation angles of the gates are specified by the components of a classical input vector.

通过参数化电路,我们的意思是门的旋转角度由经典输入矢量的分量指定。

The flow: The output of the NN goes in as the input for the PQC which gives an output which can be used as an input for the final layers.

流程:NN的输出作为PQC的输入进入,它提供了可以用作最终层的输入的输出。

QML的应用 (Applications of QML)

化学品模拟: (Chemicals simulation:)

One projects to in the form of quantum data and an algorithm mapped over it to form a structure that will act as vaccine for Covid 19 would be very easy in Quantum Machine Learning. The search space would be vast where as the search speed will also be fast.

在量子机器学习中,以量子数据的形式进行投影并在其上映射一种算法以形成将用作Covid 19疫苗的结构的方法非常容易。 搜索空间将是巨大的,因为搜索速度也将很快。

量子物质模拟: (Quantum Matter Simulation:)

Quantum Machine learning can be used to design matter which can sustain high temperatures and has superconductivity any other properties of matter which have many body quantum effects meaning the collective behaviour of a group of interacting particles in quantum space. These behaviours are very complex in nature, and to link them to elementary laws is very difficult.

量子机器学习可用于设计能够维持高温并具有超导性的物质的任何其他性质,这些性质具有许多物体量子效应,这意味着一组相互作用的粒子在量子空间中的集体行为。 这些行为本质上非常复杂,将它们与基本定律联系起来非常困难。

量子控制: (Quantum Control:)

Machine Learning models can be used to design the open and closed loop controls, calibration and error mitigation.

机器学习模型可用于设计开环和闭环控制,校准和错误缓解。

Mostly trying to develop a device to view the quantum state before the collapse of the wave function

通常试图开发一种在波函数崩溃之前查看量子状态的设备

量子通信网络: (Quantum Communication Networks:)

Use Machine learning to identify non orthogonal states to construct quantum repeaters, receivers and purification units. Basically moving towards the idea of Quantum Internet.

使用机器学习来识别非正交状态,以构造量子中继器,接收器和纯化单元。 从根本上迈向量子互联网的想法。

降维: (Dimensionality Reduction:)

Support vector Machines work in hyperplanes and when the dimensions go high, classical computers fail.

支持向量机器在超平面中工作,并且当尺寸变大时,传统计算机就会失败。

But when it comes to quantum computers we can see exponential speedups. It works on feature maps and segregates them based on those maps.

但是当涉及到量子计算机时,我们可以看到指数级的加速。 它适用于要素地图,并根据这些地图将其隔离。

可能出现的问题 (Questions that may arise)

Do we need classical ML skill?

我们需要经典的机器学习技能吗?

Short answer: Yes

简短答案:是

Longer One: It is a combination of Machine Learning with Quantum computing, so if you are an enthusiast and don’t know ML. Then I would recommend to get your ML concepts right because Quantum realm is complex, and this is where we are trying to fit out classical world into it. So if we don’t have a hands over it.. it will be tough..!!

更长的一个:它是机器学习与量子计算的结合,因此,如果您是发烧友并且不懂ML。 然后,我建议您正确设置您的ML概念,因为Quantum领域很复杂,而这正是我们试图将经典世界纳入其中的地方。 所以,如果我们没有交出来..那将很难.. !!

Books For QML —

QML书籍—

  • Dancing with Qubits

    用Qubit跳舞

Required skills —

必备技能-

  • Passion

    热情

  • Perseverance

    毅力

  • Dedication

    奉献精神

  • Python

    Python
  • ML Algorithms

    机器学习算法
  • Linear Algebra

    线性代数
  • Statistics

    统计
  • Probability

    可能性
  • Vectors

    向量
  • Libraries — Tensorflow/ Qiskit/ Pennylane.. anything you like

    库— Tensorflow / Qiskit / Pennylane ..任何您喜欢的东西

Join us in the #peerlearning series every Sunday 4–6 PM IST.

在每个IST的每个星期日4–6(下午)加入我们的#peerlearning系列。

Book your slots here —

在此处预订您的广告位-

翻译自: https://medium.com/quantumcomputingindia/quantum-machine-learning-101-5428062822d1

机器学习 量子

  • 2
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值