Extended Quantum Computing Patterns
Orchestrated Execution
Aliases: –
Tags:
© https://www.scitepress.org/Link.aspx?doi=10.5220/0012057700003538
Intent
How to ensure the control and data flow for quantum applications comprising one or more quantum circuits with corresponding classical pre- and post-processing steps?
Context
Most quantum algorithms are hybrid, i.e., parts are executed on quantum devices, and others run on classical hardware [Leymann and Barzen, 2020]. Furthermore, quantum applications can involve multiple quantum algorithms and additional classical parts, e.g., interacting with the user or loading data from a database. These parts must be orchestrated, i.e., the control and data flow between them must be ensured.
Forces
Quantum devices and the corresponding quantum cloud offerings vary strongly in characteristics, such as the number of available qubits, incurred costs for the execution, or queuing times [Tannu and Qureshi, 2019], [Vietz et al., 2021]. The orchestration of parts running in heterogeneous environments can get unmanageable without external orchestration tools, e.g., as there could be long invocation chains, complex data transfers, data format transformations, and interactions with various heterogeneous APIs.
Solution
Utilize a workflow language to model the quantum and classical parts as tasks within a workflow model [Weder et al., 2020b] as shown in Figure 6. The workflow model can then be deployed to a workflow engine, which orchestrates the quantum and classical parts by invoking them in the specified order and ensuring the required data flow (Ellis, 1999). Thereby, the invocation of heterogeneous offerings, as well as features such as data format transformation is provided by the workflow engine [Leymann and Roller, 2000]. While there exist workflow offerings specifically targeting the quantum computing domain, e.g., providing some pre-implemented quantum algorithms, standardized workflow languages and corresponding workflow engines can also be employed to benefit from their maturity and rich feature sets.
Result
The classical code as well as the quantum circuits required to realize a quantum application are separated from the workflow model defining how they are integrated. This increases modularity and enables the reuse of existing code, decreasing development time and cost. Furthermore, by using workflows, quantum applications can benefit from the reliability, scalability, and robustness of workflow engines [Leymann and Barzen, 2021a]. Finally, also the usage of various heterogeneous quantum and classical cloud offerings with different functionalities is supported. However, the need to model orchestrations to enact them on specialized middleware requires additional expertise and may result in overhead for simple use cases such as circuit design and testing.
Examples
–
Related Patterns
If multiple quantum circuits have to be executed by the workflow, the PRIORITIZED EXECUTION pattern can be used to reduce waiting times. Further, this pattern can be applied to integrate several distinct quantum applications made available using the PRE-DEPLOYED EXECUTION pattern.
Known Uses
Examples of standardized workflow languages are Business Process Model and Notation (BPMN) [Object Management Group, 2010] or Business Process Execution Language (BPEL) (OASIS, 2007). For the execution of these workflow models, different workflow engines are available, e.g., the Camunda BPMN engine [Camunda Services, 2023]. Furthermore, there exists a quantum-specific modeling extension to ease the modeling of workflows in the quantum computing domain [Weder et al., 2020b]. Quantum-specific orchestration tools comprise Orquestra by Zapata [Zapata, 2022], which uses a custom YAML-based language, and Covalent by Agnostiq [Agnostiq, 2023], a quantum orchestration platform that requires specifying control flow via a Python-based domain-specific language.