计算机工程与应用 ›› 2025, Vol. 61 ›› Issue (5): 94-103.DOI: 10.3778/j.issn.1002-8331.2408-0285

• 理论与研发 • 上一篇    下一篇

遗传启发映射策略在量子电路优化中的应用

韩子傲, 李晖, 卢凯, 刘述娟, 鞠明媚   

  1. 1.哈尔滨商业大学 计算机与信息工程学院,哈尔滨 150028
    2.黑龙江省电子商务与信息处理重点实验室,哈尔滨 150028
  • 出版日期:2025-03-01 发布日期:2025-03-01

Application of Genetic-Inspired Mapping Strategy in Quantum Circuit Optimization

HAN Zi’ao , LI Hui, LU Kai, LIU Shujuan, JU Mingmei#br#   

  1. 1.School of Computer and Information Engineering, Harbin University of Commerce, Harbin 150028, China
    2.Heilongjiang Key Laboratory of Electronic Commerce and Information Processing, Harbin 150028, China
  • Online:2025-03-01 Published:2025-03-01

摘要: 现行的量子位映射策略大多是确定性的,导致生成的量子电路映射缺乏多样性,难以在质量和多样性之间取得平衡,且无法灵活适应不同的量子计算任务。基于此,设计了一种基于遗传启发的量子电路映射策略(genetic-inspired quantum circuit mapping strategy,GQCMS)。该策略引入了多样化的交叉和突变操作,通过在更广阔的解空间中进行搜索,使得算法执行过程中不断生成多样化的候选解,避免陷入局部最优解,从而增加找到全局最优解的机会,提高了电路映射的整体质量。此外,为了克服传统映射策略中常见的量子比特距离较远导致的SWAP操作频繁问题,提出了一种基于邻近门的初始化方法,通过优先考虑最近邻量子位,减少需要进行SWAP操作的次数,降低电路的复杂性,缩短映射过程中的计算时间。实验结果表明,GQCMS在t|ket>和Qiskit编译器中的表现显著优于2QAN,分别平均减少了44.8%和62.5%的SWAP门数量,并在t|ket>中平均减少了42.9%的映射运行时间。

关键词: 量子电路, 量子位映射, 遗传算法, 遗传启发量子电路映射策略, 适应度函数

Abstract: The current qubit mapping strategies are predominantly deterministic, leading to quantum circuit mappings that lack diversity, making it challenging to balance quality and diversity while being inflexible to various quantum computing tasks. To address this issue, a genetic-inspired quantum circuit mapping strategy (GQCMS) has been developed. This strategy introduces diversified crossover and mutation operations, enabling the algorithm to continually generate diverse candidate solutions through broader search spaces, thereby avoiding local optima and increasing the likelihood of identifying global optima, which ultimately enhances the overall quality of circuit mapping. Additionally, to overcome the frequent SWAP operations caused by distant qubit placements in traditional mapping strategies, a proximity-gate-based initialization method is proposed. By prioritizing nearest-neighbor qubits, this method reduces the need for SWAP operations, decreases circuit complexity, and shortens computation time during the mapping process. Experimental results indicate that GQCMS significantly outperforms 2QAN in the t|ket> and Qiskit compilers, with an average reduction of 44.8% and 62.5% in SWAP gate count, respectively, and a 42.9% average reduction in mapping runtime in t|ket>.

Key words: quantum circuit, qubit mapping, genetic algorithm, genetic-inspired quantum circuit mapping strategy (GQCMS), fitness function