Litcius/Paper detail

Mutation Testing of Quantum Programs: A Case Study With Qiskit

Daniel Fortunato, José Campos, Rui Abreu

2022IEEE Transactions on Quantum Engineering52 citationsDOIOpen Access PDF

Abstract

As quantum computing is still in its infancy, there is an inherent lack of knowledge and technology to test a quantum program properly. In the classical realm, mutation testing has been successfully used to evaluate how well a program's test suite detects seeded faults (i.e., mutants). In this paper, building on the definition of syntactically equivalent quantum operations, we propose a novel set of mutation operators to generate mutants based on qubit measurements and quantum gates. To ease the adoption of quantum mutation testing, we further propose QMUTPY, an extension of the well-known and fully automated open-source mutation tool MUTPY. To evaluate QMUTPY's performance, we conducted a case study on 24 real quantum programs written in IBM's QISKIT library. Furthermore, we show how better test suite coverage and improvements to test assertions can increase the test suites' mutation score and quality. QMUTPY has proven to be an effective quantum mutation tool, providing insight into the current state of quantum tests and how to improve them.

Topics & Concepts

Computer scienceTest suiteQubitMutationQuantum computerTheoretical computer scienceQuantumComputer engineeringTest casePhysicsGeneticsQuantum mechanicsMachine learningGeneRegression analysisBiologySoftware Testing and Debugging TechniquesTeaching and Learning ProgrammingQuantum Computing Algorithms and Architecture
Mutation Testing of Quantum Programs: A Case Study With Qiskit | Litcius