{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# HHL 算法\n", "\n", "[](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/notebook/r2.5.0/mindquantum/zh_cn/case_library/mindspore_hhl_algorithm.ipynb)\n", "[](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/notebook/r2.5.0/mindquantum/zh_cn/case_library/mindspore_hhl_algorithm.py)\n", "[](https://gitee.com/mindspore/docs/blob/r2.5.0/docs/mindquantum/docs/source_zh_cn/case_library/hhl_algorithm.ipynb)" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## 概述\n", "\n", "**HHL算法的目的:** 给定一个 Hermitian $A$ 和一个单位向量 $\\vec{b}$,\n", "求解方程 $A \\vec{x} = \\vec{b}$ 。\n", "\n", "令 $\\left| b \\right\\rangle = \\sum_{j=1}^{N} b_{j } \\left| j \\right\\rangle$,\n", "算法的关键在于在 $\\left|b \\right\\rangle$ 上模拟 $e^{i A \\Delta t }$ 。\n", "\n", "设 $A$ 的谱分解如下\n", "\n", "$$A = \\sum_{j=1}^{N} \\lambda_{j } \\left| u_{j} \\right\\rangle \\left\\langle u_{j} \\right|$$\n", "\n", "那么\n", "\n", "$$e^{i A \\Delta t } = \\sum_{j=1}^{N} e^{i \\lambda_{j} \\Delta t } \\left| u_{j} \\right\\rangle \\left\\langle u_{j} \\right|$$\n", "\n", "将 $\\left| b \\right\\rangle$ 用基 $\\left\\lbrace \\left| u_{j} \\right\\rangle \\right\\rbrace$ 表示 : $\\left| b \\right\\rangle = \\sum_{j=1}^{N} \\beta_{j} \\left| u_{j} \\right\\rangle$ 。\n", "\n", "使用量子相位估计 QPE(Quantum Phase Estimation),其中 $U = e^{i A \\Delta t}$,作用结果如下:\n", "\n", "$$\\left| b \\right\\rangle \\xrightarrow{\\text{QPE}} \\sum_{j=1}^{N} \\beta_{j} \\left| u_{j} \\right\\rangle | \\widetilde{ \\lambda_j } \\rangle$$\n", "\n", "其中 $| \\widetilde{\\lambda_j} \\rangle$ 是特征值 $\\lambda_{j}$ 的估计(波浪线表示估计值,下文同理)。\n", "\n", "很容易看出方程的解就是\n", "\n", "$$\n", "\\left| x \\right\\rangle = A^{-1 } \\left| b \\right\\rangle = \\sum_{j}^{ } \\beta_{j } (\\lambda_{j})^{-1 } \\left| u_{j} \\right\\rangle\n", "$$\n", "\n", "所以我们只需要将信息从量子态 $| \\widetilde{\\lambda_j} \\rangle$ 中提取出来即可。" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## HHL 算法步骤\n", "\n", "下面详细介绍 HHL 算法的详细步骤,包含详细的数学推导。" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### 数据预处理\n", "\n", "前面提到 $A$ 需要是 Hermitian 的,也就是 $A^\\dagger = A$。其实这个条件可以放宽,如果 $A$ 不是 Hermitian 的,构造 $\\tilde{A}$ 如下:\n", "\n", "$$\n", "\\tilde{A} = \\begin{pmatrix}\n", "0 & A \\\\\n", "A^{\\dagger } & 0 \\\\\n", "\\end{pmatrix}\n", "$$\n", "\n", "然后求解方程\n", "\n", "$$\n", "\\tilde{A} \\vec{y} = \\begin{pmatrix}\n", "\\vec{b} \\\\\n", "0 \\\\\n", "\\end{pmatrix}\n", "$$\n", "\n", "很容易验证方程的解 $\\vec{y}$ 一定具有如下的形式\n", "\n", "$$\n", "\\vec{y} = \\begin{pmatrix}\n", "0 \\\\\n", "\\vec{x} \\\\\n", "\\end{pmatrix}\n", "$$\n", "\n", "其中 $A \\vec{x} = \\vec{b}$ 。\n", "\n", "对于 $\\vec{b}$,因为 HHL 是量子算法,所以需要输入的是量子态 $|b\\rangle = \\sum_{j=1}^N b_j |j\\rangle$ 。关于如何制备这样量子态,如何将经典信息编码到量子信息,不是本算法关心的重点,这里只假设制备好了这样的量子态。" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### 制备算子 $U = e^{i A \\Delta t}$\n", "\n", "如何高效的制备算子 $U = e^{i A \\Delta t}$ 是核心问题。后面将会看到,整个 HHL 算法的复杂度主要取决于算子 $U$ ,所以需要高效的模拟 $U$ 。\n", "\n", "制备这个时间演化算子 $U = e^{i A \\Delta t}$ 属于量子系统模拟(哈密顿量模拟)问题,本身是一个重要的量子问题,这里并不展开讨论。\n", "\n", "在原论文中,对矩阵 $A$ 作出了**稀疏性**的限制,其目的就是能够高效的模拟 $e^{i A \\Delta t}$。对于一般的稠密矩阵 $A$,模拟其演化复杂度可能很高。" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "这里不去展开证明 QPE 的正确性,读者只需要知道 QPE 的输入是一个酉算子 $U$ 和其特征向量 $|u\\rangle$,设 $U |u\\rangle = e^{2 \\pi i \\varphi} |u\\rangle$ ,输出是 $\\varphi$ 的估计 $\\tilde{\\varphi}$ 。\n", "\n", "具体来说,使用 $t$ 个辅助量子比特, QPE 的作用如下\n", "\n", "$$\\left| b \\right\\rangle \\left| 0 \\right\\rangle^{\\otimes t} \\left| 0 \\right\\rangle = \\sum_{j=1}^{N} \\beta_{j} \\left| u_{j} \\right\\rangle \\left| 0 \\right\\rangle^{\\otimes t} \\left| 0 \\right\\rangle\n", "\\xrightarrow{\\text{QPE}} \\sum_{j=1}^{N} \\beta_{j} \\left| u_{j} \\right\\rangle \\left| \\widetilde{\\varphi_j} \\right\\rangle \\left| 0 \\right\\rangle$$\n", "\n", "其中 $\\left| \\widetilde{\\varphi_j} \\right\\rangle$ 是相位 $\\varphi_{j}$ 的估计。\n", "这里在 $t$ 个辅助比特后面还增加了一个辅助比特,是用于后面的旋转步骤。\n", "\n", "为了更好的理解,这里举一个例子:\n", "取\n", "\n", "$$A = Z = \\left| 0 \\right\\rangle \\left\\langle 0 \\right| - \\left| 1 \\right\\rangle \\left\\langle 1 \\right|$$\n", "\n", "那么\n", "\n", "$$U = e^{i A \\Delta t } = e^{i \\Delta t} \\left| 0 \\right\\rangle \\left\\langle 0 \\right| + e^{-i \\Delta t} \\left| 1 \\right\\rangle \\left\\langle 1 \\right|$$\n", "\n", "两个相位分别是 $\\varphi_{1} = \\Delta t / 2 \\pi$ 和 $\\varphi_{2} = -\\Delta t / 2 \\pi$ 。\n", "\n", "如果我们使用 $t = 4$ 个辅助比特,并且取 $\\Delta t = \\pi / 4$,那么 $\\varphi_{1} = 1 / 8$ 和 $\\varphi_{2} = - 1 / 8$ 。\n", "\n", "两个相位的估计值分别是 $\\widetilde{\\varphi_1} = 0.0010 \\times 2^4 = 2$ 和 $\\widetilde{\\varphi_2} = 0.1110 \\times 2^4 = 14$ 。\n", "因为相位是 $[0, 1)$ 之间的小数 $0.q_{t_1}q_{t_2}\\ldots q_{t_t}$,\n", "乘上 $2^t$ 得到其对应的量子态 $|q_{t_1} \\ldots q_{t_t} \\rangle$ 。\n", "需要指出的是,因为相位是模 $1$ 的小数,$-0.0010$ 被映射到了 $0.1110$,我们想要还原相位(为了还原 $\\lambda$),首先通过选取足够小的 $\\Delta t$ 使得 $|\\varphi| < 1 / 2$,这样如果 $|q_{t_1} \\ldots q_{t_t}\\rangle < 2^{t-1}$ 对应正数,$|q_{t_1}\\ldots q_{t_t}\\rangle > 2^{t-1}$ 对应负数。\n", "\n", "通过简单的定量计算,我们得到如下的映射关系:\n", "\n", "$$\n", "\\frac{\\lambda \\Delta t}{2 \\pi} = \\varphi = \\begin{cases}\n", "\\tilde{\\varphi} / 2^{t} & , \\varphi > 0 & , \\tilde{\\varphi} < 2^{t-1} \\\\\n", "\\tilde{\\varphi} / 2^{t} - 1 & , \\varphi < 0 & , \\tilde{\\varphi} > 2^{t-1}\\\\\n", "\\end{cases}\n", "$$\n", "\n", "其中 $\\lambda$ 是 $A$ 的特征值,$\\varphi$ 是 $U = e^{i A \\Delta t}$ 的相位,$\\tilde{\\varphi}$ 是 $\\varphi$ 的估计。" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### 条件旋转\n", "\n", "经过 QPE 后,整个量子态如下\n", "\n", "$$\n", "\\sum_{j=1}^{N} \\beta_{j} \\left| u_{j} \\right\\rangle \\left| \\widetilde{\\varphi_j} \\right\\rangle \\left| 0 \\right\\rangle\n", "$$\n", "\n", "想要将 $\\lambda_j$ 的信息从量子态 $\\left| \\widetilde{\\varphi_j} \\right\\rangle$ 中提取出来,我们需要使用条件旋转门 $CR(k)$,其作用效果如下\n", "\n", "$$\n", "CR(k) \\left| \\tilde{\\varphi} \\right\\rangle \\left| b \\right\\rangle = \\begin{cases}\n", "\\left| \\tilde{\\varphi} \\right\\rangle \\left| b \\right\\rangle & , k \\neq \\tilde{\\varphi} \\\\\n", "\\left| \\tilde{\\varphi} \\right\\rangle R_y \\left( 2 \\arcsin \\frac{C}{\\lambda} \\right) \\left| b \\right\\rangle & , k = \\tilde{\\varphi} \\\\\n", "\\end{cases}\n", "$$\n", "\n", "简单来说,只有当 $k$ 选择了正确的 $\\tilde{\\varphi}$,才会对后面的量子比特作用旋转操作。\n", "\n", "因为我们不知道正确的 $\\tilde{\\varphi}$ 是什么,所以暴力的枚举所有的可能 $CR(k)$, $k = 1, \\ldots , 2^{t}-1$ 。\n", "\n", "旋转的效果是很简单的\n", "\n", "$$\n", "\\prod_{k=1}^{2^{t} - 1} I\\otimes CR(k) \\sum_{j=1}^{N} \\beta_{j} \\left| u_{j} \\right\\rangle \\left| \\widetilde{\\varphi_j} \\right\\rangle \\left| 0 \\right\\rangle\n", "= \\sum_{j=1}^{N} \\beta_{j} \\left| u_{j} \\right\\rangle \\left| \\widetilde{\\varphi_j} \\right\\rangle \\left( \\sqrt{1 - \\left( \\frac{C}{\\lambda_{j}} \\right)^{2}} \\left| 0 \\right\\rangle + \\frac{C}{\\lambda_{j}} \\left| 1 \\right\\rangle \\right)\n", "$$\n", "\n", "再作用一次逆 QPE,整体的量子态如下\n", "\n", "$$\n", "\\left| \\psi \\right\\rangle = \\sum_{j=1}^{N} \\beta_{j} \\left| u_{j} \\right\\rangle \\left| 0 \\right\\rangle^{\\otimes t} \\left( \\sqrt{1 - \\left( \\frac{C}{\\lambda_{j}} \\right)^{2}} \\left| 0 \\right\\rangle + \\frac{C}{\\lambda_{j}} \\left| 1 \\right\\rangle \\right)\n", "$$" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "### 测量\n", "\n", "对最后一个量子比特进行测量,当测量结果是 $\\left| 1 \\right\\rangle$ 时,其概率是\n", "\n", "$$\n", "p_1 = C^{2} \\sum_{j=1}^{N} ( \\beta_{j} / \\lambda_{j} )^{2}\n", "$$\n", "\n", "测量后的量子态变为\n", "\n", "$$\n", "\\left| \\psi_{1} \\right\\rangle = \\frac{1}{\\left( \\sum_{j=1}^{N} \\left( \\beta_{j} / \\lambda_{j} \\right)^{2} \\right)^{-1}} \\sum_{j=1}^{N} \\frac{\\beta_{j}}{\\lambda_{j}} \\left| u_{j} \\right\\rangle \\left| 0 \\right\\rangle^{\\otimes t} \\left| 1 \\right\\rangle\n", "$$\n", "\n", "显然此时三个量子寄存器之间不存在纠缠,如果只看第一个量子寄存器,它已经是 $|x\\rangle$ 的状态了(忽略掉一个归一化系数)。\n", "\n", "需要指出的是,旋转操作里面有一个参数 $C$,我们看到 $C$ 不会影响最后结果的正确性,但是却实实在在的影响了得到结果的概率 $p_{1}$ 。\n", "我们肯定希望 $C$ 能够尽可能大,从而使 $p_1$ 尽可能大。但是 $C \\leq \\left\\vert \\lambda_{j} \\right\\vert$ ,它要比所有特征值的绝对值还要小,如果没有先验信息,不知道绝对值最小的 $\\lambda$ 有多大,那么就只能保守的取一个很小的 $C$,然后可以通过振幅放大技术来增大得到结果的概率。" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## MindQuantum 实现\n", "\n", "这里使用 MindQuantum 实现一个简单的例子,仅说明 HHL 算法的过程和正确性。\n", "\n", "为了计算方便,我们选取一个简单的\n", "$A = Z = \\begin{bmatrix}\n", "1 & 0 \\\\\n", "0 & -1\n", "\\end{bmatrix}$,因为其时间演化算子 $e^{i Z \\Delta t} = R_z(- 2 \\Delta t)$ ,比较容易实现。" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "eigenvalues of A:\n", " [ 1. -1.]\n", "eigenvectors of A:\n", " [[1. 0.]\n", " [0. 1.]]\n", "b: [0.6 0.8]\n", "Solution of Ax=b is: [ 0.6 -0.8]\n" ] } ], "source": [ "import numpy as np\n", "\n", "A = np.array([[1, 0], [0, -1]])\n", "es, vs = np.linalg.eig(A)\n", "\n", "print(f\"eigenvalues of A:\\n {es}\")\n", "print(f\"eigenvectors of A:\\n {vs}\")\n", "\n", "b = np.array([0.6, 0.8])\n", "print(f\"b: {b}\")\n", "print(f\"Solution of Ax=b is: {np.linalg.solve(A, b)}\")" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "这里导入所需要的各种函数:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "from mindquantum.core.gates import H, X, RY, RZ, Measure, Power, BARRIER\n", "from mindquantum.core.circuit import Circuit\n", "from mindquantum.simulator import Simulator" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "对于量子态 $|b\\rangle = \\cos\\theta |0\\rangle + \\sin\\theta |1\\rangle$ 的制备,可以通过一个 $R_y(2 \\theta)$ 实现。\n", "\n", "下面的代码制备了 $|b\\rangle = 0.6 |0\\rangle + 0.8 |1\\rangle$ 并进行了测量。" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"401.2\" height=\"147.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><rect x=\"0\" y=\"0\" width=\"401.2\" height=\"147.0\" fill=\"#ffffff\" /><text x=\"10\" y=\"17.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" >Shots:\n", " 10000 </text><text x=\"10\" y=\"31.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" >Keys: q0 </text><line x1=\"31.2\" x2=\"391.2\" y1=\"62.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><line x1=\"31.2\" x2=\"31.2\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><text x=\"33.2\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >0.0 </text><line x1=\"31.2\" x2=\"31.2\" y1=\"62.0\" y2=\"137.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><line x1=\"91.2\" x2=\"91.2\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><text x=\"93.2\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >0.128 </text><line x1=\"91.2\" x2=\"91.2\" y1=\"62.0\" y2=\"137.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" /><line x1=\"151.2\" x2=\"151.2\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><text x=\"153.2\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >0.255 </text><line x1=\"151.2\" x2=\"151.2\" y1=\"62.0\" y2=\"137.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" /><line x1=\"211.2\" x2=\"211.2\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><text x=\"213.2\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >0.383 </text><line x1=\"211.2\" x2=\"211.2\" y1=\"62.0\" y2=\"137.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" /><line x1=\"271.2\" x2=\"271.2\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><text x=\"273.2\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >0.511 </text><line x1=\"271.2\" x2=\"271.2\" y1=\"62.0\" y2=\"137.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" /><line x1=\"331.2\" x2=\"331.2\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><text x=\"333.2\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >0.639 </text><line x1=\"331.2\" x2=\"331.2\" y1=\"62.0\" y2=\"137.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" /><text x=\"22.2\" y=\"85.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >0 </text><line x1=\"24.2\" x2=\"31.2\" y1=\"85.0\" y2=\"85.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><rect x=\"31.2\" y=\"73.0\" width=\"169.70408642555188\" height=\"24\" id=\"bar_0_1703864626452180004\" fill=\"#5e7ce0\" /><text x=\"210.90408642555187\" y=\"85.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_0_1703864626452210004\" fill-opacity=\"0\" >3613 </text><text x=\"22.2\" y=\"115.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >1 </text><line x1=\"24.2\" x2=\"31.2\" y1=\"115.0\" y2=\"115.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><rect x=\"31.2\" y=\"103.0\" width=\"299.99999999999994\" height=\"24\" id=\"bar_1_1703864626452228704\" fill=\"#16acff\" /><text x=\"341.19999999999993\" y=\"115.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_1_1703864626452241904\" fill-opacity=\"0\" >6387 </text><animate xlink:href=\"#bar_0_1703864626452180004\" attributeName=\"width\" from=\"0\" to=\"169.70408642555188\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 169.70408642555188\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" /><animate xlink:href=\"#bar_1_1703864626452228704\" attributeName=\"width\" from=\"0\" to=\"299.99999999999994\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 299.99999999999994\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" /><animate xlink:href=\"#bar_1_1703864626452228704\" attributeName=\"fill\" from=\"#16acff\" to=\"#fac209\" dur=\"0.15s\" calcMode=\"spline\" values=\"#16acff; #fac209\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" /><animate xlink:href=\"#bar_text_0_1703864626452210004\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" /><animate xlink:href=\"#bar_text_1_1703864626452241904\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" /><text x=\"203.1\" y=\"41.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"middle\" >probability </text></svg>" ], "text/plain": [ "<mindquantum.io.display.measure_res_svg_drawer.SVGMeasure at 0x7f14685cd0d0>" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "circ = Circuit()\n", "circ += RY(2 * np.arcsin(0.8)).on(0)\n", "circ += Measure().on(0)\n", "\n", "sim = Simulator(backend=\"mqvector\", n_qubits=1)\n", "res = sim.sampling(circ, shots=10000)\n", "res.svg()" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "下面一步步构建出完整的量子线路,取 $t = 4$,$\\Delta t = \\pi / 4$, $C = 0.5$。\n", "\n", "- 首先是 QPE\n", "- 然后是 $CR(k)$,$k = 1, \\ldots, 15$\n", "- 接着是 逆QPE\n", "- 最后测量" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"6016.8\" height=\"380.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><rect x=\"0\" y=\"0.0\" width=\"6016.8\" height=\"380.0\" fill=\"#ffffff\" /><text x=\"20.0\" y=\"40.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >q0: </text><text x=\"20.0\" y=\"100.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >q1: </text><text x=\"20.0\" y=\"160.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >q2: </text><text x=\"20.0\" y=\"220.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >q3: </text><text x=\"20.0\" y=\"280.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >q4: </text><text x=\"20.0\" y=\"340.0\" font-size=\"16px\" dominant-baseline=\"middle\" text-anchor=\"start\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#252b3a\" >q5: </text><line x1=\"48.8\" x2=\"5996.8\" y1=\"40.0\" y2=\"40.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><line x1=\"48.8\" x2=\"5996.8\" y1=\"100.0\" y2=\"100.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><line x1=\"48.8\" x2=\"5996.8\" y1=\"160.0\" y2=\"160.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><line x1=\"48.8\" x2=\"5996.8\" y1=\"220.0\" y2=\"220.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><line x1=\"48.8\" x2=\"5996.8\" y1=\"280.0\" y2=\"280.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><line x1=\"48.8\" x2=\"5996.8\" y1=\"340.0\" y2=\"340.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><rect x=\"72.8\" y=\"320.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"112.8\" y=\"336.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RY </text><text x=\"112.8\" y=\"352.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >1.8546 </text><rect x=\"72.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"92.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >H </text><rect x=\"72.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"92.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >H </text><rect x=\"72.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"92.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >H </text><rect x=\"72.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"92.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >H </text><circle cx=\"252.8\" cy=\"280.0\" r=\"4\" fill=\"#5e7ce0\" /><line x1=\"252.8\" x2=\"252.8\" y1=\"280.0\" y2=\"340.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" /><rect x=\"172.8\" y=\"320.0\" width=\"160.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"252.8\" y=\"340.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RZ(-π/2)^1 </text><circle cx=\"432.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" /><line x1=\"432.8\" x2=\"432.8\" y1=\"220.0\" y2=\"340.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" /><rect x=\"352.8\" y=\"320.0\" width=\"160.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"432.8\" y=\"340.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RZ(-π/2)^2 </text><circle cx=\"612.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" /><line x1=\"612.8\" x2=\"612.8\" y1=\"160.0\" y2=\"340.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" /><rect x=\"532.8\" y=\"320.0\" width=\"160.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"612.8\" y=\"340.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RZ(-π/2)^4 </text><circle cx=\"792.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" /><line x1=\"792.8\" x2=\"792.8\" y1=\"100.0\" y2=\"340.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" /><rect x=\"712.8\" y=\"320.0\" width=\"160.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"792.8\" y=\"340.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RZ(-π/2)^8 </text><line x1=\"912.8\" x2=\"912.8\" y1=\"140.0\" y2=\"240.0\" stroke-width=\"3\" stroke=\"#16acff\" /><rect x=\"892.8\" y=\"140.0\" width=\"40\" height=\"40\" rx=\"4\" ry=\"4\" fill=\"#16acff\" fill-opacity=\"1\" stroke=\"#ffffff\" stroke-width=\"0\" /><path d=\"M 903.1999999999999 156.31384387633062 L 908.0 148.0 L 912.8 156.31384387633062 L 909.4399999999999 156.31384387633062 L 909.4399999999999 172.0 L 906.56 172.0 L 906.56 156.31384387633062 Z\" fill=\"#ffffff\" /><path d=\"M 922.4 163.68615612366938 L 917.5999999999999 172.0 L 912.8 163.68615612366938 L 916.16 163.68615612366938 L 916.16 148.0 L 919.04 148.0 L 919.04 163.68615612366938 Z\" fill=\"#ffffff\" /><rect x=\"892.8\" y=\"200.0\" width=\"40\" height=\"40\" rx=\"4\" ry=\"4\" fill=\"#16acff\" fill-opacity=\"1\" stroke=\"#ffffff\" stroke-width=\"0\" /><path d=\"M 903.1999999999999 216.31384387633062 L 908.0 208.0 L 912.8 216.31384387633062 L 909.4399999999999 216.31384387633062 L 909.4399999999999 232.0 L 906.56 232.0 L 906.56 216.31384387633062 Z\" fill=\"#ffffff\" /><path d=\"M 922.4 223.68615612366938 L 917.5999999999999 232.0 L 912.8 223.68615612366938 L 916.16 223.68615612366938 L 916.16 208.0 L 919.04 208.0 L 919.04 223.68615612366938 Z\" fill=\"#ffffff\" /><line x1=\"972.8\" x2=\"972.8\" y1=\"80.0\" y2=\"300.0\" stroke-width=\"3\" stroke=\"#16acff\" /><rect x=\"952.8\" y=\"80.0\" width=\"40\" height=\"40\" rx=\"4\" ry=\"4\" fill=\"#16acff\" fill-opacity=\"1\" stroke=\"#ffffff\" stroke-width=\"0\" /><path d=\"M 963.1999999999999 96.31384387633061 L 968.0 88.0 L 972.8 96.31384387633061 L 969.4399999999999 96.31384387633061 L 969.4399999999999 112.0 L 966.56 112.0 L 966.56 96.31384387633061 Z\" fill=\"#ffffff\" /><path d=\"M 982.4 103.68615612366939 L 977.5999999999999 112.0 L 972.8 103.68615612366939 L 976.16 103.68615612366939 L 976.16 88.0 L 979.04 88.0 L 979.04 103.68615612366939 Z\" fill=\"#ffffff\" /><rect x=\"952.8\" y=\"260.0\" width=\"40\" height=\"40\" rx=\"4\" ry=\"4\" fill=\"#16acff\" fill-opacity=\"1\" stroke=\"#ffffff\" stroke-width=\"0\" /><path d=\"M 963.1999999999999 276.3138438763306 L 968.0 268.0 L 972.8 276.3138438763306 L 969.4399999999999 276.3138438763306 L 969.4399999999999 292.0 L 966.56 292.0 L 966.56 276.3138438763306 Z\" fill=\"#ffffff\" /><path d=\"M 982.4 283.6861561236694 L 977.5999999999999 292.0 L 972.8 283.6861561236694 L 976.16 283.6861561236694 L 976.16 268.0 L 979.04 268.0 L 979.04 283.6861561236694 Z\" fill=\"#ffffff\" /><rect x=\"1012.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"1032.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >H </text><circle cx=\"1092.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"1092.8\" x2=\"1092.8\" y1=\"220.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"1072.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"1092.8\" y=\"216.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >PS </text><text x=\"1092.8\" y=\"232.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >-π/2 </text><rect x=\"1132.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"1152.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >H </text><circle cx=\"1212.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"1212.8\" x2=\"1212.8\" y1=\"160.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"1192.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"1212.8\" y=\"156.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >PS </text><text x=\"1212.8\" y=\"172.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >-π/4 </text><circle cx=\"1272.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"1272.8\" x2=\"1272.8\" y1=\"160.0\" y2=\"220.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"1252.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"1272.8\" y=\"156.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >PS </text><text x=\"1272.8\" y=\"172.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >-π/2 </text><rect x=\"1312.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"1332.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >H </text><circle cx=\"1392.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"1392.8\" x2=\"1392.8\" y1=\"100.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"1372.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"1392.8\" y=\"96.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >PS </text><text x=\"1392.8\" y=\"112.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >-π/8 </text><circle cx=\"1452.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"1452.8\" x2=\"1452.8\" y1=\"100.0\" y2=\"220.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"1432.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"1452.8\" y=\"96.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >PS </text><text x=\"1452.8\" y=\"112.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >-π/4 </text><circle cx=\"1512.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"1512.8\" x2=\"1512.8\" y1=\"100.0\" y2=\"160.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"1492.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"1512.8\" y=\"96.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >PS </text><text x=\"1512.8\" y=\"112.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >-π/2 </text><rect x=\"1552.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"1572.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >H </text><rect x=\"1612.8\" y=\"20.0\" width=\"0\" height=\"340\" fill=\"gray\" fill-opacity=\"0.8\" /><rect x=\"1612.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"1632.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"1612.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"1632.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"1612.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"1632.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><circle cx=\"1692.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"1692.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"1692.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"1692.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"1692.8\" x2=\"1692.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"1672.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"1692.8\" y=\"36.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RY </text><text x=\"1692.8\" y=\"52.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >π </text><rect x=\"1732.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"1752.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"1732.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"1752.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"1732.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"1752.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"1792.8\" y=\"20.0\" width=\"0\" height=\"340\" fill=\"gray\" fill-opacity=\"0.8\" /><rect x=\"1792.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"1812.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"1792.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"1812.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"1792.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"1812.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><circle cx=\"1892.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"1892.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"1892.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"1892.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"1892.8\" x2=\"1892.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"1852.8\" y=\"20.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"1892.8\" y=\"36.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RY </text><text x=\"1892.8\" y=\"52.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >1.0472 </text><rect x=\"1952.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"1972.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"1952.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"1972.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"1952.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"1972.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"2012.8\" y=\"20.0\" width=\"0\" height=\"340\" fill=\"gray\" fill-opacity=\"0.8\" /><rect x=\"2012.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2032.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"2012.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2032.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><circle cx=\"2112.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"2112.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"2112.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"2112.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"2112.8\" x2=\"2112.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"2072.8\" y=\"20.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"2112.8\" y=\"36.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RY </text><text x=\"2112.8\" y=\"52.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >0.6797 </text><rect x=\"2172.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2192.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"2172.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2192.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"2232.8\" y=\"20.0\" width=\"0\" height=\"340\" fill=\"gray\" fill-opacity=\"0.8\" /><rect x=\"2232.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2252.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"2232.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2252.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"2232.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2252.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><circle cx=\"2332.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"2332.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"2332.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"2332.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"2332.8\" x2=\"2332.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"2292.8\" y=\"20.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"2332.8\" y=\"36.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RY </text><text x=\"2332.8\" y=\"52.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >0.5054 </text><rect x=\"2392.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2412.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"2392.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2412.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"2392.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2412.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"2452.8\" y=\"20.0\" width=\"0\" height=\"340\" fill=\"gray\" fill-opacity=\"0.8\" /><rect x=\"2452.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2472.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"2452.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2472.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><circle cx=\"2552.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"2552.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"2552.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"2552.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"2552.8\" x2=\"2552.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"2512.8\" y=\"20.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"2552.8\" y=\"36.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RY </text><text x=\"2552.8\" y=\"52.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >0.4027 </text><rect x=\"2612.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2632.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"2612.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2632.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"2672.8\" y=\"20.0\" width=\"0\" height=\"340\" fill=\"gray\" fill-opacity=\"0.8\" /><rect x=\"2672.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2692.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"2672.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2692.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><circle cx=\"2772.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"2772.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"2772.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"2772.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"2772.8\" x2=\"2772.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"2732.8\" y=\"20.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"2772.8\" y=\"36.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RY </text><text x=\"2772.8\" y=\"52.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >0.3349 </text><rect x=\"2832.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2852.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"2832.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2852.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"2892.8\" y=\"20.0\" width=\"0\" height=\"340\" fill=\"gray\" fill-opacity=\"0.8\" /><rect x=\"2892.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"2912.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><circle cx=\"2992.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"2992.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"2992.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"2992.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"2992.8\" x2=\"2992.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"2952.8\" y=\"20.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"2992.8\" y=\"36.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RY </text><text x=\"2992.8\" y=\"52.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >0.2867 </text><rect x=\"3052.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3072.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"3112.8\" y=\"20.0\" width=\"0\" height=\"340\" fill=\"gray\" fill-opacity=\"0.8\" /><rect x=\"3112.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3132.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"3112.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3132.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"3112.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3132.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><circle cx=\"3212.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"3212.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"3212.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"3212.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"3212.8\" x2=\"3212.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"3172.8\" y=\"20.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"3212.8\" y=\"36.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RY </text><text x=\"3212.8\" y=\"52.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >0.2507 </text><rect x=\"3272.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3292.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"3272.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3292.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"3272.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3292.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"3332.8\" y=\"20.0\" width=\"0\" height=\"340\" fill=\"gray\" fill-opacity=\"0.8\" /><rect x=\"3332.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3352.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"3332.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3352.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><circle cx=\"3432.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"3432.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"3432.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"3432.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"3432.8\" x2=\"3432.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"3392.8\" y=\"20.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"3432.8\" y=\"36.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RY </text><text x=\"3432.8\" y=\"52.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >-0.2867 </text><rect x=\"3492.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3512.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"3492.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3512.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"3552.8\" y=\"20.0\" width=\"0\" height=\"340\" fill=\"gray\" fill-opacity=\"0.8\" /><rect x=\"3552.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3572.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"3552.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3572.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><circle cx=\"3652.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"3652.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"3652.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"3652.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"3652.8\" x2=\"3652.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"3612.8\" y=\"20.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"3652.8\" y=\"36.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RY </text><text x=\"3652.8\" y=\"52.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >-0.3349 </text><rect x=\"3712.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3732.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"3712.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3732.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"3772.8\" y=\"20.0\" width=\"0\" height=\"340\" fill=\"gray\" fill-opacity=\"0.8\" /><rect x=\"3772.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3792.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><circle cx=\"3872.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"3872.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"3872.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"3872.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"3872.8\" x2=\"3872.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"3832.8\" y=\"20.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"3872.8\" y=\"36.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RY </text><text x=\"3872.8\" y=\"52.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >-0.4027 </text><rect x=\"3932.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"3952.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"3992.8\" y=\"20.0\" width=\"0\" height=\"340\" fill=\"gray\" fill-opacity=\"0.8\" /><rect x=\"3992.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"4012.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"3992.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"4012.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><circle cx=\"4092.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"4092.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"4092.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"4092.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"4092.8\" x2=\"4092.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"4052.8\" y=\"20.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"4092.8\" y=\"36.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RY </text><text x=\"4092.8\" y=\"52.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >-0.5054 </text><rect x=\"4152.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"4172.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"4152.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"4172.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"4212.8\" y=\"20.0\" width=\"0\" height=\"340\" fill=\"gray\" fill-opacity=\"0.8\" /><rect x=\"4212.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"4232.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><circle cx=\"4312.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"4312.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"4312.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"4312.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"4312.8\" x2=\"4312.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"4272.8\" y=\"20.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"4312.8\" y=\"36.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RY </text><text x=\"4312.8\" y=\"52.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >-0.6797 </text><rect x=\"4372.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"4392.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"4432.8\" y=\"20.0\" width=\"0\" height=\"340\" fill=\"gray\" fill-opacity=\"0.8\" /><rect x=\"4432.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"4452.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><circle cx=\"4532.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"4532.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"4532.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"4532.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"4532.8\" x2=\"4532.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"4492.8\" y=\"20.0\" width=\"80.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"4532.8\" y=\"36.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RY </text><text x=\"4532.8\" y=\"52.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >-1.0472 </text><rect x=\"4592.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"4612.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >X </text><rect x=\"4652.8\" y=\"20.0\" width=\"0\" height=\"340\" fill=\"gray\" fill-opacity=\"0.8\" /><circle cx=\"4672.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"4672.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"4672.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><circle cx=\"4672.8\" cy=\"100.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"4672.8\" x2=\"4672.8\" y1=\"40.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"4652.8\" y=\"20.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"4672.8\" y=\"36.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RY </text><text x=\"4672.8\" y=\"52.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >-π </text><rect x=\"4712.8\" y=\"20.0\" width=\"0\" height=\"340\" fill=\"gray\" fill-opacity=\"0.8\" /><rect x=\"4712.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"4732.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >H </text><circle cx=\"4792.8\" cy=\"160.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"4792.8\" x2=\"4792.8\" y1=\"100.0\" y2=\"160.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"4772.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"4792.8\" y=\"96.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >PS </text><text x=\"4792.8\" y=\"112.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >π/2 </text><circle cx=\"4852.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"4852.8\" x2=\"4852.8\" y1=\"100.0\" y2=\"220.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"4832.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"4852.8\" y=\"96.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >PS </text><text x=\"4852.8\" y=\"112.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >π/4 </text><circle cx=\"4912.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"4912.8\" x2=\"4912.8\" y1=\"100.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"4892.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"4912.8\" y=\"96.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >PS </text><text x=\"4912.8\" y=\"112.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >π/8 </text><rect x=\"4952.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"4972.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >H </text><circle cx=\"5032.8\" cy=\"220.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"5032.8\" x2=\"5032.8\" y1=\"160.0\" y2=\"220.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"5012.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"5032.8\" y=\"156.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >PS </text><text x=\"5032.8\" y=\"172.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >π/2 </text><circle cx=\"5092.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"5092.8\" x2=\"5092.8\" y1=\"160.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"5072.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"5092.8\" y=\"156.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >PS </text><text x=\"5092.8\" y=\"172.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >π/4 </text><rect x=\"5132.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"5152.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >H </text><circle cx=\"5212.8\" cy=\"280.0\" r=\"4\" fill=\"#fac209\" /><line x1=\"5212.8\" x2=\"5212.8\" y1=\"220.0\" y2=\"280.0\" stroke=\"#fac209\" stroke-width=\"3\" /><rect x=\"5192.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#fac209\" fill-opacity=\"1\" /><text x=\"5212.8\" y=\"216.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >PS </text><text x=\"5212.8\" y=\"232.0\" font-size=\"14.0px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >π/2 </text><rect x=\"5252.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"5272.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >H </text><line x1=\"5332.8\" x2=\"5332.8\" y1=\"80.0\" y2=\"300.0\" stroke-width=\"3\" stroke=\"#16acff\" /><rect x=\"5312.8\" y=\"80.0\" width=\"40\" height=\"40\" rx=\"4\" ry=\"4\" fill=\"#16acff\" fill-opacity=\"1\" stroke=\"#ffffff\" stroke-width=\"0\" /><path d=\"M 5323.2 96.31384387633061 L 5328.0 88.0 L 5332.8 96.31384387633061 L 5329.4400000000005 96.31384387633061 L 5329.4400000000005 112.0 L 5326.56 112.0 L 5326.56 96.31384387633061 Z\" fill=\"#ffffff\" /><path d=\"M 5342.400000000001 103.68615612366939 L 5337.6 112.0 L 5332.8 103.68615612366939 L 5336.16 103.68615612366939 L 5336.16 88.0 L 5339.04 88.0 L 5339.04 103.68615612366939 Z\" fill=\"#ffffff\" /><rect x=\"5312.8\" y=\"260.0\" width=\"40\" height=\"40\" rx=\"4\" ry=\"4\" fill=\"#16acff\" fill-opacity=\"1\" stroke=\"#ffffff\" stroke-width=\"0\" /><path d=\"M 5323.2 276.3138438763306 L 5328.0 268.0 L 5332.8 276.3138438763306 L 5329.4400000000005 276.3138438763306 L 5329.4400000000005 292.0 L 5326.56 292.0 L 5326.56 276.3138438763306 Z\" fill=\"#ffffff\" /><path d=\"M 5342.400000000001 283.6861561236694 L 5337.6 292.0 L 5332.8 283.6861561236694 L 5336.16 283.6861561236694 L 5336.16 268.0 L 5339.04 268.0 L 5339.04 283.6861561236694 Z\" fill=\"#ffffff\" /><line x1=\"5392.8\" x2=\"5392.8\" y1=\"140.0\" y2=\"240.0\" stroke-width=\"3\" stroke=\"#16acff\" /><rect x=\"5372.8\" y=\"140.0\" width=\"40\" height=\"40\" rx=\"4\" ry=\"4\" fill=\"#16acff\" fill-opacity=\"1\" stroke=\"#ffffff\" stroke-width=\"0\" /><path d=\"M 5383.2 156.31384387633062 L 5388.0 148.0 L 5392.8 156.31384387633062 L 5389.4400000000005 156.31384387633062 L 5389.4400000000005 172.0 L 5386.56 172.0 L 5386.56 156.31384387633062 Z\" fill=\"#ffffff\" /><path d=\"M 5402.400000000001 163.68615612366938 L 5397.6 172.0 L 5392.8 163.68615612366938 L 5396.16 163.68615612366938 L 5396.16 148.0 L 5399.04 148.0 L 5399.04 163.68615612366938 Z\" fill=\"#ffffff\" /><rect x=\"5372.8\" y=\"200.0\" width=\"40\" height=\"40\" rx=\"4\" ry=\"4\" fill=\"#16acff\" fill-opacity=\"1\" stroke=\"#ffffff\" stroke-width=\"0\" /><path d=\"M 5383.2 216.31384387633062 L 5388.0 208.0 L 5392.8 216.31384387633062 L 5389.4400000000005 216.31384387633062 L 5389.4400000000005 232.0 L 5386.56 232.0 L 5386.56 216.31384387633062 Z\" fill=\"#ffffff\" /><path d=\"M 5402.400000000001 223.68615612366938 L 5397.6 232.0 L 5392.8 223.68615612366938 L 5396.16 223.68615612366938 L 5396.16 208.0 L 5399.04 208.0 L 5399.04 223.68615612366938 Z\" fill=\"#ffffff\" /><circle cx=\"5432.8\" cy=\"280.0\" r=\"4\" fill=\"#5e7ce0\" /><line x1=\"5432.8\" x2=\"5432.8\" y1=\"280.0\" y2=\"340.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" /><rect x=\"5372.8\" y=\"320.0\" width=\"120.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"5432.8\" y=\"340.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RZ(π/2)^1 </text><circle cx=\"5572.8\" cy=\"220.0\" r=\"4\" fill=\"#5e7ce0\" /><line x1=\"5572.8\" x2=\"5572.8\" y1=\"220.0\" y2=\"340.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" /><rect x=\"5512.8\" y=\"320.0\" width=\"120.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"5572.8\" y=\"340.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RZ(π/2)^2 </text><circle cx=\"5712.8\" cy=\"160.0\" r=\"4\" fill=\"#5e7ce0\" /><line x1=\"5712.8\" x2=\"5712.8\" y1=\"160.0\" y2=\"340.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" /><rect x=\"5652.8\" y=\"320.0\" width=\"120.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"5712.8\" y=\"340.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RZ(π/2)^4 </text><circle cx=\"5852.8\" cy=\"100.0\" r=\"4\" fill=\"#5e7ce0\" /><line x1=\"5852.8\" x2=\"5852.8\" y1=\"100.0\" y2=\"340.0\" stroke=\"#5e7ce0\" stroke-width=\"3\" /><rect x=\"5792.8\" y=\"320.0\" width=\"120.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"5852.8\" y=\"340.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >RZ(π/2)^8 </text><rect x=\"5932.8\" y=\"260.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"5952.8\" y=\"280.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >H </text><rect x=\"5932.8\" y=\"200.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"5952.8\" y=\"220.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >H </text><rect x=\"5932.8\" y=\"140.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"5952.8\" y=\"160.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >H </text><rect x=\"5932.8\" y=\"80.0\" width=\"40.0\" height=\"40\" rx=\"4\" ry=\"4\" stroke=\"#ffffff\" stroke-width=\"0\" fill=\"#5e7ce0\" fill-opacity=\"1\" /><text x=\"5952.8\" y=\"100.0\" font-size=\"20px\" dominant-baseline=\"middle\" text-anchor=\"middle\" font-family=\"Arial\" font-weight=\"normal\" fill=\"#ffffff\" >H </text></svg>" ], "text/plain": [ "<mindquantum.io.display.circuit_svg_drawer.SVGCircuit at 0x7f13de288fd0>" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from mindquantum.algorithm.library import qft\n", "\n", "# q1 ~ q4 : for QPE\n", "t = 4\n", "qc = [4, 3, 2, 1]\n", "\n", "# store |b> , and store the result |x>\n", "qb = 5\n", "\n", "# use for conditional rotation\n", "qs = 0\n", "\n", "# choose a time evolution\n", "dt = np.pi / 4\n", "\n", "# choose a small C\n", "C = 0.5\n", "\n", "circ = Circuit()\n", "\n", "# prepare b\n", "circ += RY(2 * np.arcsin(0.8)).on(qb)\n", "\n", "# QPE\n", "for i in qc:\n", " circ += H.on(i)\n", "\n", "for (i, q) in enumerate(qc):\n", " circ += Power(RZ(-2 * dt), 2**i).on(qb, q)\n", "\n", "# apply inverse QFT\n", "circ += qft(list(reversed(qc))).hermitian()\n", "\n", "# conditional rotate\n", "circ += BARRIER\n", "for k in range(1, 2**t):\n", " for i in range(t):\n", " if (k & (1 << i)) == 0:\n", " circ += X.on(qc[i])\n", " phi = k / (2**t)\n", " if k > 2**(t-1):\n", " phi -= 1.0\n", " l = 2 * np.pi / dt * phi\n", " circ += RY(2 * np.arcsin(C / l)).on(qs, qc)\n", "\n", " for i in range(t):\n", " if (k & (1 << i)) == 0:\n", " circ += X.on(qc[i])\n", " circ += BARRIER\n", "\n", "# apply inverse QPE\n", "circ += qft(list(reversed(qc)))\n", "\n", "for (i, q) in enumerate(qc):\n", " circ += Power(RZ(2 * dt), 2**i).on(qb, q)\n", "\n", "for i in qc:\n", " circ += H.on(i)\n", "\n", "circ.svg()" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "如何验证我们的结果的正确性?测量。因为结果是量子态 $|x\\rangle$,目前 MindQuantum 没有相关的办法能够单独取出某一个量子比特的内部值,我们只能通过测量。" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "image/svg+xml": [ "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"408.4\" height=\"207.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><rect x=\"0\" y=\"0\" width=\"408.4\" height=\"207.0\" fill=\"#ffffff\" /><text x=\"10\" y=\"17.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" >Shots:\n", " 100000 </text><text x=\"10\" y=\"31.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" >Keys: q5 q0 </text><line x1=\"38.4\" x2=\"398.4\" y1=\"62.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><line x1=\"38.4\" x2=\"38.4\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><text x=\"40.4\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >0.0 </text><line x1=\"38.4\" x2=\"38.4\" y1=\"62.0\" y2=\"197.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><line x1=\"98.4\" x2=\"98.4\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><text x=\"100.4\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >0.096 </text><line x1=\"98.4\" x2=\"98.4\" y1=\"62.0\" y2=\"197.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" /><line x1=\"158.4\" x2=\"158.4\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><text x=\"160.4\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >0.192 </text><line x1=\"158.4\" x2=\"158.4\" y1=\"62.0\" y2=\"197.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" /><line x1=\"218.4\" x2=\"218.4\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><text x=\"220.4\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >0.288 </text><line x1=\"218.4\" x2=\"218.4\" y1=\"62.0\" y2=\"197.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" /><line x1=\"278.4\" x2=\"278.4\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><text x=\"280.4\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >0.385 </text><line x1=\"278.4\" x2=\"278.4\" y1=\"62.0\" y2=\"197.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" /><line x1=\"338.4\" x2=\"338.4\" y1=\"55.0\" y2=\"62.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><text x=\"340.4\" y=\"60.0\" font-size=\"12px\" dominant-baseline=\"bottom\" text-anchor=\"start\" fill=\"#575d6c\" >0.481 </text><line x1=\"338.4\" x2=\"338.4\" y1=\"62.0\" y2=\"197.0\" stroke=\"#dfe1e6\" stroke-width=\"1\" /><text x=\"29.4\" y=\"85.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >00 </text><line x1=\"31.4\" x2=\"38.4\" y1=\"85.0\" y2=\"85.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><rect x=\"38.4\" y=\"73.0\" width=\"167.20758956434904\" height=\"24\" id=\"bar_0_1703864632974821913\" fill=\"#5e7ce0\" /><text x=\"215.60758956434904\" y=\"85.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_0_1703864632974840113\" fill-opacity=\"0\" >26790 </text><text x=\"29.4\" y=\"115.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >01 </text><line x1=\"31.4\" x2=\"38.4\" y1=\"115.0\" y2=\"115.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><rect x=\"38.4\" y=\"103.0\" width=\"56.52852328048933\" height=\"24\" id=\"bar_1_1703864632974855213\" fill=\"#16acff\" /><text x=\"104.92852328048934\" y=\"115.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_1_1703864632974865013\" fill-opacity=\"0\" >9057 </text><text x=\"29.4\" y=\"145.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >10 </text><line x1=\"31.4\" x2=\"38.4\" y1=\"145.0\" y2=\"145.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><rect x=\"38.4\" y=\"133.0\" width=\"300.00000000000006\" height=\"24\" id=\"bar_2_1703864632974877713\" fill=\"#5e7ce0\" /><text x=\"348.40000000000003\" y=\"145.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_2_1703864632974890313\" fill-opacity=\"0\" >48066 </text><text x=\"29.4\" y=\"175.0\" font-size=\"12px\" dominant-baseline=\"middle\" text-anchor=\"end\" fill=\"#575d6c\" >11 </text><line x1=\"31.4\" x2=\"38.4\" y1=\"175.0\" y2=\"175.0\" stroke=\"#adb0b8\" stroke-width=\"1\" /><rect x=\"38.4\" y=\"163.0\" width=\"100.40569217326177\" height=\"24\" id=\"bar_3_1703864632974903613\" fill=\"#16acff\" /><text x=\"148.80569217326178\" y=\"175.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"start\" fill=\"#575d6c\" id=\"bar_text_3_1703864632974911913\" fill-opacity=\"0\" >16087 </text><animate xlink:href=\"#bar_0_1703864632974821913\" attributeName=\"width\" from=\"0\" to=\"167.20758956434904\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 167.20758956434904\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" /><animate xlink:href=\"#bar_1_1703864632974855213\" attributeName=\"width\" from=\"0\" to=\"56.52852328048933\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 56.52852328048933\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" /><animate xlink:href=\"#bar_2_1703864632974877713\" attributeName=\"width\" from=\"0\" to=\"300.00000000000006\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 300.00000000000006\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" /><animate xlink:href=\"#bar_3_1703864632974903613\" attributeName=\"width\" from=\"0\" to=\"100.40569217326177\" dur=\"0.3s\" calcMode=\"spline\" values=\"0; 100.40569217326177\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" /><animate xlink:href=\"#bar_2_1703864632974877713\" attributeName=\"fill\" from=\"#5e7ce0\" to=\"#fac209\" dur=\"0.15s\" calcMode=\"spline\" values=\"#5e7ce0; #fac209\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" /><animate xlink:href=\"#bar_text_0_1703864632974840113\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" /><animate xlink:href=\"#bar_text_1_1703864632974865013\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" /><animate xlink:href=\"#bar_text_2_1703864632974890313\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" /><animate xlink:href=\"#bar_text_3_1703864632974911913\" attributeName=\"fill-opacity\" from=\"0\" to=\"1\" dur=\"0.15s\" calcMode=\"spline\" values=\"0; 1\" keyTimes=\"0; 1\" keySplines=\"0.42 0 1 0.8;\" fill=\"freeze\" begin=\"0.3s\" /><text x=\"206.7\" y=\"41.0\" font-size=\"14px\" dominant-baseline=\"middle\" text-anchor=\"middle\" >probability </text></svg>" ], "text/plain": [ "<mindquantum.io.display.measure_res_svg_drawer.SVGMeasure at 0x7f13de2c7490>" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sim = Simulator(backend=\"mqvector\", n_qubits=2 + t)\n", "sim.apply_circuit(circ)\n", "\n", "circ_m = Circuit()\n", "circ_m += Measure().on(qs)\n", "circ_m += Measure().on(qb)\n", "\n", "res = sim.sampling(circ_m, shots=100000)\n", "res.svg()" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.3602052179446389" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "res.data.get(\"01\", 0) / (res.data.get(\"01\", 0) + res.data.get(\"11\", 0))" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "通过统计当 `q0` 是 1 时,`q5` 的测量结果,我们看到 `q5 = 0` 的占比是 `0.36`,和答案的预期一致。\n", "\n", "当然这种方法只能得到振幅大小,想要得到更多信息,例如相位,需要对测量进行调整,这里不去讨论。" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "<table border=\"1\">\n", " <tr>\n", " <th>Software</th>\n", " <th>Version</th>\n", " </tr>\n", "<tr><td>mindquantum</td><td>0.9.11</td></tr>\n", "<tr><td>scipy</td><td>1.10.1</td></tr>\n", "<tr><td>numpy</td><td>1.23.5</td></tr>\n", "<tr>\n", " <th>System</th>\n", " <th>Info</th>\n", "</tr>\n", "<tr><td>Python</td><td>3.9.16</td></tr><tr><td>OS</td><td>Linux x86_64</td></tr><tr><td>Memory</td><td>8.3 GB</td></tr><tr><td>CPU Max Thread</td><td>8</td></tr><tr><td>Date</td><td>Fri Dec 29 23:43:57 2023</td></tr>\n", "</table>\n" ], "text/plain": [ "<mindquantum.utils.show_info.InfoTable at 0x7f13de238af0>" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from mindquantum.utils.show_info import InfoTable\n", "\n", "InfoTable('mindquantum', 'scipy', 'numpy')" ] } ], "metadata": { "kernelspec": { "display_name": "base", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.16" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }