《电子技术应用》
您所在的位置:首页 > 模拟设计 > 设计应用 > 基于SIMD并行的量子切分模拟加速优化
基于SIMD并行的量子切分模拟加速优化
电子技术应用
王莺时,邵鹏宇,蒋金虎
复旦大学 大数据研究院
摘要: 量子计算是当前计算领域备受瞩目的尖端课题,量子切分是为了突破当前的硬件限制、提高可用量子比特数而提出的一种极具潜力的计算框架。在使用经典计算机对其进行的研究与验证中,对子电路的量子模拟是最重要的算力瓶颈环节。为了提高量子模拟的效率,本研究发现量子模拟框架Qiskit Aer中关键的矩阵计算环节所使用的朴素线性代数方法存在使用SIMD进行优化的空间。基于此,本研究使用AVX2指令优化了矩阵计算部分的代码,并通过容器化方法进行控制变量测试。SIMD优化方法成功地对Qiskit Aer的量子模拟效率赋予了显著提升,经过验证,此提升是稳定、可靠、可复现的,并且不会对量子模拟以外的无关环节引入未知影响。本文的研究成果提高了量子切分模拟的效率,为量子切分的研究提供了更快速的工具,为Qiskit框架的进一步优化提供了可以借鉴的经验与范式。
中图分类号:TN201;TP38 文献标志码:A DOI: 10.16157/j.issn.0258-7998.257119
中文引用格式: 王莺时,邵鹏宇,蒋金虎. 基于SIMD并行的量子切分模拟加速优化[J]. 电子技术应用,2025,51(12):1-7.
英文引用格式: Wang Yingshi,Shao Pengyu,Jiang Jinhu. Quantum cutting simulation acceleration optimization based on SIMD parallelism[J]. Application of Electronic Technique,2025,51(12):1-7.
Quantum cutting simulation acceleration optimization based on SIMD parallelism
Wang Yingshi,Shao Pengyu,Jiang Jinhu
Institute of Big Data, Fudan University
Abstract: Quantum computing is a cutting-edge topic that has attracted much attention in the current computing field. Quantum cutting is a highly promising computing framework proposed to break through the current hardware limitations and increase the number of available quantum bits. In the research and verification of it using classical computers, quantum simulation of subcircuits is the most important bottleneck link in computing power. In order to improve the efficiency of quantum simulation, this study found that the naive linear algebra method used in the key matrix calculation link of Qiskit Aer, a quantum simulation framework commonly used in quantum projects, has room for optimization using Single Instruction Multiple Data (SIMD). Based on this, this paper uses AVX2 instructions to optimize the code of the matrix calculation part, and tests the control variables through the containerization method. The SIMD optimization method successfully gave a significant improvement in the quantum simulation efficiency of Qiskit Aer. It has been verified that this improvement is stable, reliable, and reproducible, and will not introduce unknown effects on irrelevant links outside the quantum simulation. The research results of this paper improve the efficiency of quantum cutting simulation, provide a faster tool for the study of quantum cutting, and provide experience and paradigms that can be used for further optimization of the Qiskit framework.
Key words : quantum computing;quantum circuit cutting;quantum simulation;SIMD;Qiskit

引言

量子计算(Quantum Computing,QC)是一种遵循量子力学规律调控量子信息单元进行计算的新型计算模式。与经典计算不同,量子计算遵循量子力学规律,它是能突破经典算力瓶颈的新型计算模式[1]。但是尽管量子计算的理论优势使人心潮澎湃,当前量子硬件技术仍处于早期阶段。学界提出一个专有名词“噪声中等规模量子设备”(Noisy Intermediate-Scale Quantum, NISQ)[2]来指代当前的量子设备发展水平,因其量子比特数量有限且易受噪声干扰。

这种硬件限制,使得许多量子算法难以直接在真实量子设备上执行,研究人员不得不依赖经典计算机来对量子系统进行模拟。量子模拟为验证新的量子算法提供了可靠的平台,也为量子硬件的设计和优化提供了理论支撑。

量子模拟利用经典计算机来模拟量子系统的行为,尤其是对量子电路的运行进行仿真。模拟的核心任务就是计算量子电路的输出概率分布,这就要求对量子态的演化过程进行精确建模。主流的建模方式是使用态矢(statevector)来表示一个量子态的概率分布。对个量子比特,其状态空间为,所以一个用来表示它的态矢就需要个浮点数。也就是说,量子模拟要求指数规模的资源,计算复杂度随着量子比特数的增加呈指数式增长,这对执行这个任务的硬件与软件都提出了巨大的挑战。

所以受限于量子硬件的规模和精度,经典计算机上的量子模拟成为研究量子算法的重要手段。通过量子模拟器,研究者可以验证量子算法的正确性,分析其运行效率,并探索新的算法设计。

然而,随着量子电路规模的扩大,经典硬件对量子模拟的支持面临巨大挑战。尤其是在模拟超过30个量子比特的电路时,硬件资源和计算时间的需求呈现指数级增长,这对现有模拟器提出了更高的性能要求。

主流的量子模拟框架包括IBM的Qiskit、Google的Cirq和微软的Q#等。其中,Qiskit[3]是一个广泛应用的开源量子计算框架,提供了从量子电路设计到模拟和硬件执行的一站式工具链。

Qiskit的核心模块之一是Qiskit Aer[4],它专注于高性能、高质量的量子电路模拟。它支持状态向量模拟、密度矩阵模拟以及噪声模型模拟等多种模式。Qiskit Aer采用了经典线性代数方法来计算量子态的演化,也能够在多线程和多GPU环境下实现加速。


本文详细内容请下载:

https://www.chinaaet.com/resource/share/2000006868


作者信息:

王莺时,邵鹏宇,蒋金虎

(复旦大学 大数据研究院, 上海 200433)


subscribe.jpg

此内容为AET网站原创,未经授权禁止转载。