Source-linked AI summary

Modelling Quantum Circuits with UML

Ricardo Pérez-Castillo, Luis Jiménez-Navajas, Mario Piattini

arXiv:2103.16169v1cs.SE

TL;DR

Quantum software has been developed with ad hoc techniques, while its engineering calls for more systematic methods and high-level, technology-independent design. This paper proposes a UML profile applied to activity diagrams to represent quantum circuits. The representation connects circuits with other UML elements for modelling hybrid information systems.

  • Problem

    Quantum software has been coded with ad hoc techniques, and systematic methods and abstract, technology-independent representations are needed for its design.

    Source: §1 · p. 1
  • Method

    The paper defines a UML profile of stereotypes applied to UML activity diagrams to represent quantum circuits.

    Source: §1 · p. 2, §3 · p. 3
  • Results

    The proposed UML representation lets quantum circuits be linked with other UML elements and diagrams for hybrid information-system designs.

    Source: §1 · p. 2, §4 · p. 6
  • Takeaways & Limitations

    UML quantum-circuit models can be integrated with standard UML elements and existing modelling tools for technology-agnostic hybrid-system designs.

    Source: §1 · p. 2, §4 · p. 6

Abstract

from arXiv · show

None of the quantum computing applications imagined will ever become a reality without quantum software. Quantum programmes have, to date, been coded with ad hoc techniques. Researchers in the field of quantum software engineering are, therefore, now demanding more systematic techniques and methods with which to produce software with sufficient quality. One of the challenges and lessons learned from classic software engineering is the need for high-level, abstract and technology-independent representations with which to design software before it is coded. This paper specifically addresses this challenge for quantum software design. Since UML is a well-proven modelling language that has been widely employed by industry for some time, we propose a UML extension for the representation of quantum algorithms. Our proposal comprises the definition of a UML profile based on various stereotypes that can be applied to the existing UML activity diagrams in order to represent quantum circuits. The advantage of this representation is that UML quantum circuits can be interrelated with other UML elements and diagrams, which will make it possible to represent various concerns and viewpoints of the so-called hybrid information systems. This will consequently enable classical and quantum aspects to be modelled together in integrated designs in a technological-agnostic manner that is already supported by a considerable number of existing software design tools.

1 INTRODUCTION

Quantum software requires more systematic engineering methods and abstract, technology-independent design representations, particularly as classical and quantum software are combined in hybrid systems. The paper proposes extending UML activity diagrams with a profile for representing quantum circuits and linking them to other UML elements.

1 INTRODUCTION

  • Quantum software engineering needs systematic techniques for designing and building sufficiently high-quality software, alongside classical engineering methods adapted to quantum software.The paper notes that classical and quantum software may operate together in hybrid information systems.Source: §1 · p. 1
  • Hybrid systems may combine quantum mission-critical functions with classical functions that remain better suited to some problems.The authors argue both types of software should be modernised for hybrid information systems.Source: §1 · p. 1
  • UML and model-driven engineering support technology-independent design and can enable transformations between models and source code for different platforms.The paper presents this as relevant amid rapid change and limited standardisation in quantum programming.Source: §1 · pp. 1–2
  • The proposed UML extension represents quantum circuits in activity diagrams and allows them to link with other UML elements for hybrid-system designs.The paper presents this as an ongoing research effort and a preliminary profile.Source: §1 · p. 2

2 UML FOR QUANTUM SOFTWARE

The section motivates UML for quantum and hybrid software design, then compares UML extension approaches and selects a profile as the extension mechanism. It presents UML profiles as a lightweight, tool-compatible way to add quantum-specific semantics.

2.1 Usage of UML in Quantum Software

  • UML models can gather and analyse requirements in a technology- and methodology-independent programme design, supporting hybrid information systems.The paper frames software design as part of a life cycle for quantum or hybrid systems.Source: §2.1 · p. 2
  • UML offers multiple system viewpoints, design communication and validation, established engineering practices, structured components, tool support, and support for software modernisation.The paper notes that UML must still be adapted to capture quantum software semantics and building blocks.Source: §2.1 · p. 2

2.2 UML Extensibility

  • UML profiles are lightweight extensions made from stereotypes, tagged values, and constraints on existing UML elements, and the paper selects this approach for quantum information systems.Compared with new metamodel approaches, profiles offer less expressiveness but stronger UML conformance and easier use with existing tools.Source: §2.2 · p. 3
  • A UML profile is applied to a model through metamodel and metaclass references, while stereotype properties appear as tagged values.The profile is represented as a package containing stereotypes.Source: §2.2 · p. 3

3 QUANTUM UML PROFILE

The paper proposes a preliminary UML profile for modelling quantum circuits as activity diagrams, using six stereotypes and explicit control flow. A teleportation example demonstrates how the profile represents circuits and connects them with classical UML elements.

3 QUANTUM UML PROFILE

  • The profile adds six quantum-circuit stereotypes to UML activity diagrams, using activity-diagram metaclasses as its base.Source: §3 · p. 3, Figure 2 · p. 4
  • A circuit is a compound activity partitioned by qubit; gates, control qubits, measurements, and resets use stereotyped UML actions.Source: §3 · p. 4
  • UML control flow connects actions into a fully connected graph, with fork and join nodes representing synchronization barriers.Source: §3 · p. 4

3.1 Running Example

  • The teleportation example models three qubits as activity partitions, places gates and measurements as actions, and represents barriers with fork and join nodes.Source: §3.1 · p. 5, Figure 3 · p. 5
  • Measurements can connect to data-store nodes for classical values, while other UML elements can express relationships with the circuit.Source: §3.1 · p. 5
  • The example makes execution flow explicit, unlike the original circuit notation; this resembles QASM source flow and can help when gate order matters for optimization.Source: §3.1 · p. 5, Figure 5 · p. 6

4 DISCUSSION

The Quantum UML Profile uses a lightweight UML profile to represent quantum circuits in activity diagrams, reusing existing modelling tools and integrating with standard UML elements for hybrid systems. The discussion describes code-generation and modernization possibilities while identifying extension to other UML diagrams as future work.

4 DISCUSSION

  • The lightweight Quantum UML Profile reuses existing UML modelling tools and integrates circuits with standard UML elements for representing hybrid information systems.The authors contrast this profile approach with heavyweight extension mechanisms.Source: §4 · p. 6
  • Six icon-free stereotypes apply to standard activity-diagram elements, avoiding commitment to variable quantum-gate graphics and supporting a common notation for classical and quantum parts.The authors argue that this reduces complexity and improves understandability in hybrid-system modelling.Source: §4 · p. 6
  • Existing UML-based code generators could be extended to generate quantum source code in languages such as QASM, Q# and Qiskit.The UML representations may also support modernization through reverse-engineering quantum circuits from source code.Source: §4 · p. 6
  • The proposed profile is part of longer-term work to extend other UML viewpoints, including use-case, class, sequence, component and deployment diagrams.Source: §4 · p. 6
Loading 2103.16169v1…