MP-1: Service or micro-service wrapper

Summary: In the context of quantum middleware, this pattern enables seamless communication and data exchange between classical and quantum components by wrapping quantum resources into classical services or small, loosely coupled, and independently deployable micro-services.

Problem: Since most existing quantum computers are neither portable nor mass-produced, access is provided via local and global networks by major players such as Amazon, IBM, Google, D-Wave, Microsoft, and Rigetti. Quantum Brilliance is the only known startup developing a portable quantum computer, making it a notable exception. The existing hardware API provided by the quantum services vendor are typically characterised by technology and vendor lock-in, may offer limited capabilities, and often do not align with application requirements. This presents challenges for the accessibility, deployability, flexibility, resilience, and maintainability of quantum-enhanced AI systems.

Solution: The solution is to wrap the functionalities provided by the quantum hardware within a service facade that interacts with the provided quantum resources and exposes a required service interface to the consumers. This facade is typically built on top of the cloud computing infrastructure provided by vendors through models such as Quantum Computing as a Service (QCaaS) model or Quantum Infrastructure as a Service (QIaaS) model or Platform as a Service (QPaaS). These models allows developers for accessing high-level abstractions for quantum hardware functionalities over the
cloud, and has already become a standard cloud quantum model offered by industry vendors such as IBM, Microsoft Azure, and Amazon Braket. A comprehensive review of cloud quantum computing can be found in (Nguyen et al. 2024).

Note that the quantum software full-stack often follows a layered architecture, as presented in (Jones et al. 2012). When applied within the context of a service-oriented architecture, this layered structure gives rise to a service layer pattern. In quantum systems, the service layer functions
as a wrapper for higher-level abstractions rather than organising business logic, making it functionally equivalent to the service wrapper pattern.

Benefits:

  • Accessibility. The micro-services wrapper pattern increases accessibility by decoupling quantum software from the constraints of platform-specific programming languages, hardware, and associated services. This abstraction facilitates broader interoperability and flexibility, enabling quantum applications to seamlessly integrate across diverse technological environments [S81].
  • Scalability and composability. This pattern enhances scalability and composability by leveraging specialised, unified, and standardised API functions.
  • Reliability. This pattern optimises the interface between client interactions and quantum backend services, enhancing reliability and ensuring stable and consistent performance across different operational scenarios.
  • Deployability. Wrapping quantum functionalities into micro-services enhances deployability and maintainability of the quantum AI applications.

Drawbacks:

  • Complexity. Wrappers add complexity. Creating high-level abstractions by aggregating and wrapping provided service interfaces can introduce additional bugs and errors in the code.

Known uses:

  • (Valencia et al. 2022) used Amazon Braket to deploy quantum services by wrapping them in a classical service. They used prime factorisation and the traveling salesman problem as examples to study the effect of different quantum hardware on the service performance.
  • Several authors such as (Barzen et al. 2021) [S92], (De Stefano et al. 2022) and (Garcia-Alonso et
    al. 2022
    ) propose a service model called Quantum Application as a Service (QAaaS) or Quantum Software as a Service (QSaaS). This model provides users access to an extensive array of preconfigured quantum software tools and applications and encapsulates the most common quantum applications and their deployment logic, including the quantum circuit along with data pre- and post-processing. It also provides an API that can be called within other applications.
  • H. T. Nguyen et al. 2024 proposed a holistic Quantum Function-as-a-Service framework (QFaaS), which leverages the advantages of the serverless model.