arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2509.17538quant-ph

QUT:用于量子子程序的单元测试框架

QUT: A Unit Testing Framework for Quantum Subroutines

Mykhailo V. Klymenko, Thong Hoang, Hoa Nguyen, Samuel A. Wilkinson, Bahar Goldozian, Xing Zhenchang, Qinghua Lu, Muhammad Usman, Liming Zhu

更新

AI总结:

本文提出QUT框架,通过多态概率断言实现量子子程序的单元测试,支持多种数据类型并兼容多种量子硬件。

AI中文摘要:

我们提出了QUT(量子单元测试)框架的架构设计和原型实现,该框架专注于可用性和简洁性,使量子单元测试背后的复杂理论概念对各类背景用户可及。通过实现多态概率断言,其评估方法适应断言语句中使用的参数类型,这些参数可能根据量子子程序的上下文依赖语义而变化。这些参数可以表示为量子比特测量结果、密度矩阵或 Choi 矩阵。对于每种类型,架构集成了特定的测试协议,如量子过程重构、量子状态重构或皮尔逊卡方检验,同时保持足够的灵活性以在未来纳入额外协议。该框架基于Qiskit软件栈构建,兼容广泛的量子硬件后端和模拟平台。基于量子子程序的指称语义推理,本文还突显了量子单元测试与经典单元测试之间的关键区别。

英文摘要:

We present the architectural design and prototype implementation of QUT (Quantum Unit Testing), a framework for unit testing of quantum subroutines. The framework is developed with a focus on usability and simplicity, making the complex theoretical concepts behind quantum unit testing accessible to a wide range of users with diverse backgrounds. This is achieved through the implementation of polymorphic probabilistic assertions, whose evaluation methods adapt to the data types of the arguments used in assertion statements, which may vary according to the context-dependent semantics of quantum subroutines. These arguments can be represented as qubit measurement outcomes, density matrices, or Choi matrices. For each type, the architecture integrates a specific testing protocol - such as quantum process tomography, quantum state tomography, or Pearson's chi-squared test - while remaining flexible enough to incorporate additional protocols in the future. The framework is built on the Qiskit software stack, providing compatibility with a broad range of quantum hardware backends and simulation platforms. Drawing on the reasoning provided by the denotational semantics of quantum subroutines, this work also highlights the key distinctions between quantum unit testing and its classical counterpart.

↑