Skip to content

Commit

Permalink
deploy: e3f0d63
Browse files Browse the repository at this point in the history
  • Loading branch information
yiiyama committed Apr 25, 2023
1 parent fddc883 commit 235d006
Show file tree
Hide file tree
Showing 29 changed files with 870 additions and 847 deletions.
50 changes: 25 additions & 25 deletions _sources/addition_on_ibmq.ipynb
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "e1fef5dc",
"id": "38e092ef",
"metadata": {},
"source": [
"# 【参考】足し算を実機で行う\n",
Expand All @@ -19,7 +19,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e2fa7199",
"id": "445dee83",
"metadata": {
"tags": [
"remove-output"
Expand All @@ -43,7 +43,7 @@
},
{
"cell_type": "markdown",
"id": "ccd55db0",
"id": "296cd822",
"metadata": {},
"source": [
"実習と同様、`'ibm-q/open/main'`のプロバイダでは(1, 1)の回路しか扱えないので、フェイクバックエンドを使います。"
Expand All @@ -52,7 +52,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "bdb6f3f6",
"id": "bdce3d32",
"metadata": {
"tags": [
"remove-output",
Expand All @@ -72,7 +72,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b44b5cf8",
"id": "51c7bcfa",
"metadata": {
"tags": [
"remove-output"
Expand All @@ -94,7 +94,7 @@
},
{
"cell_type": "markdown",
"id": "c54a74ca",
"id": "26c5cde0",
"metadata": {},
"source": [
"実習と全く同じ`setup_addition`関数と、次のセルで効率化前の回路を返す`make_original_circuit`関数を定義します。"
Expand All @@ -103,7 +103,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "9133e1f6",
"id": "fa4f73d6",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -165,7 +165,7 @@
},
{
"cell_type": "markdown",
"id": "845aea2c",
"id": "9241e4a1",
"metadata": {},
"source": [
"(4, 4)から(1, 1)までそれぞれオリジナルと効率化した回路の二通りを作り、全てリストにまとめてバックエンドに送ります。"
Expand All @@ -174,7 +174,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d7462357",
"id": "ddeec35e",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -217,7 +217,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b2c85b6a",
"id": "1970d7ce",
"metadata": {
"tags": [
"remove-input"
Expand All @@ -236,7 +236,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "37c204c9",
"id": "fe859e44",
"metadata": {
"tags": [
"remove-output",
Expand Down Expand Up @@ -276,7 +276,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c1d2b4d3",
"id": "32d1c6be",
"metadata": {
"tags": [
"remove-input"
Expand All @@ -294,7 +294,7 @@
},
{
"cell_type": "markdown",
"id": "19011701",
"id": "472f85d1",
"metadata": {},
"source": [
"ジョブが返ってきたら、正しい足し算を表しているものの割合を調べてみましょう。"
Expand All @@ -303,7 +303,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ebe8c2e2",
"id": "e67e5b7a",
"metadata": {
"tags": [
"remove-output"
Expand Down Expand Up @@ -339,7 +339,7 @@
},
{
"cell_type": "markdown",
"id": "98c3b09b",
"id": "4664d567",
"metadata": {},
"source": [
"ちなみに、`ibm_kawasaki`というマシンで同じコードを走らせると、下のような結果が得られます。\n",
Expand Down Expand Up @@ -374,7 +374,7 @@
},
{
"cell_type": "markdown",
"id": "9d4d4a0d",
"id": "42c9e566",
"metadata": {
"tags": [
"remove-input"
Expand All @@ -395,7 +395,7 @@
},
{
"cell_type": "markdown",
"id": "c5857d32",
"id": "0e3a9f1e",
"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": "52b1cf5a",
"id": "57e8156d",
"metadata": {},
"source": [
"## Quantum Volume\n",
Expand All @@ -424,7 +424,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "cb21586f",
"id": "47ac72ef",
"metadata": {
"tags": [
"remove-output",
Expand All @@ -443,7 +443,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "fcf4bf4e",
"id": "115b3e0e",
"metadata": {
"tags": [
"remove-output",
Expand Down Expand Up @@ -477,7 +477,7 @@
},
{
"cell_type": "markdown",
"id": "43e34cdb",
"id": "d1f00f18",
"metadata": {},
"source": [
"QVから期待される正答率の序列にならないかもしれません。量子コンピュータという恐ろしく複雑な機械の性能を一つの数値で表すことの限界がここにあり、今のように単純な回路を実行する場合は、ケースバイケースで特定の量子ビットや特定のゲートのエラー率が結果に大きな影響を及ぼしたりするのです。\n",
Expand All @@ -488,7 +488,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "30a62548",
"id": "3c742e3f",
"metadata": {
"tags": [
"remove-output",
Expand All @@ -509,7 +509,7 @@
},
{
"cell_type": "markdown",
"id": "9119fb7f",
"id": "3ede95d4",
"metadata": {
"tags": [
"remove-output",
Expand Down Expand Up @@ -543,7 +543,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "559e76f3",
"id": "9628f630",
"metadata": {
"tags": [
"raises-exception",
Expand All @@ -567,7 +567,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "2567e7de",
"id": "94fb1e6f",
"metadata": {
"tags": [
"remove-output",
Expand Down

0 comments on commit 235d006

Please sign in to comment.