在 CUDA-Q 中用于调试量子电路与量子态的统计断言
Statistical Assertions for Debugging Quantum Circuits and States in CUDA-Q
AI总结:
本文提出一种基于统计断言的 CUDA-Q 量子电路调试工作流程,通过在电路中插入断言跟踪量子比特状态并检测偏差,同时用 Fisher 精确检验与蒙特卡罗方法提升产品态断言可靠性,弥补了 CUDA-Q 的可用性缺口。
摘要:
随着量子计算不断走向成熟,越来越多的开发者正在设计、编写和模拟量子电路。然而,在调试量子电路方面仍存在挑战,尤其是当电路的规模和复杂度不断增加时。由于缺乏有效的调试工作流程,开发者不得不手动检查电路并分析各种量子态,这一过程既容易出错又耗时。在本研究中,我们提出了一种基于统计断言的 CUDA-Q 调试工作流程。CUDA-Q 因其能够利用 GPU 加速量子电路模拟而受到广泛欢迎;这使得电路可以扩展到更大的深度和宽度,而在此规模下手工调试尤为困难。受先前基于 Qiskit 的调试器启发并以其为基础,我们的工作使 CUDA-Q 用户能够更轻松地验证量子程序的正确性。通过在量子电路中插入统计断言,我们的工具能够在电路中的任意位置提供关于量子比特状态的有价值见解,跟踪其演化过程,并帮助检测与预期行为的偏差。此外,我们通过结合使用 Fisher 精确检验和蒙特卡罗方法替代卡方检验,提高了产品态断言的可靠性和准确性,并考察了 CUDA-Q 独特的基于内核的编程模型对我们调试工具设计的影响。这项工作为 CUDA-Q 的可用性缺口之一提供了实用解决方案,为更可靠、更高效的量子软件开发铺平了道路。
英文摘要:
As quantum computing continues to mature, more developers are designing, coding, and simulating quantum circuits. A challenge exists, however, in debugging quantum circuits, particularly as they scale in size and complexity. Given the lack of effective debugging workflows, developers are forced to manually inspect their circuits and analyze various quantum states, which is error-prone and time-consuming. In this research, we present a statistical assertion-based debugging workflow for CUDA-Q. CUDA-Q has gained popularity due to its ability to leverage GPUs to accelerate quantum circuit simulations; this allows circuits to scale to larger depths and widths, where they can be particularly hard to debug by hand. Inspired by and building from prior Qiskit-based debuggers, our work allows CUDA-Q users to verify quantum program correctness with greater ease. Through the insertion of statistical assertions within a quantum circuit, our tool provides valuable insights into the state of qubits at any point within a circuit, tracks their evolution, and helps detect deviations from expected behavior. Furthermore, we improve the reliability and accuracy of the product state assertion by using a combination of Fisher's exact test and the Monte Carlo Method instead of a chi-square test, and examine the impact of CUDA-Q's distinct kernel-based programming model on the design of our debugging tool. This work offers a practical solution to one of CUDA-Q's usability gaps, paving the way for more reliable and efficient quantum software development.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。