The QPath Blog


QrEngineer APP beta1:  quantum software reengineering tool (II)

Software modernization*

In the previous entry we focused on the functionalities of the QrEngineer APP module for the integration of quantum programs developed with the SDK of other vendors. In this case we will focus on the functionalities of the other module currently available in the QrEngineer APP: QModernization – Quantum Software Modernization with QuantumPath®.

To address the problems associated with migrations to quantum computing, re-engineering and standards-based software modernisation,, it must be ensured that Software Engineering best practices for modernization and re-engineering are incorporated into the quantum computing domain. For this to be possible, it is indispensable to have reverse engineering tools that analyse quantum software information in the source code capable of generating abstract models that can be used in quantum software modernization processes.

Our proposal is to generate such models according to the Knowledge Discovery Metamodel (KDM) standard, by means of an extension of KDM, through the standard extensibility mechanism offered by KDM. These KDM models can be used to restructure or add new quantum functionality at a higher level of abstraction, i.e., independently of the specific quantum technology [1].

In our R&D work we have found that if the extracted knowledge is represented holistically in a KDM repository when reverse engineering the systems, then re-engineering and migration to the different quantum environments will be improved. As far as UML (Unified Modeling Language) for the re-engineering process is concerned, this standard should be extended to represent and integrate quantum programmes. Thus, KDM models could be automatically transformed into UML representations and engineers could model quantum aspects manually for new target systems.

Extending the research on quantum software modernization to practical applications for quantum software development with QuantumPath® has been one of the challenges we have taken on. For the solutions to be practical, useful for software development, in the design and development of modernization tools we need to consider the different perspectives that this research presents us with:

·       The existence of different programming languages in both the classical and quantum domains, which is another challenge to be implemented in the practical solution.

·       The need to modernise algorithms developed in different technological contexts:

o   classical – quantum with QPath® – classical

o   quantum – quantum with QPath® – quantum

QuantumPath® is a natural integrator of proprietary and third-party solutions, which supports the development of algorithms and quantum apps in the most appropriate context for each solution (100% agnostic, semi-agnostic with DirectCode), to which we have added the ability to support imports/exports of algorithms developed in other environments to the platform, after the modernization process.

The software solution to make this important integrative functionality viable has been implemented by designing and developing a QPath® application specialised in software modernization: QrEngineer APP – QModernization (see Figure 1).

QModernization implements the following processes to enable software modernization to QPath®:

·       Management of modernization projects.

·       Parsing of source code artefacts for modernization.

·       Generation of KDM models.

·       Transformation of KDM models to UML.

Figure 1. QModernization homepage


Exposed at a high level, the QModernization system implements the following tasks:

·       Creating a modernization project (Figure 2).

Figure 2. Form to create a new modernization project


·       Add a new quantum circuit to the modernization project’s circuit catalogue by providing its source code and circuit metadata. The beta 1 version of the tool, QrEngineer APP supports quantum circuits developed in the following languages:

o   Microsoft Q# (Q Sharp)

o   OpenQASM 3.0


Modernization of an algorithm developed in Q#

In the following, we will show, step by step, a project to modernise an algorithm developed in Q#.

The first step is to upload a circuit to the QrEngineer APP circuit catalogue:

Figure 3. Form for uploading a quantum circuit to a project’s circuit catalogue.


Once the circuit is attached to the project, the user can view its source code, and the KDM and UML models generated by the system:

Figure 4. Visualization of source code of a quantum circuit

Figure 5. Visualization of the KDM model associated with a quantum circuit.

Figure 6. Visualization of the UML model associated with a quantum circuit.


·       As a utility, the system allows the user to see a visual representation of the generated UML model, in the form of an activity diagram: 

Figure 7. Activity diagram associated with the UML model of a quantum circuit.




Once the defined architecture and fundamental requirements have been implemented, and their practical validity has been proven in beta 1, the research and development teams continue working to extend their processes, functionalities and, above all, to enrich the library of classical and quantum programming languages supported by QrEngineer APP and, as a result of this:

·       we are researching in the modernization of algorithms developed in the main classical programming languages.

·       we continue to expand the number of supported vendors for the adaptation of circuits developed with different Python-based SDKs.

·       we are designing the tools that will implement, in an advanced way, the most important results of the whole quantum software modernization cycle.

Based on a conceptual design by QST, QModernization is the result of years of research and development by a team of aQuantum researchers composed of scientists and engineers from QSTAlarcos Group and aQuantum, working on these tasks with the aim of defining a model for the reengineering and modernization of quantum software, as well as determining the technical feasibility of developing the solutions that make this possible.

There is no doubt that the modernization of quantum software as we see it, from the perspective of software engineering applied to tools, still has a long way to go to reach the full case tools to which we aspire, but we believe that it is worth the effort to share these first steps in this direction and that, from there, we will show the progress and maturity of these tools..

Working with QrEngineer APP facilitates the process of migrating algorithms developed in other environments and programming languages to QuantumPath®. In addition to saving time, using reengineering best practices helps preserve business knowledge, enables evolutionary maintenance of legacy information systems, and reduces development risk and costs.

 *  The core content of this article is an updated version of the section “Modernization of Quantum Systems”, published by the authors as part of the book Ingeniería del Software Cuántico & QuantumPath®. aQuantum, 2022.

[1] Pérez, R. Jiménez, L. Martínez, A. Peterssen, G. Ingeniería del Software Cuántico & QuantumPath®. Cap. 6: Modernización de sistemas cuánticos. aQuantum, 2022.