Design by Contract Framework for Quantum Software

Masaomi Yamaguchi, Nobukazu Yoshioka
{"title":"Design by Contract Framework for Quantum Software","authors":"Masaomi Yamaguchi, Nobukazu Yoshioka","doi":"10.1109/Q-SE59154.2023.00010","DOIUrl":null,"url":null,"abstract":"To realize reliable quantum software, techniques to automatically ensure the quantum software's correctness have recently been investigated. However, they primarily focus on fixed quantum circuits rather than the procedure of building quantum circuits. Despite being a common approach, the correctness of building circuits using different parameters following the same procedure is not guaranteed. To this end, we propose a design-by-contract framework for quantum software. Our framework provides a python-embedded language to write assertions on the input and output states of all quantum circuits built by certain procedures. Additionally, it provides a method to write assertions about the statistical processing of measurement results to ensure the procedure's correctness for obtaining the final result. These assertions are automatically checked using a quantum computer simulator. For evaluation, we implemented our framework and wrote assertions for some widely used quantum algorithms. Consequently, we found that our framework has sufficient expressive power to verify the whole procedure of quantum software.","PeriodicalId":276685,"journal":{"name":"2023 IEEE/ACM 4th International Workshop on Quantum Software Engineering (Q-SE)","volume":"2 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-03-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2023 IEEE/ACM 4th International Workshop on Quantum Software Engineering (Q-SE)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/Q-SE59154.2023.00010","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

Abstract

To realize reliable quantum software, techniques to automatically ensure the quantum software's correctness have recently been investigated. However, they primarily focus on fixed quantum circuits rather than the procedure of building quantum circuits. Despite being a common approach, the correctness of building circuits using different parameters following the same procedure is not guaranteed. To this end, we propose a design-by-contract framework for quantum software. Our framework provides a python-embedded language to write assertions on the input and output states of all quantum circuits built by certain procedures. Additionally, it provides a method to write assertions about the statistical processing of measurement results to ensure the procedure's correctness for obtaining the final result. These assertions are automatically checked using a quantum computer simulator. For evaluation, we implemented our framework and wrote assertions for some widely used quantum algorithms. Consequently, we found that our framework has sufficient expressive power to verify the whole procedure of quantum software.
量子软件的契约框架设计
为了实现可靠的量子软件,人们研究了自动保证量子软件正确性的技术。然而,他们主要关注的是固定量子电路,而不是构建量子电路的过程。尽管是一种常见的方法,但不能保证使用不同参数遵循相同程序构建电路的正确性。为此,我们提出了一个量子软件的契约设计框架。我们的框架提供了一种嵌入python的语言,用于在由某些过程构建的所有量子电路的输入和输出状态上编写断言。此外,还提供了一种编写测量结果统计处理断言的方法,以确保过程的正确性,从而获得最终结果。这些断言是使用量子计算机模拟器自动检查的。为了评估,我们实现了我们的框架,并为一些广泛使用的量子算法编写了断言。因此,我们发现我们的框架具有足够的表达能力来验证量子软件的整个过程。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信