Research and Advances
Computing Applications Europe Region special section: Big trends

When Software Engineering Meets Quantum Computing

Posted
  1. Introduction
  2. The Impact of Quantum Computing
  3. Why Quantum Software Engineering?
  4. Classical vs. Quantum Software Engineering
  5. Conclusion
  6. References
  7. Authors
  8. Footnotes
binary code in detail of quantum computer illustration

Over the last few decades, quantum computing (QC) has intrigued scientists, engineers, and the public across the globe. Quantum computers use quantum superposition to perform many computations, in parallel, that are not possible with classical computers, resulting in tremendous computational power.7 By exploiting such power, QC and quantum software enable many applications that are typically out of the reach of classical computing, such as drug discovery and faster artificial intelligence (AI) techniques.

Quantum computers are currently being developed with a variety of technologies, such as superconducting and ion trapping. Private companies, such as Google and IBM, are building their own quantum computers, while public entities are investing in quantum technologies. For example, the European Union Commission is spending €1 billion on quantum technologies (“EU’s Quantum Flagship Project’s Website”a). Currently, the key goal for quantum computers is to reduce hardware errors that limit their practical uses. Regardless of the eventual technology that wins the quantum hardware race, the key enabler for building QC applications is quantum software (see Figure 1).

f1.jpg
Figure 1. An overview of quantum software engineering.

Quantum software needs to be supported with a quantum software stack, ranging from operating systems to compilers and programming languages, (see examples in Table 1) as postulated by Bertels et al. from the University of Porto.3 Quantum software engineering (QSE) enables the cost-effective and scalable development of dependable quantum software to build revolutionary quantum software applications in many domains—for example, finance, chemistry, healthcare, and agriculture (see Figure 1 and Table 1). However, effective quantum software applications cannot be developed with classical software engineering methods due to quantum computing’s inherent characteristics—for instance, superposition and entanglement. Thus, we need to build novel QSE methodologies (with tool support) that cover different phases of QSE, possibly including requirements engineering, modeling, coding, testing, and debugging as shown in Figure 1.

t1.jpg
Table 1. Various dimensions of quantum computing with examples.

In this article, we first present a general view of quantum computing’s potential impact, followed by some highlights of EU-level QC initiatives. We then argue the need for QSE, present the state of the art of QSE from multiple aspects (testing, for example) by comparing quantum computers with their classical counterparts, and shed light on possible research directions.

Back to Top

The Impact of Quantum Computing

Quantum computing is primed to solve a broad spectrum of computationally expensive societal and industrial problems. Notable examples include accelerated drug discovery and vaccine development in healthcare, portfolio management and optimization in finance, and complex simulations in physics to better understand our universe. As a result, QC’s success will inevitably and significantly impact our day-to-day lives and revolutionize most industries across many domains. Such impact must be realized via quantum software, the development of which should be systematically powered by QSE. Scientifically speaking, QSE will open new areas of research to develop real applications by fostering research communities across disciplines (such as computer science, software engineering, mathematics, and physics) and interactions with other fields such as medicine, chemistry, and finance. Table 1 summarizes various dimensions of QC with examples.

EU-level quantum initiatives. Efforts to build quantum computers in Europe are increasing. VTT–Technical Research Centre of Finland, together with IQM, aims to build Finland’s first 25-qubit, fully functional quantum computer by 2024. In Sweden, the Wallenberg Centre for Quantum Technology at Chalmers is building a superconducting quantum computer capable of up to 100 qubits. The Future and Emerging Technologies’ Quantum Technologies Flagship program also funds projects to build quantum computers. For example, AQTION is building Europe’s first ion-trapped quantum computer, while OpenSuperQ is focused on building a 100-qubit superconducting QC. To boost research on the development of novel QC applications in Germany, Fraunhofer installed an IBM Quantum System One to provide access to organizations interested in developing QC applications. Finally, NordiQuEst is a new collaborative effort between four Nordic countries and Estonia to build a dedicated Nordic-Estonian QC ecosystem that will integrate various quantum computers and emulators and make them accessible to the Nordic-Estonian region to accelerate QC research, development, and education.

Back to Top

Why Quantum Software Engineering?

Building practical and real-life QC applications requires the implementation of quantum algorithms as software. Learning from the classical computing realm, developing dependable software entails following a software development life cycle (SDLC), which typically includes requirements engineering, architecture and design, development, testing, debugging, and maintenance phases.

Given that quantum software development is relatively new, an SDLC for quantum software doesn’t exist. However, quantum programming languages are available to implement quantum algorithms (see examples in Table 1). In their current state, these languages allow programming at the lower level—for instance, as quantum circuits consisting of quantum gates. Figure 2 shows a quantum program example in IBM’s Qiskit performing quantum entanglement, its equivalent quantum circuit in the middle, and execution result on the right side.

f2.jpg
Figure 2. Quantum entanglement program in OpenQASM together with its quantum circuit and execution result.

Programming quantum circuits is challenging, as evidenced in the example, because it requires a specialized background in quantum physics, including an understanding of how quantum gates work. Unfortunately, classical computing programmers do not often possess such a background, thus making it difficult for them to program quantum computers. Moreover, in the context of quantum SDLC, quantum programming is just one aspect; attention must be given to other SDLC phases, such as requirements, design, and architecture; verification and validation; and maintenance.

Back to Top

Classical vs. Quantum Software Engineering

Quantum software requirements engineering and quantum software modeling. Due to the increasing complexity of software application domains, requirements engineering is critical, as it is the process of eliciting, specifying/modeling, managing requirements, among others. During the process, various stakeholders—domain experts and software developers, for example—interact, and the resulting requirements serve as key artifacts to drive software design and development. From this perspective, we consider that requirements engineering in the quantum world aligns with requirements engineering of its classical computing counterpart (see Table 2 for details). However, QC brings new challenges.

t2.jpg
Table 2. Comparison of classical and quantum computing.

First, its software engineers often find its application domains—for instance, radiotherapy optimization or drug discovery—hard to comprehend. Second, quantum software engineers must also equip themselves with basic knowledge about quantum mechanics, linear algebra, algorithms and their analysis, and more. Therefore, requirements engineering is very important for easing communication among various stakeholders while raising the level of abstraction in understanding the domain and linking the domain to analysis, design, and implementation. To the best of our knowledge, requirements engineering for quantum software is an uncharted area of research. There has not been any publication in this area yet. We argue that, as with classical software, quantum software engineering requires the development of novel elicitation, specification, modeling, analysis, and verification methods.

Quantum finite-state machines, and the study of their formal properties, have been investigated in the literature.8 However, their application to quantum software modeling remains unstudied. Recently, there has been an increasing interest in extending the Unified Modeling Language (UML) to model quantum software, mainly in the classical software engineering community as highlighted by European researchers.2 More research is needed, though, to determine whether extending UML is sufficient or more domain-specific modeling solutions are required. In general, there are many opportunities for quantum software modeling, such as developing novel and intuitive quantum modeling notations and methodologies, verification and validation with quantum software models, and empowering code/circuit generation.

Quantum software testing. It is important to ensure quantum programs are correct—that is, they can deliver their intended functionalities. Testing quantum programs is difficult compared to classical software due to their inherent characteristics, including their probabilistic nature; computations in superpositions; the use of advanced features, such as entanglement; a difficulty in reading or estimating quantum program states in superposition; and a lack of precise test oracles. Thus, there is a need for novel, automated, and systematic methods for testing quantum programs. Quantum software testing is garnering increased attention, and several papers have recently been published, with significant contributions from European researchers.1,6,9,10

Several research areas need to be explored, such as how to define and check (with relevant statistics, for instance) quantum test oracles without destroying superposition, and how to cost-effectively find test data that can break a quantum program. Given hardware noises in quantum computers, testing techniques must also be noise-aware. In general, we foresee the need to build theoretical foundations of quantum software testing, including coverage criteria, test models, and test strategies. Test strategies consist of test oracles, test data, and test cases, and can be designed by considering fault types, metamorphic testing to deal with test oracle issues, and mutation analysis. To maximize the benefit, all test techniques are expected to be independent of a quantum programming language. Furthermore, we need practical applications, extensive empirical evaluations of testing techniques, and the creation of benchmarks for the community. Several automated quantum software testing tools have recently been developed, with major contributions by European researchers such as Quito, Muskit, QuSBT, QsharpCheck, and QuCAT.

Quantum software debugging. Observed failures in quantum pro-grams—for instance, found with testing—need to be diagnosed with the debugging process to isolate and patch the code to fix the failure. This process typically comprises multiple tactics usually found in debuggers, such as relying on print statements in code to achieve interactive debugging. Similarly, we need quantum software debugging tactics, implemented in debuggers, to cost-effectively diagnose and resolve quantum software failures. However, the development of effective debugging techniques faces several challenges as discussed in a key debugging work:4 an inability to directly monitor quantum software states in superposition; the understanding of quantum software states, when possible (for instance, in quantum computer simulators), can be unintuitive; and a lack of best practices, in general, to perform debugging.

Several research opportunities exist for debugging quantum programs: tailoring classical debugging tactics (backtracking and cause elimination, for example) to debug programs on quantum simulators and developing novel tactics to debug on real quantum computers; novel visualization approaches to inspect values without the need to measure quantum states, with intuitive visualizations comprehensible by humans; and novel ways to infer quantum software states using statistical4 and projection-based assertions (for example, see Li et al.5), in addition to developing novel assertion types.

Back to Top

Conclusion

Quantum computing is on the rise and will, no doubt, revolutionize many technologies. It will transform our understanding of and the way we deal with complex problems and challenges. Quantum software engineering is key to the systematic and cost-effective creation of tomorrow’s powerful, reliable, and practical QC applications.

Compared with classical computing, QC’s inherent complexity and its complex application domains—drug discovery, for example—present new multidimensional challenges that emphasize the significance of QSE. Fascinated by this observation, we presented in this article the key highlights of QC activities in Europe, key QSE innovations (when compared with classical software engineering), and open QSE research directions. This is the time to embrace QC and form the QSE community in Europe and globally.

    1. Ali, S., Arcaini, P., Wang, X., and Yue, T. Assessing the effectiveness of input and output coverage criteria for testing quantum programs. In Proceedings of the 14th IEEE Conf. on Software Testing, Verification, and Validation (2021).

    2. Ali, S. and Yue, T. Modeling quantum programs: Challenges, initial results, and research directions. In Proceedings of the 1st ACM SIGSOFT Intern. Workshop on Architectures and Paradigms for Engineering Quantum Software. (2020).

    3. Bertels, K. et al. Quantum accelerator stack: A research roadmap. (2021), arXiv:2102.02035.

    4. Huang, Y. and Martonosi, M. Statistical assertions for validating patterns and finding bugs in quantum programs. In Proceedings of the 46th Intern. Symp. on Computer Architecture (2019).

    5. Li, G. et al. Projection-based runtime assertions for testing and debugging quantum programs. In Proceedings of the ACM on Programming Languages 4 (2020); doi:10.1145/3428218.

    6. Mendiluze, E., Ali, S., Arcaini, P., and Yue, T. Muskit: A mutation analysis tool for quantum software testing. In Proceedings of the 36th Intern. Conf. on Automated Software Engineering—Tool Demonstrations track (2021).

    7. Mermin, N.D. Quantum Computer Science: An Introduction, Cambridge University Press (2007).

    8. Tian, Y., Feng, T., Luo, M., Zheng, S., and Zhou, X. Experimental demonstration of quantum finite automaton. npj Quantum Information 5, 1 (2019), 56; doi:10.1038/s41534-019-0163-x

    9. Wang, X., Arcaini, P., Yue, T., and Ali, S. Application of combinatorial testing to quantum programs. In Proceedings of the IEEE Intern. Conf. on Software Quality, Reliability, and Security (2021).

    10. Wang, X., Arcaini, P., Yue, T., and Ali, S. Generating failing test suites for quantum programs with search. In Proceedings of the 13th Symp. Search-Based Software Engineering (2021).

Join the Discussion (0)

Become a Member or Sign In to Post a Comment

The Latest from CACM

Shape the Future of Computing

ACM encourages its members to take a direct hand in shaping the future of the association. There are more ways than ever to get involved.

Get Involved

Communications of the ACM (CACM) is now a fully Open Access publication.

By opening CACM to the world, we hope to increase engagement among the broader computer science community and encourage non-members to discover the rich resources ACM has to offer.

Learn More