|
| 1 | +{ |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "markdown", |
| 5 | + "metadata": {}, |
| 6 | + "source": [ |
| 7 | + "# Simulated Annealing and Quantum Annealing" |
| 8 | + ] |
| 9 | + }, |
| 10 | + { |
| 11 | + "cell_type": "markdown", |
| 12 | + "metadata": {}, |
| 13 | + "source": [ |
| 14 | + "## Annealing\n", |
| 15 | + "Annealing refers to heating an imperfect crystal to restore its perfect (or near-perfect) configuration. The dislocated atoms migrate due to thermal energy and become stable at the minimum energy configuration. For example, a crystal suffering from a Frenkel defect (accumulation of interstitials) due to Wigner effect (displacement of atoms from lattice sites due to neurtons) is treated by annealing to restore its structure." |
| 16 | + ] |
| 17 | + }, |
| 18 | + { |
| 19 | + "cell_type": "markdown", |
| 20 | + "metadata": {}, |
| 21 | + "source": [ |
| 22 | + "## Simulated Annealing\n", |
| 23 | + "\n", |
| 24 | + "Simulated annealing is a probabilistic approach to optimize a given function. If we are interested in the most stable configuration of a physical system, then simulated annealing can be used to obtain the state with a minimum energy.\n", |
| 25 | + "A system in a certain state is associated with a certain probability to evolve into a new state, generating a new configuration. \n", |
| 26 | + "\n", |
| 27 | + "The state of a configuration is changed by a small amount. Then the cost function for the new configuration is found. If the newer configuration has a lower energy than the previous state, then the new configuration is accepted as the updated configuration. If the newer configuration has a higher energy, it is accepted with a probability of $exp \\ \\big({-\\frac{\\Delta E}{T}}\\big)$; where $\\Delta E$ is the difference in energy of the configuration and $T$ is the temperature of the system.The \"uphill move\" (move from a lower energy to a higher energy) is accepted because, there may be a lower energy state on the other side of the hill (local minima vs global minimum). Initially, $T$ is kept very high so that the transition probability is 1. Therefore, in the initial stages of simulated annealing, the system configuration changes frequently searching for \"better\" states. The temperature is gradually lowered to zero and ultimately the system will be in ground state." |
| 28 | + ] |
| 29 | + }, |
| 30 | + { |
| 31 | + "attachments": {}, |
| 32 | + "cell_type": "markdown", |
| 33 | + "metadata": {}, |
| 34 | + "source": [ |
| 35 | + "\n", |
| 36 | + "Variation of energy of a system during simulated annealing." |
| 37 | + ] |
| 38 | + }, |
| 39 | + { |
| 40 | + "cell_type": "markdown", |
| 41 | + "metadata": { |
| 42 | + "slideshow": { |
| 43 | + "slide_type": "slide" |
| 44 | + } |
| 45 | + }, |
| 46 | + "source": [ |
| 47 | + "## Quantum Annealing\n", |
| 48 | + "\n", |
| 49 | + "It is a quantum analogue of simulated annealing. The thermal hopping is replaced with tunneling effect. Initially a system is allowed to evolve uniformly, searching for the best configuration. Here, uniormly refers to uniform in quantum sense, i.e., we accept a linear combination of all states. This is a state of large quantum mechanical fluctuations, from which the system gradually proceeds towards the state with zero fluctutation. This means that the probability of the lowest energy state being occupied is maximized." |
| 50 | + ] |
| 51 | + }, |
| 52 | + { |
| 53 | + "cell_type": "markdown", |
| 54 | + "metadata": {}, |
| 55 | + "source": [ |
| 56 | + "### How is quantum annealing different from the gate model quantum computing?\n", |
| 57 | + "\n", |
| 58 | + "The common quantum computing method is the gate model, in which we apply quantum gates to the bits to change their states over time. \n", |
| 59 | + "\n", |
| 60 | + "In gate model quantum computing, we want to be able to control and manipulate the evolution of the quantum states. If this control can be achieved, larger problems can be solved.\n", |
| 61 | + "\n", |
| 62 | + "In quantum annealing, we try to utilize the natural evolution of quantum states by setting up the problem and letting quantum effects take over. Then a final configuration is obtained (depending on the set up).\n", |
| 63 | + "\n", |
| 64 | + "Technically, it is very difficult to get qubits to work together coherently in gate model quantum computing. However, there are very powerful algorithms (example: Shor's algorithm, Grover's algorithm) that have been developed to deal with this. " |
| 65 | + ] |
| 66 | + }, |
| 67 | + { |
| 68 | + "cell_type": "markdown", |
| 69 | + "metadata": {}, |
| 70 | + "source": [ |
| 71 | + "### How does the quantum annealing process work?\n", |
| 72 | + "\n", |
| 73 | + "A qubit can be in a state of $|0\\rangle$ or $|1\\rangle$. These states are encoded in a circulating current and the corresponding magnetic field. Since the qubits are quantum objects, they exist in a superposition of the two states. In the quantum annealing process, each qubit goes from the superposition state to either $|0\\rangle$ or $|1\\rangle$ state. In terms of energy, the energy diagram of the quantum state has a single minima. Once the quantum annealing process takes over, the \n", |
| 74 | + "energy curve is altered, giving rise to two minima (double well).\n", |
| 75 | + "\n", |
| 76 | + "<table>\n", |
| 77 | + " <tr>\n", |
| 78 | + " <td> <img src=\"figures/Magnetic_field_before.png\" alt=\"Individual qubits\" style=\"width: 500px;\"/> </td> \n", |
| 79 | + " <td> <img src=\"\" alt=\"\" style=\"width: 100px;\"/> </td> \n", |
| 80 | + " <td> <img src=\"Magnetic_field_after.png\" alt=\"Superposed qubits\" style=\"width: 250px;\"/> </td>\n", |
| 81 | + " </tr>\n", |
| 82 | + "</table>\n", |
| 83 | + "\n", |
| 84 | + "<table>\n", |
| 85 | + " <tr>\n", |
| 86 | + " <td> <img src=\"figures/quantum_annealing_energy_diagram.png\" alt=\"Energy diagram\" style=\"width: 800px;\"/> </td> \n", |
| 87 | + " </tr>\n", |
| 88 | + "</table>" |
| 89 | + ] |
| 90 | + }, |
| 91 | + { |
| 92 | + "cell_type": "markdown", |
| 93 | + "metadata": {}, |
| 94 | + "source": [ |
| 95 | + "### How does the qubit decide/know which state to occupy during quantum annealing?\n", |
| 96 | + "\n", |
| 97 | + "The probability that a qubit occupies a state is equal (1/2 for each of $|0\\rangle$ and $|1\\rangle$). However, the probability can be controlled by applying and external magnetic field (called bias). An external magnetic field perturbs the double well potential, thereby increasing the energy of one state. Consequently, the probability that this state be occupied by a qubit decreases. This means that the remaining state has a greater probability of being occupied by a qubit. In this way, the qubit minimizes its energy in presence of the bias. \n", |
| 98 | + "\n", |
| 99 | + "<table>\n", |
| 100 | + " <tr>\n", |
| 101 | + " <td> <img src=\"figures/energy_diagram_with_bias.png\" alt=\"Energy with bias\" style=\"width: 800px;\"/> </td> \n", |
| 102 | + " </tr>\n", |
| 103 | + "</table>\n" |
| 104 | + ] |
| 105 | + }, |
| 106 | + { |
| 107 | + "cell_type": "markdown", |
| 108 | + "metadata": {}, |
| 109 | + "source": [ |
| 110 | + "## Summary\n", |
| 111 | + "\n", |
| 112 | + "Quantum annealing is started with a large set of \"independent\" qubits; each qubit can exist as a superposition of $|0\\rangle$ and $|1\\rangle$. Biases and couplings are introduced to make entangled qubits. Quantum annealing then changes the probability that each qubit will end up in $|0\\rangle$ or $|1\\rangle$ state, i.e., a final state is obtained that is the minimum energy state of the problem." |
| 113 | + ] |
| 114 | + }, |
| 115 | + { |
| 116 | + "cell_type": "markdown", |
| 117 | + "metadata": {}, |
| 118 | + "source": [ |
| 119 | + "## Description in terms of Hamiltonian and Eigen states\n", |
| 120 | + "\n", |
| 121 | + "The Hamiltonian used in Quantum annealing is of the form: \n", |
| 122 | + "\n", |
| 123 | + "$$H = (1-s)H_0 + sH_1$$\n", |
| 124 | + "\n", |
| 125 | + "$H_0$ is called the initial Hamiltonian (qubits are in superposition state)\n", |
| 126 | + "\n", |
| 127 | + "$H_1$ is called the final or problem Hamiltonian (the lowest energy state corresponding to this Hamiltonian is the answer to the problem)\n", |
| 128 | + "\n", |
| 129 | + "Quantum annealling is started with the intial Hamiltonian ($s = 0$). The parameter $s$ is increased a little and the gound state of $H$ is found. The process is continued until $s = 1$ and therefore $H = H1$. Since the initial states are in a superposition state, they are all quantum states. Similarly, the final states are independent states and thus classical states. Therefore, the quantum annealing process \"translates\" quantum objects to classical objects.\n", |
| 130 | + "\n", |
| 131 | + "**Eigen Spectrum**\n", |
| 132 | + "\n", |
| 133 | + "<table>\n", |
| 134 | + " <tr>\n", |
| 135 | + " <td> <img src=\"figures/Eigen_spectra.png\" alt=\"Eigen spectra\" style=\"width: 700px;\"/> </td> \n", |
| 136 | + " </tr>\n", |
| 137 | + "</table>\n", |
| 138 | + "\n", |
| 139 | + "\n", |
| 140 | + "The eigen spectrum shows the different quantum states that a system can be in during quantum annealing. The state with the lowest energy is at the bottom with the states above it gradually increasing in energy.\n", |
| 141 | + "\n", |
| 142 | + "At the beginning of annealing, a system starts at the minimum energy state. When the problem Hamiltonian is introduced, the higher energy levels approach closer to the minimum energy state (i.e., the transition probability to the higher energy state becomes significant). There is a point at which the separation between the ground and the first excited state is minimum. That gap is called the minimum gap or anticrossing (this gap is useful in verifying that the quantum annealing has indeed occured).\n", |
| 143 | + "\n", |
| 144 | + "Running the annealing too fast can cuase the system to jump to excited state. So, the annealing is done slowly such that the system remains in ground state throughout annealing. This process is called adiabatic annealing. " |
| 145 | + ] |
| 146 | + }, |
| 147 | + { |
| 148 | + "cell_type": "markdown", |
| 149 | + "metadata": {}, |
| 150 | + "source": [ |
| 151 | + "## Couplers\n", |
| 152 | + "\n", |
| 153 | + "The ability to control the probability of a qubit to occupy a particular state can be used to make the qubits influence each other. The devices that can do this are called couplers.\n", |
| 154 | + "\n", |
| 155 | + "A coupler can: (1) either cause the coupled qubits to end up in the same state, (2) or cause the neighboring qubits to occur in the opposite state.\n", |
| 156 | + "\n", |
| 157 | + "Using couplers is using the phenomenon of entanglement. Two entangled qubits are considered as a single entity. Therefore, it will have four states: $|00\\rangle$, $|01\\rangle$, $|10\\rangle$, $|11\\rangle$. The relative energies of these qubits depend on the biases on each qubit and the coupling between them.\n", |
| 158 | + "\n", |
| 159 | + "In the language of quantum computing, we say that a coupler can make two cases (stated above) energetically favorable. If the coupler \"wants\" the two qubits to end up in the same state, it will lower the energies of the states $|00\\rangle$ and $|11\\rangle$. In contrast, if it \"wants\" the two qubits to be in the opposite states, it will lower the energies of the states $|01\\rangle$ and $|10\\rangle$.\n", |
| 160 | + "\n", |
| 161 | + "Each qubit can have a bias applied to it and the qubits can interact via the coupler. A user can choose the values of the biases and the couplers. In this way, a quantum computer is programmed. A user chooses a set of biases and couplers that define an energy landscape. Then quantum annealing is carried out to find the minimum energy level." |
| 162 | + ] |
| 163 | + }, |
| 164 | + { |
| 165 | + "cell_type": "code", |
| 166 | + "execution_count": null, |
| 167 | + "metadata": {}, |
| 168 | + "outputs": [], |
| 169 | + "source": [] |
| 170 | + } |
| 171 | + ], |
| 172 | + "metadata": { |
| 173 | + "kernelspec": { |
| 174 | + "display_name": "Python 3", |
| 175 | + "language": "python", |
| 176 | + "name": "python3" |
| 177 | + }, |
| 178 | + "language_info": { |
| 179 | + "codemirror_mode": { |
| 180 | + "name": "ipython", |
| 181 | + "version": 3 |
| 182 | + }, |
| 183 | + "file_extension": ".py", |
| 184 | + "mimetype": "text/x-python", |
| 185 | + "name": "python", |
| 186 | + "nbconvert_exporter": "python", |
| 187 | + "pygments_lexer": "ipython3", |
| 188 | + "version": "3.7.6" |
| 189 | + } |
| 190 | + }, |
| 191 | + "nbformat": 4, |
| 192 | + "nbformat_minor": 4 |
| 193 | +} |
0 commit comments