2024年10月16日水曜日

Testing my mobile quantum circuit simulator

[Abstract] This article tests the applicability of the mobile quantum circuit simulator Qsim_multi that I have developed so far with MIT App Inventor. As examples, I have taken the inverse Quantum Fourier transform and the order finding problems that appear in a recently published book. These form the basis of Shor's prime factorization algorithm. In conclusion, I have confirmed that my simulator Qsim_multi can handle these problems successfully.

🔴 A new book on quantum computing
Recently, I bought a new book (FIg.1) by Nivio Dos Santos. The title is "How to code for Quantum Computers", but it is not a so-called how-to book, but a compact summary of basic concepts. As soon as you open the book, you get the feeling that something fun is written in it. In the second half, the quantum Fourier transform, quantum phase estimation, and Shor's algorithm calculations are explained in detail. Therefore, I would say that this is a book for beginners to intermediate level.
Although the main text does not include any program code, the Python code (Jupyter Notebook) for the Google Cirq environment is publicly available on the Web, which is useful.

I ran the following two examples from the book on my mobile quantum simulator. However, I noticed something important here. That is the order of the quantum bits. My simulator is the same as IBM Qiskit, but in Cirq, the order is reversed. Therefore, it was necessary to reverse it. However, even if I did that, for example, the results of the quantum Fourier transform would have different phases even if the probabilities of each basis were the same. If you keep that in mind, there is no problem.

🔴 Example1: Using Inverse-QFT
First, here is an example using the inverse quantum Fourier transform. Fig.2 shows the circuit diagram and quantum state consisting of 16 bases explained in this book. The inverse quantum Fourier transform invQFT is shown in its expanded form. The small filled circles in each circle indicate the probability, and the slope of the red line indicates the phase.
The result of converting this to my simulator and running it is shown in Fig. 3. This simulator has a built-in inverse quantum Fourier transform (IQFT), so I used it as is. Comparing the quantum state with Fig. 2, the probability is the same, and the phase is a mirror image. This result shows that my simulator is operating normally.

🔴 Example2: Finding the order of [gk mod N = 1]
Next, we will look at the order-finding problem, which is important in Shor's algorithm. Here, we find the order of the specific example "7k mod 15 = 1", that is, the smallest integer k that satisfies this equation.

The quantum circuit and the order discovery results are shown below. Fig. 4 is from the Cirq environment, and Fig. 5 is from my simulator. The measurement results after applying "7k mod 15 " and invQFT were consistent for both in a 3-qubit system. That is, out of the eight possibilities, only 010, 100, 000, and 110 were measured with equal probability. By approximating the result to a rational number, we obtained 1/4, and found that the order was 4. The details of why we can say this and its relationship to Shor's algorithm are shown below:

 2024年7月9日火曜日
 Shor's Algorithm:量子コンピューティングの学びの最高峰
In Fig. 4, the measurement results are shown as the frequency of occurrence in 1000 trials, and in Fog.5 they are shown as probability calculation results.

In addition, in my simulator in Fig. 5, the measured values ​​for the four cases (3-qubit) are divided into four. This is a little difficult to see, so it would be better to summarize it as shown in Fig. 4. I would like to address this in the next version update.

🔴Conclusions
For simple cases of the inverse quantum Fourier transform and the order finding problem, my mobile quantum circuit simulator gave identical results to those run in the Google Cirq environment, confirming the applicability of the simulator to a certain extent.

自作モバイル量子回路シミュレータのテスト

【要旨】本稿は、これまでに自作したモバイル量子回路シミュレータQsim_multiの適用性をテストするものである。例題として、最近発刊されたある書籍に載っている、逆量子フーリエ変換位数発見問題を取り上げた。これらは、Shorの素因数分解アルゴリズムの根幹を成している。結論として、自作シミュレータQsim_multiがこれらを正常に処理できることを確認できた。

🔴 A new book on quantum computing
 最近、Nivio Dos Santos著の新刊(FIg.1)を購入した。タイトルは、"How to code for Quantum Computers"となっているが、いわゆるハウツー本ではなく、基本概念がコンパクトにまとめられている。本を開いたとたんに、何か楽しいことが書いてある、という雰囲気がある。後半には、量子フーリエ変換、量子位相推定、Shorのアルゴリズムの計算が詳細に説明されている。だから、初級から中級レベルの本だと言える。
 本文には、プログラムコードはほとんど出てこないが、Google Cirq環境用のPythonコード(Jupyter Notebook)がWeb上に公開されているので重宝する。

 この本に掲載されている以下の二つの例題を、私の自作モバイル量子シミュレータで稼働させるのである。だが、ここで重要なことに気づいた。それは、量子ビットの並べ順である。私のシミュレータは、IBM Qiskitなどと同じだが、Cirqでは、それが逆順になっているのである。したがって、それを逆転させる必要があった。しかし、そうしても、例えば、量子フーリエ変換の結果などは、各基底の確率は同一になっても、位相は異なるだろう。それを踏まえて扱えば問題ない。

🔴 Example1: Using Inverse-QFT
 まず、逆量子フーリエ変換を使う例である。Fig.2はこの書籍で説明されている回路図と16個の基底からなる量子状態である。逆量子フーリエ変換invQFTは展開形で示されている。それぞれの円内の塗り潰した小さな円は確率を示し、赤い直線の傾きは位相を示す。
 これを私のシミュレータ用に変換して実行した結果をFig.3に示す。このシミュレータには、逆量子フーリエ変換IQFTを内蔵しているので、それをそのまま使った。量子状態をFig.2と比較すると、確率は同じであり、位相は鏡像反転している。この結果から、私のシミュレータは、正常に稼働していることが分かる。

🔴 Example2: Finding the order of [gk mod N = 1]
 次に、Shorのアルゴリズムで重要な位数発見問題である。ここでは、具体例「7k mod 15 = 1」の位数、すなわち、この式を満たす最小の整数kを求める。
 量子回路と位数発見結果を以下に示す。Fig.4はCirq環境であり、Fig.5は私のシミュレータによる。「7k mod 15 」とinvQFTの適用後の測定結果は、3-qubitシステムにおいて、両者で一致した。すなわち、8個の可能性のうち、010、100、000、110の四つだけが、それぞれ等しい確率で測定される。その結果を有理数近似して1/4が得られ、位数が4であることがわかった。なぜそう言えるのかの詳細と、Shorのアルゴリズムとの関係は以下に示されている:
 2024年7月9日火曜日
 Shor's Algorithm:量子コンピューティングの学びの最高峰
 Fig.4では、測定結果は、1000回試行おける出現頻度で示してあり、Fog.5では確率計算結果として示している。
 なお、Fig.5の私のシミュレータでは、測定した4ケース(3-qubit)の値が、それぞれ四つに分かれている。これは少し見にくいので、Fig4.のようにまとめた方が良い。次回のバージョンアップの際に対処したい。

🔴結論
 逆量子フーリエ変換と位数発見問題の簡単な場合について、私のモバイル量子回路シミュレータは、Google Cirq環境で実行されたのと同一の結果を与えた。一定の適用性を確認できたと考える。

2024年10月7日月曜日

ある女子学生とMIT App Inventor

 小生、普段は量子コンピューティング(fundamentals)関連 記事を書いています。そこで作成しているアプリは、ほぼ全面的にMIT App Inventorを利用しています。そのApp Inventorと日本のある女子学生の関わりに関するstoryが以下に掲載されています。
 素晴らしい記事だと思います!🎉🎉🎉

🔴MIT App Inventorトップページ
https://appinventor.mit.edu/

🔴App Inventor Foundation Newsページ
https://www.appinventorfoundation.org/news/rika-suzuki


2024年10月6日日曜日

Books to Learn the Basics of Quantum Computing

This topic has already been covered several times on this blog. I hope that the short articles to come will also be helpful to those who are thinking of learning quantum computing. If you have a solid grasp of the basics, you will have a higher chance of progressing in anything.

There are countless books, web materials, YouTube videos, etc. on quantum computing, but the following two books are recommended on the IBM Quantum Learning site. These are books that I have studied thoroughly myself, so I am very happy with this recommendation! (I have written several articles on this blog about the contents of these books, so please take a look.)

What's also great is that, to a certain extent, you can use the IBM Quantum Computer for free, as shown below. Most of the examples on this site and the examples in the books above can be run on this hardware.
Of course, IBM also provides guides for those who want to move on to more advanced content. For example, the following well-known advanced books are also introduced.
  • Michael A. Nielsen, Isaac L. Chuang, "Quantum Computation and Quantum Information" 
  • Phillip Kaye, Raymond Laflamme, and Michele Mosca, "An Introduction to Quantum Computing"

2024年9月26日木曜日

最近購入した量子コンピューティング書籍2冊

 最近、量子コンピューティングの本を2冊購入した。「ここを知りたい」と思っていたことが書かれていて、とても有用だったので、簡単に紹介したい。

🔴中山茂:新版Qiskit 量子プログラミング入門、Gaia教育シリーズ79, 2024
 IBMの量子プログラミング開発環境Qiskitは多機能で優れたものではあるが、その改訂の頻度が激しすぎる。その都度、それまで動いていたアプリに何らかの不整合が生じて動かなくなる状態が続いている。過渡期であるのでやむを得ないのかも知れないが、困っている人は多いはずである。
 著者はその点も考慮して、その時点の最新版Qiskit 1.1で稼働するPythonコードを多数示している。IBMのサイトでドキュメントを調べなくても、本書がガイドしてくれるのでとても有り難い!(と思っていたら、さらにQiskit 1.2で変更になってしまったところが既に数ヶ所見つかった!)

 小生にとって最も良かったのは、最新のIBM Quantum実機(シミュレータではなく)をどのように使うか、その例題が付いていることである。若干の修正は必要であったが、小生のローカルマシンに構築したQiskit環境から(APIトークンを付与して)実機で動かすことができた。具体的には、最新のIBM Quantum実機で以下の機能を使うことができた:
  • Estimatorによる、実機上での期待値計算
  • Samplerによる、実機上での量子状態計算
  • 量子回路に対する、トランスパイルによる選択マシン向けの最適化
 さらに、量子計算と古典計算を連携させるPythonプログラムの例も多数示しているので、単に勉強ではなく、少しづつ、実際的な問題解決に向かえるという気にさせてくれる。

🔴Vladimir Silva: Quantum Computing by Practice, APress, 2024
 この書籍で特に気に入った章は、Chapter 8: Game Theoryである。古典コンピュータではできない、量子コンピュータ特有のゲーム問題解法が示されている。これを動かして、量子コンピューティングに馴染みがない人を驚かすことができる!以下の二つがある。
  • Counterfeit coin puzzle:量子重ね合わせと、確率振幅増幅を使った驚異の偽コイン発見プログラム
  • Mermin-Peres Magic Square Game: 量子もつれを巧みに利用した、見えないテレパシーを使うような驚異的マジック!

2024年9月23日月曜日

「量子天秤」の威力を示す偽コイン発見ゲーム

 前報では、量子もつれの不思議さを感じられるMermin-Peres Magic Gameについて述べた。今回は、量子特有の別の性質、量子重ね合わせ(superposition)を巧みに利用した「偽コイン発見」Counterfeit Coin Puzzleについて簡単に書いてみたい。

🔴偽コイン(Counterfeit Coin)発見パズル
 n個のコインのうちに、k個の偽物が混じっているとする。偽物は、いずれも正常なものよりも一定量だけ軽い。どれが偽物かを特定したい。ここでは(左右の皿に同数のコインを入れて均衡を測るため)天秤を使う。では、何回、天秤で測定すれば偽物を特定できるか。それを解くための計算量に関する研究はすでに発表されている。

 具体例で検討する。今、8個のコインのうち1個が偽物(n = 8、k = 1)について考える。この場合、2回だけ天秤で測れば偽物を特定できることが分かっている。

 だが、量子計算では、「量子天秤」Quantum Beam Balanceを使うと、偽物が1個である場合、コインの総数nに拘らず、1回だけの測定で偽物を特定できる!

🔴量子天秤では1回の測定で偽物を特定できるという事実
 量子計算ではなぜそれができるのかについては、IBM Qiskitの解説[1]や書籍[2]などに詳しく掲載されている。本稿では、whyではなく、howについてだけ示す。つまり、「こうすればできる」というメモとして叙述する。

(1)「量子天秤」Quantum Beam Balanceを作る
 例えば、11111001のような、1が偶数個のバイナリストリングを考える。これは、コインq7q6q5q4q3q2q1q0に対応するが、q1q2を除く6個のコインを皿に載せた状態を意味する。左右どちらの皿に載せるかは問題ではない。下図は、そのようなすべてのバイナリストリングの重ね合わせ状態(superposition)を作る仕掛けである。その作成が成功した場合は、最下段の量子ビットq8が0となり、失敗の場合は1となる。その成功の確率は0.5なので、成功するまで繰り返せば良い。

 このsuperpositionの作成が成功した場合(q8の測定結果が0の場合)、図の右端に置かれたCNOT(制御付きNOT)が働いて、偽コインのインデックス(この場合は3)が設定される。念のためだが、これによって予め答えを教えている訳ではなく、偽物のコインを一つ入れたに過ぎない。この時点で、必要な量子天秤を構成したということになる。


(2)量子天秤で偽コインを特定する
 引き続き、下図の量子回路を適用すると、偽コインを特定できる。回路の説明は略すが、注目すべきは、この回路を1回通すだけで、すなわち、量子天秤で1回だけ測定するだけで結果が出ることである!

 実際、測定結果は、以下のいずれかになる。どちらの場合も、q3だけが他のビットと異なっている。すなわち、偽コインはq3であることを示している!
🔴IBM Quantum実機でも確かめたいが
 この量子回路を、IBM Quantum実機(ibm_sherbrooke)で実行してみたが、失敗であった。"Instruction bfunc is not supported"というエラーが発生。bfucとは、Boolean Functionのこと。すなわち、古典レジスタの値に応じて、動的に量子回路を構成するc_if ()コマンドは、この実機ではサポートされないとのことらしい。シミュレータでは、上記のように正常に実行できたが...
 一方、驚くべきことに、ChatGPTに問い合わせたところ、納得できる回答が得られた。すでに多くの人が、IBM Quantum実機を利用していてSNSなどでエラー情報の交換が行われているからであろう。
 なお、現時点ではIBM Quantum実機上で量子状態をそのまま保存して再利用することはできないようである。シミュレータでは、State vectorを保存、取り出しはできるが。実機では、測定結果(古典ビットに保存できる)を利用して、新たに次の量子回路を設定することになる。

参考資料
[1] Quantum Counterfeit Coin Problem,
https://github.com/qiskit-community/qiskit-community-tutorials/blob/master/games/quantum_counterfeit_coin_problem.ipynb

[2] Vladimir Silva, Quantum Computing by Practice (Chapter 8), APress, 2024. 

---------------------------------
private memo:
Anaconda -
/IBM_Qiskit_Local_Sim_OK/Completed_qiskit1x/Counterfeit_coin_IBM_2.ipynb

---------------------------------

2024年9月18日水曜日

Videos showing my mobile quantum circuit simulators in action

So far, I have created many quantum apps and several quantum circuit simulators. Recently, I have revised these. Enjoy the videos showing how they work! 

n-qubit simulator

2024年9月12日木曜日

量子もつれ(entanglement)を体感できそうなゲーム

【要旨】量子コンピューティングで最も重要な原理の一つは、量子もつれ entanglementである。図1に示す通り、科学雑誌Newtonの最新号にも30頁の解説がある。その量子もつれを体感できそうな簡単なゲームアプリを作成し、自作のモバイル量子回路シミュレータと、IBM Quantum実機で実行した。その結果を検討した。

🔴 Tiny Mermin-Peres Magic Game
 量子もつれを利用するゲームとして有名なMermin-Peres Magic Squareというのがある。ここでは、そのエッセンスを抜き出して、独自の簡単なゲームとした。そのため、先頭にTinyを付した。そのTinyゲームを図2に示す。

 登場人物は、Alice、Bob、Refereeの三人である。AliceとBobはそれぞれ図2に示した四つの3ビットのstringを持つ。(1)Aliceは所有する3ビットstringの一つをランダムに選んでRefereeへ送る。ただし、その情報をBobへ伝えることは禁止。(2)Bobは、Refereeから「成功」と言われるようにするため、自分の3ビットstringのどれかをRefereeへ送る。(3)Refereeは、両者から送られてきたstringの右端のビットを比較し、それらが同一ならば「成功」、異なれば「失敗」を宣言する。

 例えば、Aliceが#1を、Bobが#2を送信した場合は、両者の右端ビットが同一なので「成功」だが、Aliceが#1を、Bobが#4を送信した場合は「失敗」となる。

 AliceとBobにとって、「必ず成功」となる戦略はあるのか?古典的方法では、それは無いと言えるだろう。なぜなら、Aliceがどの3ビットstringを送信したかを、Bobは知らないからである。

 ところが、量子コンピュータを使う(量子もつれを使う)と、「必ず成功」する仕組みを作ることができるのである!

🔴 量子もつれに基づく「必ず成功する」戦略
 「量子もつれ」とは何か、また、その回路図の意味は何かの説明は略す。それをご存知ない方にも、「こんなやり方もあるのか」ということを感じていただければ十分である。

 図3にその戦略を示した。まず、AliceとBobはそれぞれ3ビットstringを持つとしたが、ここでは2量子ビットづつしか持たない。それは、図2の「ビット列の特性」に示した通り、Aliceの3ビットの和は偶数であり、Bobのそれは奇数であることによる。すなわち、最初の2ビットが決まれば、右端のビットは自動的に決まってしまうからである。

 図3の量子回路では、ゲーム開始前の準備として、AliceとBobの量子ビットに「量子もつれ」を生じさせている。しかし、ゲーム開始後には、何らの"通信"も行っていないように見える。ところがRefereeは、AlcieとBobから送られてきた結果から、必ず、「成功」の判断を下すのである!

🔴 自作モバイル量子回路シミュレータによる確認
 上記の戦略の妥当性を、自作シミュレータで確認した結果を図4に示す。右側に、赤い小さな円が8個ある。これは、AliceとBobの量子ビット4つの測定結果から、8つの「成功」のパタンが、それぞれ1/8の確率で発生することを意味している。「失敗」が起こる確率はゼロである。

 一例として、最初の赤丸に対応する0001は、Aliceが000を、Bobが010をRefereeに送ったことを意味する。両者の右端ビットは共に0なので、確かに「成功」である。他の七つのケースも、同様に、全て「成功」であることが分かる。
 以上のことから、BobはAliceが何を送ったのかを知らないのに、常に「成功」となるstringをRefereeへ送ることができている。すなわち、Bobが測定を行うと、その結果として、必ず「成功」となるstringをRefereeへ送ることができる。不思議さは消えないかもしれないが、これが量子もつれの効果である。

🔴 IBM Quantum実機による確認
 上記は、量子回路シミュレータの結果である。次に、本物の量子もつれを起こす、量子コンピュータ実機ではどうなるのかを確かめた。図5は、そのための量子回路の準備である。記述法は異なるが、実質的には、図4に示したものと等価である。
 この量子回路を、IBM Quantum実機で実行した結果が図6である。10,000ショットにおける、AliceとBobの測定結果のパタンの出現頻度を示している。赤枠で囲んだパタンは、図4の赤丸と対応している。すなわち、「成功」となるパタン8つが高い頻度で出現している。つまり、86%は「成功」となるパタンである。一方では、実機のノイズ等ため、一部の量子もつれの消失などにより、14%は「失敗」となった。現在、一般公開されている量子コンピュータではこの程度の誤差が生ずる場合がある。

🔴 まとめと感想
 ここに述べた、Tiny Mermin-Peresというゲームは、古典的方法では、「100%成功」する戦略は存在しない。しかし、量子もつれを利用すると、不思議なことに、「100%成功」する戦略を作ることができる。量子回路シミュレータではそれを確認することができた。一方、本物の「量子もつれ」が使われる量子コンピュータ実機(現在一般公開されているもの)では、ノイズによるエラーのため、「86%程度の確率で成功」するという結果となった。それでも、古典コンピュータでは不可能なことが、高い確率で実現できるという好例を与えている。素晴らしいことである。今後、量子コンピュータは急速に進展する気配なので、この86%は次第に100%に近づくであろう。

---------------------------------
private memo:
IBM Quantum Composer 
Files/Mermin_Peres_FoYo1
---------------------------------

2024年9月1日日曜日

Mobile quantum circuit simulator V2 is complete!🎉

So far, I have created many quantum apps and several quantum circuit simulators. Recently, I have completed the mobile quantum circuit simulator V2 for n-Qubit! I would like to provide an overview of it again. Please refer to here and here for details.

🔴Check out the introductory video for this simulator here!

🔴 Features of the n-Qubit mobile quantum circuit simulator

  • It runs on a mobile phone alone. No external simulators are used, so no internet is required.
  • There is no limit to the number of quantum bits n used. (However, in reality, it is naturally limited by the mobile phone's resources.)
  • Quantum gate descriptions are given in text, but I have put a lot of effort into making the output format easy to understand.
  • When describing quantum circuits, you can refer to eight built-in quantum circuit examples with hand-drawn circuit diagrams.
  • It is believed that about 80 to 90 percent of the examples shown in related books at the beginner to intermediate level can be run with this simulator.

🔴 Ten built-in quantum circuit examples

The ten examples above show what kind of quantum circuits can be simulated, so please use them as a reference when configuring your own quantum circuits.

  • [Bell] Bell circuit that gives 2-qubit quantum entanglement
  • [GHZ] GHZ circuit that gives 3-qubit quantum entanglement
  • [QFT] Phase waves are generated by 3-qubit QFT (quantum Fourier transform).
  • [Modulo] Calculation of "7k mod 15" using 4-qubit. Uses a swap gate.
  • [Crover] Grover's search algorithm using 2-qubit. Consists of phase inversion of the target basis and amplification of its probability amplitude.
  • [Bit-flip1] Bit-flip errors using 5-qubit (3-qubit for input, 2-qubit for control) are determined by measuring the control 2-qubit, and a new error correction gate is added and executed depending on the measurement result.
  • [Bit-flip2] Same settings as Bit-flip1, but Bit-flip errors are automatically corrected without measuring the quantum bits along the way.
  • [Phase Est] Quantum phase estimation using 6-qubit (1-qubit for problem setting, 5-qubit for answer). Quantum phase kickback in the first stage, IQFT (inverse quantum Fourier transform) in the second stage. A unique notation is used to reduce the amount of circuit description required in the first stage.
  • [Stern-Gerlach] Using 1-qubit, we mimic the famous Stern-Gerlach experiment in quantum computing.
  • [Mermin-Peres Magic] Magic using entangled 4 qubits (pseudo-telepathy). Alice sets the value in the third row and Bob sets the value in the third column.
Below are some thumbnails of the screens of these circuits. Please run the app and check the detailed screens for yourself. If you contact me by email, I will provide you with this app (.apk file for Android).


モバイル量子回路シミュレータV2の完成!🎉

 これまでに多数の量子アプリと、幾つかの量子回路シミュレータを自作してきたが、このほど、n-Qubit用モバイル量子回路シミュレータV2が完成した!改めて、その概要を示したい。詳細はこちら(英文)こちら(英文)を参照願いたい。

🔴Check out the introductory video for this simulator here!

🔴 n-Qubitモバイル量子回路シミュレータの特徴

  • スマホ単体で動く。外部のシミュレータ等は使わないので、インターネットは不要。
  • 利用する量子ビット数nに制限はない。(ただし、実際には、当然スマホのリソースの制約を受ける。)
  • 量子ゲートの記述はテキストで与えるが、分かりやすい出力形式などに工夫を凝らした。
  • 量子回路記述にあたっては、手書き回路図面付きの10件の組み込み量子回路例を参考にしていただける。
  • 初級〜中級レベルの関連書籍等で示されている例題の恐らく8〜9割程度は、本シミュレータで動かせると思われる。

🔴 組み込まれている10件の量子回路例題
 具体的にどのような量子回路のシミュレーションが可能なのかを、上記に述べた10件の例題で示すので、ご自分の量子回路を構成する際の参考にしていただきたい。

  • [Bell] 2-qubitの量子もつれを与えるBell回路
  • [GHZ] 3-qubitの量子もつれを与えるGHZ回路
  • [QFT] 3-qubitのQFT(量子フーリエ変換)によって、位相の波を起こす。
  • [Modulo] 4-qubitを使った「7k mod 15」の計算。Swapゲートを利用。
  • [Crover] 2-qubitを使ったGroverの探索アルゴリズム。対象の基底の位相反転とその確率振幅の増幅から成る。
  • [Bit-flip1] 5-qubit(入力用3-qubit、制御用2-qubit)を使ったBit-flipエラーを、制御用2-qubitの測定で判定し、その測定結果に応じて、エラー訂正用ゲートを新たに加えて実行する。
  • [Bit-flip2] Bit-flip1と同じ設定だが、途中で量子ビットを測定せずに、自動的にBit-flipエラーを訂正する。
  • [Phase Est] 6-qubit(問題設定用1-qubit、回答用5-qubit)を使った量子位相推定。前段で量子位相キックバック、後段でIQFT(逆量子フーリエ変換)の構成。前段の回路記述量を抑止すために独自の記法を用いている。
  • [Stern-Gerlach] 1-qubitを使って、著名なStern-Gerlachの実験を量子コンピューティングで模倣する。
  • [Mermin-Peres Magic] 量子もつれになった4qubitを使ったマジック(pseudo-telepathyによる)。Aliceが3行目、Bobが3列目に値を設定する場合。
 以下に、これらの回路の画面のサムネールをいくつか示す。詳細画面は、ご自身でこのアプリを動かして確認していただきたい。メールでご連絡いただければ、このアプリ(.apkファイル for Android)を提供します。