2023年12月25日月曜日

Try Deutsch's and Grover's algorithms in my quantum circuit simulator

I wrote about the quantum circuit application (simulator) that I created using three mobile phones in previous articles. This time, I confirmed that Deutsch's and Grover's algorithms work correctly with this simulator. Note that in the diagram below, Alice's qubit (q0) and Bob's qubit (q1) are assigned to different mobile phones. The effects of each quantum gate are sent via CloudBD to a mobile phone for control.

Deutsch's algorithm

Many explanations regarding this have already been published, so I will omit the details. The Deutsch algorithm determines whether a function whose inputs are all 0 or 1 and whose function value also takes 0 or 1 is a constant function or a balanced function. Its feature is that by creating a special mechanism called Oracle, the judgment can be made with only one function evaluation.

Fig.1 and Fig.2 show that the Deutsch algorithm works correctly when the input is one variable using my quantum circuit simulator.

Grover's algorithm

Grover's algorithm searches for specific data in an unstructured data set. In the first stage of this algorithm, the data to be searched is first marked. In a quantum bit system, this means inverting the phase of the probability amplitude of the corresponding basis vector. This is achieved by creating a circuit called Oracle, just as in the case of Deutsch. Next, in the subsequent stage, a quantum circuit for amplifying the probability amplitude is assembled and executed. As a result, only the probability of the corresponding basis vector becomes 100%, so a search result can be obtained.

Figures 3 to 6 show that, using my quantum circuit simulator, the Grover algorithm works correctly in the case of classical 2-bit information (4 pieces of data) and obtains the desired results.

0 件のコメント:

コメントを投稿