量子符号执行的优化

    Optimization of Quantum Symbolic Execution

    • 摘要: 量子符号执行是一种为量子程序生成测试用例的技术. 目前,量子符号执行只机械地根据被调试程序中的每一个条件语句来连续划分测试用例空间,没有考虑整个表达式以及条件语句的嵌套,导致量子线路比较复杂. 为了解决该问题,提出对量子符号执行的优化. 首先,通过对关系表达式进行化简,直接减少量子模块个数,或者通过值的替换间接减少量子模块个数. 其次,对逻辑与和逻辑或2类逻辑表达式分别提出简化线路的方法. 最后,提出将嵌套条件语句看作外层与内层的逻辑与来简化线路,优化对量子符号执行中测试用例空间的划分. 实验表明,该优化方法降低了实现量子符号执行线路的成本,包括量子门和量子比特个数.

       

      Abstract: Quantum symbolic execution is a technique for generating test cases for quantum programs. At present, quantum symbol execution only mechanically divides the test case space continuously according to each conditional statement in the debugged program, without considering the entire expression and the nesting of conditional statements, which results in complex quantum circuits. To solve this problem, this paper proposed an optimization of quantum symbols. First, by simplifying the relational expression, the number of quantum modules was directly reduced, or the number of quantum modules was indirectly reduced through the substitution of values. Second, the methods of simplifying circuit for logic AND and logic OR were presented, respectively. Finally, it was proposed that the nested conditional statement was regarded as the logic AND of outer layer and inner layer to simplify the circuit, and optimize the division of the test case space in the quantum symbolic execution. Results show that this optimization method reduces the cost of implementing quantum symbolic execution circuits, including the number of quantum gates and qubits.

       

    /

    返回文章
    返回