Abstract

While quantum algorithms are known to be very powerful, there are also people who think that “quantum computers will never be able to run the if/then/else type of logic”. On the other hand, though many experts know that such a claim is a misconception, in literature there is still lacking of a general description of the procedure for implementing the if/then/else conditional statements in the quantum way. In the current work, we present such a general method in details, explaining how the unitary transformation required for any if/then/else operation can be constructed from simpler unitary transformations and projective operators. Moreover, by using the well-known controlled-NOT gate, Fredkin gate and Toffoli gate as examples, it is elaborated that the structure of the existing conditional quantum operations agrees with our general method. An even more complicated example is also provided, showing that our method is convenient for solving real-world if/then/else problems with quantum computers. Thus the result not only refutes the above claim, but also helps to develop the skill on quantum programming.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call