WO2022048280A1 - 一种分布式的量子计算仿真方法和装置 - Google Patents
一种分布式的量子计算仿真方法和装置 Download PDFInfo
- Publication number
- WO2022048280A1 WO2022048280A1 PCT/CN2021/103305 CN2021103305W WO2022048280A1 WO 2022048280 A1 WO2022048280 A1 WO 2022048280A1 CN 2021103305 W CN2021103305 W CN 2021103305W WO 2022048280 A1 WO2022048280 A1 WO 2022048280A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- undirected graph
- tensor
- tensors
- sub
- edge
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N10/00—Quantum computing, i.e. information processing based on quantum-mechanical phenomena
- G06N10/80—Quantum programming, e.g. interfaces, languages or software-development kits for creating or handling programs capable of running on quantum computers; Platforms for simulating or accessing quantum computers, e.g. cloud-based quantum computing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N10/00—Quantum computing, i.e. information processing based on quantum-mechanical phenomena
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/27—Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/12—Computing arrangements based on biological models using genetic models
- G06N3/126—Evolutionary algorithms, e.g. genetic algorithms or genetic programming
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N10/00—Quantum computing, i.e. information processing based on quantum-mechanical phenomena
- G06N10/20—Models of quantum computing, e.g. quantum circuits or universal quantum computers
Definitions
- the present invention relates to the field of quantum computing, more particularly, to a distributed quantum computing simulation method and device.
- Quantum computing is a new computing mode using the principle of quantum entanglement and state superposition, which will bring powerful quantum parallelism and bring new solutions to the problem of insufficient computing power in the post-Moore era.
- Feynman proposed the concept of quantum computing decades ago in response to the exponential growth of memory overhead in classical computer simulation of quantum systems.
- quantum computing has made great progress in both hardware and algorithms, especially with Google's claim to achieve "quantum supremacy", quantum computing has entered the public eye.
- quantum computing is still in its infancy, and large-scale fault-tolerant quantum computers are still a long way off.
- quantum computing simulation platform it is of great significance to build a quantum computing simulation platform based on classical computers: (1) it can provide a verification platform for quantum algorithms, and can also verify the reliability of quantum software and quantum fault tolerance; (2) help Understand the boundaries between classical computing and quantum computing, and promote the development of the field of quantum computing.
- the MPS Microx Product State, matrix product state
- PEPS Projective Entangled Pair States, projected entangled pair states
- Single-amplitude simulation is a recently developed strategy. It does not need to store all the amplitudes of the quantum state, but only needs to calculate the probability amplitude of the POVM (Positive Operator Value Measurement) element.
- the single-amplitude strategy easily simulates quantum supremacy circuits, even shallow quantum circuits exceeding 100 qubits.
- the single-amplitude mode generally maps the quantum circuit to a tensor network, and the contracted zero-order tensor is the required probability amplitude.
- the purpose of the embodiments of the present invention is to provide a distributed quantum computing simulation method and device, which can perform the single-amplitude strategy quantum computing simulation based on the density matrix on the distributed computing system, and improve the single-amplitude strategy quantum computing simulation. versatility and ease of use.
- a first aspect of the embodiments of the present invention provides a distributed quantum computing simulation method, including performing the following steps:
- converting the quantum circuit to be simulated into a tensor network represented by an undirected graph includes:
- connection relationship between the input state, the operation gate, and the measurement of the qubit in the quantum circuit is determined in the undirected graph as the connected edge between the corresponding vertices.
- dividing the undirected graph into multiple subgraphs using a genetic algorithm based on the computing resources of a distributed system includes:
- a genetic algorithm is used to determine the set of edges to perform the split on the undirected graph based on the number of splits, including:
- calculating the undirected graph tree width includes:
- the undirected graph tree width is determined based on the minimum value of the width of the tree decomposition among the multiple trees.
- tensor shrinking between connected tensors is performed on each sub-process node for multiple sub-graphs until only one tensor remains, so as to finally obtain zero-order tensors of multiple sub-graphs at the same time.
- each child process node uses the same tensor shrinking sequence to perform tensor shrinking on different nodes in multiple subgraphs in turn, consumes the same computing resources in unit computing time, and makes each child with the same computing capability.
- the process node obtains zero-order tensors of multiple subgraphs at the same time.
- the quantum circuit to be simulated is converted into a tensor network represented by an undirected graph and the undirected graph is divided into multiple subgraphs using a genetic algorithm based on the computing resources of the distributed system, and the The process node simultaneously acquires and superimposes the zero-order tensors of multiple subgraphs to determine the zero-order tensors of the undirected graph, and uses it as a positive definite operator to measure the probability amplitude of the element to perform quantum computing simulation. run on the main process node of the system.
- a second aspect of the embodiments of the present invention provides a distributed quantum computing simulation device, including a main process node and a plurality of sub-process nodes, wherein:
- the main process node is configured to convert the quantum circuit to be simulated into a tensor network represented by an undirected graph, and use the genetic algorithm based on the computing resources of the distributed system to divide the undirected graph into multiple subgraphs;
- the multiple sub-process nodes are configured to perform tensor reduction between the connected tensors for the multiple sub-graphs respectively until only one tensor remains, so as to finally obtain the zero-order tensors of the multiple sub-graphs at the same time;
- the main process node is also configured to acquire and stack the zero-order tensors of multiple subgraphs at the same time to determine the zero-order tensors of the undirected graph, and use it as the probability amplitude of the positive definite operator value measurement element to perform quantum computing simulation.
- the main process node uses a genetic algorithm based on the computing resources of the distributed system to divide the undirected graph into multiple subgraphs, including:
- the master process node determines the edge set to perform the split on the undirected graph using a genetic algorithm based on the number of splits, including:
- the distributed quantum computing simulation method and device convert the quantum circuit to be simulated into a tensor network represented by an undirected graph, and use a distributed system-based
- the genetic algorithm of computing resources divides the undirected graph into multiple subgraphs; the multiple subgraphs perform tensor reduction between connected tensors on each subprocess node until only one tensor remains, and finally Obtain the zero-order tensors of multiple subgraphs at the same time; simultaneously obtain and stack the zero-order tensors of multiple subgraphs from each sub-process node to determine the zero-order tensors of the undirected graph, and use it as the value measurement element of the positive definite operator
- the technical scheme of performing quantum computing simulation based on the probability amplitude of the system can perform single-amplitude strategy quantum computing simulation based on density matrix on distributed computing system, and improve the generality and ease of use of single-amplitude strategy quantum computing simulation.
- FIG. 1 is a schematic flowchart of a distributed quantum computing simulation method provided by the present invention
- Fig. 2 is the quantum circuit diagram of the distributed quantum computing simulation method provided by the present invention.
- FIG. 4 is a schematic diagram of tensor contraction of the distributed quantum computing simulation method provided by the present invention.
- FIG. 5 is a tensor network edge cut diagram of the distributed quantum computing simulation method provided by the present invention.
- the first aspect of the embodiments of the present invention proposes an embodiment of a distributed quantum computing simulation method capable of executing a density matrix-based single-amplitude strategy quantum computing simulation on a distributed computing system.
- FIG. 1 shows a schematic flowchart of the distributed quantum computing simulation method provided by the present invention.
- the distributed quantum computing simulation method includes the following steps:
- Step S101 Convert the quantum circuit to be simulated into a tensor network represented by an undirected graph, and use a genetic algorithm based on computing resources of a distributed system to divide the undirected graph into multiple subgraphs;
- Step S103 performing tensor reduction between the connected tensors on each sub-process node for the multiple sub-graphs until only one tensor remains, so as to finally obtain zero-order tensors of the multiple sub-graphs at the same time;
- Step S105 Obtain and stack the zero-order tensors of multiple sub-graphs simultaneously from each sub-process node to determine the zero-order tensors of the undirected graph, and use it as the probability amplitude of the positive definite operator value measurement element to perform quantum computing simulation .
- the program can be stored in a computer-readable storage medium.
- the storage medium may be a magnetic disk, an optical disk, a read only memory (ROM), or a random access memory (RAM) or the like.
- the computer program embodiments can achieve the same or similar effects as any of the foregoing method embodiments corresponding thereto.
- converting the quantum circuit to be simulated into a tensor network represented by an undirected graph includes:
- connection relationship between the input state, the operation gate, and the measurement of the qubit in the quantum circuit is determined in the undirected graph as the connected edge between the corresponding vertices.
- dividing the undirected graph into a plurality of subgraphs with a genetic algorithm based on the computing resources of the distributed system includes:
- a genetic algorithm is used to determine the set of edges to perform the split on the undirected graph based on the number of splits, including:
- calculating the undirected graph tree width includes:
- the undirected graph tree width is determined based on the minimum value of the width of the tree decomposition among the multiple trees.
- tensor shrinking between connected tensors is performed on each sub-process node for multiple sub-graphs until only one tensor remains, so as to finally obtain zero-order tensors of multiple sub-graphs at the same time.
- each child process node uses the same tensor shrinking sequence to perform tensor shrinking on different nodes in multiple subgraphs in turn, consumes the same computing resources in unit computing time, and makes each child with the same computing capability.
- the process node obtains zero-order tensors of multiple subgraphs at the same time.
- the quantum circuit to be simulated is converted into a tensor network represented by an undirected graph and the undirected graph is divided into multiple subgraphs using a genetic algorithm based on the computing resources of the distributed system, and the The process node simultaneously acquires and superimposes the zero-order tensors of multiple subgraphs to determine the zero-order tensors of the undirected graph, and uses it as a positive definite operator to measure the probability amplitude of the element to perform quantum computing simulation. run on the main process node of the system.
- a tensor network is formed by topologically connecting different tensors, which can generally be represented by an undirected graph.
- G (V, E), where V is the set of vertices and E is the set of edges.
- a quantum circuit as shown in Figure 2 corresponds to a tensor network as shown in Figure 3, and constructing a corresponding tensor network based on the quantum circuit is the first step to implement tensor network contraction.
- Each operation gate, input state, and measurement in the quantum circuit of Fig. 2 corresponds to a vertex of the undirected graph of Fig. 3, and the edge of the quantum circuit corresponds to the edge of the undirected graph.
- a tensor in a tensor network is a data structure with rank and dimension, where rank refers to how many edges a tensor is connected to, which can be represented by different index indices (such as i, j, k, l, etc.) ; the dimension is how many possible addresses each index has.
- E is the POVM meta operator and G is the unitary evolution operator.
- Tensor shrinking is a tensor operation that shrinks two tensors into one tensor as shown in Figure 4.
- Two connected tensors have internal edges and open edges, and tensor contraction shrinks the internal edges and merges the two vertices into one.
- e is a tensor of order x+y
- f is a tensor of order y+z
- a tensor of order x+z can be obtained after contraction.
- the operation process is as follows:
- the zero-order tensor is the probability amplitude corresponding to the POVM (Positive Definite Operator Value Measurement) element.
- the maximum memory overhead of tensor network shrinking depends on the tensors of the largest order in the shrinking process. Generally speaking, as the shrinking of the tensor network proceeds, the maximum order of the tensors in the intermediate process will first increase and then decrease. For example, a tensor of rank 3+2 and a tensor of rank 2+3 are condensed to obtain a tensor of rank 3+3.
- the maximum order of intermediate tensors is related to the order of tensor contraction. The order of each contraction corresponds to the tree decomposition of a graph. The optimal elimination order is the tree decomposition with the smallest tree width.
- a subset of nodes in graph G constitute a bag
- B i a subset of nodes in graph G constitute a bag
- B i the tree decomposition of graph G
- a tree decomposition of a graph G can be represented as a mapping from the vertices V(G) of the graph to the bag B i , and satisfies the following conditions:
- the tree decomposition of a graph G is not unique.
- the tree width of a graph G refers to the minimum width among all possible tree decompositions of the graph G, denoted as tw(G).
- Computing tree width and tree decomposition is a NP (Non-deterministic Polynomial, uncertain polynomial) problem, but there are open source software that can be applied in actual computing, such as QuickBB. In fact, the time overhead of tensor network shrinking is also related to the tree width.
- each edge has four distinct indices:
- Figure 5 we can cut this edge to generate 4 subgraphs with different initializations; and each subgraph is shrunk and added, and the result is the same as the result of the original graph. Its theoretical calculation is as follows,
- the shrinking of different subgraphs can be computed separately on different cores, enabling distributed tensor network shrinking.
- the subgraph after trimming has a smaller tree width, which means that the subgraph shrinking has a smaller memory footprint and lower time algorithm complexity.
- the tree width of the original undirected graph in Figure 4 is 3, while the tree widths of the subgraphs generated after edge trimming are all 1.
- This embodiment of the present invention aims to generate subgraphs with a number close to the number of available distributed processor threads; if the number of generated subgraphs is not greater than the number of computing cores, then different cores can be used to calculate different subgraph shrinks. The number is greater than the number of computing cores, then a serial method is required.
- the main process only needs to collect the contracted result of each sub-process (that is, there is only one complex number), and the sub-processes that perform complete vertical operations do not need to communicate, so the communication between the super-computing nodes will be reduced to very low, so it is no longer a bottleneck at all.
- the structure of the subgraphs contracted by each process is completely consistent, so the computing time used is also the same, and there is no idle situation for some processes, and the utilization rate of the distributed computing system is also fully improved.
- an embodiment of the present invention proposes a strategy for finding the optimal edge elimination based on a heuristic algorithm.
- the first step individual evaluation. Calculate the tree width of the corresponding graph of N individuals in the population P, and sort them.
- the second step crossover operation (chromosomal mutation). Except for the individual with the smallest tree width, every two adjacent individuals are crossed, and our crossover method is the latter in the two sets. The elements are exchanged, and if there are duplicate elements in the set after the crossover, an element that does not exist in the set is randomly generated.
- the third step mutation operation (gene mutation). Randomly select an individual other than the optimal individual in the population to mutate, randomly select an individual edge set, and then randomly generate an edge that is not in the set.
- the individuals in the population are evaluated, and the optimal individual is returned to perform edge trimming.
- the distributed quantum computing simulation method converts the quantum circuit to be simulated into a tensor network represented by an undirected graph, and uses computing resources based on a distributed system.
- the genetic algorithm divides the undirected graph into multiple subgraphs; performs tensor reduction between the connected tensors on each sub-process node of the multiple subgraphs until only one tensor remains, and finally obtains the The zero-order tensors of multiple subgraphs; simultaneously obtain and stack the zero-order tensors of multiple subgraphs from each sub-process node to determine the zero-order tensors of the undirected graph, and use it as the probability of the positive definite operator value measurement element
- a technical solution for performing quantum computing simulation with amplitude which can perform single-amplitude strategy quantum computing simulation based on density matrix on a distributed computing system, and improves the versatility and ease of use of single-amplitude strategy quantum computing simulation.
- an embodiment of a distributed quantum computing simulation apparatus capable of performing single-amplitude strategy quantum computing simulation based on a density matrix on a distributed computing system.
- the distributed quantum computing simulation device includes a main process node and a plurality of sub-process nodes, wherein:
- the main process node is configured to convert the quantum circuit to be simulated into a tensor network represented by an undirected graph, and use the genetic algorithm based on the computing resources of the distributed system to divide the undirected graph into multiple subgraphs;
- the multiple sub-process nodes are configured to perform tensor reduction between the connected tensors for the multiple sub-graphs respectively until only one tensor remains, so as to finally obtain the zero-order tensors of the multiple sub-graphs at the same time;
- the main process node is also configured to acquire and stack the zero-order tensors of multiple subgraphs at the same time to determine the zero-order tensors of the undirected graph, and use it as the probability amplitude of the positive definite operator value measurement element to perform quantum computing simulation.
- the main process node uses a genetic algorithm based on the computing resources of the distributed system to divide the undirected graph into multiple subgraphs, including:
- the master process node determines the edge set to perform the split on the undirected graph using a genetic algorithm based on the number of splits, including:
- the distributed quantum computing simulation device converts the quantum circuit to be simulated into a tensor network represented by an undirected graph, and uses computing resources based on a distributed system.
- the genetic algorithm divides the undirected graph into multiple subgraphs; performs tensor reduction between the connected tensors on each subprocess node of the multiple subgraphs until only one tensor remains, and finally obtains the The zero-order tensors of multiple subgraphs; simultaneously obtain and stack the zero-order tensors of multiple subgraphs from each sub-process node to determine the zero-order tensors of the undirected graph, and use it as the probability of the positive definite operator value measurement element
- the technical solution for performing quantum computing simulation with amplitude is able to perform single-amplitude strategy quantum computing simulation based on density matrix on a distributed computing system, which improves the versatility and ease of use of single-amplitude strategy quantum computing simulation.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biophysics (AREA)
- Evolutionary Computation (AREA)
- Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Mathematical Analysis (AREA)
- Condensed Matter Physics & Semiconductors (AREA)
- Computational Mathematics (AREA)
- Genetics & Genomics (AREA)
- Physiology (AREA)
- Biomedical Technology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computer Hardware Design (AREA)
- Medical Informatics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Geometry (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
一种分布式的量子计算仿真方法和装置,方法包括:将待仿真的量子线路转化为以无向图表示的张量网络,并使用基于分布式系统的运算资源的遗传算法将无向图切分为多个子图(S101);将多个子图分别在各个子进程节点上执行针对相连接的张量之间的张量缩并直到仅剩一个张量,以最终同时获得多个子图的零阶张量(S103);从各个子进程节点同时获取和叠加多个子图的零阶张量以确定无向图的零阶张量,并将其作为正定算子取值测量元的概率幅来执行量子计算仿真(S105)。该方法能够在分布式计算系统上执行基于密度矩阵的单振幅策略量子计算仿真,提高单振幅策略量子计算仿真的泛用性和易用性。
Description
本申请要求于2020年09月04日提交中国国家知识产权局,申请号为202010923077.1,发明名称为“一种分布式的量子计算仿真方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明涉及量子计算领域,更具体地,特别是指一种分布式的量子计算仿真方法和装置。
量子计算是利用量子纠缠和态叠加原理的新型计算模式,会带来强大的量子并行性,为后摩尔时代算力不足的问题带来新的解决方案。其实,费恩曼针对经典计算机仿真量子体系内存开销指数增长的问题,早在几十年前就提出量子计算的概念。经过几十年的发展,量子计算无论在硬件还是算法都取得很大的进展,尤其是随着谷歌宣称实现“量子霸权”,量子计算走进公众视野。然而,整体而言,量子计算仍处于初级阶段,距离大规模可容错的量子计算机还有很长的路要走。在这种背景下,基于经典计算机构建量子计算仿真平台有很重要的意义:(1)可以为量子算法提供验证平台,而且也能为量子软件、量子容错的可靠性做验证;(2)帮助理解经典计算和量子计算的界限,促进量子计算领域的发展。
构建量子计算仿真平台是一个相对比较新的方向,目前有全振幅和单振幅的模式。全振幅模式需要存储量子态的全部振幅,通过量子门对振幅进行调控,存储一个N量子比特的振幅需要的向量维数是2N,存储需求随量子比特的增加指数增加,即使一个大型超算也很难仿真超过45量子比特的量子系统。最近,全振幅仿真也取得很大的进展,比如部分振幅仿真, 以及双比特门分解。基于关联电子体系量子态的MPS(Matrix Product State,矩阵乘积态)和PEPS(Projective Entangled Pair States,投影纠缠对态)技术也属于全振幅仿真。这些新技术可以使全振幅仿真的规模突破45量子比特。
单振幅仿真是最近发展起来的一种策略,不用存储量子态全部振幅,只需要计算POVM(Positive Operator Value Measurement,正定算子取值测量)元的概率幅。单振幅策略很容易仿真量子霸权线路,甚至超过100量子比特的浅层量子线路。单振幅模式一般是把量子线路映射为张量网络,缩并后的零阶张量为所需概率幅。目前有基于路径积分和密度矩阵的两种策略,基于路径积分策略的研究相对较多,目前可以仿真40层9*9量子比特的量子霸权线路,是最好的结果。
但是对于基于密度矩阵的量子计算仿真策略,国内外无具体可行的方案运行在分布式超算上,只有支持多线程的方案,运行在一个处理器内的多核上。针对现有技术中基于密度矩阵的单振幅策略量子计算仿真不支持分布式计算系统的问题,目前尚无有效的解决方案。
发明内容
有鉴于此,本发明实施例的目的在于提出一种分布式的量子计算仿真方法和装置,能够在分布式计算系统上执行基于密度矩阵的单振幅策略量子计算仿真,提高单振幅策略量子计算仿真的泛用性和易用性。
基于上述目的,本发明实施例的第一方面提供了一种分布式的量子计算仿真方法,包括执行以下步骤:
将待仿真的量子线路转化为以无向图表示的张量网络,并使用基于分布式系统的运算资源的遗传算法将无向图切分为多个子图;
将多个子图分别在各个子进程节点上执行针对相连接的张量之间的张量缩并直到仅剩一个张量,以最终同时获得多个子图的零阶张量;
从各个子进程节点同时获取和叠加多个子图的零阶张量以确定无向图 的零阶张量,并将其作为正定算子取值测量元的概率幅来执行量子计算仿真。
在一些实施方式中,将待仿真的量子线路转化为以无向图表示的张量网络包括:
将量子线路中的量子比特的输入态、操作门、和测量使用迹运算转化为张量,并在无向图中确定为顶点;
将量子线路中的量子比特的输入态、操作门、和测量之间的连接关系在无向图中确定为对应顶点之间相连的边。
在一些实施方式中,使用基于分布式系统的运算资源的遗传算法将无向图切分为多个子图包括:
基于分布式系统的运算资源确定对无向图执行切分的次数,使得以4为底的切分次数的指数幂趋近可用的子进程的数量;
基于切分次数使用遗传算法确定对无向图执行切分的边集合;
将边集合中的边从无向图中切断,并在被切断位置生成两个新顶点;
为两个新顶点赋予4组分的密度算符{|0><0|,|0><1|,|1><0|,|1><1|}中之一作为两个新顶点的张量;
基于两个新顶点的张量的密度算符的不同赋值而生成所有可能的组合作为多个子图,其中子图的数量是以4为底的切分次数的指数幂。
在一些实施方式中,基于切分次数使用遗传算法确定对无向图执行切分的边集合,包括:
构建确定数量的无向图作为个体以形成无向图种群,在无向图中随机选择切分次数个边生成边集合,除此之外还包括以下步骤:
计算种群中所有个体的无向图树宽度,并将所有个体依照无向图树宽度的大小而排序;
使除无向图树宽度最小的个体外的所有个体两两相邻地交换边集合中的部分边以执行染色体变异;
将在除无向图树宽度最小的个体外的所有个体中随机选取的一个边集合中的随机选取的一个边替换为随机选取的另一个边以执行基因突变;
响应于边集合中出现重复的边,而随机选取边集合中不存在的边替代重复的边;
重复循环执行上述步骤直到循环次数超过预定的最大迭代次数,并返回种群内的最优个体作为边集合。
在一些实施方式中,计算无向图树宽度包括:
基于所有的不同张量缩并顺序对无向图执行树分解以获得多颗树;
基于多颗树各自的结构分别确定所对应的树分解的宽度;
基于多颗树中树分解的宽度的最小值确定无向图树宽度。
在一些实施方式中,将多个子图分别在各个子进程节点上执行针对相连接的张量之间的张量缩并直到仅剩一个张量,以最终同时获得多个子图的零阶张量包括:各个子进程节点使用相同的张量缩并顺序分别对多个子图中的不同节点依次执行张量缩并,在单位计算时间内消耗相同的计算资源,并使具有相同计算能力的各个子进程节点同时获得多个子图的零阶张量。
在一些实施方式中,将待仿真的量子线路转化为以无向图表示的张量网络并使用基于分布式系统的运算资源的遗传算法将无向图切分为多个子图,以及从各个子进程节点同时获取和叠加多个子图的零阶张量以确定无向图的零阶张量,并将其作为正定算子取值测量元的概率幅来执行量子计算仿真的步骤均为在分布式系统的主进程节点上执行。
基于上述目的,本发明实施例的第二方面提供了一种分布式的量子计算仿真装置,包括主进程节点和多个子进程节点,其中:
主进程节点配置用于将待仿真的量子线路转化为以无向图表示的张量网络,并使用基于分布式系统的运算资源的遗传算法将无向图切分为多个子图;
多个子进程节点配置用于将多个子图分别执行针对相连接的张量之间的张量缩并直到仅剩一个张量,以最终同时获得多个子图的零阶张量;
主进程节点还配置用于同时获取和叠加多个子图的零阶张量以确定无向图的零阶张量,并将其作为正定算子取值测量元的概率幅来执行量子计算仿真。
在一些实施方式中,主进程节点使用基于分布式系统的运算资源的遗传算法将无向图切分为多个子图包括:
基于分布式系统的运算资源确定对无向图执行切分的次数,使得以4为底的切分次数的指数幂趋近可用的子进程的数量;
基于切分次数使用遗传算法确定对无向图执行切分的边集合;
将边集合中的边从无向图中切断,并在被切断位置生成两个新顶点;
为两个新顶点赋予4组分的密度算符{|0><0|,|0><1|,|1><0|,|1><1|}中之一作为两个新顶点的张量;
基于两个新顶点的张量的密度算符的不同赋值而生成所有可能的组合作为多个子图,其中子图的数量是以4为底的切分次数的指数幂。
在一些实施方式中,主进程节点基于切分次数使用遗传算法确定对无向图执行切分的边集合包括:
构建确定数量的无向图作为个体以形成无向图种群,在无向图中随机选择切分次数个边生成边集合,除此之外还包括以下步骤:
计算种群中所有个体的无向图树宽度,并将所有个体依照无向图树宽度的大小而排序;
使除无向图树宽度最小的个体外的所有个体两两相邻地交换边集合中的部分边以执行染色体变异;
将在除无向图树宽度最小的个体外的所有个体中随机选取的一个边集合中的随机选取的一个边替换为随机选取的另一个边以执行基因突变;
响应于边集合中出现重复的边,而随机选取边集合中不存在的边 替代重复的边;
重复循环执行上述步骤直到循环次数超过预定的最大迭代次数,并返回种群内的最优个体作为边集合。
本发明具有以下有益技术效果:本发明实施例提供的分布式的量子计算仿真方法和装置,通过将待仿真的量子线路转化为以无向图表示的张量网络,并使用基于分布式系统的运算资源的遗传算法将无向图切分为多个子图;将多个子图分别在各个子进程节点上执行针对相连接的张量之间的张量缩并直到仅剩一个张量,以最终同时获得多个子图的零阶张量;从各个子进程节点同时获取和叠加多个子图的零阶张量以确定无向图的零阶张量,并将其作为正定算子取值测量元的概率幅来执行量子计算仿真的技术方案,能够在分布式计算系统上执行基于密度矩阵的单振幅策略量子计算仿真,提高单振幅策略量子计算仿真的泛用性和易用性。
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明提供的分布式的量子计算仿真方法的流程示意图;
图2为本发明提供的分布式的量子计算仿真方法的量子线路图;
图3为本发明提供的分布式的量子计算仿真方法的无向图;
图4为本发明提供的分布式的量子计算仿真方法的张量缩并示意图;
图5为本发明提供的分布式的量子计算仿真方法的张量网络切边图。
为使本发明的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本发明实施例进一步详细说明。
需要说明的是,本发明实施例中所有使用“第一”和“第二”的表述均是为了区分两个相同名称非相同的实体或者非相同的参量,可见“第一”“第二”仅为了表述的方便,不应理解为对本发明实施例的限定,后续实施例对此不再一一说明。
基于上述目的,本发明实施例的第一个方面,提出了一种能够在分布式计算系统上执行基于密度矩阵的单振幅策略量子计算仿真的分布式的量子计算仿真方法的一个实施例。图1示出的是本发明提供的分布式的量子计算仿真方法的流程示意图。
所述的分布式的量子计算仿真方法,如图1所示,包括以下步骤:
步骤S101:将待仿真的量子线路转化为以无向图表示的张量网络,并使用基于分布式系统的运算资源的遗传算法将无向图切分为多个子图;
步骤S103:将多个子图分别在各个子进程节点上执行针对相连接的张量之间的张量缩并直到仅剩一个张量,以最终同时获得多个子图的零阶张量;
步骤S105:从各个子进程节点同时获取和叠加多个子图的零阶张量以确定无向图的零阶张量,并将其作为正定算子取值测量元的概率幅来执行量子计算仿真。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指示相关硬件来完成,程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,存储介质可为磁碟、光盘、只读存储记忆体(ROM)或随机存储记忆体(RAM)等。计算机程序的实施例,可以达到与之对应的前述任意方法实施例相同或者相类似的效果。
在一些实施方式中,将待仿真的量子线路转化为以无向图表示的张量网络包括:
将量子线路中的量子比特的输入态、操作门、和测量使用迹运算转化 为张量,并在无向图中确定为顶点;
将量子线路中的量子比特的输入态、操作门、和测量之间的连接关系在无向图中确定为对应顶点之间相连的边。
在一些实施方式中,用基于分布式系统的运算资源的遗传算法将无向图切分为多个子图包括:
基于分布式系统的运算资源确定对无向图执行切分的次数,使得以4为底的切分次数的指数幂趋近可用的子进程的数量;
基于切分次数使用遗传算法确定对无向图执行切分的边集合;
将边集合中的边从无向图中切断,并在被切断位置生成两个新顶点;
为两个新顶点赋予4组分的密度算符{|0><0|,|0><1|,|1><0|,|1><1|}中之一作为两个新顶点的张量;
基于两个新顶点的张量的密度算符的不同赋值而生成所有可能的组合作为多个子图,其中子图的数量是以4为底的切分次数的指数幂。
在一些实施方式中,基于切分次数使用遗传算法确定对无向图执行切分的边集合,包括:
构建确定数量的无向图作为个体以形成无向图种群,在无向图中随机选择切分次数个边生成边集合,除此之外还包括以下步骤:
计算种群中所有个体的无向图树宽度,并将所有个体依照无向图树宽度的大小而排序;
使除无向图树宽度最小的个体外的所有个体两两相邻地交换边集合中的部分边以执行染色体变异;
将在除无向图树宽度最小的个体外的所有个体中随机选取的一个边集合中的随机选取的一个边替换为随机选取的另一个边以执行基因突变;
响应于边集合中出现重复的边,而随机选取边集合中不存在的边替代重复的边;
重复循环执行上述步骤直到循环次数超过预定的最大迭代次数, 并返回种群内的最优个体作为边集合。
在一些实施方式中,计算无向图树宽度包括:
基于所有的不同张量缩并顺序对无向图执行树分解以获得多颗树;
基于多颗树各自的结构分别确定所对应的树分解的宽度;
基于多颗树中树分解的宽度的最小值确定无向图树宽度。
在一些实施方式中,将多个子图分别在各个子进程节点上执行针对相连接的张量之间的张量缩并直到仅剩一个张量,以最终同时获得多个子图的零阶张量包括:各个子进程节点使用相同的张量缩并顺序分别对多个子图中的不同节点依次执行张量缩并,在单位计算时间内消耗相同的计算资源,并使具有相同计算能力的各个子进程节点同时获得多个子图的零阶张量。
在一些实施方式中,将待仿真的量子线路转化为以无向图表示的张量网络并使用基于分布式系统的运算资源的遗传算法将无向图切分为多个子图,以及从各个子进程节点同时获取和叠加多个子图的零阶张量以确定无向图的零阶张量,并将其作为正定算子取值测量元的概率幅来执行量子计算仿真的步骤均为在分布式系统的主进程节点上执行。
下面根据具体实施例来进一步阐述本发明的具体实施方式。
张量网络是由不同的张量通过拓扑连接而成,一般可用无向图表示,我们定义为G=(V,E),其中V为顶点集合,E为边的集合。例如,一个形如图2所示的量子线路和一个形如图3所示的张量网络相对应,根据量子线路构建对应的张量网络是实施张量网络缩并的第一步。在图2的量子线路中的每个操作门、输入态、测量都对应到图3的无向图中的顶点,量子线路的边对应无向图的边。
张量网络中的张量是具有阶数和维数的数据结构,其中阶数是指一个张量有几条边连接,可以用不同指数索引来表示(如i,j,k,l等);维数是每个索引有几个可能的取址。在量子计算的框架下,张量的维数是一个4组 分的密度算符,取值Π={|0><0|,|0><1|,|1><0|,|1><1|}。因此对于一个k阶张量,我们可以用一个一维阵列存储,需要存储4k个复数。
现有技术已经公开了构建张量网络的方法:对于一个单量子比特输入态ρ,它的张量是_σ=tr(ρ·σ)(其中σ∈Π);对于一个单量子比特操作门,它的张量是T_(σ,τ)=tr(τ^+G(σ));对于一个两量子比特操作门,它的张量是
而量子测量的张量是T_τ=tr(E·τ)。其中E是POVM元算符,G是幺正演化算符。
张量缩并是一种张量运算,是将两个张量以如图4所示的方式缩并成一个张量。两个连接的张量有内部边和开放边,而张量缩并是把内部边收缩,并将两个顶点合并成一个。如图4所示,对于两个张量e和f,e是x+y阶张量,f是y+z阶张量,缩并后可以得到一个x+z阶张量。运算过程如下:
张量网络中的多个张量依次完成缩并后会得到一个零阶张量,该零阶张量为该POVM(正定算子取值测量)元对应的概率幅。
张量网络缩并的最大内存开销取决于缩并过程中的最大阶数的张量。一般而言,随着张量网络缩并的进行,中间过程张量的最大阶数会先增大再减小。例如,一个3+2阶张量和一个2+3阶张量缩并后得到一个3+3阶的张量。中间张量的最大阶数和张量缩并的顺序有关,每种缩并的顺序和一个图的树分解相对应,最优的消去顺序就是具有最小树宽的树分解。
设G=(V,E)为一个无向图,图G的一个结点子集构成一个包(bag),记为B
i,图G的树分解是一棵树T,由包B
i构成。图G的一个树分解可以表示为图的顶点V(G)到包B
i的映射,并且满足如下条件:
(1)U
i∈V(T)B
i=V(G),包中节点的集合能够覆盖图G的结点集合;
(3)如果在树T中k出现在从i到j的一条路径上,则B
i∩B
j=B
k。
对于树分解T,其宽度定义为max(|B
v∈V(T)|-1)。一个图G的树分解不唯一,图G的树宽是指图G所有可能的树分解中宽度的最小值,记为tw(G)。计算树宽和树分解是一个NP(Non-deterministic Polynomial,不确定多项式)难题,但是在实际的计算中有开源的软件可以应用,例如QuickBB。实际上,张量网络缩并的时间开销也和树宽有关。
基于上述张量缩并的具体手段、其计算空间复杂度问题、以及在分布式计算系统上的应用需求,本发明实施例针对性地提出了更加适应分布式计算系统并且降低树宽的张量网络缩并算法:不是消去顶点,而是消去边。在张量网络中,每条边有四个不同的索引:|0><0|,|0><1|,|1><0|和|1><1|。如图5所示,我们可以把这条边切断,生成4个具有不同初始化的子图;而每个子图缩并后进行加和,其结果和原始图缩并后的结果一致。其理论计算如下所示,
这一事实意味着可以在不同的核上分别计算不同子图的缩并,实现分布式张量网络缩并。同时必须注意,切边后的子图有更小的树宽,这就意味着子图缩并有更小的内存占用和更低的时间算法复杂度。例如,图4中 原始的无向图的树宽为3,而切边后生成的子图的树宽均是1。实际上如果有必要,完全可以消去多条边,消去边的数量越多生成子图的树宽就越小,那么生成子图的数量就越多,如果消去m条边那么生成子图的数量为4
m。本发明实施例旨在生成数量与可用的分布式处理器线程接近的子图;如果生成子图的数量不大于计算核数,那么可以用不同的核计算不同的子图缩并,如果子图的数量大于计算核数,那么需要采用串行的方式。
这将带来多个优选的技术效果。本发明实施例只需要在主进程收集每个子进程缩并后的结果(即,只有一个复数),而进行完全垂直运算的子进程间不需要通信,那么超算节点间的通信将被降低到很低,因此完全不再是瓶颈。同时,每个进程缩并的子图的结构完全一致,因此所用的计算时间也一致,不存在有些进程空闲的情况,进而对于分布式计算系统的利用率也有充分提升。
此时唯一的遗留问题是确定如何切边。选择不同的边消去产生子图的树宽差别很大,因此寻找最优消去边的集合对于提升算法的性能至关重要。寻找最优的集合本身是NP难题,当图的规模较大时显然不可能在有限的时间内通过穷举来找到最优的消去边的集合。作为近似的替代,本发明实施例提出了一种基于启发式算法的寻找最优消去边的策略。
首先初始化遗传算法,设置迭代计数器t=0,设置最大迭代次数T,初始化种群P,其中种群P具有N个个体,每个个体是在无向图中随机选择M个边(消去)的集合。
然后重复以下步骤:
第一步:个体评价。计算群体P中N个体对应图的树宽,并进行排序。
第三步:变异运算(基因突变)。在种群内随机选择一个除最优个体外 的个体进行变异,在该个体边的集合中随机选择一个,再随机生成一个集合内没有的边。
第四步:迭代计数器加一。t=t+1,Until(直到)t>T。
最后循环结束时,对种群内个体进行评价,返回最优个体来执行切边。
从上述实施例可以看出,本发明实施例提供的分布式的量子计算仿真方法,通过将待仿真的量子线路转化为以无向图表示的张量网络,并使用基于分布式系统的运算资源的遗传算法将无向图切分为多个子图;将多个子图分别在各个子进程节点上执行针对相连接的张量之间的张量缩并直到仅剩一个张量,以最终同时获得多个子图的零阶张量;从各个子进程节点同时获取和叠加多个子图的零阶张量以确定无向图的零阶张量,并将其作为正定算子取值测量元的概率幅来执行量子计算仿真的技术方案,能够在分布式计算系统上执行基于密度矩阵的单振幅策略量子计算仿真,提高单振幅策略量子计算仿真的泛用性和易用性。
需要特别指出的是,上述分布式的量子计算仿真方法的各个实施例中的各个步骤均可以相互交叉、替换、增加、删减,因此,这些合理的排列组合变换之于分布式的量子计算仿真方法也应当属于本发明的保护范围,并且不应将本发明的保护范围局限在所述实施例之上。
基于上述目的,本发明实施例的第二个方面,提出了一种能够在分布式计算系统上执行基于密度矩阵的单振幅策略量子计算仿真的分布式的量子计算仿真装置的一个实施例。所述的分布式的量子计算仿真装置包括主进程节点和多个子进程节点,其中:
主进程节点配置用于将待仿真的量子线路转化为以无向图表示的张量网络,并使用基于分布式系统的运算资源的遗传算法将无向图切分为多个子图;
多个子进程节点配置用于将多个子图分别执行针对相连接的张量之间的张量缩并直到仅剩一个张量,以最终同时获得多个子图的零阶张量;
主进程节点还配置用于同时获取和叠加多个子图的零阶张量以确定无向图的零阶张量,并将其作为正定算子取值测量元的概率幅来执行量子计算仿真。
在一些实施方式中,主进程节点使用基于分布式系统的运算资源的遗传算法将无向图切分为多个子图包括:
基于分布式系统的运算资源确定对无向图执行切分的次数,使得以4为底的切分次数的指数幂趋近可用的子进程的数量;
基于切分次数使用遗传算法确定对无向图执行切分的边集合;
将边集合中的边从无向图中切断,并在被切断位置生成两个新顶点;
为两个新顶点赋予4组分的密度算符{|0><0|,|0><1|,|1><0|,|1><1|}中之一作为两个新顶点的张量;
基于两个新顶点的张量的密度算符的不同赋值而生成所有可能的组合作为多个子图,其中子图的数量是以4为底的切分次数的指数幂。
在一些实施方式中,主进程节点基于切分次数使用遗传算法确定对无向图执行切分的边集合包括:
构建确定数量的无向图作为个体以形成无向图种群,在无向图中随机选择切分次数个边生成边集合,除此之外还包括以下步骤:
计算种群中所有个体的无向图树宽度,并将所有个体依照无向图树宽度的大小而排序;
使除无向图树宽度最小的个体外的所有个体两两相邻地交换边集合中的部分边以执行染色体变异;
将在除无向图树宽度最小的个体外的所有个体中随机选取的一个边集合中的随机选取的一个边替换为随机选取的另一个边以执行基因突变;
响应于边集合中出现重复的边,而随机选取边集合中不存在的边替代重复的边;
重复循环执行上述步骤直到循环次数超过预定的最大迭代次数, 并返回种群内的最优个体作为边集合。
从上述实施例可以看出,本发明实施例提供的分布式的量子计算仿真装置,通过将待仿真的量子线路转化为以无向图表示的张量网络,并使用基于分布式系统的运算资源的遗传算法将无向图切分为多个子图;将多个子图分别在各个子进程节点上执行针对相连接的张量之间的张量缩并直到仅剩一个张量,以最终同时获得多个子图的零阶张量;从各个子进程节点同时获取和叠加多个子图的零阶张量以确定无向图的零阶张量,并将其作为正定算子取值测量元的概率幅来执行量子计算仿真的技术方案,能够在分布式计算系统上执行基于密度矩阵的单振幅策略量子计算仿真,提高单振幅策略量子计算仿真的泛用性和易用性。
需要特别指出的是,上述分布式的量子计算仿真装置的实施例采用了所述分布式的量子计算仿真方法的实施例来具体说明各模块的工作过程,本领域技术人员能够很容易想到,将这些模块应用到所述分布式的量子计算仿真方法的其他实施例中。当然,由于所述分布式的量子计算仿真方法实施例中的各个步骤均可以相互交叉、替换、增加、删减,因此,这些合理的排列组合变换之于所述分布式的量子计算仿真装置也应当属于本发明的保护范围,并且不应将本发明的保护范围局限在所述实施例之上。
以上是本发明公开的示例性实施例,但是应当注意,在不背离权利要求限定的本发明实施例公开的范围的前提下,可以进行多种改变和修改。根据这里描述的公开实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本发明实施例公开的元素可以以个体形式描述或要求,但除非明确限制为单数,也可以理解为多个。
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本发明实施例公开的范围(包括权利要求)被限于这些例子;在本发明实施例的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上所述的本发明实施例的不同方面的许多 其它变化,为了简明它们没有在细节中提供。因此,凡在本发明实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本发明实施例的保护范围之内。
Claims (10)
- 一种分布式的量子计算仿真方法,其特征在于,包括执行以下步骤:将待仿真的量子线路转化为以无向图表示的张量网络,并使用基于分布式系统的运算资源的遗传算法将所述无向图切分为多个子图;将所述多个子图分别在各个子进程节点上执行针对相连接的张量之间的张量缩并直到仅剩一个张量,以最终同时获得所述多个子图的零阶张量;从各个子进程节点同时获取和叠加所述多个子图的零阶张量以确定所述无向图的零阶张量,并将其作为正定算子取值测量元的概率幅来执行量子计算仿真。
- 根据权利要求1所述的方法,其特征在于,将待仿真的量子线路转化为以无向图表示的张量网络包括:将所述量子线路中的量子比特的输入态、操作门、和测量使用迹运算转化为张量,并在所述无向图中确定为顶点;将所述量子线路中的量子比特的输入态、操作门、和测量之间的连接关系在所述无向图中确定为对应顶点之间相连的边。
- 根据权利要求1所述的方法,其特征在于,使用基于分布式系统的运算资源的遗传算法将所述无向图切分为多个子图包括:基于分布式系统的运算资源确定对所述无向图执行切分的次数,使得以4为底的切分次数的指数幂趋近可用的所述子进程的数量;基于所述切分次数使用所述遗传算法确定对所述无向图执行切分的边集合;将所述边集合中的边从所述无向图中切断,并在被切断位置生成两个新顶点;为所述两个新顶点赋予4组分的密度算符{|0><0|,|0><1|,|1><0|,|1><1|}中之一作为所述两个新顶点的张量;基于所述两个新顶点的张量的密度算符的不同赋值而生成所有可能的组合作为所述多个子图,其中子图的数量是以4为底的所述切分次数的指数幂。
- 根据权利要求3所述的方法,其特征在于,基于所述切分次数使用所述遗传算法确定对所述无向图执行切分的边集合,包括:构建确定数量的所述无向图作为个体以形成无向图种群,在所述无向图中随机选择所述切分次数个边生成所述边集合,除此之外还包括以下步骤:计算所述种群中所有个体的无向图树宽度,并将所有个体依照所述无向图树宽度的大小而排序;使除所述无向图树宽度最小的个体外的所有个体两两相邻地交换所述边集合中的部分边以执行染色体变异;将在除所述无向图树宽度最小的个体外的所有个体中随机选取的一个边集合中的随机选取的一个边替换为随机选取的另一个边以执行基因突变;响应于所述边集合中出现重复的边,而随机选取所述边集合中不存在的边替代重复的边;重复循环执行上述步骤直到循环次数超过预定的最大迭代次数,并返回种群内的最优个体作为所述边集合。
- 根据权利要求4所述的方法,其特征在于,计算所述无向图树宽度包括:基于所有的不同张量缩并顺序对所述无向图执行树分解以获得多颗树;基于所述多颗树各自的结构分别确定所对应的所述树分解的宽度;基于所述多颗树中所述树分解的宽度的最小值确定所述无向图树宽度。
- 根据权利要求1所述的方法,其特征在于,将所述多个子图分别在各个子进程节点上执行针对相连接的张量之间的张量缩并直到仅剩一个张量,以最终同时获得所述多个子图的零阶张量包括:所述各个子进程节点使用相同的张量缩并顺序分别对所述多个子图中的不同节点依次执行张量缩并,在单位计算时间内消耗相同的计算资源,并使 具有相同计算能力的所述各个子进程节点同时获得所述多个子图的零阶张量。
- 根据权利要求1所述的方法,其特征在于,将待仿真的量子线路转化为以无向图表示的张量网络并使用基于分布式系统的运算资源的遗传算法将所述无向图切分为多个子图,以及从各个子进程节点同时获取和叠加所述多个子图的零阶张量以确定所述无向图的零阶张量,并将其作为正定算子取值测量元的概率幅来执行量子计算仿真的步骤均为在分布式系统的主进程节点上执行。
- 一种分布式的量子计算仿真装置,其特征在于,包括主进程节点和多个子进程节点,其中:所述主进程节点配置用于将待仿真的量子线路转化为以无向图表示的张量网络,并使用基于分布式系统的运算资源的遗传算法将所述无向图切分为多个子图;所述多个子进程节点配置用于将所述多个子图分别执行针对相连接的张量之间的张量缩并直到仅剩一个张量,以最终同时获得所述多个子图的零阶张量;所述主进程节点还配置用于同时获取和叠加所述多个子图的零阶张量以确定所述无向图的零阶张量,并将其作为正定算子取值测量元的概率幅来执行量子计算仿真。
- 根据权利要求8所述的装置,其特征在于,所述主进程节点使用基于分布式系统的运算资源的遗传算法将所述无向图切分为多个子图包括:基于分布式系统的运算资源确定对所述无向图执行切分的次数,使得以4为底的切分次数的指数幂趋近可用的所述子进程的数量;基于所述切分次数使用所述遗传算法确定对所述无向图执行切分的边集合;将所述边集合中的边从所述无向图中切断,并在被切断位置生成两个新顶点;为所述两个新顶点赋予4组分的密度算符{|0><0|,|0><1|,|1><0|,|1><1|}中之一作为所述两个新顶点的张量;基于所述两个新顶点的张量的密度算符的不同赋值而生成所有可能的组合作为所述多个子图,其中子图的数量是以4为底的所述切分次数的指数幂。
- 根据权利要求9所述的装置,其特征在于,所述主进程节点基于所述切分次数使用所述遗传算法确定对所述无向图执行切分的边集合包括:构建确定数量的所述无向图作为个体以形成无向图种群,在所述无向图中随机选择所述切分次数个边生成所述边集合,除此之外还包括以下步骤:计算所述种群中所有个体的无向图树宽度,并将所有个体依照所述无向图树宽度的大小而排序;使除所述无向图树宽度最小的个体外的所有个体两两相邻地交换所述边集合中的部分边以执行染色体变异;将在除所述无向图树宽度最小的个体外的所有个体中随机选取的一个边集合中的随机选取的一个边替换为随机选取的另一个边以执行基因突变;响应于所述边集合中出现重复的边,而随机选取所述边集合中不存在的边替代重复的边;重复循环执行上述步骤直到循环次数超过预定的最大迭代次数,并返回种群内的最优个体作为所述边集合。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US18/012,528 US20230267358A1 (en) | 2020-09-04 | 2021-06-29 | Distributed Quantum Computing Simulation Method and Apparatus |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010923077.1 | 2020-09-04 | ||
| CN202010923077.1A CN112132287B (zh) | 2020-09-04 | 2020-09-04 | 一种分布式的量子计算仿真方法和装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022048280A1 true WO2022048280A1 (zh) | 2022-03-10 |
Family
ID=73848508
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2021/103305 Ceased WO2022048280A1 (zh) | 2020-09-04 | 2021-06-29 | 一种分布式的量子计算仿真方法和装置 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US20230267358A1 (zh) |
| CN (1) | CN112132287B (zh) |
| WO (1) | WO2022048280A1 (zh) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114565101A (zh) * | 2022-03-21 | 2022-05-31 | 苏州浪潮智能科技有限公司 | 含噪声的量子计算仿真方法、装置、设备及介质 |
| CN114928545A (zh) * | 2022-03-31 | 2022-08-19 | 中国电子科技集团公司第十五研究所 | 一种基于Spark的大规模流量数据关键节点计算方法 |
| CN116389284A (zh) * | 2023-03-17 | 2023-07-04 | 南通大学 | 一种分布式量子计算中基于依赖图的传输代价优化方法 |
| CN117291271A (zh) * | 2023-09-22 | 2023-12-26 | 华东师范大学 | 一种基于分布式系统的高效量子线路模拟方法 |
Families Citing this family (19)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112132287B (zh) * | 2020-09-04 | 2022-05-17 | 苏州浪潮智能科技有限公司 | 一种分布式的量子计算仿真方法和装置 |
| CN112749807A (zh) * | 2021-01-11 | 2021-05-04 | 同济大学 | 一种基于生成模型的量子态层析方法 |
| CN114912336B (zh) * | 2021-02-09 | 2024-01-05 | 本源量子计算科技(合肥)股份有限公司 | 量子比特仿真模型的建立方法、装置以及可读存储介质 |
| CN115310612A (zh) * | 2021-04-21 | 2022-11-08 | 合肥本源量子计算科技有限责任公司 | 量子线路构建方法、装置及量子计算机操作系统 |
| CN115271079B (zh) * | 2021-04-29 | 2024-07-16 | 本源量子计算科技(合肥)股份有限公司 | 量子线路的替换方法、装置、介质及量子计算机操作系统 |
| CN114218881A (zh) * | 2021-04-30 | 2022-03-22 | 无锡江南计算技术研究所 | 一种针对百量子级方形量子网格随机电路模拟方法 |
| CN115511089B (zh) * | 2021-06-23 | 2025-11-18 | 本源量子计算科技(合肥)股份有限公司 | 量子计算任务处理方法、装置及量子计算机操作系统 |
| US12585841B2 (en) * | 2021-08-11 | 2026-03-24 | Uchicago Argonne, Llc | Quantum simulation |
| CN114091685B (zh) * | 2021-11-08 | 2022-08-23 | 北京百度网讯科技有限公司 | 深度学习框架的张量切分方法、装置、设备和存储介质 |
| CN114186633B (zh) * | 2021-12-10 | 2023-04-07 | 北京百度网讯科技有限公司 | 模型的分布式训练方法、装置、设备以及存储介质 |
| CN114254755B (zh) * | 2021-12-24 | 2022-12-02 | 中国科学院理论物理研究所 | 模拟量子比特末态概率幅的方法、装置和量子虚拟机 |
| CN114092073B (zh) * | 2022-01-21 | 2022-04-22 | 苏州浪潮智能科技有限公司 | 无向带权数据图至dag任务图的转换方法、系统及装置 |
| CN114492814B (zh) * | 2022-01-27 | 2023-08-08 | 本源量子计算科技(合肥)股份有限公司 | 基于量子计算模拟目标体系能量的方法、装置及介质 |
| CN115169566A (zh) * | 2022-09-09 | 2022-10-11 | 之江实验室 | 基于张量网络局部采样的随机量子线路模拟方法和装置 |
| CN116306951B (zh) * | 2023-03-06 | 2025-10-21 | 京东科技信息技术有限公司 | 一种量子计算方法和装置、电子设备和存储介质 |
| CN118350473B (zh) * | 2024-06-18 | 2024-09-13 | 量子科技长三角产业创新中心 | 过程张量层析模型训练及过程张量层析方法和装置 |
| CN118536319B (zh) * | 2024-07-23 | 2024-10-11 | 深圳飞骧科技股份有限公司 | 基于边收缩技术的电路预处理方法、系统及相关设备 |
| CN119578566B (zh) * | 2024-10-24 | 2025-10-31 | 复旦大学 | 一种基于电路切割的量子电路模拟方法 |
| CN120781997A (zh) * | 2025-09-04 | 2025-10-14 | 中移(苏州)软件技术有限公司 | 量子线路模拟方法、装置、电子设备及存储介质 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107329831A (zh) * | 2017-06-29 | 2017-11-07 | 北京仿真中心 | 一种基于改进遗传算法的仿真资源调度方法 |
| CN110428055A (zh) * | 2018-04-27 | 2019-11-08 | 阿里巴巴集团控股有限公司 | 量子计算方法和设备 |
| US20200125985A1 (en) * | 2018-10-21 | 2020-04-23 | President And Fellows Of Harvard College | Qubit allocation for noisy intermediate-scale quantum computers |
| CN112132287A (zh) * | 2020-09-04 | 2020-12-25 | 苏州浪潮智能科技有限公司 | 一种分布式的量子计算仿真方法和装置 |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6004818B2 (ja) * | 2012-08-07 | 2016-10-12 | インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation | 並列化方法、システム、及びプログラム |
| US11093679B2 (en) * | 2018-03-14 | 2021-08-17 | International Business Machines Corporation | Quantum circuit decomposition by integer programming |
| CN111819579B (zh) * | 2018-08-03 | 2022-02-08 | 谷歌有限责任公司 | 跨计算装置分布张量计算的方法、系统和介质 |
| CN109241633B (zh) * | 2018-09-12 | 2021-03-23 | 西安交通大学 | 基于遗传算法的流体机械并行仿真程序进程映射方法 |
| CN109978171B (zh) * | 2019-02-26 | 2023-10-10 | 南京航空航天大学 | 一种基于云计算的Grover量子仿真算法优化方法 |
| CN110941494A (zh) * | 2019-12-02 | 2020-03-31 | 哈尔滨工程大学 | 一种面向深度学习的gpu并行计算的数据处理方法 |
| US12481907B2 (en) * | 2020-04-24 | 2025-11-25 | Alibaba Group Holding Limited | Methods and systems for tensor network contraction based on hypergraph decomposition and parameter optimization |
| US12561368B2 (en) * | 2020-04-24 | 2026-02-24 | Alibaba Group Holding Limited | Methods and systems for tensor network contraction based on local optimization of contraction tree |
-
2020
- 2020-09-04 CN CN202010923077.1A patent/CN112132287B/zh not_active Expired - Fee Related
-
2021
- 2021-06-29 WO PCT/CN2021/103305 patent/WO2022048280A1/zh not_active Ceased
- 2021-06-29 US US18/012,528 patent/US20230267358A1/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107329831A (zh) * | 2017-06-29 | 2017-11-07 | 北京仿真中心 | 一种基于改进遗传算法的仿真资源调度方法 |
| CN110428055A (zh) * | 2018-04-27 | 2019-11-08 | 阿里巴巴集团控股有限公司 | 量子计算方法和设备 |
| US20200125985A1 (en) * | 2018-10-21 | 2020-04-23 | President And Fellows Of Harvard College | Qubit allocation for noisy intermediate-scale quantum computers |
| CN112132287A (zh) * | 2020-09-04 | 2020-12-25 | 苏州浪潮智能科技有限公司 | 一种分布式的量子计算仿真方法和装置 |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114565101A (zh) * | 2022-03-21 | 2022-05-31 | 苏州浪潮智能科技有限公司 | 含噪声的量子计算仿真方法、装置、设备及介质 |
| CN114928545A (zh) * | 2022-03-31 | 2022-08-19 | 中国电子科技集团公司第十五研究所 | 一种基于Spark的大规模流量数据关键节点计算方法 |
| CN114928545B (zh) * | 2022-03-31 | 2024-02-06 | 中国电子科技集团公司第十五研究所 | 一种基于Spark的大规模流量数据关键节点计算方法 |
| CN116389284A (zh) * | 2023-03-17 | 2023-07-04 | 南通大学 | 一种分布式量子计算中基于依赖图的传输代价优化方法 |
| CN116389284B (zh) * | 2023-03-17 | 2023-11-07 | 南通大学 | 一种分布式量子计算中基于依赖图的传输代价优化方法 |
| CN117291271A (zh) * | 2023-09-22 | 2023-12-26 | 华东师范大学 | 一种基于分布式系统的高效量子线路模拟方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112132287B (zh) | 2022-05-17 |
| CN112132287A (zh) | 2020-12-25 |
| US20230267358A1 (en) | 2023-08-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2022048280A1 (zh) | 一种分布式的量子计算仿真方法和装置 | |
| Gueunet et al. | Task-based augmented merge trees with Fibonacci heaps | |
| CN115168281B (zh) | 一种基于禁忌搜索算法的神经网络片上映射方法和装置 | |
| Bader et al. | Parallel algorithms for evaluating centrality indices in real-world networks | |
| Doraiswamy et al. | Computing Reeb graphs as a union of contour trees | |
| CN102594909B (zh) | 基于共邻矩阵谱信息的多目标社区检测方法 | |
| CN102902772B (zh) | 一种基于多目标优化的Web社区发现方法 | |
| CN116151381B (zh) | 量子电路处理方法、装置及电子设备 | |
| CN109656798B (zh) | 基于顶点重排序的超级计算机大数据处理能力测试方法 | |
| CN116611527B (zh) | 量子电路处理方法、装置及电子设备 | |
| Zhao et al. | Simulation of quantum computing on classical supercomputers with tensor-network edge cutting | |
| CN109919172A (zh) | 一种多源异构数据的聚类方法及装置 | |
| Liu et al. | D2match: leveraging deep learning and degeneracy for subgraph matching | |
| Zhang et al. | Opinion dynamics in social networks incorporating higher-order interactions | |
| Kanezashi et al. | Adaptive pattern matching with reinforcement learning for dynamic graphs | |
| Bhuiyan et al. | Fast parallel algorithms for edge-switching to achieve a target visit rate in heterogeneous graphs | |
| CN115658809B (zh) | 一种基于局部方向中心性的数据分布式聚类方法及装置 | |
| Ismaeel et al. | An efficient workload clustering framework for large-scale data centers | |
| Zhang et al. | Scalegcn: Efficient and effective graph convolution via channel-wise scale transformation | |
| Tian et al. | Community detection of undirected hypergraphs by Ricci flow | |
| Mendiburu et al. | Introducing belief propagation in estimation of distribution algorithms: A parallel framework | |
| von Kirchbach et al. | Efficient process-to-node mapping algorithms for stencil computations | |
| Liu et al. | Large-scale social network analysis based on mapreduce | |
| CN115001978B (zh) | 一种基于强化学习模型的云租户虚拟网络智能映射方法 | |
| Barron et al. | Binary Bleed: Fast Distributed and Parallel Method for Automatic Model Selection |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21863348 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 21863348 Country of ref document: EP Kind code of ref document: A1 |

