3.4 Classical recursion in quantum programming

The notion of recursion allows the programming of repetitive tasks without a large number of similar steps to be specified individually. In the previous sections, we have studied the quantum extension of the while-language, which provides a program construct, namely the quantum while-loop, to implement a special kind of recursion – iteration – in quantum computation. The general form of recursive procedure has been widely used in classical programming. It renders a more powerful technique than iteration, in which a function can be defined, directly or indirectly, in terms of itself. In this section, we add the general notion of recursion into the quantum while-language in order to specify procedures ...

Get Foundations of Quantum Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.