Abstract
AbstractQuantum computing is a promising field that can solve complex problems beyond traditional computers’ capabilities. Developing high-quality quantum software applications, called quantum software engineering, has recently gained attention. However, quantum software development faces challenges related to code quality. A recent study found that many open-source quantum programs are affected by quantum-specific code smells, with long circuit being the most common. While the study provided relevant insights into the prevalence of code smells in quantum circuits, it did not explore the potential effect of transpilation, a necessary step for executing quantum computer programs, on the emergence of code smells. Indeed, transpilation might alter those characteristics employed to detect the presence of a smell on a circuit. To address this limitation, we present a new study investigating the impact of transpilation on quantum-specific code smells and how different target gate sets affect the results. We conducted experiments on 17 open-source quantum programs alongside a set of 100 synthetic circuits. We found that transpilation can significantly alter the metrics that are used to detect code smells, even into previously smell-free circuits, with the long circuit smell being the most susceptible to transpilation. Furthermore, the choice of the gate set significantly influences the presence and severity of code smells in transpiled circuits, highlighting the need for careful gate set selection to mitigate their impact. These findings have implications for circuit optimization and high-quality quantum software development. Further research is needed to understand the consequences of code smells and their potential impact on quantum computations, considering the characteristics and constraints of different gate sets and hardware platforms.
Funder
Università degli Studi di Salerno
Publisher
Springer Science and Business Media LLC
Reference48 articles.
1. Api reference for qiskit.circuit.random.random_circuit (2024). https://docs.quantum.ibm.com/api/qiskit/0.19/qiskit.circuit.random.random_circuit
2. Qiskit 0.43.0 documentation (2024). https://qiskit.org/documentation/
3. Transpiler (qiskit.transpiler)—Qiskit 0.43.1 documentation (2024). https://qiskit.org/documentation/apidoc/transpiler.html
4. Ahmad A, Khan AA, Waseem M, Fahmideh M, Mikkonen T (2022) Towards process centered architecting for quantum software systems. In: 2022 IEEE International conference on quantum software (QSW), pp 26–31. IEEE
5. Aleksandrowicz G, Alexander T, Barkoutsos P, Bello L, Ben-Haim Y, Bucher D, Cabrera-Hernández FJ, Carballo-Franquis J, Chen A, Chen CF et al (2019) Qiskit: An open-source framework for quantum computing. Accessed 16 Mar