计算机科学 ›› 2024, Vol. 51 ›› Issue (9): 96-102.doi: 10.11896/jsjkx.230600219

• 高性能计算 • 上一篇    下一篇

Grover量子搜索算法在“嵩山”超级计算机系统中的模拟

杜帅岐1,2, 刘晓楠1, 廉德萌1,2, 刘正煜1,2   

  1. 1 国家超级计算郑州中心 郑州 450001
    2 郑州大学计算机与人工智能学院 郑州 450001
  • 收稿日期:2023-06-29 修回日期:2023-11-15 出版日期:2024-09-15 发布日期:2024-09-10
  • 通讯作者: 刘晓楠(prof.liu.xn@foxmail.com)
  • 作者简介:(du_shuaiqi@163.com)
  • 基金资助:
    国家自然科学基金(61972413,61701539)

Simulation of Grover's Quantum Search Algorithm in “Songshan” Supercomputer System

DU Shuaiqi1,2, LIU Xiaonan1, LIAN Demeng1,2, LIU Zhengyu1,2   

  1. 1 National Supercomputing Centerin Zhengzhou,Zhengzhou 450001,China
    2 School of Computer and Artificial Intelligence,Zhengzhou University,Zhengzhou 450001,China
  • Received:2023-06-29 Revised:2023-11-15 Online:2024-09-15 Published:2024-09-10
  • About author:DU Shuaiqi,born in 1996,postgraduate.His main research interests include quantum algorithm and high-perfor-mance computation.
    LIU Xiaonan,born in 1977,Ph.D,associate professor,master's supervisor.His main research interests include quantum algorithm and high-perfor-mance parallel computation.
  • Supported by:
    National Natural Science Foundation of China(61972413,61701539).

摘要: 量子计算凭借其叠加性和纠缠性,具有强大的并行计算能力。然而,目前的量子计算机不能在保证大规模量子比特处于稳定叠加态的同时,进行干涉、纠缠等量子操作。因此,当前研究和推动量子计算的有效途径是使用经典计算机模拟量子计算。Grover量子搜索算法针对无序数据库搜索问题设计,将搜索的时间复杂度加速至开平方级,能加速机器学习中的主成分分析。因此,研究和模拟Grover算法,可以促进量子计算与机器学习结合领域的发展,为Grover量子搜索算法的应用以及量子机器学习在“嵩山”超级计算机系统中的模拟奠定基础。通过研究Grover量子搜索算法,模拟出了算法的量子线路。使用Toffoli量子门优化该量子线路,在减少了两个辅助量子比特的同时,提出了Grover算法的通用量子线路。实验基于“嵩山”超级计算机系统的CPU+DCU异构体系,使用了MPI多进程+HIP多线程的两级并行策略。通过调整辅助比特在量子线路中的位置,减少了MPI进程间的通信;使用分片的方式传输数据依赖的量子态。对比串行版本,并行化的模拟算法取得了最高560.33倍的加速,首次实现了31qubits规模的Grover量子搜索算法。

关键词: Grover量子搜索算法, 异构体系, MPI, HIP, 分片传输

Abstract: With its superposition and entanglement properties,quantum computing has a powerful parallel computing capacity.However,current quantum computers cannot ensure stable superposition states of large-scale qubits while performing quantum operations such as interference and entanglement.Therefore,the current approach to promote quantum computing is to simulate quantum computing using classical computers.The Grover quantum search algorithm is designed for the problem of searching unsorted databases,reducing the time complexity to square root level,and accelerating principal component analysis in machine learning.Therefore,studying and simulating the Grover algorithm can promote the development of quantum computing combined with machine learning and lay the foundation for its application as well as the simulation of Grover quantum search algorithm in the “Songshan” supercomputer system.By studying the Grover quantum search algorithm,the quantum circuit of the algorithm is simulated.The Toffoli quantum gate is used to optimize the quantum circuit,proposing a universal quantum circuit for the Grover algorithm while reducing two auxiliary qubits.The experiment is based on the CPU+DCU heterogeneous system of the “Song-shan” supercomputer system,using a two-level parallel strategy of MPI multiprocessing and HIP multithreading.By adjusting the position of the auxiliary qubits in the quantum circuit,the communication between MPI processes is reduced,and the data-depen-dent quantum states are transmitted using a fragmentation method.Compared to the serial version,the parallelized simulation algorithm achieves a maximum speedup of 560.33 times,realizing for the first time the Grover quantum search algorithm with a scale of 31 qubits.

Key words: Grover's quantum search algorithm, Heterogeneous architecture, MPI, HIP, Fragment-based transmission

中图分类号: 

  • TP385
[1]GROVER L K.A fast quantum mechanical algorithm for database search[C]//Proceedings of the Twenty-eighth Annual ACM Symposium on Theory of Computing.1996:212-219.
[2]YIN A,HE K,FAN P.Quantum dialogue protocol based onGrover's search algorithms [J].Modern Physics Letters A,2019,34(21):1950169.
[3]LIU X N,SONG H C,WANG H,et al.Overview of improvement and application of Grover algorithm [J].Computer Science,2021,48(10):315-323.
[4]ZHANG K,KOREPIN V E.Depth optimization of quantumsearch algorithms beyond Grover's algorithm [J].Physical Review A,2020,101(3):032346.
[5]CHEN H,GAO Y,ZHANG J.Quantum K-nearest neighbor algorithm[J].Journal of Southeast University(Natural Science Edition),2015,45(4):647-651.
[6]SAHA A,SAHA D,CHAKRABARTI A.Circuit design for k-coloring problem and its implementation on near-term quantum devices[C]//2020 IEEE International Symposium on Smart Electronic Systems(iSES)(Formerly iNiS).IEEE,2020:17-22.
[7]HABIBI M R,GOLESTAN S,SOLTANMANESH A,et al.Power and Energy Applications Based on Quantum Computing:The Possible Potentials of Grover's Algorithm[J].Electronics,2022,11(18):2919.
[8]LIU X N,JING L N,WANG L X,et al.Large-scale quantum Fourier transform simulation based on Shenwei 26010 processor[J].Computer Science,2020,47(8):93-97.
[9]LIU X N,JING L N,WANG L X,et al.Quantum FourierTransform Simulation on Sunway TaihuLight[C]//2020 15th International Conference on Computer Science & Education(ICCSE).IEEE,2020:833-837.
[10]XIE J M,HU W F,HAN L.Quantum Fourier Transform Simulation Based on" Songshan[J].Supercomputer System,2021,48(12):36-42.
[11]SCHWABE P,WESTERBAAN B.Solving Binary with Grover'sAlgorithm[C]//Security,Privacy,and Applied Cryptography Engineering:6th International Conference,SPACE 2016,Hyderabad,India,December 14-18,2016,Proceedings.Cham:Springer International Publishing,2016:303-322.
[12]SONG H C,LIU X N,WANG H,et al.Integer decomposition based on Grover search algorithm[J].Computer Science,2021,48(4):93-97.
[13]FERNANDES D,DUTRA I.Using Grover's search quantumalgorithm to solve Boolean satisfiability problems:Part I[J].XRDS:Crossroads,The ACM Magazine for Students,2019,26(1):64-66.
[14]MAGNIEZ F,SANTHA M,SZEGEDY M.Quantum algorithms for the triangle problem[J].SIAM Journal on Computing,2007,37(2):413-424.
[15]KAIN B.Searching a quantum database with Grover's search algorithm[J].American Journal of Physics,2021,89(6):618-626.
[16]MANDVIWALLA A,OHSHIRO K,JI B.ImplementingGrover's algorithm on the IBM quantum computers[C]//2018 IEEE International Conference on Big Data.IEEE,2018:2531-2537.
[17]VEMULA D R,KONAR D,SATHEESAN S,et al.A Scalable 5,6-Qubit Grover's Quantum Search Algorithm[J].arXiv:2205.00117,2022.
[18]CHEN Y.Optimization of Grover's quantum search in multi-solution and hyperbit spaces[D].Xi'an:Northwest University,2021.
[19]PRONIN C B,OSTROUKH A V.Developing MathematicalOracle Functions for Grover Quantum Search Algorithm[J].arXiv:2109.05921,2021.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!