Skip to content

Commit

Permalink
deploy: 55eac00
Browse files Browse the repository at this point in the history
  • Loading branch information
yiiyama committed May 25, 2023
1 parent 5a1d169 commit 8b1f3a1
Show file tree
Hide file tree
Showing 28 changed files with 722 additions and 829 deletions.
Binary file added _images/rxx.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/ryy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/rzz.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 25 additions & 25 deletions _sources/addition_on_ibmq.ipynb
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "6225a0f1",
"id": "a2d4c21a",
"metadata": {},
"source": [
"# 【参考】足し算を実機で行う\n",
Expand All @@ -19,7 +19,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d2567a0a",
"id": "5fc7b6ab",
"metadata": {
"tags": [
"remove-output"
Expand All @@ -43,7 +43,7 @@
},
{
"cell_type": "markdown",
"id": "034eb533",
"id": "36a13cd9",
"metadata": {},
"source": [
"実習と同様、`'ibm-q/open/main'`のプロバイダでは(1, 1)の回路しか扱えないので、フェイクバックエンドを使います。"
Expand All @@ -52,7 +52,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "63391898",
"id": "d1ab9a36",
"metadata": {
"tags": [
"remove-output",
Expand All @@ -72,7 +72,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "51255e86",
"id": "85050776",
"metadata": {
"tags": [
"remove-output"
Expand All @@ -94,7 +94,7 @@
},
{
"cell_type": "markdown",
"id": "bdee87f8",
"id": "12c8d900",
"metadata": {},
"source": [
"実習と全く同じ`setup_addition`関数と、次のセルで効率化前の回路を返す`make_original_circuit`関数を定義します。"
Expand All @@ -103,7 +103,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5260448e",
"id": "8d7ce3a3",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -165,7 +165,7 @@
},
{
"cell_type": "markdown",
"id": "228869b0",
"id": "e14d4b25",
"metadata": {},
"source": [
"(4, 4)から(1, 1)までそれぞれオリジナルと効率化した回路の二通りを作り、全てリストにまとめてバックエンドに送ります。"
Expand All @@ -174,7 +174,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "18b32e73",
"id": "a7df5b88",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -217,7 +217,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "1b7d1280",
"id": "63528480",
"metadata": {
"tags": [
"remove-input"
Expand All @@ -236,7 +236,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e46abf38",
"id": "bfce8c0f",
"metadata": {
"tags": [
"remove-output",
Expand Down Expand Up @@ -276,7 +276,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ea37eb4a",
"id": "8b0689f2",
"metadata": {
"tags": [
"remove-input"
Expand All @@ -294,7 +294,7 @@
},
{
"cell_type": "markdown",
"id": "0bb9a240",
"id": "74084449",
"metadata": {},
"source": [
"ジョブが返ってきたら、正しい足し算を表しているものの割合を調べてみましょう。"
Expand All @@ -303,7 +303,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b9ad0795",
"id": "bff6e622",
"metadata": {
"tags": [
"remove-output"
Expand Down Expand Up @@ -339,7 +339,7 @@
},
{
"cell_type": "markdown",
"id": "54650822",
"id": "00895903",
"metadata": {},
"source": [
"ちなみに、`ibm_kawasaki`というマシンで同じコードを走らせると、下のような結果が得られます。\n",
Expand Down Expand Up @@ -374,7 +374,7 @@
},
{
"cell_type": "markdown",
"id": "d6c00f16",
"id": "42da3454",
"metadata": {
"tags": [
"remove-input"
Expand All @@ -395,7 +395,7 @@
},
{
"cell_type": "markdown",
"id": "a4bc4b77",
"id": "5ee36e36",
"metadata": {},
"source": [
"回路が均一にランダムに$0$から$2^{n_1 + n_2 + n_3} - 1$までの数を返す場合、レジスタ1と2のそれぞれの値の組み合わせに対して正しいレジスタ3の値が一つあるので、正答率は$2^{n_1 + n_2} / 2^{n_1 + n_2 + n_3} = 2^{-n_3}$となります。実機では、(4, 4)と(3, 3)でどちらの回路も正答率がほとんどこの値に近くなっています。(2, 2)では効率化回路で明らかにランダムでない結果が出ています。(1, 1)では両回路とも正答率8割です。\n",
Expand All @@ -405,7 +405,7 @@
},
{
"cell_type": "markdown",
"id": "53657ac2",
"id": "e4f79572",
"metadata": {},
"source": [
"## Quantum Volume\n",
Expand All @@ -424,7 +424,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ecb7d5f8",
"id": "8286d17d",
"metadata": {
"tags": [
"remove-output",
Expand All @@ -443,7 +443,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "2265b826",
"id": "236f18e4",
"metadata": {
"tags": [
"remove-output",
Expand Down Expand Up @@ -477,7 +477,7 @@
},
{
"cell_type": "markdown",
"id": "4949dc13",
"id": "c6f92bd9",
"metadata": {},
"source": [
"QVから期待される正答率の序列にならないかもしれません。量子コンピュータという恐ろしく複雑な機械の性能を一つの数値で表すことの限界がここにあり、今のように単純な回路を実行する場合は、ケースバイケースで特定の量子ビットや特定のゲートのエラー率が結果に大きな影響を及ぼしたりするのです。\n",
Expand All @@ -488,7 +488,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d60c667d",
"id": "2f3ecffd",
"metadata": {
"tags": [
"remove-output",
Expand All @@ -509,7 +509,7 @@
},
{
"cell_type": "markdown",
"id": "71976075",
"id": "6fe8a572",
"metadata": {
"tags": [
"remove-output",
Expand Down Expand Up @@ -543,7 +543,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "62547224",
"id": "d95de361",
"metadata": {
"tags": [
"raises-exception",
Expand All @@ -567,7 +567,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "53e476be",
"id": "4c148338",
"metadata": {
"tags": [
"remove-output",
Expand Down

0 comments on commit 8b1f3a1

Please sign in to comment.