\n",
84 | " \n",
85 | "
Implementation of Quantum Error Mitigation Techniques
\n",
86 | "\n",
87 | "The resilience level in Qiskit runtime is a metric to specify how much resilience to build against errors, and therefore the level of error mitigation. Higher levels generate more accurate results, at the expense of longer processing times. You can activate higher levels of resilience on Qiskit runtime but please do note that **this feature is currently in beta** and the results may not be as expected, but feel free to experiment with them where you are directed below in the code blocks!\n",
88 | "\n",
89 | "You may find these resources handy:\n",
90 | "\n",
91 | "- [Qiskit Documentation: Options](https://qiskit.org/ecosystem/ibm-runtime/stubs/qiskit_ibm_runtime.options.Options.html)\n",
92 | "- [Configuring error mitigation](https://qiskit.org/ecosystem/ibm-runtime/how_to/error-mitigation.html)\n",
93 | " \n"
94 | ]
95 | },
96 | {
97 | "cell_type": "code",
98 | "execution_count": null,
99 | "id": "4f9ad94a-fed1-48af-864b-300fb08b82e1",
100 | "metadata": {
101 | "tags": []
102 | },
103 | "outputs": [],
104 | "source": [
105 | "#import required libraries\n",
106 | "import time\n",
107 | "import numpy as np\n",
108 | "from qiskit import *\n",
109 | "from qiskit.circuit import Parameter\n",
110 | "from qiskit.quantum_info import Statevector, Pauli, SparsePauliOp\n",
111 | "from qiskit.circuit.library import RealAmplitudes\n",
112 | "import matplotlib.pyplot as plt\n",
113 | "import matplotlib.ticker as tck\n",
114 | "from qiskit.tools.visualization import plot_histogram\n",
115 | "from qiskit_ibm_runtime import QiskitRuntimeService, Session, Options, Sampler, Estimator\n",
116 | "from qiskit.providers.fake_provider import FakeManila\n",
117 | "from qiskit_aer.noise import NoiseModel\n",
118 | "\n",
119 | "# Import FakeBackend\n",
120 | "fake_backend = FakeManila()\n",
121 | "noise_model = NoiseModel.from_backend(fake_backend)"
122 | ]
123 | },
124 | {
125 | "cell_type": "code",
126 | "execution_count": null,
127 | "id": "1b178af8-3640-4d60-922f-1dacd656681e",
128 | "metadata": {
129 | "tags": []
130 | },
131 | "outputs": [],
132 | "source": [
133 | "# Save the Runtime account credentials if you have not done so already\n",
134 | "# If you need to overwrite the account info, please add `overwrite=True`\n",
135 | "# QiskitRuntimeService.save_account(channel='ibm_quantum', token='my_token', overwrite=True)\n",
136 | "\n",
137 | "service = QiskitRuntimeService(channel=\"ibm_quantum\", instance='ibm-q/open/main')\n",
138 | "\n",
139 | "backend = service.backends(simulator=True)[0]\n",
140 | "print(backend)"
141 | ]
142 | },
143 | {
144 | "cell_type": "code",
145 | "execution_count": null,
146 | "id": "6bb61fc5-a06d-478e-9e3f-c003427c1d11",
147 | "metadata": {
148 | "tags": []
149 | },
150 | "outputs": [],
151 | "source": [
152 | "# This is the circuit you used in the main syllabus for learning M3\n",
153 | "theta = Parameter('theta')\n",
154 | "\n",
155 | "qc = QuantumCircuit(2)\n",
156 | "qc.x(1)\n",
157 | "qc.h(0)\n",
158 | "qc.cp(theta,0,1)\n",
159 | "qc.h(0)\n",
160 | "\n",
161 | "qc.draw()"
162 | ]
163 | },
164 | {
165 | "attachments": {},
166 | "cell_type": "markdown",
167 | "id": "f07ef407-2918-4a44-9060-f7b5b90c0334",
168 | "metadata": {},
169 | "source": [
170 | "In the next cell, in the line of code as indicated, change the resilience level to any of the values `[1, 2, 3]` and run the Estimator to see how output changes with resilience level"
171 | ]
172 | },
173 | {
174 | "cell_type": "code",
175 | "execution_count": null,
176 | "id": "87ecd033-dda0-4ba4-979f-7294bcbae16c",
177 | "metadata": {
178 | "tags": []
179 | },
180 | "outputs": [],
181 | "source": [
182 | "phases = np.linspace(0, 2*np.pi, 50)\n",
183 | "individual_phases = [[ph] for ph in phases]\n",
184 | "ZZ = SparsePauliOp.from_list([(\"ZZ\", 1)])\n",
185 | "\n",
186 | "options = Options(\n",
187 | " simulator={\n",
188 | " \"noise_model\": noise_model,\n",
189 | " \"seed_simulator\": 42,\n",
190 | " }, \n",
191 | " resilience_level=0\n",
192 | ")\n",
193 | "\n",
194 | "options_with_em = Options(\n",
195 | " simulator={\n",
196 | " \"noise_model\": noise_model,\n",
197 | " \"seed_simulator\": 42,\n",
198 | " }, \n",
199 | " resilience_level=1 ### Change the value in this line ###\n",
200 | ")"
201 | ]
202 | },
203 | {
204 | "cell_type": "code",
205 | "execution_count": null,
206 | "id": "05414212-af71-4ebf-afc8-260967588399",
207 | "metadata": {
208 | "tags": []
209 | },
210 | "outputs": [],
211 | "source": [
212 | "with Session(service=service, backend=backend): \n",
213 | " estimator = Estimator(options=options)\n",
214 | " job = estimator.run(circuits=[qc]*len(phases), parameter_values=individual_phases, observables=[ZZ]*len(phases))\n",
215 | " param_results = job.result()\n",
216 | " exp_values = param_results.values\n",
217 | " \n",
218 | " estimator = Estimator(options=options_with_em)\n",
219 | " job = estimator.run(circuits=[qc]*len(phases), parameter_values=individual_phases, observables=[ZZ]*len(phases))\n",
220 | " param_results = job.result()\n",
221 | " exp_values_with_em = param_results.values"
222 | ]
223 | },
224 | {
225 | "cell_type": "code",
226 | "execution_count": null,
227 | "id": "2bd54d85-78b4-481f-9d44-4f8db4092745",
228 | "metadata": {
229 | "tags": []
230 | },
231 | "outputs": [],
232 | "source": [
233 | "plt.plot(phases, exp_values, 'o', label='noisy')\n",
234 | "plt.plot(phases, exp_values_with_em, 'o', label='mitigated')\n",
235 | "plt.plot(phases, 2*np.sin(phases/2,)**2-1, label='theory')\n",
236 | "plt.xlabel('Phase')\n",
237 | "plt.ylabel('Expectation')\n",
238 | "plt.legend();"
239 | ]
240 | },
241 | {
242 | "attachments": {},
243 | "cell_type": "markdown",
244 | "id": "7e5af1e1-5a51-48d5-84c2-916a0e8ecb8c",
245 | "metadata": {},
246 | "source": [
247 | "
\n",
248 | " \n",
249 | "
Optional: Run the above on a real backend
\n",
250 | "\n",
251 | "Feel free to test the above code on a **real quantum backend** to see how the result varies when running on a QPU. For Quantum Explorers, you have a `hub`, `group`, and `project` allocated to you. Feel free to configure the cell below and experiment with the results!\n",
252 | " \n",
253 | " "
254 | ]
255 | },
256 | {
257 | "cell_type": "code",
258 | "execution_count": null,
259 | "id": "6319e3e3-24fa-4263-941b-1f6d25202632",
260 | "metadata": {
261 | "tags": []
262 | },
263 | "outputs": [],
264 | "source": [
265 | "# Get the least-busy backend, this step may take a while\n",
266 | "real_backend = service.least_busy(min_num_qubits=2, simulator=False)\n",
267 | "\n",
268 | "print(f\"The least busy backend is {real_backend.name}.\")"
269 | ]
270 | },
271 | {
272 | "attachments": {},
273 | "cell_type": "markdown",
274 | "id": "b3daf9d4-e553-41c7-852d-636e87e94272",
275 | "metadata": {},
276 | "source": [
277 | "Using the real backend for `Estimator`:"
278 | ]
279 | },
280 | {
281 | "cell_type": "code",
282 | "execution_count": null,
283 | "id": "ef4f5b6e-5bd0-4257-9dc6-5e32dafb5cd0",
284 | "metadata": {
285 | "tags": []
286 | },
287 | "outputs": [],
288 | "source": [
289 | "with Session(service=service, backend=real_backend): \n",
290 | " estimator = Estimator(options=options)\n",
291 | " job = estimator.run(circuits=[qc]*len(phases), parameter_values=individual_phases, observables=[ZZ]*len(phases))\n",
292 | " print(f\"First job ID: {job.job_id()}\")\n",
293 | " \n",
294 | " estimator = Estimator(options=options_with_em)\n",
295 | " job = estimator.run(circuits=[qc]*len(phases), parameter_values=individual_phases, observables=[ZZ]*len(phases))\n",
296 | " print(f\"Second job ID: {job.job_id()}\")"
297 | ]
298 | },
299 | {
300 | "cell_type": "code",
301 | "execution_count": null,
302 | "id": "62a6fcad-16ac-4288-a1c0-2970afd76f81",
303 | "metadata": {
304 | "tags": []
305 | },
306 | "outputs": [],
307 | "source": [
308 | "#Get job results\n",
309 | "job = service.job('place first job ID here')\n",
310 | "param_results = job.result()\n",
311 | "exp_values = param_results.values\n",
312 | "\n",
313 | "job_with_em = service.job('place second job ID here')\n",
314 | "param_results_with_em = job_with_em.result()\n",
315 | "exp_values_with_em = param_results_with_em.values"
316 | ]
317 | },
318 | {
319 | "attachments": {},
320 | "cell_type": "markdown",
321 | "id": "8a6b7aae-1300-403f-802d-4366d17c1319",
322 | "metadata": {},
323 | "source": [
324 | "While your jobs are running, you can monitor them! Simply copy the Job ID printed out for you for one of the runs and enter it into the search bar **[here](https://quantum-computing.ibm.com/jobs)**! Make sure you are logged into the IBM Quantum Platform to access this page. "
325 | ]
326 | },
327 | {
328 | "cell_type": "code",
329 | "execution_count": null,
330 | "id": "ef101938-b6c7-4f54-8fa9-418c5540bd76",
331 | "metadata": {
332 | "tags": []
333 | },
334 | "outputs": [],
335 | "source": [
336 | "plt.plot(phases, exp_values, 'o', label='noisy')\n",
337 | "plt.plot(phases, exp_values_with_em, 'o', label='mitigated')\n",
338 | "plt.plot(phases, 2*np.sin(phases/2,)**2-1, label='theory')\n",
339 | "plt.xlabel('Phase')\n",
340 | "plt.ylabel('Expectation')\n",
341 | "plt.legend();"
342 | ]
343 | },
344 | {
345 | "attachments": {},
346 | "cell_type": "markdown",
347 | "id": "1cbb2b3c-aa1c-4a12-9462-d9528651640b",
348 | "metadata": {},
349 | "source": [
350 | "# References\n",
351 | "- [1] **[Getting Started - Qiskit Research](https://github.com/qiskit-research/qiskit-research/blob/main/docs/getting_started.ipynb)**\n",
352 | "- [2] **[Error mitigation for short-depth quantum circuits - Kristan Temme, Sergey Bravyi and Jay M. Gambetta](https://arxiv.org/pdf/1612.02058.pdf)**\n",
353 | "- [3] **[Configure error mitigation](https://qiskit.org/ecosystem/ibm-runtime/how_to/error-mitigation.html)**"
354 | ]
355 | },
356 | {
357 | "cell_type": "code",
358 | "execution_count": 1,
359 | "id": "184a135d",
360 | "metadata": {
361 | "tags": []
362 | },
363 | "outputs": [
364 | {
365 | "data": {
366 | "text/html": [
367 | "
Version Information
Qiskit Software | Version |
---|
qiskit-terra | 0.24.1 |
qiskit-aer | 0.12.1 |
qiskit-ibmq-provider | 0.20.2 |
qiskit | 0.43.2 |
qiskit-nature | 0.6.2 |
qiskit-finance | 0.3.4 |
qiskit-optimization | 0.5.0 |
qiskit-machine-learning | 0.6.1 |
System information |
---|
Python version | 3.10.8 |
Python compiler | GCC 10.4.0 |
Python build | main, Nov 22 2022 08:26:04 |
OS | Linux |
CPUs | 8 |
Memory (Gb) | 31.211322784423828 |
Wed Jul 12 04:36:16 2023 UTC |
"
368 | ],
369 | "text/plain": [
370 | "
"
371 | ]
372 | },
373 | "metadata": {},
374 | "output_type": "display_data"
375 | }
376 | ],
377 | "source": [
378 | "from qiskit.tools.jupyter import *\n",
379 | "%qiskit_version_table"
380 | ]
381 | }
382 | ],
383 | "metadata": {
384 | "kernelspec": {
385 | "display_name": "Python 3 (ipykernel)",
386 | "language": "python",
387 | "name": "python3"
388 | },
389 | "language_info": {
390 | "codemirror_mode": {
391 | "name": "ipython",
392 | "version": 3
393 | },
394 | "file_extension": ".py",
395 | "mimetype": "text/x-python",
396 | "name": "python",
397 | "nbconvert_exporter": "python",
398 | "pygments_lexer": "ipython3",
399 | "version": "3.10.8"
400 | },
401 | "vscode": {
402 | "interpreter": {
403 | "hash": "2314985414265184cbcbf39283c3ac2af8a6b2659fa88be3910ade054ec8b29d"
404 | }
405 | },
406 | "widgets": {
407 | "application/vnd.jupyter.widget-state+json": {
408 | "state": {
409 | "106f5a473c7940a7a32e5a4c36b03b26": {
410 | "model_module": "@jupyter-widgets/controls",
411 | "model_module_version": "2.0.0",
412 | "model_name": "HBoxModel",
413 | "state": {
414 | "children": [
415 | "IPY_MODEL_ecd4c505b4954dc8ab510a6d2cefe7ad",
416 | "IPY_MODEL_8ccacb4ee6644f1e8dfdd809fe5b28b0",
417 | "IPY_MODEL_1cb499addaf5456e9c7e6402d664247f",
418 | "IPY_MODEL_9275d435ca99492393c311f738733385",
419 | "IPY_MODEL_a14b92773e484d3a95f92280575d1052"
420 | ],
421 | "layout": "IPY_MODEL_63d1e1533c7647c88f5e027c7f22fc01"
422 | }
423 | },
424 | "18ab7cec7c994c919bda4c561a538e55": {
425 | "model_module": "@jupyter-widgets/controls",
426 | "model_module_version": "2.0.0",
427 | "model_name": "HTMLStyleModel",
428 | "state": {
429 | "description_width": "",
430 | "font_size": null,
431 | "text_color": null
432 | }
433 | },
434 | "1cb499addaf5456e9c7e6402d664247f": {
435 | "model_module": "@jupyter-widgets/controls",
436 | "model_module_version": "2.0.0",
437 | "model_name": "HTMLModel",
438 | "state": {
439 | "layout": "IPY_MODEL_267063972f98462b903b04e80054da8b",
440 | "style": "IPY_MODEL_a155f68cb75a40cc9bece01a2733f62e",
441 | "value": "Status
"
442 | }
443 | },
444 | "22156f77e1eb435fae2439f275e6e1be": {
445 | "model_module": "@jupyter-widgets/base",
446 | "model_module_version": "2.0.0",
447 | "model_name": "LayoutModel",
448 | "state": {
449 | "width": "190px"
450 | }
451 | },
452 | "243eaa616bdb49fe9bfbbb687965af3e": {
453 | "model_module": "@jupyter-widgets/controls",
454 | "model_module_version": "2.0.0",
455 | "model_name": "HTMLStyleModel",
456 | "state": {
457 | "description_width": "",
458 | "font_size": null,
459 | "text_color": null
460 | }
461 | },
462 | "267063972f98462b903b04e80054da8b": {
463 | "model_module": "@jupyter-widgets/base",
464 | "model_module_version": "2.0.0",
465 | "model_name": "LayoutModel",
466 | "state": {
467 | "width": "95px"
468 | }
469 | },
470 | "2f838f75a38b4b2eaf3f2f45d1aaa6dd": {
471 | "model_module": "@jupyter-widgets/controls",
472 | "model_module_version": "2.0.0",
473 | "model_name": "GridBoxModel",
474 | "state": {
475 | "children": [
476 | "IPY_MODEL_adbeaeff15a540fd8cfb09ab242e0577"
477 | ],
478 | "layout": "IPY_MODEL_73880c531b1140aab2baba2789e4b0e4"
479 | }
480 | },
481 | "32a8865864e34ad29b7b83e65df1c666": {
482 | "model_module": "@jupyter-widgets/base",
483 | "model_module_version": "2.0.0",
484 | "model_name": "LayoutModel",
485 | "state": {
486 | "grid_area": "right",
487 | "padding": "0px 0px 0px 0px",
488 | "width": "70px"
489 | }
490 | },
491 | "446976232f8749aeb7d0407469ad7025": {
492 | "model_module": "@jupyter-widgets/controls",
493 | "model_module_version": "2.0.0",
494 | "model_name": "HTMLStyleModel",
495 | "state": {
496 | "description_width": "",
497 | "font_size": null,
498 | "text_color": null
499 | }
500 | },
501 | "45fb2f3111224340a6e3eadf7ce0b0c3": {
502 | "model_module": "@jupyter-widgets/controls",
503 | "model_module_version": "2.0.0",
504 | "model_name": "HTMLModel",
505 | "state": {
506 | "layout": "IPY_MODEL_daf43e8b5fbd4ddea15a42955b92df50",
507 | "style": "IPY_MODEL_446976232f8749aeb7d0407469ad7025",
508 | "value": "Circuit Properties
"
509 | }
510 | },
511 | "639c5f72f32e4e619ccca4608495ade7": {
512 | "model_module": "@jupyter-widgets/controls",
513 | "model_module_version": "2.0.0",
514 | "model_name": "ButtonStyleModel",
515 | "state": {
516 | "font_family": null,
517 | "font_size": null,
518 | "font_style": null,
519 | "font_variant": null,
520 | "font_weight": null,
521 | "text_color": null,
522 | "text_decoration": null
523 | }
524 | },
525 | "63d1e1533c7647c88f5e027c7f22fc01": {
526 | "model_module": "@jupyter-widgets/base",
527 | "model_module_version": "2.0.0",
528 | "model_name": "LayoutModel",
529 | "state": {
530 | "margin": "0px 0px 0px 37px",
531 | "width": "600px"
532 | }
533 | },
534 | "71b87bf858134484b9d93e3713fdcbb3": {
535 | "model_module": "@jupyter-widgets/base",
536 | "model_module_version": "2.0.0",
537 | "model_name": "LayoutModel",
538 | "state": {
539 | "width": "70px"
540 | }
541 | },
542 | "73880c531b1140aab2baba2789e4b0e4": {
543 | "model_module": "@jupyter-widgets/base",
544 | "model_module_version": "2.0.0",
545 | "model_name": "LayoutModel",
546 | "state": {
547 | "grid_template_areas": "\n \". . . . right \"\n ",
548 | "grid_template_columns": "20% 20% 20% 20% 20%",
549 | "width": "100%"
550 | }
551 | },
552 | "8ccacb4ee6644f1e8dfdd809fe5b28b0": {
553 | "model_module": "@jupyter-widgets/controls",
554 | "model_module_version": "2.0.0",
555 | "model_name": "HTMLModel",
556 | "state": {
557 | "layout": "IPY_MODEL_cb20ccbcd79e4c429652025bff6cae08",
558 | "style": "IPY_MODEL_c517d44276414ce6b0f3c1afbdc71319",
559 | "value": "Backend
"
560 | }
561 | },
562 | "9275d435ca99492393c311f738733385": {
563 | "model_module": "@jupyter-widgets/controls",
564 | "model_module_version": "2.0.0",
565 | "model_name": "HTMLModel",
566 | "state": {
567 | "layout": "IPY_MODEL_71b87bf858134484b9d93e3713fdcbb3",
568 | "style": "IPY_MODEL_243eaa616bdb49fe9bfbbb687965af3e",
569 | "value": "Queue
"
570 | }
571 | },
572 | "9a2dda626f0e49568f09c45c7c992042": {
573 | "model_module": "@jupyter-widgets/base",
574 | "model_module_version": "2.0.0",
575 | "model_name": "LayoutModel",
576 | "state": {}
577 | },
578 | "a14b92773e484d3a95f92280575d1052": {
579 | "model_module": "@jupyter-widgets/controls",
580 | "model_module_version": "2.0.0",
581 | "model_name": "HTMLModel",
582 | "state": {
583 | "layout": "IPY_MODEL_9a2dda626f0e49568f09c45c7c992042",
584 | "style": "IPY_MODEL_ea27d52c5d384d1c95af83a034a3937c",
585 | "value": "Message
"
586 | }
587 | },
588 | "a155f68cb75a40cc9bece01a2733f62e": {
589 | "model_module": "@jupyter-widgets/controls",
590 | "model_module_version": "2.0.0",
591 | "model_name": "HTMLStyleModel",
592 | "state": {
593 | "description_width": "",
594 | "font_size": null,
595 | "text_color": null
596 | }
597 | },
598 | "adbeaeff15a540fd8cfb09ab242e0577": {
599 | "model_module": "@jupyter-widgets/controls",
600 | "model_module_version": "2.0.0",
601 | "model_name": "ButtonModel",
602 | "state": {
603 | "button_style": "primary",
604 | "description": "Clear",
605 | "layout": "IPY_MODEL_32a8865864e34ad29b7b83e65df1c666",
606 | "style": "IPY_MODEL_639c5f72f32e4e619ccca4608495ade7",
607 | "tooltip": null
608 | }
609 | },
610 | "c517d44276414ce6b0f3c1afbdc71319": {
611 | "model_module": "@jupyter-widgets/controls",
612 | "model_module_version": "2.0.0",
613 | "model_name": "HTMLStyleModel",
614 | "state": {
615 | "description_width": "",
616 | "font_size": null,
617 | "text_color": null
618 | }
619 | },
620 | "cb20ccbcd79e4c429652025bff6cae08": {
621 | "model_module": "@jupyter-widgets/base",
622 | "model_module_version": "2.0.0",
623 | "model_name": "LayoutModel",
624 | "state": {
625 | "width": "145px"
626 | }
627 | },
628 | "daf43e8b5fbd4ddea15a42955b92df50": {
629 | "model_module": "@jupyter-widgets/base",
630 | "model_module_version": "2.0.0",
631 | "model_name": "LayoutModel",
632 | "state": {
633 | "margin": "0px 0px 10px 0px"
634 | }
635 | },
636 | "ea27d52c5d384d1c95af83a034a3937c": {
637 | "model_module": "@jupyter-widgets/controls",
638 | "model_module_version": "2.0.0",
639 | "model_name": "HTMLStyleModel",
640 | "state": {
641 | "description_width": "",
642 | "font_size": null,
643 | "text_color": null
644 | }
645 | },
646 | "ecd4c505b4954dc8ab510a6d2cefe7ad": {
647 | "model_module": "@jupyter-widgets/controls",
648 | "model_module_version": "2.0.0",
649 | "model_name": "HTMLModel",
650 | "state": {
651 | "layout": "IPY_MODEL_22156f77e1eb435fae2439f275e6e1be",
652 | "style": "IPY_MODEL_18ab7cec7c994c919bda4c561a538e55",
653 | "value": "Job ID
"
654 | }
655 | }
656 | },
657 | "version_major": 2,
658 | "version_minor": 0
659 | }
660 | }
661 | },
662 | "nbformat": 4,
663 | "nbformat_minor": 5
664 | }
665 |
--------------------------------------------------------------------------------
/Time_Traveler_Badge/2023/quantum-error-suppression-mitigation-correction-ja.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# エラー抑制、エラー緩和、エラー訂正の違いとは?\n",
8 | "\n",
9 | "「[What’s the difference between error suppression, error mitigation, and error correction?](https://research.ibm.com/blog/quantum-error-suppression-mitigation-correction)」の抄訳です。"
10 | ]
11 | },
12 | {
13 | "cell_type": "markdown",
14 | "metadata": {},
15 | "source": [
16 | "#### 量子コンピューターは、変革をもたらす可能性を秘めています。しかしそれは、宇宙の物理的限界で動作する、ノイズが多く高感度なシステムに固有のエラーに対処できる場合に限られます。エラー処理は単純な作業ではなく、システム設計のあらゆる段階でこのエラーを予測し、修正する必要があります。"
17 | ]
18 | },
19 | {
20 | "cell_type": "markdown",
21 | "metadata": {},
22 | "source": [
23 | "コンピューター内でエラーが発生するのは自然なことです。量子状態は、実行される量子回路によって規定されたとおりに進化するはずです。しかし、実際の量子状態や量子ビットは、外部環境やハードウェア自体の様々な不可避な外乱(ノイズと呼ばれる外乱)により、異なる進化を遂げ、計算に誤差を生じる可能性があります。しかし、量子ビットのエラーは古典ビットのエラーよりも複雑です。量子ビットの0か1の値が変化するだけでなく、量子ビットには位相があります。量子ビットが指す方向のようなものです。私たちは、システムの各レベルでこれらの種類のエラーの両方を処理する方法を見つける必要があります。計算ハードウェア自体の制御を改善し、ハードウェアに冗長性を持たせることで、1つまたは数個の量子ビットがエラーになっても、計算のために正確な値を取り出すことができるようにするのです。\n",
24 | "\n",
25 | "このようなエラーを処理する方法はいくつかありますが、専門用語が多すぎて混乱することもあります。各用語が正確に何を意味するかについては、分野内でも意見の相違があります。エラー処理は、エラー抑制、エラー緩和、エラー訂正という独自の研究開発上の考慮事項を持つ 3 つのコア部分に分けることができます。特に抑制と緩和の違いは微妙で、完全に定義されているわけではないことに注意してください。"
26 | ]
27 | },
28 | {
29 | "cell_type": "markdown",
30 | "metadata": {},
31 | "source": [
32 | "## エラー抑制\n",
33 | "\n",
34 | "エラー抑制は、エラー処理の最も基本的なレベルです。エラー抑制とは、望ましくない影響に関する知識を利用して、それらの影響の可能性を予測し、回避するカスタマイズを導入するテクニックを指します。多くの場合、エラー抑制について話すときは、ハードウェアに最も近いレベルでのエラー処理について話しています。このような手法は、ユーザーの知らないところで行われることが多く、プロセッサーが望ましい結果を返すように制御信号を変更したり追加したりすることが多いです。\n",
35 | "\n",
36 | "エラー抑制技術の歴史は数十年前にさかのぼり、磁気共鳴画像法(MRI)の核磁気共鳴(NMR)装置など、制御可能な最初の量子システムで開発されました。量子コンピューターは、スピンエコー(量子ビットの焦点を再調整し、量子状態をより長く維持できるようにする一連のパルス)など、これらの技術のいくつかを採用しています。スピン・エコーは、ダイナミック・デカップリングと呼ばれる技術の一部です。ダイナミック・デカップリングは、アイドル状態の量子ビットにパルスを送り、その値を元の状態にリセットします。これは基本的に、計算で使用されている量子ビットからの潜在的な影響を元に戻すためです。\n",
37 | "\n",
38 | "断熱ゲートによる微分除去(DRAG)は、標準的なパルス形状に成分を追加し、計算に使用する0と1の状態よりも高い状態に入る量子ビットを減らします。その他にも数十年かけて開発された数多くの技術があり、私たちはそれを研究し、必要に応じて私たち自身のハードウェアに実装しています。[Qiskit Pulse](https://qiskit.org/documentation/apidoc/pulse.html)では、ユーザーが独自にエラー抑制を探求するためにカスタムパルスを生成することができます。[ぜひお試しください。](https://ja.learn.qiskit.org/course/quantum-hardware-pulses/calibrating-qubits-using-qiskit-pulse)"
39 | ]
40 | },
41 | {
42 | "cell_type": "markdown",
43 | "metadata": {},
44 | "source": [
45 | "## エラー緩和\n",
46 | "\n",
47 | "一方、エラー緩和は、回路のアンサンブル出力を用いて、期待値を推定する際のノイズの影響を低減または除去します。我々は、近い将来、有用な量子コンピュータを実現する鍵は、エラー緩和であると考えています。\n",
48 | "\n",
49 | "(エラー緩和:フォールト・トレランスが究極の目標である以上、エラー緩和こそが量子コンピューティングを有用なものにする道である。[続きを読む](https://research.ibm.com/blog/gammabar-for-quantum-advantage)。)\n",
50 | "\n",
51 | "私たちのチームは、さまざまなエラー緩和技術のポートフォリオを探求し、開発しています。例えば、確率的エラー・キャンセル(PEC)は、平均してノイズを打ち消すチャンネルを模倣する回路の集まりからサンプルが抽出されます。このプロセスは、ノイズキャンセリングヘッドフォンの仕組みに少し似ていますが、ショットごとにノイズをキャンセルするのではなく、平均的に機能します。ゼロノイズ外挿(ZNE)は、異なるノイズ強度における量子回路の測定結果を外挿することで、ノイズの多い量子回路の測定結果に影響を与えるノイズを低減し、実際の値がどうあるべきかを決定します。M3やTREX(Twirled Readout Error eXtinction)のような他の方法は、特に量子測定のノイズを減らすことに焦点を当てています。\n",
52 | "\n",
53 | "重要なのは、これらの方法にはそれぞれオーバーヘッドがあり、精度のレベルもそれぞれ異なるということです。例えば、これらの手法の中で最も強力なものは、指数関数的なオーバーヘッドを伴います。つまり、実行にかかる時間は、量子ビット数と回路の深さで定義される問題の大きさに応じて指数関数的に増加します。手法のポートフォリオを用意することで、ユーザーは精度の要求とどの程度のオーバーヘッドを許容するかに基づいて、自分の問題に最も理にかなった手法を選択することができます。\n",
54 | "\n",
55 | "これらの手法の中で最も強力な手法を使用すると、ノイズのない(バイアスのかかっていない)期待値を計算できるため、エラー緩和に興奮しています。期待値は様々な特性や問題をエンコードできます。例えば、スピン系の磁化や相関関数、分子配置のエネルギー、あるいはコスト関数などです。ただし、これらは通常、|00110⟩ などの特定の量子状態の確率では表しません。私たちは、研究コミュニティーや IBM Quantum Network のメンバーが、演算子の期待値をコアprimitive として利用する新しいアルゴリズムやアプリケーションを開発することを奨励しています。\n",
56 | "\n",
57 | "オーバーヘッドがあるにもかかわらず、数百量子ビットの範囲では、等価な回路深さで、エラー緩和が依然として実用的である可能性があることを願っています。等価な回路深さを持つ数百量子ビット以上になると、量子エラー訂正とエラー緩和技術のハイブリッドの可能性を想定しています。 "
58 | ]
59 | },
60 | {
61 | "cell_type": "markdown",
62 | "metadata": {},
63 | "source": [
64 | "## エラー訂正\n",
65 | "\n",
66 | "エラー訂正は、我々の究極の目標であるフォールト・トレラント量子計算を達成する方法であり、冗長性を構築することで、数個の量子ビットにエラーが発生しても、システムはプロセッサー上で実行されるどんなものに対しても正確な答えを返すことができます。エラー訂正は、エラーが発生したかどうかをチェックできるように、情報が冗長性を持ってエンコードされる古典的なコンピューティングの標準的な技術です。\n",
67 | "\n",
68 | "量子エラー訂正も同じ考え方ですが、前述の新しいタイプの誤りを考慮する必要があるという点に注意が必要です。さらに、状態が崩れないようにシステムを注意深く測定しなければなりません。量子エラー訂正では、論理量子ビットと呼ばれる単一の量子ビットの値を複数の物理量子ビットにまたがって符号化し、物理量子ビットのファブリックを本質的にエラーのない論理量子ビットとして扱うことができるゲートを実装します。エラーを検出し訂正するために、エラー訂正コードと呼ばれる特定の演算と測定のセットを実行します。しきい値定理によれば、エラー訂正を適用する前にハードウェアが達成しなければならない、ハードウェア依存の最小エラー率があることがわかっています。\n",
69 | "\n",
70 | "(しきい値定理:量子のパイオニアが考える、量子アルゴリズムに取り組む人がもっと必要だと考える理由: [量子しきい値定理](https://medium.com/qiskit/why-this-quantum-pioneer-thinks-we-need-more-people-working-on-quantum-algorithms-3020729c61e1)の重要な立役者の一人、Dorit Aharonov について読む。)\n",
71 | "\n",
72 | "しかし、エラー訂正は単なる工学的課題ではなく、物理学と数学の問題です。現在の主要なコードである表面符号は、1つの論理量子ビットに対してO(d^2)という多くの物理量子ビットを必要とします。ここで、d は距離と呼ばれるコードの特徴であり、訂正できるエラーの数に関係します。QECコードがフォールトトレランスを達成するのに十分なエラーを訂正するためには、コードのエラー訂正能力と量子デバイスのエラーレートが一致するように、距離dを十分に高く選択する必要があります。現在の量子デバイスはかなりノイズが多く、エラー率は1e-3に近いため、表面符号で量子エラー訂正を使用するために必要な量子ビットの数が現時点では非現実的です。前進するためには、デバイスの物理エラー率を1e-4まで下げると同時に、より少ない物理量子ビットで済む新しいコードを発見する必要があります。\n",
73 | "\n",
74 | "世界中の理論家たちは、現在もさまざまなエラー訂正戦略や量子ビットのレイアウトを考案し、どれが将来的に最も有望かを見極めています。昨年、理論家たちは2次関数的なオーバーヘッドO(d^2)を克服する方法を発見し、ロバスト性に線形にスケールするコードを明らかにしました。ロバストネスが2倍になるということは、量子ビット数が2倍になるということです。これによって、オーバーヘッドを大幅に削減したエラー訂正が可能になるかもしれません。IBM Quantum は最近、この分野のさらなる研究に拍車をかけるため、[サマースクール](https://www.ibm.com/quantum/summer-school)を開催しました。一方、ハードウェア・エンジニアは理論家と協力して、理論家の最良のアイデアを確実に実現できるように取り組んでいます。\n",
75 | "\n",
76 | "エラー抑制、エラー緩和、エラー訂正は似ているように聞こえるかもしれませんが、それぞれ独自の専門知識と考慮事項が必要であり、量子コンピューターが真の価値をもたらすためにはそれぞれが極めて重要です。量子コンピューターがどのような問題を解決したいかは分かっていますが、実際にその問題を解決するには、エラーやノイズを実用的でスケーラブルな方法で処理する必要があり、そこに到達する方法はまだ明らかではありません。エラー抑制、緩和、訂正のいずれかの分野が改善されれば、実用的な量子コンピューティングの実現に近づきます。これらの分野は一体となって、量子コンピューティングのオーバーヘッドを低減するための継続的な道筋を提供します。IBM Quantum は、量子中心のスーパーコンピューティングの時代をもたらすために、これらすべての分野で前進を続けています。 "
77 | ]
78 | },
79 | {
80 | "cell_type": "markdown",
81 | "metadata": {},
82 | "source": [
83 | "Translated and adapted by: Kifumi Numata"
84 | ]
85 | }
86 | ],
87 | "metadata": {
88 | "kernelspec": {
89 | "display_name": "Python 3",
90 | "language": "python",
91 | "name": "python3"
92 | },
93 | "language_info": {
94 | "codemirror_mode": {
95 | "name": "ipython",
96 | "version": 3
97 | },
98 | "file_extension": ".py",
99 | "mimetype": "text/x-python",
100 | "name": "python",
101 | "nbconvert_exporter": "python",
102 | "pygments_lexer": "ipython3",
103 | "version": "3.8.5"
104 | }
105 | },
106 | "nbformat": 4,
107 | "nbformat_minor": 4
108 | }
109 |
--------------------------------------------------------------------------------
/credly.md:
--------------------------------------------------------------------------------
1 |
2 | # Quantum Explorers Digital Credentials
3 |
4 | Quantum Explorers is our self-paced, game-based quantum computing learning program for high school students and above. There are seven themed achievements to unlock. Each achievement has a learning module, event, or set of tasks associated with it that must be completed in order to unlock its achievement. Based on the number of achievements a learner unlocks, they will be issued an IBM digital credential.
5 |
6 | For program information, visit [qisk.it/quantum-explorers](http://qisk.it/quantum-explorers).
7 |
8 | 
9 |
10 | ## Badge Pages
11 |
12 | Click on the links below for more information about each badge:
13 |
14 | - [Participant](https://www.credly.com/org/ibm/badge/quantum-explorer-2023-participant) - 1/3 community achievements
15 | - [Foundational](https://www.credly.com/org/ibm/badge/quantum-explorer-2023-foundational) - 1/4 learning achievements
16 | - [Intermediate](https://www.credly.com/org/ibm/badge/quantum-explorer-2023-intermediate) - 4/4 learning achievements
17 | - [Advanced](https://www.credly.com/org/ibm/badge/quantum-explorer-2023-advanced) - 7/7 total achievements
18 |
19 |
20 |
21 |
22 | ## Privacy Statement
23 |
24 | NOTICE: IBM leverages the services of Credly, a 3rd party data processor authorized by IBM and located in the United States, to assist in the administration of the IBM Digital Badge program. In order to issue you an IBM Digital Badge, your personal information (name, email address, and badge earned) will be shared with Credly. You will receive an email notification from Credly with instructions for claiming the badge. Your personal information is used to issue your badge and for program reporting and operational purposes. IBM may share the personal information collected with IBM subsidiaries and third parties globally. It will be handled in a manner consistent with IBM privacy practices. The IBM Privacy Statement can be viewed [here](https://www.ibm.com/us-en/privacy).
25 |
26 |
27 | Contact email address: qiskit.events@us.ibm.com
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/images/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiskit-community/quantum-explorers/597fec6917327884425c9121257bcbf027df5f16/images/.DS_Store
--------------------------------------------------------------------------------
/images/QE Medium Banner.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiskit-community/quantum-explorers/597fec6917327884425c9121257bcbf027df5f16/images/QE Medium Banner.jpg
--------------------------------------------------------------------------------
/images/credly_badges.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiskit-community/quantum-explorers/597fec6917327884425c9121257bcbf027df5f16/images/credly_badges.png
--------------------------------------------------------------------------------
/images/incoming message.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiskit-community/quantum-explorers/597fec6917327884425c9121257bcbf027df5f16/images/incoming message.jpg
--------------------------------------------------------------------------------
/images/qe_banner.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiskit-community/quantum-explorers/597fec6917327884425c9121257bcbf027df5f16/images/qe_banner.jpg
--------------------------------------------------------------------------------