Abstract: |
With the rapid evolution of quantum computers and the emergence of different quantum cloud offerings, use cases from various application areas, such as chemistry or physics, can now be implemented and executed on real quantum computers. Thereby, the applications are typically hybrid, i.e., combine quantum and classical programs. Workflows enable the orchestration of these programs and provide advantages, such as robustness or reproducibility. However, different quantum algorithms require executing the quantum and classical programs in a loop with many iterations, leading to an inefficient orchestration through the workflow. For the efficient execution of such algorithms, hybrid runtimes are offered, combining the quantum and classical programs in a single hybrid program, optimizing the execution. However, this leads to a conceptional gap between the modeling benefits of workflow technologies, e.g., modularization, reuse, and understandability, and the efficiency improvements when using hybrid runtimes. To overcome this issue, we present a method to model all tasks explicitly in the workflow model and analyze the workflow to detect loops that can benefit from hybrid runtimes. Furthermore, corresponding hybrid programs are automatically generated, and the workflow is rewritten to use them. We validate the practical feasibility of our approach by a prototypical implementation. |