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.

0 件のコメント:

コメントを投稿