Empowering QHAna with seamless backend management using Ballerina

QuAntiL (Quantum Application Lifecycle Management) provides tooling assistance for diverse facets of the quantum application lifecycle, encompassing tasks like implementing, deploying, executing, and monitoring quantum applications.

qhana logo


The Application component of QuAntiL incorporates tools and quantum algorithm implementations tailored to address specific use cases. Notably, the Quantum Humanities Analysis Tool (QHAna) features an intelligent toolset that employs machine-learning techniques compatible with classical and quantum hardware. Specifically created for integration with the MUSE Repository, it offers extensive techniques primarily focused on categorical data. The backend driving QHAna is developed using the Ballerina programming language.


Developing the QHAna backend presented several challenges that required careful consideration of effective solutions. Handling transactions within the backend posed complexities, as it involved managing multiple operations to maintain data consistency and reliability. Additionally, connecting QHAna backend services with a database proved to be a notable challenge, demanding the establishment of a seamless connection to ensure efficient data retrieval, storage, and management. Another significant challenge involved the integration of services easily and efficiently. Also, implementing the Experiment API of the QHAna backend required a programming language that could simplify the creation and operation of services, allowing for a service-based architecture. Overcoming these challenges was crucial for the successful development of the QHAna backend.


As illustrated in the diagram below, the solution encompasses the QHAna backend written in Ballerina, featuring the Experiment API, which connects with the services and collects the data and order of operations during the experiment. This backend interfaces with the web-based QHAna user interface, which serves as the front end and is expected to establish resilient communications with the QHAna backend for data storage and retrieval.

QHAna solution diagram


The utilization of Ballerina in the QHAna backend yields a diverse set of benefits, effectively addressing challenges and elevating the overall development of the system. Ballerina's cloud-based integration capabilities play a pivotal role in ensuring the reliability and consistency of QHAna's operations, even when transactions involve processes that are distributed across multiple database calls. Additionally, Ballerina's built-in support for database management contributed significantly to the accuracy and reliability of QHAna's machine-learning project management. Furthermore, Ballerina's syntax and framework allowed the QHAna backend to leverage Ballerina's language features in implementing the Experiment API, which is one of the crucial parts of its architecture, in an efficient manner.


By seamlessly integrating with QHAna, Ballerina demonstrates its capacity to proficiently manage the complexities of backend development, providing a robust foundation for the intricate demands of quantum humanities analysis. The symbiotic relationship between the two not only emphasizes the language's adaptability but also its pivotal role in contributing to the reliability and scalability essential for the success of advanced analytical processes within the realm of quantum humanities.

Ballerina, with its strong and feature-rich type system, is well suited for creating and integrating services. Important information like transactional contexts are visible at a glance, thanks to the built-in support of transactions with syntax-level features and compiler checks.

Fabian Bühler - Research Associate, Institute of Architecture of Application Systems (IAAS), University of Stuttgart.