diff --git a/README.md b/README.md index f12fba6cb76b570529a4c3d6253367a2e49b8ad9..3e7b898e042d9958a8dd1bf90f305ac77ef4b9fd 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ python main.py 特别的,我们提供了涵盖量子优化、量子化学、量子机器学习等多个领域的案例供大家学习。比如: -- 量子组合优化(QAOA),完成安装步骤后打开 tutorial\QAOA.ipynb 即可进行研究学习。 +- 量子近似优化(QAOA),完成安装步骤后打开 tutorial\QAOA.ipynb 即可进行研究学习。 ```bash cd tutorial @@ -91,7 +91,7 @@ jupyter notebook VQE.ipynb ### 开发 -Paddle Quantum 使用 setuptools的develop 模式进行安装,相关代码修改可以直接进入`paddle_quantum` 文件夹进行修改。python 文件携带了自说明注释。 +Paddle Quantum 使用 setuptools 的develop 模式进行安装,相关代码修改可以直接进入`paddle_quantum` 文件夹进行修改。python 文件携带了自说明注释。 @@ -105,7 +105,7 @@ Paddle Quantum 使用 setuptools的develop 模式进行安装,相关代码修 我们非常欢迎开发者使用Paddle Quantum进行量子机器学习的研发,如果您的工作有使用Paddle Quantum,也非常欢迎联系我们。目前使用 Paddle Quantum 的代表性工作关于 Gibbs 态制备如下: -[1] Y. Wang, G. Li, and X. Wang, “Variational quantum Gibbs state preparation with a truncated Taylor series,” arXiv:2005.08797, May 2020. [[pdf](https://arxiv.org/pdf/2005.08797.pdf)] +[1] Youle Wang, Guangxi Li, and Xin Wang. 2020. Variational quantum Gibbs state preparation with a truncated Taylor series. arXiv2005.08797. [[pdf](https://arxiv.org/pdf/2005.08797.pdf)] ## Copyright and License @@ -118,12 +118,12 @@ Paddle Quantum 使用 [Apache-2.0 license](LICENSE)许可证。 [1] [量子计算 - 百度百科](https://baike.baidu.com/item/量子计算/11035661?fr=aladdin) -[2] M. A. Nielsen and I. L. Chuang, Quantum computation and quantum information. Cambridge university press, 2010. +[2] Michael A Nielsen and Isaac L Chuang. 2010. Quantum computation and quantum information. Cambridge university press. -[3] Phillip Kaye, R. Laflamme, and M. Mosca, An Introduction to Quantum Computing. 2007. +[3] Phillip Kaye, Raymond Laflamme, and Michele Mosca. 2007. An Introduction to Quantum Computing. -[4] J. Biamonte, P. Wittek, N. Pancotti, P. Rebentrost, N. Wiebe, and S. Lloyd, “Quantum machine learning,” Nature, vol. 549, no. 7671, pp. 195–202, Sep. 2017. [[pdf](https://arxiv.org/pdf/1611.09347)] +[4] Jacob Biamonte, Peter Wittek, Nicola Pancotti, Patrick Rebentrost, Nathan Wiebe, and Seth Lloyd. 2017. Quantum machine learning. Nature 549, 7671, 195–202. [[pdf](https://arxiv.org/pdf/1611.09347)] -[5] M. Schuld, I. Sinayskiy, and F. Petruccione, “An introduction to quantum machine learning,” Contemp. Phys., vol. 56, no. 2, pp. 172–185, 2015. [[pdf](https://arxiv.org/pdf/1409.3097)] +[5] Maria Schuld, Ilya Sinayskiy, and Francesco Petruccione. 2015. An introduction to quantum machine learning. Contemp. Phys. 56, 2, 172–185. [[pdf](https://arxiv.org/pdf/1409.3097)] -[6] M. Benedetti, E. Lloyd, S. Sack, and M. Fiorentini, “Parameterized quantum circuits as machine learning models,” Quantum Sci. Technol., vol. 4, no. 4, p. 043001, Nov. 2019. [[pdf](https://arxiv.org/pdf/1906.07682)] +[6] Marcello Benedetti, Erika Lloyd, Stefan Sack, and Mattia Fiorentini. 2019. Parameterized quantum circuits as machine learning models. Quantum Sci. Technol. 4, 4, 043001. [[pdf](https://arxiv.org/pdf/1906.07682)] \ No newline at end of file diff --git a/tutorial/GIBBS.ipynb b/tutorial/GIBBS.ipynb index 91d9fd7a5e5590e3041db9d16b9a628b738a31fd..eab1d100d0f9b33ab0eb7e915fdb78e1b2bb3876 100644 --- a/tutorial/GIBBS.ipynb +++ b/tutorial/GIBBS.ipynb @@ -133,7 +133,7 @@ } }, "source": [ - "- 接下来我们根据上图中的电路设计,具体通过PaddleQuantum的UAnsatz函数来搭建量子神经网络。 " + "- 接下来我们根据上图中的电路设计,具体通过 Paddle Quantum 的UAnsatz函数来搭建量子神经网络。 " ] }, { @@ -178,7 +178,7 @@ "- 具体的我们参考的是[4]中的方法(核心思想是利用吉布斯态达到了最小自由能的性质)。\n", "- 通过作用量子神经网络$U(\\theta)$在初始态上,我们可以得到输出态$\\left| {\\psi \\left( {\\bf{\\theta }} \\right)} \\right\\rangle $, 其在第2-4个量子位的态记为$\\rho_B(\\theta)$.\n", "- 设置训练模型中的的损失函数,在吉布斯态学习中,我们利用冯诺依曼熵函数的截断来进行自由能的估计,相应的损失函数参考[4]可以设为 \n", - "$loss= {L_1} + {L_2} + {L_3}$,其中${L_1} = tr(H\\rho_B)$, ${L_2} = 2{\\beta ^{ - 1}}{\\mathop{\\rm Tr}\\nolimits} \\left( \\rho_B^2 \\right)$, $L_3 = - {\\beta ^{ - 1}}\\frac{{Tr(\\rho_B^3) + 3}}{2}$." + "$loss= {L_1} + {L_2} + {L_3}$,其中 ${L_1}= tr(H\\rho_B)$, ${L_2} = 2{\\beta^{-1}}{\\mathop{Tr}}(\\rho_B^2)$ , $L_3 = - {\\beta ^{ - 1}}\\frac{{Tr(\\rho_B^3) + 3}}{2}$." ] }, { diff --git a/tutorial/QAOA.ipynb b/tutorial/QAOA.ipynb index b75607ad63655076ac94427fd1e56491fe41ef24..5fd93bb7d546ceab441ddc0a74b20833765d36c2 100644 --- a/tutorial/QAOA.ipynb +++ b/tutorial/QAOA.ipynb @@ -282,7 +282,7 @@ "![QAOA.png](https://release-data.cdn.bcebos.com/PIC%2FQAOACir.png) \n", "\n", "\n", - "其中,模块 $U_x(\\beta)$ 可以分解为在每个量子比特上作用绕 $X$ 方向转动的量子逻辑门 $R_x(\\beta)= e^{-i\\beta X_j}$,而模块 $U_c(\\gamma)$ 则可分解为作用在两比特上的 $ZZ$ 逻辑门 $R_{zz}(\\gamma)= e^{-i\\gamma ZZ}$。\n", + "其中,模块 $U_x(\\beta)$ 可以分解为在每个量子比特上作用绕 $X$ 方向转动的量子逻辑门 $R_x(\\beta)= e^{-i\\beta X_j}$,而模块 $U_c(\\gamma)$ 则可分解为作用在两比特上的 $ZZ$ 逻辑门 $R_{zz}(\\gamma)= e^{-i\\gamma Z\\otimes Z}$。\n", "\n", "此外,我们可以设置交叉放置两个模块的次数,记为 QAOA 电路的层数 $P$。于是输入\n", "\n", diff --git a/tutorial/QAOA_En.ipynb b/tutorial/QAOA_En.ipynb index a444c46988fe23801833c2a1b9db6b2c557cb149..99755079cf40c25759a06e05b67e898489876255 100644 --- a/tutorial/QAOA_En.ipynb +++ b/tutorial/QAOA_En.ipynb @@ -262,7 +262,7 @@ "\n", "\n", "\n", - "Further, each module in the QAOA circuit can be decomposed into a series of operations acting on single qubits and two qubits. In particular, the first has the decomposition of $U_c(\\gamma)=\\prod_{(i, j)}e^{-i \\gamma Z_iZ_j }$ while there is $U_x(\\beta)=\\prod_{i}e^{-i \\beta X_i}$ for the second. This is illustrated in the following figure.\n", + "Further, each module in the QAOA circuit can be decomposed into a series of operations acting on single qubits and two qubits. In particular, the first has the decomposition of $U_c(\\gamma)=\\prod_{(i, j)}e^{-i \\gamma Z_i\\otimes Z_j }$ while there is $U_x(\\beta)=\\prod_{i}e^{-i \\beta X_i}$ for the second. This is illustrated in the following figure.\n", "\n", " ![Circ](https://release-data.cdn.bcebos.com/PIC%2FQAOACir.png) \n", "\n", diff --git a/tutorial/VQE.ipynb b/tutorial/VQE.ipynb index ce80ad935d3824f38832513deb501cc66a9309a9..39772f730d346f3c14b88a5ddbb9f6b3f9fc3899 100644 --- a/tutorial/VQE.ipynb +++ b/tutorial/VQE.ipynb @@ -256,7 +256,7 @@ "metadata": {}, "source": [ "## 测试效果\n", - "我们现在已经完成了量子神经网络的训练,得到的基态能量的估计值大致为-1.136 Ha,我们将通过与理论值的对比来测试效果。\n", + "我们现在已经完成了量子神经网络的训练,得到的基态能量的估计值大致为-1.136 Ha (注: Ha为[哈特里能量](https://baike.baidu.com/item/%E5%93%88%E7%89%B9%E9%87%8C%E8%83%BD%E9%87%8F/13777793?fr=aladdin),是原子单位制中的能量单位),我们将通过与理论值的对比来测试效果。\n", "- 训练后得到的QNN作用在初始零态上就是VQE算法的输出态,最后更新的损失函数则为其对应的能量。\n", "- 接下来我们将训练QNN得到的基态能量和理想情况下的理论值。\n", "- 我们可以先求解理论值,即哈密顿量$H$的最小特征值。" diff --git a/tutorial/VQSD.ipynb b/tutorial/VQSD.ipynb index 8dab31fdbf799f1837782bfc26555bc5a1b87fde..e31ad7a82aab67d02be5bfc0726c37cd887d2249 100644 --- a/tutorial/VQSD.ipynb +++ b/tutorial/VQSD.ipynb @@ -37,12 +37,10 @@ } }, "source": [ - "$\\newcommand{\\ket}[1]{|{#1}\\rangle}$\n", - "$\\newcommand{\\bra}[1]{\\langle{#1}|}$\n", "\n", "## 背景\n", "量子态对角化算法(VQSD)[1-3] 目标是输出一个量子态的特征谱,即其所有特征值。求解量子态的特征值在量子计算中有着诸多应用,比如可以用于计算保真度和冯诺依曼熵,也可以用于主成分分析。\n", - "- 量子态通常是一个混合态,表示如下 $\\rho_{\\text{mixed}} = \\sum_i P_i \\ket{\\psi_i}\\bra{\\psi_i}$\n", + "- 量子态通常是一个混合态,表示如下 $\\rho_{\\text{mixed}} = \\sum_i P_i |\\psi_i\\rangle\\langle\\psi_i|$\n", "- 作为一个简单的例子,我们考虑一个2量子位的量子态,它的特征谱为 $(0.5, 0.3, 0.1, 0.1)$, 我们先通过随机作用一个酉矩阵来生成具有这样特征谱的量子态。\n" ] }, @@ -136,7 +134,7 @@ "source": [ "## 配置训练模型 - 损失函数\n", "- 现在我们已经有了数据和量子神经网络的架构,我们将进一步定义训练参数、模型和损失函数。\n", - "- 通过作用量子神经网络$U(\\theta)$在量子态$\\rho$后得到的量子态记为$\\tilde\\rho$,我们设定损失函数为$\\tilde\\rho$与用来标记的量子态$\\sigma=0.1 \\ket{00}\\bra{00} + 0.2 \\ket{01}\\bra{01} + 0.3 \\ket{10}\\bra{10} + 0.4 \\ket{11}\\bra{11}$的内积。\n", + "- 通过作用量子神经网络$U(\\theta)$在量子态$\\rho$后得到的量子态记为$\\tilde\\rho$,我们设定损失函数为$\\tilde\\rho$与用来标记的量子态$\\sigma=0.1 |00\\rangle\\langle 00| + 0.2 |01\\rangle \\langle 01| + 0.3 |10\\rangle \\langle10| + 0.4 |11 \\rangle\\langle 11|$的内积。\n", "- 具体的,设定损失函数为 $\\mathcal{L}(\\boldsymbol{\\theta}) = Tr(\\tilde\\rho\\sigma) .$" ] },