Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3639476.3639761acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article
Open access

Locating Buggy Segments in Quantum Program Debugging

Published: 24 May 2024 Publication History

Abstract

When a bug is detected by testing a quantum program on a quantum computer, we want to determine its location to fix it. To locate the bug, the quantum program is divided into several segments, and each segment is tested. However, to prepare a quantum state that is input to a segment, it is necessary to execute all the segments ahead of that segment in a quantum computer. This means that the cost of testing each segment depends on its location. We can also locate a buggy segment only if it is confirmed that there are no bugs in all segments ahead of that buggy segment. Since a quantum program is tested statistically on the basis of measurement results, there is a tradeoff between testing accuracy and cost. Although these characteristics are unique to quantum programs and complicate locating bugs, they have not been investigated. We suggest for the first time that these characteristics should be considered to efficiently locate bugs. We are also the first to propose a bug-locating method that takes these characteristics into account. The results from experiments indicate that the bug-locating cost, represented as the number of executed quantum gates, can be reduced with the proposed method compared with naive methods.

References

[1]
Rui Abreu, João Paulo Fernandes, Luis Llana, and Guilherme Tavares. 2022. Metamorphic testing of oracle quantum programs. In Proceedings of the 3rd International Workshop on Quantum Software Engineering. 16--23.
[2]
Shaukat Ali, Paolo Arcaini, Xinyi Wang, and Tao Yue. 2021. Assessing the Effectiveness of Input and Output Coverage Criteria for Testing Quantum Programs. In 2021 14th IEEE Conference on Software Testing, Verification and Validation (ICST). 13--23.
[3]
Luis S. Barbosa. 2020. Software Engineering for 'Quantum Advantage'. In Proceedings of the IEEE/ACM 42nd International Conference on Software Engineering Workshops (Seoul, Republic of Korea) (ICSEW'20). Association for Computing Machinery, New York, NY, USA, 427--429.
[4]
Andrew Cross. 2018. The IBM Q experience and QISKit open-source quantum computing software. In APS March meeting abstracts, Vol. 2018. L58--003.
[5]
Manuel De Stefano, Fabiano Pecorelli, Dario Di Nucci, Fabio Palomba, and Andrea De Lucia. 2022. Software engineering for quantum programming: How far are we? Journal of Systems and Software 190 (2022), 111326.
[6]
Daniel Fortunato, José Campos, and Rui Abreu. 2022. Qmutpy: A mutation testing tool for quantum algorithms and applications in qiskit. In Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis. 797--800.
[7]
Sébastien Hélie. 2007. Understanding statistical power using noncentral probability distributions: Chi-squared, G-squared, and ANOVA. Tutorials in Quantitative Methods for Psychology 3, 2 (2007), 63--69.
[8]
Shahin Honarvar, Mohammad Reza Mousavi, and Rajagopal Nagarajan. 2020. Property-based testing of quantum programs in Q#. In Proceedings of the IEEE/ACM 42nd International Conference on Software Engineering Workshops. 430--435.
[9]
Yipeng Huang and Margaret Martonosi. 2018. QDB: from quantum algorithms towards correct quantum programs. arXiv preprint arXiv:1811.05447 (2018).
[10]
Yipeng Huang and Margaret Martonosi. 2019. Statistical assertions for validating patterns and finding bugs in quantum programs. In Proceedings of the 46th International Symposium on Computer Architecture. 541--553.
[11]
Gushu Li, Li Zhou, Nengkun Yu, Yufei Ding, Mingsheng Ying, and Yuan Xie. 2020. Projection-based runtime assertions for testing and debugging quantum programs. Proceedings of the ACM on Programming Languages 4, OOPSLA (2020), 1--29.
[12]
Ji Liu, Gregory T Byrd, and Huiyang Zhou. 2020. Quantum circuits for dynamic runtime assertions in quantum computation. In Proceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems. 1017--1030.
[13]
Ji Liu and Huiyang Zhou. 2021. Systematic Approaches for Precise and Approximate Quantum State Runtime Assertion. In 2021 IEEE International Symposium on High-Performance Computer Architecture (HPCA). 179--193.
[14]
Peixun Long and Jianjun Zhao. 2022. Testing Quantum Programs with Multiple Subroutines. (8 2022). arXiv:2208.09206 [cs.SE]
[15]
Joseph M Lukens, Kody JH Law, Ajay Jasra, and Pavel Lougovski. 2020. A practical and efficient approach for Bayesian quantum state estimation. New Journal of Physics 22, 6 (2020), 063038.
[16]
Eñaut Mendiluze, Shaukat Ali, Paolo Arcaini, and Tao Yue. 2021. Muskit: A mutation analysis tool for quantum software testing. In 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 1266--1270.
[17]
Andriy Miranskyy and Lei Zhang. 2019. On Testing Quantum Programs. In 2019 IEEE/ACM 41st International Conference on Software Engineering: New Ideas and Emerging Results (ICSE-NIER). 57--60.
[18]
Andriy Miranskyy, Lei Zhang, and Javad Doliskani. 2020. Is your quantum program bug-free? arXiv preprint arXiv:2001.10870 (2020).
[19]
Andriy Miranskyy, Lei Zhang, and Javad Doliskani. 2021. On testing and debugging quantum software. arXiv preprint arXiv:2103.09172 (2021).
[20]
Enrique Moguel, Javier Berrocal, José García-Alonso, and Juan Manuel Murillo. 2020. A Roadmap for Quantum Software Engineering: Applying the Lessons Learned from the Classics. In Q-SET@ QCE. 5--13.
[21]
Asmar Muqeet, Tao Yue, Shaukat Ali, and Paolo Arcaini. 2023. Noise-Aware Quantum Software Testing. arXiv preprint arXiv:2306.16992 (2023).
[22]
Michael A Nielsen and Isaac L Chuang. 2010. Quantum computation and quantum information. Cambridge university press.
[23]
Matteo Paltenghi and Michael Pradel. 2023. MorphQ: Metamorphic Testing of the Qiskit Quantum Computing Platform. In Proceedings of the 45th International Conference on Software Engineering (Melbourne, Victoria, Australia) (ICSE '23). IEEE Press, 2413--2424.
[24]
Mario Piattini, Guido Peterssen, and Ricardo Pérez-Castillo. 2021. Quantum computing: A new software engineering golden age. ACM SIGSOFT Software Engineering Notes 45, 3 (2021), 12--14.
[25]
Mario Piattini, Guido Peterssen, Ricardo Pérez-Castillo, Jose Luis Hevia, Manuel A Serrano, Guillermo Hernández, Ignacio García Rodríguez de Guzmán, Claudio Andrés Paradela, Macario Polo, Ezequiel Murina, et al. 2020. The talavera manifesto for quantum software engineering and programming. In QANSWER. 1--5.
[26]
Fuyuhiko Tanaka. 2012. Bayesian estimation of the wave function. Physics Letters A 376, 36 (2012), 2471--2476.
[27]
Jiyuan Wang, Fucheng Ma, and Yu Jiang. 2021. Poster: Fuzz testing of quantum program. In 2021 14th IEEE Conference on Software Testing, Verification and Validation (ICST). IEEE, 466--469.
[28]
Xinyi Wang, Paolo Arcaini, Tao Yue, and Shaukat Ali. 2021. Application of combinatorial testing to quantum programs. In 2021 IEEE 21st International Conference on Software Quality, Reliability and Security (QRS). IEEE, 179--188.
[29]
Xinyi Wang, Paolo Arcaini, Tao Yue, and Shaukat Ali. 2021. Quito: a coverage-guided test generator for quantum programs. In 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE). IEEE, 1237--1241.
[30]
Xinyi Wang, Paolo Arcaini, Tao Yue, and Shaukat Ali. 2022. QuSBT: search-based testing of quantum programs. In Proceedings of the ACM/IEEE 44th International Conference on Software Engineering: Companion Proceedings. 173--177.
[31]
Xinyi Wang, Tongxuan Yu, Paolo Arcaini, Tao Yue, and Shaukat Ali. 2022. Mutation-based test generation for quantum programs with multi-objective search. In Proceedings of the Genetic and Evolutionary Computation Conference. 1345--1353.
[32]
Louis F Williams Jr. 1976. A modification to the half-interval search (binary search) method. In Proceedings of the 14th annual Southeast regional conference. 95--101.
[33]
Jianjun Zhao. 2020. Quantum software engineering: Landscapes and horizons. arXiv preprint arXiv:2007.07047 (2020).
[34]
Pengzhan Zhao, Xiongfei Wu, Zhuo Li, and Jianjun Zhao. 2023. QChecker: Detecting Bugs in Quantum Programs via Static Analysis. In 2023 IEEE/ACM 4th International Workshop on Quantum Software Engineering (Q-SE). 50--57.
[35]
P. Zhao, J. Zhao, and L. Ma. 2021. Identifying Bug Patterns in Quantum Programs. In 2021 IEEE/ACM 2nd International Workshop on Quantum Software Engineering (Q-SE). IEEE Computer Society, Los Alamitos, CA, USA, 16--21.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICSE-NIER'24: Proceedings of the 2024 ACM/IEEE 44th International Conference on Software Engineering: New Ideas and Emerging Results
April 2024
127 pages
ISBN:9798400705007
DOI:10.1145/3639476
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

In-Cooperation

  • Faculty of Engineering of University of Porto

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 24 May 2024

Check for updates

Qualifiers

  • Research-article

Conference

ICSE-NIER'24
Sponsor:

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 148
    Total Downloads
  • Downloads (Last 12 months)148
  • Downloads (Last 6 weeks)32
Reflects downloads up to 02 Feb 2025

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media