Source-linked AI summary

Quantum Software Engineering: Landscapes and Horizons

Jianjun Zhao

arXiv:2007.07047v2cs.SEcs.PLquant-ph

TL;DR

Quantum software engineering lacks a unified engineering perspective as quantum hardware and access expand. This paper defines the field and its life cycle, surveys methods and tools across development phases, and identifies challenges and opportunities for future research. The survey covers requirements, design, implementation, testing, maintenance, reuse, and measurement.

  • Problem

    Growing quantum hardware and Quantum-as-a-Service access create an urgent need for engineering methods, tools, and processes tailored to quantum software systems.

  • Method

    The paper defines quantum software engineering, introduces a quantum software life cycle, and comprehensively surveys approaches across its development phases.

  • Results

    The survey covers quantum software requirements analysis, design, implementation, testing, maintenance, reuse, and measurement, while identifying challenges and opportunities.

  • Takeaways & Limitations

    The paper provides guidance for software-engineering researchers and quantum-computing researchers working on quantum software systems.

  • Takeaways & Limitations

    Quantum debugging is constrained because inspecting quantum registers can cause decoherence, while copying quantum objects is physically impossible.

Abstract

from arXiv · show

Quantum software plays a critical role in exploiting the full potential of quantum computing systems. As a result, it has been drawing increasing attention recently. This paper defines the term "quantum software engineering" and introduces a quantum software life cycle. The paper also gives a generic view of quantum software engineering and discusses the quantum software engineering processes, methods, and tools. Based on these, the paper provides a comprehensive survey of the current state of the art in the field and presents the challenges and opportunities we face. The survey summarizes the technology available in the various phases of the quantum software life cycle, including quantum software requirements analysis, design, implementation, test, and maintenance. It also covers the crucial issues of quantum software reuse and measurement.

1 INTRODUCTION

Quantum software engineering extends software-engineering concerns into the quantum domain, where growing hardware access and specialized applications create an urgent need for dedicated methods, tools, and processes. This paper surveys the field across the quantum software life cycle and identifies future challenges and opportunities.

  • Quantum software engineering aims to extend classical software engineering so programmers can manipulate quantum programs with comparable ease and confidence.
  • Growing quantum hardware and Quantum-as-a-Service access have increased the need for methods, tools, and processes to engineer quantum software efficiently.
  • The survey organizes prior work across requirements, design, implementation, testing, and maintenance phases of the quantum software life cycle.
  • It identifies challenges, opportunities, and promising research directions for the emerging quantum software engineering community.
  • The paper defines quantum software engineering and introduces a quantum software life cycle model for quantum software development.

2 BACKGROUND

Quantum computing represents information with qubits and transforms quantum states using reversible gates and circuits. Superposition, entanglement, probabilistic measurement, and specialized gates distinguish quantum computation from classical computation.

  • Qubits: A qubit is represented as a normalized linear combination α|0⟩ + β|1⟩ of two computational basis states.The coefficients are complex numbers satisfying |α|^2 + |β|^2 = 1.
  • Quantum gates: Quantum gates reversibly transform qubit states, with equal numbers of inputs and outputs because quantum computation cannot lose information.Single-qubit gates can be represented by 2 × 2 matrices acting on state vectors.
  • Quantum gates: The NOT gate exchanges the coefficients of |0⟩ and |1⟩, while the Hadamard gate decomposes existing quantum states according to their coefficients.Applying the Hadamard gate twice returns the quantum state to its original state.
  • Quantum gates: A CNOT gate uses a control qubit to conditionally apply a Pauli-X operation to a target qubit when the control is |1⟩.When the control is |0⟩, the target remains unchanged.
  • Quantum circuits: Quantum circuits are interconnected collections of quantum gates whose structure implements a unitary transformation and whose outputs are read through measurement.The QFT example uses Hadamard and controlled-phase gates, with black dots indicating control bits.
  • Quantum principles: Superposition lets n qubits represent a combination of 2^n basis states, unlike n classical bits with one fixed state.This provides a large representational advantage, but the exact state cannot be obtained without measurement.
  • Quantum principles: Quantum measurement can collapse a superposition into a deterministic state, making quantum-computing results non-deterministic and requiring output verification.Reducing the superposition before measurement can yield correct results with high probability.

3 QUANTUM SOFTWARE ENGINEERING

Quantum software engineering extends beyond programming to the systematic development, operation, and maintenance of quantum software, supported by methods, tools, processes, and a sequential life cycle.

  • Quantum programming: Quantum programming builds executable programs from classical and quantum components, using quantum operations and measurements on qubit registers.Quantum operations include reversible unitary and probabilistic non-unitary operations.
  • Scope: The field addresses more than coding because requirements and design problems are described as more common and costly to correct.The paper argues that life-cycle approaches are needed for broader quantum software development.
  • Definition: Quantum software includes executable programs, supporting libraries, and documentation needed for development, operation, and maintenance.The broader definition emphasizes timely documentation as part of development.
  • Definition: Quantum software engineering applies sound engineering principles to develop, operate, and maintain economical, reliable, and efficient quantum software.The definition explicitly includes associated documentation and performance on quantum computers.
  • Generic view: Quantum software engineering is presented as a layered technology comprising methods, tools, and processes.Methods cover construction tasks, tools automate or semiautomate those methods, and processes connect them.
  • Life cycle: The proposed sequential life cycle progresses through requirements analysis, design, implementation, testing, and maintenance, with possible extensions.Maintenance is the final phase and includes modifications and updates after delivery.

4 QUANTUM SOFTWARE REQUIREMENTS ANALYSIS

Quantum software requirements analysis is identified as an emerging area lacking prior research, but expected to become critical as development resources accumulate.

  • Research status: Until recently, no research work had addressed quantum software requirements analysis.The paper identifies methodologies, techniques, and tools for this phase as an inevitable future issue.
  • Future needs: Accumulating quantum software development resources are expected to make requirements-analysis support a critical issue.The proposed support includes methodologies, techniques, and tools.

5 QUANTUM SOFTWARE DESIGN

Quantum software design is still emerging because quantum algorithms are difficult to reason about and require principles distinct from classical software design. Existing work explores UML extensions, formal models and specifications, pattern languages, and modularity frameworks.

  • Design challenges: Quantum algorithm development is difficult because superposition and entanglement complicate design compared with classical algorithms.Research on quantum software design principles and methodologies is described as still starting.
  • Modeling and specification: UML extensions for quantum software currently cover class and sequence diagrams, while three other diagram types remain unstudied.The uncovered types are composite structure, activity, and state machine diagrams.
  • Modeling and specification: A platform- and language-independent conceptual model represents quantum variables, quantum states, and quantum operations as a basis for new modeling languages.The model may support either a domain-specific language or extensions to existing modeling languages.
  • Modeling and specification: A formal specification language based on Z aims to express elementary quantum-computing notation in a form more suitable for quantum-computing scientists and software engineers.The motivation is to provide a more intuitive way to think about and write quantum algorithms.
  • Pattern languages: A quantum-algorithm pattern language systematizes recurring solutions into ten gate-model pattern types, each documented through eight elements.The elements include name, intent, icon, problem, context, solution, known uses, and next steps.
  • Modular design: Quantum modularity research includes server-client frameworks for invoking unknown unitaries and circuit factorization that recycles structure to reduce control gates.The framework is focused on modular circuit design but could be adapted to modular quantum software systems.

6 QUANTUM SOFTWARE IMPLEMENTATION

Quantum software implementation has produced multiple programming approaches across established host languages. Selecting a suitable technique is presented as an important implementation decision.

  • Programming approaches: Quantum programming approaches support host languages including C, C++, C#, Python, and F#.Examples include QCL, Scaffold, Q#, ProjectQ, Qiskit, and Forest.
  • Programming approaches: Implementation-level development has produced a range of quantum programming techniques, making technique selection important when implementing quantum applications.The survey notes that many quantum programming approaches are available.

7 QUANTUM SOFTWARE TESTING

Quantum software testing is difficult because quantum properties make program behavior harder to predict and increase the risk of programming mistakes. The surveyed work develops bug taxonomies, reproducible benchmarks, assertions, fuzzing, search-based testing, and other approaches.

  • Testing motivation: Quantum superposition, entanglement, and no-cloning make quantum-software behavior difficult to predict and motivate new testing and debugging techniques.The paper links these properties to increased difficulty in discovering quantum-software bugs.
  • Bug analysis: Bug studies identify quantum-specific faults involving initialization, operations, transformations, and compositions using iteration, recursion, and mirroring.These classifications are intended to support quantum-software debugging and defense strategies.
  • Bug analysis: Qiskit bug-pattern research catalogs symptoms, root causes, cures, and preventions, but does not cover every quantum-related construct or their interactions.The study is presented as a primary step requiring further research.
  • Benchmarks: QBugs provides reproducible quantum-algorithm bugs for controlled debugging and testing experiments, while Bugs4Q contains thirty-six manually validated Qiskit bugs with reproduction tests.Bugs4Q covers bugs from Terra, Aer, Ignis, and Aqua, with corresponding fixes publicly available.
  • Assertions: Q# property-based testing uses assertion methods for probabilities, entanglement, teleportation, transformations, and state equality.The reported properties are stateless and focus on input-output relations.
  • Automated testing: QuanFuzz adapts coverage-guided fuzzing to generate quantum-software inputs, and its evaluation on seven programs obtained 20%∼60% more branch coverage than classical test-input generation.The programs contained registers ranging from 2 to 8 qubits.
  • Assertions: Projection-based runtime assertions represent quantum properties expressively and may reduce testing overhead by matching projective measurement.Proq is designed for testing and debugging quantum programs.

7.4 Quantum Program Debugging

Quantum program debugging adapts classical tactics and develops assertion, monitoring, and static-type approaches, but quantum measurement and state properties constrain practical applicability.

  • 7.4.1 Debugging Tactics: Classical backtracking, especially code reviews and inspections, could probably support quantum debugging, while cause elimination can be extended with hypotheses, data, and experiments.Because quantum behavior is probabilistic, debugging results should be assessed through output distributions.
  • 7.4.1 Debugging Tactics: Black-box brute-force debugging can trace and log inputs and outputs, but white-box tracing is almost impossible because of superposition, entanglement, and no-cloning.Suggested solutions remain immature and may be infeasible in practice.
  • 7.4.2 Assertion-based Debugging: Assertion-based debugging places assertions to prevent known bug types and validates programs through functionally equivalent implementations in multiple quantum languages.The reported validation involved LIQUi|⟩, ProjectQ, and Q# implementations and simulation results.
  • 7.4.2 Assertion-based Debugging: Runtime assertion circuits use ancilla qubits to collect information indirectly, avoiding direct measurement of tested qubits and supporting checks for classical values, entanglement, and superposition.This approach addresses execution disruption caused by direct measurements.
  • 7.4.3 Debugging Quantum Processes.: Projection-based Proq and nondisturbing process monitoring offer alternatives, while quantum Hoare types move assertion checking toward compilation-time static verification.The surveyed language-support work remains preliminary, with more work needed for a unified programming, specification, and verification system.
  • 7.4.4 Language Support for Debugging: Noisy-program semantics can bound the distance between noisy and ideal results and compute error bounds for quantum Bernoulli factory, quantum walk, and small-circuit examples.The analysis includes circuits with and without error correction.

8 QUANTUM SOFTWARE MAINTENANCE

Quantum software maintenance focuses on correcting faults, improving performance, and reengineering classical systems to coexist with quantum algorithms and components.

  • 8 QUANTUM SOFTWARE MAINTENANCE: 60%–80% of software cost comes from maintenance, whose quantum-software purpose is to correct faults and improve applications after delivery.Emerging quantum maintenance research mainly addresses reengineering existing classical systems to integrate new quantum algorithms.
  • 8 QUANTUM SOFTWARE MAINTENANCE: Quantum computers’ high initial cost makes remote cloud calls from classical computers common, requiring enterprises to integrate quantum algorithms with existing information systems.This creates migration and coexistence problems for classical and quantum software.
  • 8 QUANTUM SOFTWARE MAINTENANCE: Model-driven reengineering can restructure classical systems together with existing or new quantum algorithms into combined classical–quantum information systems.The approach is presented as supporting migration and evolution while retaining business knowledge.
  • 8 QUANTUM SOFTWARE MAINTENANCE: Integrating quantum components requires software-engineering work beyond algorithm implementation, including quality considerations when transforming equivalent SAT formulations for quantum annealers.The case study found substantial quality differences between mathematically equivalent but structurally different transformations.

9 QUANTUM SOFTWARE REUSE

Quantum software reuse spans patterns, circuits, and states, offering structured ways to reuse design knowledge, optimized circuit building blocks, and prepared quantum resources.

  • 9 QUANTUM SOFTWARE REUSE: Quantum software reuse covers quantum patterns, quantum circuits, and quantum states across development and post-delivery activities.The surveyed scope includes requirements, design, implementation, quality assessment, and maintenance.
  • 9.1 Quantum Pattern Reuse: A quantum pattern repository can store pattern documents and links, allowing developers to query for appropriate patterns during algorithm development.The repository is described as a specialized database for managing reusable pattern knowledge.
  • 9.2 Quantum Circuit Reuse: Circuit-reuse design constructs efficient quantum circuits by systematically combining existing highly optimized circuits, with mathematically grounded explanations.This design principle addresses the difficulty of finding optimized circuits for a given unitary matrix.
  • 9.2 Quantum Circuit Reuse: Generalized circuit-synthesis reuse frameworks seek suitable circuit groups and use group information with coefficient matrices to generate circuits for non-trivial operators.The reported extension considers candidates including projective Pauli and dihedral groups.
  • 9.3 Quantum State Reuse: Plug-in quantum software proposes preparing valuable quantum states offline, testing and storing copies, then downloading states for use in quantum computers.A candidate application is executing difficult fault-tolerant gates within quantum error-correction schemes.
  • 9.3 Quantum State Reuse: Generalized quantum teleportation has also been proposed to prepare, use, and classify quantum states to make fault-tolerant quantum-computer design more straightforward and methodical.The approach aims to reduce required resources.

10 QUANTUM SOFTWARE MEASUREMENT

Quantum software measurement adapts software metrics to assess complexity, quality, effectiveness, and quantum-specific structures, while quality attributes connect system characteristics to architecture and operation.

  • 10 QUANTUM SOFTWARE MEASUREMENT: Software metrics measure inherent complexity to predict project cost and evaluate design quality and effectiveness across testing, maintenance, reengineering, reuse, and management.Metrics for new languages and paradigms should be based on models relevant to those paradigms.
  • 10 QUANTUM SOFTWARE MEASUREMENT: Table 6 summarizes effects of quantum-computing-system characteristics on software quality attributes, with cell values marked favorable, unfavorable, or unknown/neutral.The table’s legend defines F, U, and − as the three impact categories.
  • 10 QUANTUM SOFTWARE MEASUREMENT: Quantum software metrics extend classical measures such as LOC, Halstead’s Software Science, McCabe’s Complexity Metric, and Henry–Kafura information flow while quantifying quantum features.The metrics target size and structure at different abstraction levels.
  • 10 QUANTUM SOFTWARE MEASUREMENT: Circuit-understandability metrics cover circuit size, density, single-qubit gates, multiple-qubit gates, all gates, oracles, and measurement gates.These metrics are described as an initial step toward understanding quantum-circuit complexity.

11 EMPIRICAL STUDY FOR QUANTUM SOFTWARE ENGINEERING

Empirical studies examine the challenges quantum software developers face, combining traditional software engineering problems with QSE-specific difficulties. Their findings highlight persistent knowledge gaps and opportunities for explanatory and interpretive tools.

  • QSE remains an emerging field whose software engineering challenges and opportunities are not yet fully clear.
  • Empirical research analyzed contributors, forum posts, and GitHub issue reports to investigate quantum software development challenges.One study collected data on 148 contributors, while another combined qualitative analysis with automatic topic modeling.
  • Quantum developers face traditional challenges such as dependency management alongside QSE-specific difficulties such as interpreting quantum execution results.
  • Bridging quantum and classical computing knowledge receives high developer attention while remaining particularly challenging.
  • Future QSE opportunities include explaining theory behind quantum code and interpreting quantum program execution results.

12 SOFTWARE ENGINEERING FOR QUANTUM COMPUTING PLATFORMS

Quantum computing platforms are software stacks whose architecture, quality attributes, and defects require dedicated engineering study. Research addresses platform characteristics, quality impacts, bug patterns, and differential testing.

  • Quantum computing platforms combine quantum computers or simulators, programming languages, compilers, and execution environments.Examples include Qiskit, Cirq, and Q#.
  • Architecture studies identify quantum computing system characteristics relevant to software architecture and examine their effects on architectural quality attributes.
  • Quality attributes examined for quantum computing systems include availability, interoperability, maintainability, manageability, performance, and reliability.
  • Platform correctness is increasingly important as quantum computing systems develop, motivating systematic study of bugs in open-source platforms.One study selected 18 open-source quantum computing platforms.
  • QDiff differentially tests quantum software stacks by executing semantically equivalent programs and statistically comparing their results.It was evaluated on Qiskit, Cirq, and Pyquil.
  • 6 instabilities beyond normal noise were found across Qiskit, Cirq, and Pyquil using 14,799 program variants generated from 6 seed programs.

13 CHALLENGES AND OPPORTUNITIES

Quantum software engineering faces unresolved challenges across requirements, design, implementation, debugging, visualization, verification, and reuse. The section identifies missing methods, languages, tools, patterns, and reusable components as opportunities.

  • 13 CHALLENGES AND OPPORTUNITIES: Quantum software engineering must address changing requirements, limited software-development expertise, constrained budgets, and interdisciplinary complexity.
  • Requirements: Requirements analysis must establish performance, size, cost, and capability criteria early enough to assess quantum technology’s feasibility.
  • Architectural design: Quantum technology effects make design constraints and architectural attributes difficult to define using current models.
  • Architectural design: Quantum software lacks architectural patterns that adequately model quantum effects during system-level design.
  • Architectural design: Quantum architectural description languages should represent classical and quantum components, their connectors, and support formal analysis, verification, and validation.
  • Implementation: Implementation requires rules and tests to prevent unwanted changes to essential design characteristics when new constraints arise.
  • Debugging: Quantum debugging cannot rely on inspecting or copying registers, and appropriate debugging techniques remain unclear because computation is probabilistic.
  • Visualization and verification: Visualization and verification remain difficult because qubit states are exponentially numerous and quantum programs involve superposition, entanglement, and no-cloning.

14 RELATED WORK

Earlier surveys largely focus on quantum programming languages or development environments, whereas this paper surveys quantum software engineering across the complete software life cycle. It positions the work as the first comprehensive survey spanning these phases.

  • Scope: This paper surveys quantum software engineering across requirements analysis, design, implementation, testing, and maintenance.
  • Quantum programming languages: Earlier surveys cover quantum programming languages from perspectives including methodology, history, semantics, compilation, architecture, and tools.
  • Quantum programming languages: Quantum programming-language surveys classify languages into categories such as imperative, functional, circuit, multi-paradigm, and quantum object-oriented languages.
  • Quantum programming languages: Language-design surveys address architectural models, quantum-data management under no-cloning, and the expressive power of quantum functions.
  • Research gap: Programming-language surveys provide comprehensive views of that area but generally omit requirements, design, testing, and maintenance phases.
  • Quantum software engineering: The term quantum software engineering was originally coined by John Clark and Susan Stepney in 2002.
  • Quantum software engineering: Stepney and colleagues framed quantum software engineering as a grand challenge requiring classical software engineering to be reworked and extended for the quantum domain.
  • Research gap: Surveys of quantum software development environments address an essential aspect of development but not the whole quantum software development life cycle.

15 CONCLUDING REMARKS

Quantum software engineering has progressed across the life cycle, but the field is not yet mature and needs further experience to consolidate effective approaches.

  • The paper surveys engineering support across requirements, design, implementation, testing, and maintenance, alongside software reuse and measurement.
  • Quantum software development has been driven mainly by quantum programming languages, but a complete engineering discipline is needed for longer-term development.
  • Rapid progress is evident across the surveyed topics, although many techniques have emerged without established maturity.
  • Further experience is required to assess the relative strengths of proposed techniques and consolidate them into a smaller set of critical approaches.
Loading 2007.07047v2…