Skip to content

Commit

Permalink
deploy: 5679d69
Browse files Browse the repository at this point in the history
  • Loading branch information
yiiyama committed Apr 19, 2023
1 parent 414d029 commit fddc883
Show file tree
Hide file tree
Showing 26 changed files with 792 additions and 783 deletions.
50 changes: 25 additions & 25 deletions _sources/addition_on_ibmq.ipynb
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "d4d9c798",
"id": "e1fef5dc",
"metadata": {},
"source": [
"# 【参考】足し算を実機で行う\n",
Expand All @@ -19,7 +19,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d9e959df",
"id": "e2fa7199",
"metadata": {
"tags": [
"remove-output"
Expand All @@ -43,7 +43,7 @@
},
{
"cell_type": "markdown",
"id": "974eb709",
"id": "ccd55db0",
"metadata": {},
"source": [
"実習と同様、`'ibm-q/open/main'`のプロバイダでは(1, 1)の回路しか扱えないので、フェイクバックエンドを使います。"
Expand All @@ -52,7 +52,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7c245ab0",
"id": "bdb6f3f6",
"metadata": {
"tags": [
"remove-output",
Expand All @@ -72,7 +72,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ea1f18ab",
"id": "b44b5cf8",
"metadata": {
"tags": [
"remove-output"
Expand All @@ -94,7 +94,7 @@
},
{
"cell_type": "markdown",
"id": "1da8f041",
"id": "c54a74ca",
"metadata": {},
"source": [
"実習と全く同じ`setup_addition`関数と、次のセルで効率化前の回路を返す`make_original_circuit`関数を定義します。"
Expand All @@ -103,7 +103,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "dca09621",
"id": "9133e1f6",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -165,7 +165,7 @@
},
{
"cell_type": "markdown",
"id": "954bdcb6",
"id": "845aea2c",
"metadata": {},
"source": [
"(4, 4)から(1, 1)までそれぞれオリジナルと効率化した回路の二通りを作り、全てリストにまとめてバックエンドに送ります。"
Expand All @@ -174,7 +174,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "726ab688",
"id": "d7462357",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -217,7 +217,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b54076fc",
"id": "b2c85b6a",
"metadata": {
"tags": [
"remove-input"
Expand All @@ -236,7 +236,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "37afb3b0",
"id": "37c204c9",
"metadata": {
"tags": [
"remove-output",
Expand Down Expand Up @@ -276,7 +276,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "0271748e",
"id": "c1d2b4d3",
"metadata": {
"tags": [
"remove-input"
Expand All @@ -294,7 +294,7 @@
},
{
"cell_type": "markdown",
"id": "8542b104",
"id": "19011701",
"metadata": {},
"source": [
"ジョブが返ってきたら、正しい足し算を表しているものの割合を調べてみましょう。"
Expand All @@ -303,7 +303,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e9f4fdda",
"id": "ebe8c2e2",
"metadata": {
"tags": [
"remove-output"
Expand Down Expand Up @@ -339,7 +339,7 @@
},
{
"cell_type": "markdown",
"id": "47af2c2b",
"id": "98c3b09b",
"metadata": {},
"source": [
"ちなみに、`ibm_kawasaki`というマシンで同じコードを走らせると、下のような結果が得られます。\n",
Expand Down Expand Up @@ -374,7 +374,7 @@
},
{
"cell_type": "markdown",
"id": "ef0c03cf",
"id": "9d4d4a0d",
"metadata": {
"tags": [
"remove-input"
Expand All @@ -395,7 +395,7 @@
},
{
"cell_type": "markdown",
"id": "783ec66f",
"id": "c5857d32",
"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": "8b6b37a6",
"id": "52b1cf5a",
"metadata": {},
"source": [
"## Quantum Volume\n",
Expand All @@ -424,7 +424,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "db13ac0c",
"id": "cb21586f",
"metadata": {
"tags": [
"remove-output",
Expand All @@ -443,7 +443,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "34035917",
"id": "fcf4bf4e",
"metadata": {
"tags": [
"remove-output",
Expand Down Expand Up @@ -477,7 +477,7 @@
},
{
"cell_type": "markdown",
"id": "f95cf89e",
"id": "43e34cdb",
"metadata": {},
"source": [
"QVから期待される正答率の序列にならないかもしれません。量子コンピュータという恐ろしく複雑な機械の性能を一つの数値で表すことの限界がここにあり、今のように単純な回路を実行する場合は、ケースバイケースで特定の量子ビットや特定のゲートのエラー率が結果に大きな影響を及ぼしたりするのです。\n",
Expand All @@ -488,7 +488,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "00c518f7",
"id": "30a62548",
"metadata": {
"tags": [
"remove-output",
Expand All @@ -509,7 +509,7 @@
},
{
"cell_type": "markdown",
"id": "e6267166",
"id": "9119fb7f",
"metadata": {
"tags": [
"remove-output",
Expand Down Expand Up @@ -543,7 +543,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e3851043",
"id": "559e76f3",
"metadata": {
"tags": [
"raises-exception",
Expand All @@ -567,7 +567,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d2272b30",
"id": "2567e7de",
"metadata": {
"tags": [
"remove-output",
Expand Down

0 comments on commit fddc883

Please sign in to comment.