为了解决仿真量子计算过程中复杂性随量子比特数的增加呈指数级递增的问题,采用二项决策图(BDD)表示矩阵算子仿真Grover提出的量子搜索算法.BDD利用矩阵算子在量子计算过程中呈现出的结构化特性,可以高效地压缩存储空间并实现在压缩数据结构上直接进行矩阵的各种运算.利用改进的BDD实现了仿真过程需要的各种矩阵运算,用C++编写的程序对Grover算法的实例进行仿真,最后从多个角度对违反直观的实验结果进行了分析,阐述了量子算法的内在并行性.
Simulating quantum algorithms on classical computer is difficult,for the matrices representing quantum gates and the vectors modeling qubit states grow exponentially with the increase in the number of qubits.In this paper,binary decision diagram(BDD),which exploits the structure displayed in quantum computing,is adopted to simulate Grover's algorithm.First the original BDD is adapted to implement a series of algorithms such as matrix multiplication to represent and manipulate matrices and vectors.Then instances of Grover's algorithm are simulated with our programme written in C++.Finally an intensive analysis of the counter-intuitive experimental results in quantum mechanism is presented from multiple points of view,which may help understand the inner parallelism of quantum algorithms.