With the rapid development of quantum computers, several applications are being proposed for them. Quantum simulations, simulation of chemical reactions, solution of optimization problems and quantum neural networks (QNNs) are some examples. However, problems such as noise, limited number of qubits and circuit depth, and gradient vanishing must be resolved before we can use them to their full potential. In the field of quantum machine learning, several models have been proposed. In general, in order to train these different models, we use the gradient of a cost function with respect to the model parameters. In order to obtain this gradient, we must compute the derivative of this function with respect to the model parameters. One of the most used methods in the literature to perform this task is the parameter-shift rule method. This method consists of evaluating the cost function twice for each parameter of the QNN. A problem with this method is that the number of evaluations grows linearly with the number of parameters. In this work we study an alternative method, called Evolution Strategies (ES), which are a family of black box optimization algorithms which iteratively update the parameters using a search gradient. An advantage of the ES method is that in using it one can control the number of times the cost function will be evaluated. We apply the ES method to the binary classification task, showing that this method is a viable alternative for training QNNs. However, we observe that its performance will be strongly dependent on the hyperparameters used. Furthermore, we also observe that this method, alike the parameter shift rule method, suffers from the problem of gradient vanishing.
翻译:随着量子计算机的快速发展,人们提出了多种应用方案。量子模拟、化学反应模拟、优化问题求解以及量子神经网络(QNNs)均属此类实例。然而,在充分发挥其潜力之前,噪声、量子比特数量与电路深度受限、梯度消失等问题亟待解决。在量子机器学习领域,已有多种模型被提出。通常,训练这些不同模型需利用代价函数相对于模型参数的梯度。为获取该梯度,必须计算代价函数对模型参数的导数。文献中最常用的方法之一是参数平移规则,该方法需要针对QNN的每个参数对代价函数进行两次求值。其问题在于求值次数会随参数数量线性增长。本文研究了一种替代方法——演化策略(ES),这是一类基于搜索梯度迭代更新参数的黑箱优化算法。ES方法的优势在于可控制代价函数的求值次数。我们将ES方法应用于二分类任务,证明该方法可成为训练QNN的可行替代方案。然而,我们观察到其性能高度依赖于所使用的超参数。此外,我们还发现该方法与参数平移规则方法类似,同样面临梯度消失问题。