(This is an English translation of a previous Japanese article)
I have been developing a quantum circuit simulator that is as easy to use as a scientific calculator. As a single smartphone app, you can try out various quantum algorithms and apps within the 3-qubit range. This time, version 2 has been completed. I also added a little bit of play.
If you shake your smartphone lightly, one of five icons will randomly appear. It's a little fun. Of the five images, one was created by me, while the other four were created by ChatGPT.
Of course, this is not the only thing. Added a playback function that applies quantum gates. That is, by recording the steps of an algorithm (which quantum gates were applied to which registers (qubits)) in sequence, and pressing one or two buttons, the algorithm can be played back. I found this to be very useful when showing a demo to someone or when running under different conditions myself. Although details are omitted, three algorithm playback examples recorded in this manner are shown below.
●Superdense Coding
In Fig.1, Alice has the top two qubits (q0 and q1), and Bob has q2. Both qubits are in a state of quantum entanglement. Just like that, Bob went away. Alice wants to send any of the classical 3-bit information (000, 001, 010, ..., 111) to Bob. In other words, she wants to send "101" out of eight, for example, in (a). However, there are only two qubits that can be sent. This is not enough!
Nevertheless, with this wonderful Superdense Coding, Bob can always obtain any information from Alice simply by operating a predetermined quantum gate! Fig.1(b) shows this.
●Grover's Algorithm
For example, assume that eight pieces of information (000, 001, ..., 111) are arranged randomly. The problem is finding specific information from among them. Fig.2 is an example of searching for "101". First, mark the information in (a). This is achieved by inverting the phase of the corresponding basis vector |101>. This is not a scam! It simply tells you what to look for. Without such information, the search itself is meaningless.
In (b), when the button Amp3step is pressed, the probability amplitude amplification is activated, and only the probability amplitude of the basis vector whose phase was inverted in (a) is amplified, and the desired information "101" is obtained. In this example, we only needed to perform the phase inversion and amplification pair once!
●Quantum Fourier Transform
This is an application example of quantum Fourier transform QFT. One of the characteristics of QFT is that it can be applied to states of quantum superposition. In Fig.3(a), we created a superposition of two certain quantum states. Next, in (b), when the button QFT is pressed, the phase waves that are the results of each QFT in both states interfere and appear as separate phase waves. The wave swell can be seen from the phase angle and amplitude (area of the disk filled in red) in the lower part of (b).
Although omitted here, you can restore the original quantum superposition state by pressing the button next to it, IQFT. IQFT is the inverse quantum Fourier transform.