Bug patterns are erroneous code idioms or bad coding practices that have been proved to fail time and time again, which are usually caused by the misunderstanding of a programming language's features, the use of erroneous design patterns, or simple mistakes sharing common behaviors. This paper identifies and categorizes some bug patterns in the quantum programming language Qiskit and briefly discusses how to eliminate or prevent those bug patterns. We take this research as the first step to provide an underlying basis for debugging and testing quantum programs.
翻译:错误的错误模式是错误的代码模式或错误的编码做法,被证明一再失败,通常是由于误解了程序语言的特征、使用错误的设计模式或简单的错误,共同的常见行为造成的。本文在量子程序语言 Qiskit 中确定并分类了某些错误模式,并简要讨论了如何消除或防止这些错误模式。我们将此研究作为第一步,为调试量子程序提供一个基础。