microsoft/qdk
Publicmirrored fromhttps://github.com/microsoft/qdkAvailable
samples/estimation/estimation-ising-2D.ipynb
501lines · modecode
| 1 | { |
| 2 | "cells": [ |
| 3 | { |
| 4 | "cell_type": "markdown", |
| 5 | "metadata": {}, |
| 6 | "source": [ |
| 7 | "# Resource estimation for simulating a 2D Ising Model Hamiltonian\n", |
| 8 | "\n", |
| 9 | "In this Python+Q# notebook we demonstrate how to estimate the resources for quantum dynamics,\n", |
| 10 | "specifically the simulation of an Ising model Hamiltonian on an $N \\times N$ 2D\n", |
| 11 | "lattice using a *fourth-order Trotter Suzuki product formula* assuming a 2D\n", |
| 12 | "qubit architecture with nearest-neighbor connectivity.\n", |
| 13 | "\n", |
| 14 | "First, we load the necessary Python packages." |
| 15 | ] |
| 16 | }, |
| 17 | { |
| 18 | "cell_type": "code", |
| 19 | "execution_count": null, |
| 20 | "metadata": {}, |
| 21 | "outputs": [], |
| 22 | "source": [ |
| 23 | "import qsharp\n", |
| 24 | "import pandas as pd" |
| 25 | ] |
| 26 | }, |
| 27 | { |
| 28 | "cell_type": "markdown", |
| 29 | "metadata": {}, |
| 30 | "source": [ |
| 31 | "## Background: 2D Ising model\n", |
| 32 | "\n", |
| 33 | "The Ising model is a mathematical model of ferromagnetism in a lattice (in our case a 2D square lattice) with two kinds of terms in the Hamiltonian: (i) an interaction term between adjacent sites and (ii) an external magnetic field acting at each site. For our purposes, we consider a simplified version of the model where the interaction terms have the same strength and the external field strength is the same at each site.\n", |
| 34 | "Formally, the Ising model Hamiltonian on an $N \\times N$ lattice we consider is formulated as:\n", |
| 35 | "\n", |
| 36 | "$$\n", |
| 37 | "H = \\underbrace{-J \\sum_{i, j} Z_i Z_j}_{B} + \\underbrace{g \\sum_j X_j}_{A}\n", |
| 38 | "$$\n", |
| 39 | "where $J$ is the interaction strength, $g$ is external field strength.\n", |
| 40 | "\n", |
| 41 | "The time evolution $e^{-iHt}$ for the Hamiltonian is simulated with the fourth-order product formula so that any errors in simulation are sufficiently small. Essentially, this is done by simulating the evolution for small slices of time $\\Delta$ and repeating this for `nSteps` $= t/\\Delta$ to obtain the full time evolution. The Trotter-Suzuki formula for higher orders can be recursively defined using a *fractal decomposition* as discussed in Section 3 of [Hatanao and Suziki's survey](https://link.springer.com/chapter/10.1007/11526216_2). Then the fourth order formula $U_4(\\Delta)$ can be constructed using the second-order one $U_2(\\Delta)$ as follows.\n", |
| 42 | "$$\n", |
| 43 | "\\begin{aligned}\n", |
| 44 | "U_2(\\Delta) & = e^{-iA\\Delta/2} e^{-iB\\Delta} e^{-iA\\Delta/2}; \\\\\n", |
| 45 | "U_4(\\Delta) & = U_2(p\\Delta)U_2(p\\Delta)U_2((1 - 4p)\\Delta)U_2(p\\Delta)U_2(p\\Delta); \\\\\n", |
| 46 | "p & = (4 - 4^{1/3})^{-1}.\n", |
| 47 | "\\end{aligned}\n", |
| 48 | "$$\n", |
| 49 | "\n", |
| 50 | "For the rest of the notebook, we will present the code that computes the time evolution in a step by step fashion.\n", |
| 51 | "\n", |
| 52 | "## Implementation\n", |
| 53 | "\n", |
| 54 | "### Helper functions" |
| 55 | ] |
| 56 | }, |
| 57 | { |
| 58 | "cell_type": "markdown", |
| 59 | "metadata": {}, |
| 60 | "source": [ |
| 61 | "Note that expanding $U_4(\\Delta)$ to express it in terms of $A, B$ gives:\n", |
| 62 | "$$\n", |
| 63 | "U_4(\\Delta) = e^{-iAp\\Delta/2} e^{-iBp\\Delta} e^{-iAp\\Delta} e^{-iBp\\Delta} e^{-iA(1 - 3p)\\Delta/2} e^{-iB(1-4p)\\Delta} e^{-iA(1 - 3p)\\Delta/2} e^{-iBp\\Delta} e^{-iAp\\Delta} e^{-iBp\\Delta} e^{-iAp\\Delta/2}\n", |
| 64 | "$$\n", |
| 65 | "\n", |
| 66 | "The above equation with $11$ exponential terms works for one time step. For `nSteps` $> 1$ time steps, some adjacent terms can be merged to give $10t+1$ exponential terms for $e^{-iHt}$.\n", |
| 67 | "\n", |
| 68 | "The function below creates a sequence containing the constant factors that will be applied with $A$ and $B$, respectively, in the exponential sequence of the above formula." |
| 69 | ] |
| 70 | }, |
| 71 | { |
| 72 | "cell_type": "code", |
| 73 | "execution_count": null, |
| 74 | "metadata": { |
| 75 | "jupyter": { |
| 76 | "outputs_hidden": false, |
| 77 | "source_hidden": false |
| 78 | }, |
| 79 | "microsoft": { |
| 80 | "language": "qsharp" |
| 81 | }, |
| 82 | "nteract": { |
| 83 | "transient": { |
| 84 | "deleting": false |
| 85 | } |
| 86 | }, |
| 87 | "vscode": { |
| 88 | "languageId": "qsharp" |
| 89 | } |
| 90 | }, |
| 91 | "outputs": [], |
| 92 | "source": [ |
| 93 | "%%qsharp\n", |
| 94 | "function SetAngleSequence(p : Double, dt : Double, J : Double, g : Double) : Double[] {\n", |
| 95 | "\n", |
| 96 | " let len1 = 3;\n", |
| 97 | " let len2 = 3;\n", |
| 98 | " let valLength = 2*len1+len2+1;\n", |
| 99 | " mutable values = [0.0, size=valLength];\n", |
| 100 | "\n", |
| 101 | " let val1 = J*p*dt;\n", |
| 102 | " let val2 = -g*p*dt;\n", |
| 103 | " let val3 = J*(1.0 - 3.0*p)*dt/2.0;\n", |
| 104 | " let val4 = g*(1.0 - 4.0*p)*dt/2.0;\n", |
| 105 | "\n", |
| 106 | " for i in 0..len1 {\n", |
| 107 | "\n", |
| 108 | " if (i % 2 == 0) {\n", |
| 109 | " set values w/= i <- val1;\n", |
| 110 | " }\n", |
| 111 | " else {\n", |
| 112 | " set values w/= i <- val2;\n", |
| 113 | " }\n", |
| 114 | "\n", |
| 115 | " }\n", |
| 116 | "\n", |
| 117 | " for i in len1+1..len1+len2 {\n", |
| 118 | " if (i % 2 == 0) {\n", |
| 119 | " set values w/= i <- val3;\n", |
| 120 | " }\n", |
| 121 | " else {\n", |
| 122 | " set values w/= i <- val4;\n", |
| 123 | " }\n", |
| 124 | " }\n", |
| 125 | "\n", |
| 126 | " for i in len1+len2+1..valLength-1 {\n", |
| 127 | " if (i % 2 == 0) {\n", |
| 128 | " set values w/= i <- val1;\n", |
| 129 | " }\n", |
| 130 | " else {\n", |
| 131 | " set values w/= i <- val2;\n", |
| 132 | " }\n", |
| 133 | " }\n", |
| 134 | " return values;\n", |
| 135 | "}" |
| 136 | ] |
| 137 | }, |
| 138 | { |
| 139 | "cell_type": "markdown", |
| 140 | "metadata": {}, |
| 141 | "source": [ |
| 142 | "### Quantum operations\n", |
| 143 | "\n", |
| 144 | "There are two kinds of Pauli exponentials needed for simulating the time evolution of an Ising Model:\n", |
| 145 | "- The transverse field $e^{-iX\\theta}$ applied to each qubit for an angle $\\theta$;\n", |
| 146 | "- $e^{-i (Z \\otimes Z)\\theta}$ applied to neighboring pairs of qubits in the lattice.\n", |
| 147 | "\n", |
| 148 | "The operation below applies $e^{-iX\\theta}$ on all qubits in the 2D lattice." |
| 149 | ] |
| 150 | }, |
| 151 | { |
| 152 | "cell_type": "code", |
| 153 | "execution_count": null, |
| 154 | "metadata": { |
| 155 | "microsoft": { |
| 156 | "language": "qsharp" |
| 157 | }, |
| 158 | "vscode": { |
| 159 | "languageId": "qsharp" |
| 160 | } |
| 161 | }, |
| 162 | "outputs": [], |
| 163 | "source": [ |
| 164 | "%%qsharp\n", |
| 165 | "operation ApplyAllX(n : Int, qArr : Qubit[][], theta : Double) : Unit {\n", |
| 166 | " // This applies `Rx` with an angle of `2.0 * theta` to all qubits in `qs`\n", |
| 167 | " // using partial application\n", |
| 168 | " for row in 0..n-1 {\n", |
| 169 | " ApplyToEach(Rx(2.0 * theta, _), qArr[row]);\n", |
| 170 | " }\n", |
| 171 | "}" |
| 172 | ] |
| 173 | }, |
| 174 | { |
| 175 | "cell_type": "markdown", |
| 176 | "metadata": {}, |
| 177 | "source": [ |
| 178 | "The next operation below applies $e^{-i(Z \\otimes Z)\\theta}$ on overlapping pairs of neighboring qubits. Observe that unlike the previous case, it is not possible to simultaneously apply all the rotations in one go. For example, while applying the rotation on qubits at $(0, 0)$ and $(0, 1)$, it is not possible to also apply the rotation on qubits $(0, 1)$ and $(0, 2)$. Instead, we try to apply as many rotations as possible. This is broken up as follows:\n", |
| 179 | "- in the vertical (resp. horizontal) direction of the 2D lattice as chosen by `dir`,\n", |
| 180 | "- consider pairs starting with an even (resp. odd) index as given by `grp`;\n", |
| 181 | "- apply the exponential to all such pairs in the lattice." |
| 182 | ] |
| 183 | }, |
| 184 | { |
| 185 | "cell_type": "code", |
| 186 | "execution_count": null, |
| 187 | "metadata": { |
| 188 | "microsoft": { |
| 189 | "language": "qsharp" |
| 190 | }, |
| 191 | "vscode": { |
| 192 | "languageId": "qsharp" |
| 193 | } |
| 194 | }, |
| 195 | "outputs": [], |
| 196 | "source": [ |
| 197 | "%%qsharp\n", |
| 198 | "operation ApplyDoubleZ(n : Int, m : Int, qArr : Qubit[][], theta : Double, dir : Bool, grp : Bool) : Unit {\n", |
| 199 | " let start = grp ? 1 | 0; // Choose either odd or even indices based on group number\n", |
| 200 | " let P_op = [PauliZ, PauliZ];\n", |
| 201 | " let c_end = dir ? m-1 | m-2;\n", |
| 202 | " let r_end = dir ? m-2 | m-1;\n", |
| 203 | "\n", |
| 204 | " for row in 0..r_end {\n", |
| 205 | " for col in start..2..c_end { // Iterate through even or odd columns based on `grp`\n", |
| 206 | "\n", |
| 207 | " let row2 = dir ? row+1 | row;\n", |
| 208 | " let col2 = dir ? col | col+1;\n", |
| 209 | "\n", |
| 210 | " Exp(P_op, theta, [qArr[row][col], qArr[row2][col2]]);\n", |
| 211 | " }\n", |
| 212 | " }\n", |
| 213 | "}\n" |
| 214 | ] |
| 215 | }, |
| 216 | { |
| 217 | "cell_type": "markdown", |
| 218 | "metadata": {}, |
| 219 | "source": [ |
| 220 | "The next operation puts everything together and calls the operations needed to\n", |
| 221 | "simulate the Ising model Hamiltonian using a fourth order product formula.\n", |
| 222 | "Observe that the `ApplyDoubleZ` operation is called four times for different\n", |
| 223 | "choices of direction and starting index to ensure all possible pairs of qubits\n", |
| 224 | "are appropriately considered.\n", |
| 225 | "\n", |
| 226 | "The various parameters taken in by the operation correspond to:\n", |
| 227 | "\n", |
| 228 | "- `N1`, `N2`: row and column size for the lattice.\n", |
| 229 | "- `J`, `g`: parameters by which the Hamiltonian terms are scaled.\n", |
| 230 | "- `totTime`: the number of Trotter steps.\n", |
| 231 | "- `dt` : the step size for the simulation, sometimes denoted as $\\Delta$." |
| 232 | ] |
| 233 | }, |
| 234 | { |
| 235 | "cell_type": "code", |
| 236 | "execution_count": null, |
| 237 | "metadata": { |
| 238 | "microsoft": { |
| 239 | "language": "qsharp" |
| 240 | }, |
| 241 | "vscode": { |
| 242 | "languageId": "qsharp" |
| 243 | } |
| 244 | }, |
| 245 | "outputs": [], |
| 246 | "source": [ |
| 247 | "%%qsharp\n", |
| 248 | "import Std.Math.*;\n", |
| 249 | "import Std.Arrays.*;\n", |
| 250 | "\n", |
| 251 | "operation IsingModel2DSim(N1 : Int, N2 : Int, J : Double, g : Double, totTime : Double, dt : Double) : Unit {\n", |
| 252 | "\n", |
| 253 | " use qs = Qubit[N1*N2];\n", |
| 254 | " let qubitArray = Chunks(N2, qs); // qubits are re-arranged to be in an N1 x N2 array\n", |
| 255 | "\n", |
| 256 | " let p = 1.0 / (4.0 - 4.0^(1.0 / 3.0));\n", |
| 257 | " let t = Ceiling(totTime / dt);\n", |
| 258 | "\n", |
| 259 | " let seqLen = 10 * t + 1;\n", |
| 260 | "\n", |
| 261 | " let angSeq = SetAngleSequence(p, dt, J, g);\n", |
| 262 | "\n", |
| 263 | " for i in 0..seqLen - 1 {\n", |
| 264 | " let theta = (i==0 or i==seqLen-1) ? J*p*dt/2.0 | angSeq[i%10];\n", |
| 265 | "\n", |
| 266 | " // for even indexes\n", |
| 267 | " if i % 2 == 0 {\n", |
| 268 | " ApplyAllX(N1, qubitArray, theta);\n", |
| 269 | " } else {\n", |
| 270 | " // iterate through all possible combinations for `dir` and `grp`.\n", |
| 271 | " for (dir, grp) in [(true, true), (true, false), (false, true), (false, false)] {\n", |
| 272 | " ApplyDoubleZ(N1, N2, qubitArray, theta, dir, grp);\n", |
| 273 | " }\n", |
| 274 | " }\n", |
| 275 | " }\n", |
| 276 | "}\n" |
| 277 | ] |
| 278 | }, |
| 279 | { |
| 280 | "cell_type": "markdown", |
| 281 | "metadata": {}, |
| 282 | "source": [ |
| 283 | "## Getting logical resource counts\n", |
| 284 | "\n", |
| 285 | "For the purpose of generating the rQOPS for some target runtime, it suffices to obtain the logical resource estimates to simulate the Heisenberg model Hamiltonian. We consider three problem instances with lattice sizes $\\{10 \\times 10, 20 \\times 20, 30 \\times 30\\}$ with $J = g = 1.0$. These instances are simulated for a total time of $L$ seconds for lattice size $L$, with step size `dt`$ = 0.9$, and overall probability of failure $\\varepsilon = 0.01$. Any one of the six pre-defined qubit parameters will do to obtain the logical coounts and in this notebook we choose a Majorana based qubit with the `floquet code`." |
| 286 | ] |
| 287 | }, |
| 288 | { |
| 289 | "cell_type": "code", |
| 290 | "execution_count": null, |
| 291 | "metadata": {}, |
| 292 | "outputs": [], |
| 293 | "source": [ |
| 294 | "N1 = [10, 20, 30]\n", |
| 295 | "N2 = [10, 20, 30]\n", |
| 296 | "totTime = [10.0, 20.0, 30.0]\n", |
| 297 | "J = 1.0\n", |
| 298 | "g = 1.0\n", |
| 299 | "dt = 0.9" |
| 300 | ] |
| 301 | }, |
| 302 | { |
| 303 | "cell_type": "markdown", |
| 304 | "metadata": {}, |
| 305 | "source": [ |
| 306 | "We submit a resource estimation job with all the problem instances sequentially and collect the estimates in `results`." |
| 307 | ] |
| 308 | }, |
| 309 | { |
| 310 | "cell_type": "code", |
| 311 | "execution_count": null, |
| 312 | "metadata": {}, |
| 313 | "outputs": [], |
| 314 | "source": [ |
| 315 | "results = []\n", |
| 316 | "for i in range(3):\n", |
| 317 | " qsharp_string = f\"IsingModel2DSim({N1[i]}, {N2[i]}, {J}, {g}, {totTime[i]}, {dt})\"\n", |
| 318 | "\n", |
| 319 | " result = qsharp.estimate(qsharp_string, params={\"errorBudget\": 0.01, \"qubitParams\": {\"name\": \"qubit_maj_ns_e6\"}, \"qecScheme\": {\"name\": \"floquet_code\"}, \"constraints\": {\"logicalDepthFactor\": 4}})\n", |
| 320 | " results.append(result)" |
| 321 | ] |
| 322 | }, |
| 323 | { |
| 324 | "cell_type": "markdown", |
| 325 | "metadata": {}, |
| 326 | "source": [ |
| 327 | "To see the complete information provided when invoking the resource estimator, we output the result for the $10 \\times 10$ lattice by displaying `results[0]`" |
| 328 | ] |
| 329 | }, |
| 330 | { |
| 331 | "cell_type": "code", |
| 332 | "execution_count": null, |
| 333 | "metadata": {}, |
| 334 | "outputs": [], |
| 335 | "source": [ |
| 336 | "# Displaying estimates for 10x10 lattice size.\n", |
| 337 | "results[0]\n", |
| 338 | "# Change index to 1 (resp. 2) for 20x20 (resp. 30x30) lattice size." |
| 339 | ] |
| 340 | }, |
| 341 | { |
| 342 | "cell_type": "markdown", |
| 343 | "metadata": {}, |
| 344 | "source": [ |
| 345 | "## Visualizing and understanding the results\n", |
| 346 | "\n", |
| 347 | "### Result summary table" |
| 348 | ] |
| 349 | }, |
| 350 | { |
| 351 | "cell_type": "code", |
| 352 | "execution_count": null, |
| 353 | "metadata": {}, |
| 354 | "outputs": [], |
| 355 | "source": [ |
| 356 | "# Define function to display information in summary format\n", |
| 357 | "def get_summary_table(results, labels):\n", |
| 358 | " logical_qubits = []\n", |
| 359 | " logical_depth = []\n", |
| 360 | " t_states = []\n", |
| 361 | " code_distance = []\n", |
| 362 | " t_factories = []\n", |
| 363 | " t_factory_fraction = []\n", |
| 364 | " physical_qubits = []\n", |
| 365 | " rqops = []\n", |
| 366 | " runtime = []\n", |
| 367 | " logical_error = []\n", |
| 368 | "\n", |
| 369 | " for i in range(3):\n", |
| 370 | " logical_qubits.append(results[i]['physicalCounts']['breakdown']['algorithmicLogicalQubits'])\n", |
| 371 | " logical_depth.append(results[i]['physicalCountsFormatted']['logicalDepth'])\n", |
| 372 | " t_states.append(results[i]['physicalCountsFormatted']['numTstates'])\n", |
| 373 | " t_factories.append(results[i]['physicalCounts']['breakdown']['numTfactories'])\n", |
| 374 | " logical_error.append(results[i]['physicalCountsFormatted']['requiredLogicalQubitErrorRate'])\n", |
| 375 | " physical_qubits.append(results[i]['physicalCountsFormatted']['physicalQubits'])\n", |
| 376 | " rqops.append(results[i]['physicalCountsFormatted']['rqops'])\n", |
| 377 | " runtime.append(results[i]['physicalCountsFormatted']['runtime'])\n", |
| 378 | " code_distance.append(results[i]['logicalQubit']['codeDistance'])\n", |
| 379 | " t_factory_fraction.append(results[i]['physicalCountsFormatted']['physicalQubitsForTfactoriesPercentage'])\n", |
| 380 | "\n", |
| 381 | " data = pd.DataFrame()\n", |
| 382 | " pd.options.display.float_format = '{:.2E}'.format\n", |
| 383 | " data['Logical qubits'] = logical_qubits\n", |
| 384 | " data['Logical depth'] = logical_depth\n", |
| 385 | " data['Logical error'] = logical_error\n", |
| 386 | " data['T states'] = t_states\n", |
| 387 | " # data['T states'] = data['T states'].astype('float64')\n", |
| 388 | " data['Code Distance'] = code_distance\n", |
| 389 | " data['T factories'] = t_factories\n", |
| 390 | " data['T factory fraction'] = t_factory_fraction\n", |
| 391 | " data['Physical qubits'] = physical_qubits\n", |
| 392 | " data['rQOPS'] = rqops\n", |
| 393 | " data['Physical runtime'] = runtime\n", |
| 394 | " data.index = labels\n", |
| 395 | "\n", |
| 396 | " return data\n", |
| 397 | "\n", |
| 398 | "# Display summarized information for all problem instances\n", |
| 399 | "labels = [\"Isi10\", \"Isi20\", \"Isi30\"]\n", |
| 400 | "table = get_summary_table(results, labels)\n", |
| 401 | "table" |
| 402 | ] |
| 403 | }, |
| 404 | { |
| 405 | "cell_type": "markdown", |
| 406 | "metadata": {}, |
| 407 | "source": [ |
| 408 | "> Note that in general, there is a trade-off between the logical depth and number of T factories used. \n", |
| 409 | "\n", |
| 410 | "> To ensure that T factories do not dominate the resource requirements, we set the `logical_depth_factor`${}=4$ adding some number of `noops` to increase the logical depth." |
| 411 | ] |
| 412 | }, |
| 413 | { |
| 414 | "cell_type": "markdown", |
| 415 | "metadata": {}, |
| 416 | "source": [ |
| 417 | "### Getting the target rQOPS\n", |
| 418 | "\n", |
| 419 | "While the resource estimator generates a runtime for the given hardware profile, we want to set a target runtime of 2 days i.e., 172800 seconds to obtain a practical quantum advantage. We collect the previous results to compute the corresponding target rQOPS as \n", |
| 420 | "$$ \\text{Target rQOPS} = \\frac{\\text{Logical qubits}\\cdot\\text{Logical Depth}}{\\text{Target runtime}}$$" |
| 421 | ] |
| 422 | }, |
| 423 | { |
| 424 | "cell_type": "code", |
| 425 | "execution_count": null, |
| 426 | "metadata": {}, |
| 427 | "outputs": [], |
| 428 | "source": [ |
| 429 | "def get_target_rqops(results, labels):\n", |
| 430 | "\n", |
| 431 | " target_runtime = 172800\n", |
| 432 | " logical_qubits = []\n", |
| 433 | " logical_depth = []\n", |
| 434 | " target_rqops = []\n", |
| 435 | " logical_error = []\n", |
| 436 | "\n", |
| 437 | " for i in range(3):\n", |
| 438 | " logical_qubits.append(results[i]['physicalCounts']['breakdown']['algorithmicLogicalQubits'])\n", |
| 439 | " logical_depth.append(results[i]['physicalCountsFormatted']['logicalDepth'])\n", |
| 440 | " logical_error.append(results[i]['physicalCountsFormatted']['requiredLogicalQubitErrorRate'])\n", |
| 441 | " target_rqops.append(round(results[i]['physicalCounts']['breakdown']['algorithmicLogicalQubits'] * results[i]['physicalCounts']['breakdown']['logicalDepth'] / target_runtime))\n", |
| 442 | "\n", |
| 443 | " data = pd.DataFrame()\n", |
| 444 | " pd.options.display.float_format = '{:.2E}'.format\n", |
| 445 | " data['Logical qubits'] = logical_qubits\n", |
| 446 | " data['Logical depth'] = logical_depth\n", |
| 447 | " data['Logical error'] = logical_error\n", |
| 448 | " data['Target rQOPS'] = target_rqops\n", |
| 449 | " data.index = labels\n", |
| 450 | "\n", |
| 451 | " return data\n", |
| 452 | "\n", |
| 453 | "rQOPS_table = get_target_rqops(results, labels)\n", |
| 454 | "rQOPS_table\n" |
| 455 | ] |
| 456 | }, |
| 457 | { |
| 458 | "cell_type": "markdown", |
| 459 | "metadata": {}, |
| 460 | "source": [ |
| 461 | "## Next steps\n", |
| 462 | "\n", |
| 463 | "Feel free to use this notebook as a starting point for your own experiments. For\n", |
| 464 | "example, you can\n", |
| 465 | "\n", |
| 466 | "* explore how the results change considering other problem instances of the Heisenberg model\n", |
| 467 | "* explore space- and time-trade-offs by changing the value for\n", |
| 468 | " `logical_depth_factor` or `max_t_factories`\n", |
| 469 | "* visualize these trade-offs with the space and time diagrams\n", |
| 470 | "* use other or customized qubit parameters" |
| 471 | ] |
| 472 | } |
| 473 | ], |
| 474 | "metadata": { |
| 475 | "kernel_info": { |
| 476 | "name": "python3" |
| 477 | }, |
| 478 | "kernelspec": { |
| 479 | "display_name": "Python 3 (ipykernel)", |
| 480 | "language": "python", |
| 481 | "name": "python3" |
| 482 | }, |
| 483 | "language_info": { |
| 484 | "codemirror_mode": { |
| 485 | "name": "ipython", |
| 486 | "version": 3 |
| 487 | }, |
| 488 | "file_extension": ".py", |
| 489 | "mimetype": "text/x-python", |
| 490 | "name": "python", |
| 491 | "nbconvert_exporter": "python", |
| 492 | "pygments_lexer": "ipython3", |
| 493 | "version": "3.11.7" |
| 494 | }, |
| 495 | "nteract": { |
| 496 | "version": "nteract-front-end@1.0.0" |
| 497 | } |
| 498 | }, |
| 499 | "nbformat": 4, |
| 500 | "nbformat_minor": 2 |
| 501 | } |
| 502 | |