Mutation Testing of Quantum Programs Written in QISKit

There is an inherent lack of knowledge and technology to test a quantum program properly. In this paper, building on the definition of syntactically equivalent quantum operations, we investigated 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 discuss 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 11 real quantum programs written in the IBM’s QISKit library. QMutPy has proven to be an effective quantum mutation tool, providing insight on the current state of quantum tests.

[1]  Gordon Fraser,et al.  Practical Mutation Testing at Scale: A view from Google , 2021, IEEE Transactions on Software Engineering.

[2]  Pengzhan Zhao,et al.  Identifying Bug Patterns in Quantum Programs , 2021, 2021 IEEE/ACM 2nd International Workshop on Quantum Software Engineering (Q-SE).

[3]  Gordon Fraser,et al.  Does Mutation Testing Improve Testing Practices? , 2021, 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE).

[4]  Jianjun Zhao,et al.  Quantum Software Engineering: Landscapes and Horizons , 2020, ArXiv.

[5]  Peng Liu,et al.  Stochastic Optimization of Quantum Programs , 2019, Computer.

[6]  Andriy V. Miranskyy,et al.  On Testing Quantum Programs , 2018, 2019 IEEE/ACM 41st International Conference on Software Engineering: New Ideas and Emerging Results (ICSE-NIER).

[7]  Peter Wittek,et al.  Open source software in quantum computing , 2018, PloS one.

[8]  Margaret Martonosi,et al.  QDB: From Quantum Algorithms Towards Correct Quantum Programs , 2018, PLATEAU@SPLASH.

[9]  Gordon Fraser,et al.  An Industrial Evaluation of Unit Test Generation: Finding Real Faults in a Financial Application , 2017, 2017 IEEE/ACM 39th International Conference on Software Engineering: Software Engineering in Practice Track (ICSE-SEIP).

[10]  Pankaj Mudholkar,et al.  Software Testing , 2002, Computer.