In the near term, quantum approximate optimization algorithms (QAOAs) hold great potential to solve combinatorial optimization problems. These are hybrid algorithms, i.e., a combination of quantum and classical algorithms. Several proof-of-concept applications of QAOAs for solving combinatorial problems, such as portfolio optimization, energy optimization in power systems, and job scheduling, have been demonstrated. However, whether QAOAs can efficiently solve optimization problems from classical software engineering, such as test optimization, remains unstudied. To this end, we present the first effort to formulate a software test case optimization problem as a QAOA problem and solve it on quantum computer simulators. To solve bigger test optimization problems that require many qubits, which are unavailable these days, we integrate a problem decomposition strategy with the QAOA. We performed an empirical evaluation with five test case optimization problems and four industrial datasets from ABB, Google, and Orona to compare various configurations of our approach, assess its decomposition strategy of handling large datasets, and compare its performance with classical algorithms (i.e., Genetic Algorithm (GA) and Random Search). Based on the evaluation results, we recommend the best configuration of our approach for test case optimization problems. Also, we demonstrate that our strategy can reach the same effectiveness as GA and outperform GA in two out of five test case optimization problems we conducted.
翻译:近期,量子近似优化算法在解决组合优化问题方面展现出巨大潜力。这类算法属于混合算法,即量子算法与经典算法的结合。目前已有多个概念验证应用证明了QAOA在解决组合问题(如投资组合优化、电力系统能量优化及作业调度)方面的可行性。然而,QAOA能否有效解决经典软件工程中的优化问题(如测试优化)仍属未知。为此,我们首次尝试将软件测试用例优化问题形式化为QAOA问题,并在量子计算机模拟器上求解。针对当前缺乏足够量子比特、难以解决大规模测试优化问题的现状,我们整合了问题分解策略与QAOA。通过使用来自ABB、谷歌和Orona的五个测试用例优化问题及四个工业数据集,我们开展了实证评估,对比了不同配置方案,检验了大规模数据集处理策略的性能,并与经典算法(即遗传算法和随机搜索)进行了比较。基于评估结果,我们推荐了面向测试用例优化问题的最佳配置方案。此外,实验表明:我们的策略在有效性上可与GA持平,并在五个测试用例优化问题中的两个上超越了GA。