I am a professor emeritus of CS at Kanagawa Institute of Technology, Japan. Originally my specialty was parallel and distributed systems. My current interests include machine learning, natural language processing, creating mobile apps with MIT App Inventor, and quantum computing. In the web version of this blog, clicking the icon on the right (a plastic sphere) will take you to the "List of Quantum Computing Articles". - Fujio Yamamoto (for e-mail, add "@ieee.org" after "yamamotof")
2026年9月9日水曜日
Quantum Teleportation Using a Mobile Quantum Circuit Simulator
2026年9月2日水曜日
Learning Quantum Computing with a Mobile Simulator
量子計算のテキストとモバイル量子回路シミュレータ
2026年8月26日水曜日
ペリガルの分解(ピタゴラスの定理)のアニメアプリ
先の記事で、ピタゴラスの定理に関して書きました。その美しい証明であるペリガルの分割が頭に残っていて、そのアニメをMIT App Inventorでも作ってしまいました。
スマホで、ビジュアルを楽しめます。
2026年8月22日土曜日
これまでの量子関係ブログ記事170件をAIに纏めてもらう
2026年8月17日月曜日
A Needle-Dropping Game to Approximate π as 3.14
I created a game app based on the “Buffon’s Needle” experiment from my previous post. What makes it interesting is the seemingly mysterious fact that you can approximate π simply by dropping needles onto parallel lines—without drawing a circle anywhere! This could also make a fun app-development exercise for junior high and high school students. So, let’s take a look at the app I created. For this kind of project, I usually use MIT App Inventor. In this case, the ImageSprite feature was especially useful, allowing me to implement the needle-dropping action quite nicely.
πの近似値3.14が得られるまで針を投げるゲームアプリ
これはゲームアプリの作成です。前報の「ビュフォンの針」に基づいていますが、少し仕様は異なります。でも、円周も描かないのに、平行線に針を投げるだけで、πの近似値が求められる不思議さを味わえます。中高生向けのアプリ開発例題にできるかもしれません。早速、作成したアプリを以下に示します。この種のアプリを作る場合、私はMIT App Inventorを使います。今回は、特にImageSpriteの機能を使って、針の投入をうまく書くことができました。
2026年8月15日土曜日
円周率近似法「ビュフォンの針」を量子計算の教育的なデモにできるか?
2026年8月9日日曜日
量子振幅推定QAE (Quantum Amplitude Estimation)の性能
量子振幅推定QAE (Quantum Amplitude Estimation)は、量子的方法が古典的方法よりも優位である可能性を示す一例です。金融のリスク評価など、実用的にも非常に重要とされています。標準的なQAEでは、理論通り、求める確率のエラーが、オラクル呼び出し回数Nに対して、1/Nに(1/√Nではなく)減少することをシミュレーションで確認しました。ノイズに強い改良型のQAEを用いた、量子コンピュータ実機での実行は今後の課題ですが。
🟢どのような問題?
具体例を図1に示します。中央のブロッホ球面に一つ量子状態が示されています。これは、北極状態に対して、右側に示すように、2つの量子ゲートRy(60°)とRz(15°)を適用した結果です。そのため、これを測定した場合、|0>になる確率は0.75、|1>になる確率は0.25と算出できます。では、この量子状態がどのように設定されたかが不明な場合、|1>となる確率を求めたい、という問題です。以下の2つの方法を比較します。
🟢Standard Sampling(モンテカルロ法)
これは通常の方法です。多数回のサンプリングによって確率を求めます。誤差をε以下にするには、1/ε2 回のサンプリングが必要なことが分かっています。例えば、ε=0.01以下にしたい場合、10000回サンプリングが必要です。
🟢QAE (Quantum Amplitude Estimation )
上記モンテカルロ法よりも、圧倒的に少ない測定回数で精度よく振幅推定する方法です。QAEは、Groverの探索と同様の構成と量子位相推定(QPE)を組み合わせた方法であり、内部で、「位相の増幅」を含むモジュール(ここではこれをOracleと呼ぶ)を呼び出します。誤差をε以下にするには、1/ε回のOracleの呼び出しで済みます。例えば、ε=0.01なら、100回となります。なお、Oracleの呼び出し回数は、QAE内部の評価量子ビットの個数に応じて最適に決められます。
🟢シミュレーションによる両者の性能の比較
図2に、両者の誤差減少の模様をプロットしました。ここで、横軸に注意いただきたい。Standard Samplingの場合は、回数Nは、サンプリング(shot)回数です。一方、QAEの場合は、回数Nは上記に述べたOracleの呼び出し回数です。両者とも、回数Nの増加に対する誤差の減少は、理論値とかなりよく合致することがわかりました。QAEの優れた特性が確認できました。
実時間の比較で、どちらの方法が短時間で正答できるかを言うことは困難です。つまり、QAEの実装回路を実行する量子コンピュータ実機の性能、特にノイズによるエラーの影響を考慮する必要があるからです。そこで、理論的な性能指標として、Oracleの呼び出し回数を用いるのが通例です。今回もそれを用いた次第です。今回はシミュレーションでの比較でした。量子コンピュータ実機での比較は今後の課題です。現在、ノイズに強い改良型QAEの研究開発も進められていますので。
2026年7月12日日曜日
ピタゴラスの定理のアニメーション
2026年7月1日水曜日
Experimental Quantum State Tomography Using SIC-POVM
【Abstract】Quantum state tomography is a technique for determining an unknown quantum state. One approach to implementing it is through a Positive Operator-Valued Measure (POVM). In this method, many identical copies of an unknown quantum state are prepared and measured to reconstruct the state. A POVM provides a more general framework for quantum measurement than the standard projective measurement on an orthonormal basis. In this article, we implement a SIC-POVM, one particular class of POVMs, for a single qubit on an IBM Quantum processor (ibm_kingston). The experimental results demonstrate that several unknown quantum states can be reconstructed with high accuracy.
|<ψi|ψj>|2 = 1/(d+1) (i ≠ j)
It should be emphasized that the parameters used to define these "unknown" states (θ and φ) were not used anywhere in the reconstruction process. Only the four SIC-POVM measurement directions were used. Consequently, the same procedure would work equally well for a genuinely unknown input quantum state.
https://quantum.cloud.ibm.com/learning/en/courses/general-formulation-of-quantum-information/general-measurements/introduction
2026年6月30日火曜日
SIC-POVMによる量子状態トモグラフィに関する実験
なお、以下の測定では、”未知の量子状態"として設定した情報(θとφ)は全く使用していない。SIC-POVMの4つの測定方向だけを使っている。従って、"真の未知状態"が入力された場合も同様に特定できる。
https://quantum.cloud.ibm.com/learning/en/courses/general-formulation-of-quantum-information/general-measurements/introduction
2026年6月17日水曜日
IBM Quantumの上級認定資格を取得(3個目)
量子コンピューティングを探求するにあたって、理論的バックグラウンドが不足していると感じる場面が時々出てくるので、基礎を見直すことにした。その一つのテーマが「量子状態の密度行列」である。これに関する詳細なチュートリアルがIBM Quantumのwebサイトにある。"General Formulation of Quantum Information" (量子情報の一般的定式化)である。今回、そのチュートリアルを学んだ後に、認定資格(Advanced)試験を受けて合格し、認定バッチと認定証を得た。
密度行列を使う動機は以下のようなことである。
(1)従来の量子状態ベクトルよりも幅広い種類の量子状態を表現できる。これには、ノイズの影響を受ける量子系の状態や、量子状態の古典的な確率によるランダムな選択の状態も含まれる。
(2)無視したい別の系と量子もつれにある系の状態など、孤立した系の状態の記述は、従来の量子状態ベクトルでは簡単にできないが、密度行列によればそれは明快になる。
(3)古典情報と量子情報を単一の数学的枠組みで記述できる。このことから、古典情報は本質的に量子情報の特別なケースであることが見えてくる。
このチュートリアルは、このような動機を支える理論を詳しく展開しており、若干難しい内容になっている。Qiskitコードでプログラミングしたり、量子ゲートを使って量子コンピュータ実機で動かす、などの「息抜き」もできないので、尚更である。しかし、これまで知らなかった知識を得たり、曖昧だった考え方が明確になるなど、得られたものはとても大きいと感じた。
でも、ビジュアルにして楽しめる事項もあった。その一つを以下の図に示す。量子コンピューティングでは、量子状態はブロッホ球の表面に示される「純粋状態」の他に、ブロッホ球の内部の点に対応する「混合状態」がある。そこに密度行列が登場する。
2026年6月2日火曜日
フィボナッチ数列に基づく植物の葉の模型
A Model of Plant Leaves Based on the Fibonacci Sequence
One of the most beautiful and widely appreciated concepts in mathematics is the Fibonacci sequence. It appears in the forms and growth patterns of plants, seashells, and many other natural objects. More recently, it has even found applications in Topological Quantum Computation through the concept of the Fibonacci anyon.
Recently, I happened to discover an item called the “Fibonacci Tree” being sold online as a desk ornament or educational toy. Although the product itself does not seem to come with a mathematical explanation, it appears to be an object whose beauty can be appreciated simply by displaying it on a desk.
With that in mind, I would like to give a brief introduction to it below.
古くからある、誰にも親しまれる美しい数学の一つにフィボナッチ数列がある。植物や貝類などの形態に現れる他、最近では、トポロジカル量子計算(Topological Quantum Computation)における「フィボナッチ・アニオン(Fibonacci Anyon)」にも利用されるようである。
最近、偶然だが、ネット上で「フィボナッチツリー」なるものが、文具かおもちゃとして発売されているのを知った。数学的な説明などはないが、机上において美しさを味わうことができるように思う。そこで、以下の通り、簡単にご紹介します。
ところで、この黄金角の元になっている黄金比が、調味料の配合にも!
下図の通り、2種類の唐辛子の割合が黄金比だと謳っている!ラベルの色も黄金!
2026年5月29日金曜日
IBM Quantumの教室アカウントの取得が可能に!
2026年5月26日火曜日
Standalone Quantum Circuit Simulators Running on Mobile Phones
Abstract
Full-featured quantum circuit simulators such as Qiskit and Cirq are widely used in the quantum computing community. However, I wanted a quantum circuit simulator that could be used like a pocket calculator—something I could quickly pull out anytime and anywhere, without requiring an internet connection. Several years ago, I developed the app described in [2] for this purpose. Using it, I was able to experiment with many of the basic examples commonly found in introductory quantum computing textbooks, and I still find it extremely useful today.
Recently, I discovered that a similar simulator is also available: the product developed by Codexus Technologies [1]. In this article, I briefly compare the two simulators through several example problems, focusing on usability and design philosophy. Exploring the ideas behind each simulator is both interesting and enjoyable.
🟢 Standalone Quantum Circuit Simulators
Both simulators run entirely on an Android smartphone without requiring any user configuration or internet connection. Like using a calculator, users can immediately experiment with basic quantum circuits whenever they wish. Their main features are summarized below.
• Codexus Technologies App [1]
The app features an attractive and polished user interface. A wide range of fundamental quantum gates is available, and circuits of up to five qubits can be simulated. Users build circuits graphically by placing gates through the GUI, so no text-based programming is required.
Simulation results are obtained from 1,024 measurement shots and displayed both as a histogram and as a textual state vector (probability amplitudes). The development environment used to create the application is not publicly known.
• Fujio Yamamoto's App [2]
This simulator consists of two versions: a single-qubit simulator and an n-qubit simulator. In the single-qubit version, users can apply quantum gates interactively through a graphical interface, and the state vector is visualized on a three-dimensional Bloch sphere. The n-qubit version accepts circuits in a text-based format similar to IBM's QASM language.
Simulation results are displayed both graphically (using a disk representation) and in textual form as state vectors. Created circuits can be saved with a button press and later reloaded for further editing. The application was developed efficiently using MIT App Inventor, although much of the complex-number arithmetic is implemented in embedded JavaScript code.
🟢 Comparing Usability Through Example Problems
The purpose of this comparison is not to determine which simulator is superior. Rather, it is to explore the design philosophy behind each application and understand how their creators approached the challenge of building a quantum circuit simulator. Examining these differences is both informative and enjoyable. Let us try the following three examples on each simulator.
(1) Applying X and H Gates Sequentially to a Single Qubit
In the Codexus app, as shown below, the interface is highly polished and intuitive. Users simply place quantum gates one after another. Pressing the "Simulate" button automatically performs 1,024 measurement shots and displays both the state vector and histogram, making the results easy to understand.
The Fujio app also applies quantum gates through a graphical user interface. Its most distinctive feature is the visualization of the state vector on a 3D Bloch sphere. The probability amplitudes are additionally displayed as complex numbers in the lower section of the screen.
(2) Creating a GHZ State with Three Qubits
In the Codexus app, the configuration of CNOT gates is particularly well designed. First, the user selects the control qubit. The simulator then highlights the candidate qubits where the target NOT gate can be placed, allowing the user to complete the operation simply by tapping the desired qubit. The simulation output correctly shows that only the states 000 and 111 occur, confirming the presence of quantum entanglement.
In the Fujio app, quantum gates are specified using a text-based description. Because the circuit can be edited directly, the approach offers a high degree of flexibility. In addition, several example circuits are built into the application, allowing users to load and execute them immediately with a single button press. Simulation results are displayed on a disk diagram showing both probabilities and phases, providing an intuitive and user-friendly representation.
(3) The Mermin–Peres Magic Square Using Four Qubits
This example is somewhat more sophisticated than the previous two. It demonstrates a remarkable form of quantum "magic" that makes clever use of entanglement. Readers interested in the details are referred to [3].
In the Codexus app, circuits containing many gates can still be configured conveniently by scrolling horizontally across the screen. The output correctly shows that only eight of the sixteen possible four-qubit basis states appear, each with approximately equal probability.
At this point, I do have one feature request: for circuits of this length, it would be very useful to save the circuit and reload it later for further editing. I hope this capability will be added in a future version.
As with the previous examples, the Fujio app represents the circuit textually. The simulation results are displayed on the right side of the figure, where the probability and phase associated with each basis state are shown graphically on a disk diagram. The results are easy to interpret and match those produced by the Codexus simulator exactly.
Some readers may notice a small difference. For example, Codexus reports an amplitude of −0.354 for 0001, whereas Fujio reports −0.354 for 1000. This discrepancy is simply due to a different ordering convention for qubit indices. In other words, it reflects the difference between the conventions commonly used by Google Cirq and IBM Quantum.
(4) Calculation of 7k mod 15 (where k=8)
This example appears as part of quantum phase estimation (QPE). Here, we have a simple example of "7k mod 15". We have confirmed that the answer is 11 when k=8.
In Codexus, this is implemented using swap gates. The simulation result shows that the probability amplitude of |1101> is 1.0. This means that the answer is 1011 in classical binary and 11 in decimal. The bit order is as explained in example (3).
Fujio's result needs no explanation.
(5) 4-qubit QFT without swap
This example is a quantum Fourier transform (QFT) using 4 qubits. Unfortunately, it seems that Control Phase, Control S, and Control T are not available in the Codexus app. Therefore, it was not possible to create a quantum circuit for the QFT.
On the other hand, in the Fujio app, the following result can be obtained using the Control Phase gate.
Subsequently, applying the inverse quantum Fourier transform IQFTx (lowercase x means no swap) was confirmed to return to the state before applying QFTx, |1111>, as shown in the following figure.
🟢 Conclusion
Both the Codexus app and the Fujio app have their own strengths and distinctive features. They are enjoyable, convenient, and easy to use. As standalone quantum circuit simulators that run directly on Android mobile phones, they provide an accessible way to explore the fundamentals of quantum computing.
Such tools could serve as valuable educational resources for introductory quantum computing courses at both the high school and university levels.
References
[1]Quantum Circuit Simulator by Codexus Technologies (Sri Lanka)
https://play.google.com/store/apps/details?id=com.codexustechnologies.quantumcircuitsimulator&hl=en-US
[2] Redesigned Mobile Quantum Circuit Simulators by Fujio Yamamoto
https://sparse-dense.blogspot.com/2024/08/redesigned-mobile-quantum-circuit.html
[3] Mermin-Peres Magic
Exploring Quantum Entanglement through Visualization
https://sparse-dense.blogspot.com/2025/05/exploring-quantum-entanglement-through.html







.gif)




































