ラベル Bell circuit の投稿を表示しています。 すべての投稿を表示
ラベル Bell circuit の投稿を表示しています。 すべての投稿を表示

2025年10月22日水曜日

Bell回路の時間発展アニメーション

Time Evolution of the Bell Circuit

🔴概 要
 前報(→こちら)では、1量子ビットに対するアダマール変換が、シュレディンガー方程式を利用した時間発展と等価であることを知った。今回は、2量子ビットで量子もつれを生じさせるBell回路を対象として、同様の考察を行った。多くの量子コンピューティングの書籍では、1番目の量子ビットにアダマール変換を施し、次に2つの量子ビットにCNOTを施すと、瞬時に量子もつれ状態になると説明されている。だが、そこへ至るまでの時間発展を観察することは、量子力学を少し深く知ることに繋がり、量子コンピューティングを学ぶ上で有用であろう。

In the previous post, we learned that the Hadamard transformation applied to a single qubit is equivalent to time evolution governed by the Schrödinger equation.In this study, I extended that idea to a two-qubit system — the Bell circuit, which generates quantum entanglement.

In many quantum computing textbooks, it is explained that if we apply a Hadamard gate to the first qubit and then a CNOT gate to the two qubits, the system instantly becomes an entangled Bell state. However, observing how the system evolves in time toward that entangled state provides deeper insight into quantum mechanics itself. Such an approach can be highly valuable for anyone learning quantum computing, as it connects the abstract circuit model with the underlying physical process of quantum evolution.

🔴Bell回路の時間発展の観察
 下図の下段には、Bell回路のシミュレーションのスナップショットが示されている。左側は、アダマール変換を施した結果を、右側にはその後CNOTを施した結果である。一方、上段のグラフは、Bell回路に対応するハミルトニアンを時間発展させた結果である。シミュレーションの前半と後半に分けて、4つの基底|00>, |10>, |01>, |11>それぞれの測定確率を描いている。

 詳細は略すが、前報同様に、アダマールゲートとCNOTゲートそれぞれに対応するハミルトニアンを時間発展させている。完了時間も、前報と同様に設定されるが、ここでは、前半と後半がそれぞれ換算時間が1.0となるようにしてある。経過時間1.0では、シミュレーションの結果と同じく、|00>と|01>がそれぞれ確率0.5で出現することがわかる。また、経過時間2.0では、量子もつれを意味する結果が得られている。すなわち、|00>と|11>の確率がそれぞれ0.5に置き換わっている。
 さらに、上記のことを見やすくするために、アニメーションも作成した。
 
 なお、3-qubitがGHZと呼ばれる量子もつれに至る状況も同様に描くことができた。つまり、|000>を初期状態として、適切なハミルトニアンの時間発展で (|000>+|111>)/√2の状態に至る過程は以下のようになる。

2024年11月20日水曜日

Using MicroBlocks with a Quantum Circuit Simulator

In the previous article, I used MicroBlocks to control the slider of the MIT App Inventor app from a micro:bit device. This time, I tried to display the results of my quantum circuit simulator on the micro:bit. Yet another use case for the micro:bit!

In quantum computing, one of the simplest and most important circuits is the Bell circuit, because it generates strong quantum entanglement. For example, for the Bell circuit in Fig.1, if the states of the two quantum bits are |0> and |1>, the output (measurement result) will be 00 and 11 with a 50% probability, respectively. And the results 01 or 10 will never appear. In other words, if the measurement result of one quantum bit is 0, the other will always be 0. On the other hand, if one is 1, the other will always be 1. I would like to try to display such a situation on the micro:bit.

My mobile circuit simulator has 12 types of quantum circuits using 2 to 6 qubits built in as examples. This time, I selected the Bell circuit from among them, as shown in Figure 2. The measurement results for that were displayed on the micro:bit, as shown in Figure 1. Of course, you need to first connect this simulator and the micro:bit with BLE. Each time the go button is pressed, the display on the micro:bit changed according to the probability obtained in ④.

[Design Considerations]

Since this circuit deals with two quantum bits, it is natural to use two micro:bits to display the output. However, when using MicroBlocks, it was found that the following two methods are either not possible or difficult to achieve.

  • Connect multiple micro:bits via BLE from the app.
  • Connect the app and micro:bit with BLE and use the radio from that micro:bit to communicate with another micro:bit.
Therefore, this time I decided to display the measurement results of two quantum bits on a single micro:bit.

Correction
I will correct the second paragraph above. A separate instance of both the MicroBlocks and the Bluetooth LE extension for each connection allows multiple micro:bits to be used from the app. I would like to thank David Kim, Peter Mathijssen, and John Maloney for letting me know this.

[Additional information]

The above example focuses on two qubits, but I have also created a version shown below that can display the measurement results for up to five qubits.