Table of Contents
Fetching ...

M2QCode: A Model-Driven Framework for Generating Multi-Platform Quantum Programs

Xiaoyu Guo, Shinobu Saito, Jianjun Zhao

TL;DR

M2QCode addresses cross-platform quantum software development by introducing a model-driven framework that automatically generates executable quantum programs across multiple QPLs. It combines a QuanUML-based platform-independent modeling approach with two-stage transformations to an intermediate representation and then to target-language code, including both quantum and classical components. The framework supports hybrid quantum-classical systems (HQSG) and is evaluated on seven industry case studies, demonstrating high precision/recall, strong CodeBLEU similarity after naming alignment, and low KL divergence across QPLs, with some caveats for unsupported gates in Q#. The results suggest that M2QCode can reduce development effort, improve interoperability, and scale quantum software engineering toward multiplaform deployments, while pointing to future enhancements like modular circuit modeling and user-defined gate composition.

Abstract

With the growing interest in quantum computing, the emergence of quantum supremacy has marked a pivotal milestone in the field. As a result, numerous quantum programming languages (QPLs) have been introduced to support the development of quantum algorithms. However, the application of Model-Driven Development (MDD) in quantum system engineering remains largely underexplored. This paper presents an MDD-based approach to support the structured design and implementation of quantum systems. Our framework enables the automatic generation of quantum code for multiple QPLs, thereby enhancing development efficiency and consistency across heterogeneous quantum platforms. The effectiveness and practicality of our approach have been demonstrated through multiple case studies.

M2QCode: A Model-Driven Framework for Generating Multi-Platform Quantum Programs

TL;DR

M2QCode addresses cross-platform quantum software development by introducing a model-driven framework that automatically generates executable quantum programs across multiple QPLs. It combines a QuanUML-based platform-independent modeling approach with two-stage transformations to an intermediate representation and then to target-language code, including both quantum and classical components. The framework supports hybrid quantum-classical systems (HQSG) and is evaluated on seven industry case studies, demonstrating high precision/recall, strong CodeBLEU similarity after naming alignment, and low KL divergence across QPLs, with some caveats for unsupported gates in Q#. The results suggest that M2QCode can reduce development effort, improve interoperability, and scale quantum software engineering toward multiplaform deployments, while pointing to future enhancements like modular circuit modeling and user-defined gate composition.

Abstract

With the growing interest in quantum computing, the emergence of quantum supremacy has marked a pivotal milestone in the field. As a result, numerous quantum programming languages (QPLs) have been introduced to support the development of quantum algorithms. However, the application of Model-Driven Development (MDD) in quantum system engineering remains largely underexplored. This paper presents an MDD-based approach to support the structured design and implementation of quantum systems. Our framework enables the automatic generation of quantum code for multiple QPLs, thereby enhancing development efficiency and consistency across heterogeneous quantum platforms. The effectiveness and practicality of our approach have been demonstrated through multiple case studies.
Paper Structure (37 sections, 1 equation, 7 figures, 4 tables, 2 algorithms)

This paper contains 37 sections, 1 equation, 7 figures, 4 tables, 2 algorithms.

Figures (7)

  • Figure 1: Modeling specifications for quantum gates in UML (adapted from guo2025quanuml).
  • Figure 2: UML modeling specification of the Bell State circuit (adapted from guo2025quanuml).
  • Figure 3: M2QCode Workflow
  • Figure 4: Class diagram representation of C1
  • Figure 5: Sequence diagram of quantum algorithm in C1
  • ...and 2 more figures