量子电子学报 ›› 2024, Vol. 41 ›› Issue (1): 151-160.doi: 10.3969/j.issn.1007-5461.2024.01.015

• 量子光学 • 上一篇    下一篇

基于最小权和模板匹配的Oracle线路优化

杨冬晗 , 李志强*, 吴希 , 潘文杰 , 杨辉   

  1. ( 扬州大学信息工程学院, 江苏 扬州 225100 )
  • 收稿日期:2022-03-04 修回日期:2022-04-10 出版日期:2024-01-28 发布日期:2024-01-28
  • 通讯作者: E-mail: yzqqLzq@163.com E-mail:E-mail: yzqqLzq@163.com
  • 作者简介:杨冬晗 ( 1995 - ), 江苏南通人, 研究生, 主要从事量子线路综合方面的研究。E-mail: 1198391037@qq.com.
  • 基金资助:
    国家自然科学基金 (62071240), 江苏省高校基金 (10KJB520021)

Optimization of Oracle circuits based on minimum weight and template matching

YANG Donghan , LI Zhiqiang *, WU Xi , PAN Wenjie , YANG Hui   

  1. ( College of Information Engineering, Yangzhou University, Yangzhou 225100, China )
  • Received:2022-03-04 Revised:2022-04-10 Published:2024-01-28 Online:2024-01-28

摘要: 优化量子线路对于提高量子算法的计算效率和降低资源成本至关重要, 特别是在布尔函数构建的Oracle 线 路中。该优化过程分为两个关键阶段, 第一个阶段基于最小权匹配算法对Oracle 线路相同受控点的MCT 门进行重 排序, 最小化生成线路的门数; 第二个阶段利用模板匹配的方式进一步降低线路的门数和代价。实验结果表明, 相较 于优化工具RCViewer+, 在4~10 位量子比特数下, Deutsch-Jozsa 算法下的Oracle 线路门数降低了约48.3%, 代价减少 了约64.5%; Grover 算法下的Oracle 线路门数降低了约25.0%, 代价减少了约18.2%。

关键词: 量子信息, 量子线路, Oracle 线路优化, 最小权匹配, 模板匹配

Abstract: Optimizing quantum lines is essential to improve the computational efficiency and reduce the resource cost of quantum algorithms, especially in the case of Oracle circuit constructed from Boolean functions. This optimization process is divided into two key stages. In the first stage, the MCT gates of the same controlled points of Oracle circuits are reordered based on the minimum weight matching algorithm to minimize the number of gates for generating circuits. In the second stage, the method of template matching is utilized to further reduce the number of gates and the cost of the circuits. The experimental results show that, compared with the optimization tool of RCViewer+ , for 4-10 qubits, the number of Oracle circuit gates can be reduced by about 48.3%, and the cost can be reduced by about 64.5% using Deutsch-Jozsa algorithm, while the number of Oracle circuit gates is reduced by about 25.0%, and the cost is reduced by about 18.2% using Grover algorithm.

Key words: quantum information, quantum circuit, Oracle optimization, minimum weight matching; template matching

中图分类号: