Distributed quantum computing method, device, equipment and medium

By disassembling the classical computing problem into multiple sub-problems and processing it in parallel on multiple computing nodes, the distributed quantum computing method solves the problem of excessive quantum resource demand in the NISQ era, achieving efficient solution to classical computing problems and improving calculation accuracy.

CN119783841AActive Publication Date: 2025-04-08GUOKAIKE QUANTUM TECH (ANHUI) CO LTD +2
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510281397.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-04-08
Estimated Expiration
2045-03-11

AI Technical Summary

Technical Problem

In the current era of noise-containing medium-scale quantum (NISQ), when quantum methods are used to solve classical computing problems, the demand for quantum resources is too high, making it very difficult to implement quantum algorithms.

Method used

A distributed quantum computing method is proposed. By disassembling the problem to be solved into multiple sub-problems and processing it in parallel on multiple computing nodes, the demand for quantum resources is reduced. The specific steps include obtaining the number of domain qubits of the problem function to be solved and the calculation node, constructing the sub-problem function and its solution quantum circuit, running the quantum circuit to obtain the sub-problem solution, and finally combining the sub-problem solutions to obtain the original problem solution.

Benefits of technology

Through distributed processing, the number of qubits required by a single computing node is reduced, the impact of line noise on quantum states is reduced, the quantum fidelity and calculation accuracy are improved, and efficient solution to classical computing problems is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783841A_ABST
    Figure CN119783841A_ABST
Patent Text Reader

Abstract

The invention relates to a distributed quantum computing method and device, equipment and a medium, and the method comprises the steps: obtaining a to-be-solved problem function, the number of computing nodes, and the number of definitional domain quantum bits of each computing node; constructing a sub-problem function corresponding to each computational node based on the number of quantum bits in the definition domain of each computational node and an original definition domain and an original value domain of the to-be-solved problem function, wherein each sub-problem function comprises a to-be-solved sub-problem solution; constructing a sub-problem function solving quantum circuit corresponding to each computing node; respectively operating the sub-problem functions to solve the quantum circuit so as to obtain corresponding to-be-solved sub-problem solutions; and combining the corresponding sub-problem solutions according to the combination sequence of the sub-problem function definition domain in the original definition domain of the to-be-solved problem function to obtain the solution of the to-be-solved problem function. According to the method, the requirement on quantum resources when a classical calculation problem is solved by adopting a quantum mode is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of quantum computing technology, and in particular to distributed quantum computing methods, devices, equipment and media. Background Art

[0002] Quantum algorithms are algorithms that run on quantum computers and represent a cutting-edge computing technology. They use properties such as quantum superposition and quantum entanglement in quantum mechanics to solve problems that are difficult for traditional algorithms to solve. Compared with classical algorithms, quantum algorithms use quantum bits (Qubit) as the basic carrier of information and can explore multiple possible solutions at the same time, thereby achieving significant superiority over classical computing on specific problems.

[0003] To date, researchers have developed a series of quantum algorithms and achieved remarkable results in many fields. For example, the Shor algorithm uses quantum parallelism to effectively factor large integers in polynomial time, which has brought revolutionary impacts to the field of cryptography; the Grover algorithm uses quantum search technology to achieve quadratic search efficiency in disordered databases; the Simon algorithm inspired quantum algorithms based on quantum computing's Fourier transform, which is used in the most famous Shor algorithm. These quantum algorithms all highlight the superiority of quantum computing in dealing with specific complex problems, and foreshadow broad application prospects for the future development of quantum computing technology.

[0004] Although quantum algorithms currently have unparalleled advantages over traditional computing when dealing with specific complex problems and have broad application prospects, in actual application scenarios, a large amount of quantum resources are required to implement the aforementioned various quantum algorithms to solve specific problems. For the current noisy intermediate-scale quantum (NISQ) era, the implementation of these quantum algorithms is very difficult due to the processing scale of current general-purpose quantum computers. Summary of the invention

[0005] In view of the technical problems existing in the prior art, the present invention proposes a distributed quantum computing method, device, equipment and medium to reduce the demand for quantum resources when solving classical computing problems in a quantum way.

[0006] In order to solve the above technical problems, according to one aspect of the present invention, the present invention provides a distributed quantum computing method, the method comprising the following steps: Obtain the problem function to be solved, the number of computing nodes, and the number of domain qubits of each computing node, wherein the sum of the number of domain qubits of all computing nodes is equal to the number of original domain bits of the problem function to be solved; Construct a subproblem function corresponding to each computing node based on the number of domain qubits of each computing node, the original domain of the problem function to be solved, and the original range, wherein the domains of all subproblem functions, when combined together in a preset combination order, constitute the original domain of the problem function to be solved, and each subproblem function includes a subproblem solution to be solved; Construct a sub-problem function corresponding to each computing node to solve the quantum circuit; Run the subproblem function to solve the quantum circuit to obtain the solution to the subproblem; The corresponding sub-problem solutions are combined in a preset combination order of the sub-problem function definition domains in the original definition domain of the problem function to be solved to obtain a solution to the problem function to be solved.

[0007] Optionally, the sub-problem function is a first problem function, and the number of range bits of the first problem function is equal to the number of original range bits of the problem function to be solved.

[0008] Optionally, the step of constructing a sub-problem function corresponding to each computing node based on the number of domain qubits of each computing node, the original domain and the original range of the problem function to be solved includes: Constructing a first problem function corresponding to each computing node based on the number of domain qubits of each computing node, the original domain of the problem function to be solved, and the original range; the number of range bits of the first problem function is equal to the number of original range bits of the problem function to be solved; Based on each first problem function, a sub-problem function is constructed whose number of value range bits is less than the number of bits of the original value range of the problem function to be solved, wherein the domain of the sub-problem function is the same as the domain of the first problem function, and each first dependent variable value in the value range of the first problem function is mapped to a sub-dependent variable value whose number of bits is less than the number of bits of the original value range of the problem function to be solved.

[0009] Optionally, the number of domain bits of the first problem function is 1, and / or the number of range bits of the subproblem function is 1.

[0010] Optionally, the step of constructing a first problem function corresponding to each computing node based on the number of domain qubits of each computing node, the original domain and the original range of the problem function to be solved includes: According to the number of domain qubits of the computing node, determine the same number of first bits from the bits of the original domain of the problem function to be solved as the domain bits of the first problem function, and the remaining second bits as the second domain bits; Sequentially extracting the first digit value corresponding to each first independent variable value constituting the first problem function from each original independent variable value in the original definition domain, and all the first independent variable values ​​constitute the definition domain of the first problem function of the target computing node; Sequentially extract the second bit value from each original independent variable value in the original definition domain to form each second independent variable value, and all the second independent variable values ​​form the second definition domain; Combining each first independent variable value of the first problem function with each second independent variable value according to the order of their respective bits in the original definition domain to form the original independent variable value in the original definition domain; Acquire an original dependent variable value corresponding to the original independent variable value from the original value range of the problem function to be solved as a first original dependent variable value; A first original dependent variable value is determined from multiple first original dependent variable values ​​corresponding to each first independent variable value according to the same valuation function as the first dependent variable value corresponding to the first independent variable value, wherein the first dependent variable value corresponding to each first independent variable value constitutes the value range of the first problem function of the target computing node.

[0011] Optionally, the step of constructing a first problem function corresponding to each computing node based on the number of domain qubits of each computing node, the original domain and the original range of the problem function to be solved further includes: Sort all computing nodes; When the same number of first bits are determined from the bits of the original domain of the problem function to be solved as the domain bits of the first problem function according to the number of domain quantum bits of the computing nodes, the first bits with the same number as the domain quantum bits of each computing node are respectively cut out in the order from high to low or from low to high in the bits of the original domain according to the sorting of the computing nodes to obtain the domain bits of the first problem function corresponding to each computing node.

[0012] Optionally, the input quantum bits corresponding to each sub-problem function solving the quantum circuit include n j domain qubits and m j auxiliary qubits, where n j is the number of bits in the sub-problem function definition domain, which is smaller than the number of bits in the original definition domain of the problem function to be solved; the m j is the number of bits in the value range of the subproblem function, and the number of bits in the value range of the subproblem function is less than or equal to the number of bits in the original value range of the problem function to be solved; correspondingly, the step of running the subproblem function to solve the quantum circuit to obtain the corresponding solution to the subproblem to be solved includes: Preparation j domain qubits and mj The initial state of the auxiliary qubits; Based on the initial state n j domain qubits and m j The auxiliary qubits execute the subproblem function to solve the quantum circuit and measure n j The final state of the domain qubit; For j The final state of the domain qubits is calculated by tensor product to obtain n j The direct product state of the domain quantum bits is the solution to the subproblem to be solved; Among them, m j The final state of the auxiliary qubits is the same as the initial state before executing the subproblem function to solve the quantum circuit.

[0013] Optionally, the step of respectively running the sub-problem functions to solve the quantum circuit to obtain the solution to the sub-problem includes: running multiple sub-problem functions to solve the quantum circuit in a serial / parallel manner.

[0014] Optionally, when multiple sub-problem functions are run in series to solve quantum circuits, after running the previous sub-problem function to solve the quantum circuit, n times of the next sub-problem function to solve the quantum circuit are prepared. j The initial state of the domain quantum bit is defined, and the final state of the auxiliary quantum bit obtained by running the previous subproblem function to solve the quantum circuit is used as the initial state of the auxiliary quantum bit of the next subproblem function to solve the quantum circuit.

[0015] Optionally, the step of combining corresponding subproblem solutions according to a preset combination order of the definition domains of the subproblem functions in the original definition domain of the problem function to be solved to obtain a solution to the problem function to be solved includes: Tensor product calculations are performed on the solutions of each subproblem in turn according to the preset combination order of the definition domains of the subproblem functions in the original definition domain of the problem function to be solved, and the final direct product state of the quantum bits with the number of bits in the original definition domain corresponding to the calculation results is taken as the solution to the problem function to be solved.

[0016] In order to solve the above technical problems, according to another aspect of the present invention, the present invention further provides a distributed quantum computing device, the device comprising: A parameter acquisition module is configured to obtain the problem function to be solved, the number of computing nodes, and the number of domain qubits of each computing node, wherein the sum of the number of domain qubits of all computing nodes is equal to the number of original domain bits of the problem function to be solved; A subproblem function construction module is configured to construct a subproblem function corresponding to each computing node based on the number of domain qubits of each computing node, the original domain of the problem function to be solved, and the original range; the domains of all subproblem functions, when combined together in a preset combination order, constitute the original domain of the problem function to be solved, and each subproblem function includes a subproblem solution to be solved; A quantum circuit construction module configured to construct a sub-problem function solving quantum circuit corresponding to each computing node; An operation module is configured to send sub-problem function solution quantum circuits to corresponding quantum computing modules respectively, and receive measurement results returned by the quantum computing modules; The computing module is configured to calculate the measurement results returned by the quantum computing module based on the sub-problem function solution quantum circuit to obtain the solution to the sub-problem function of the corresponding sub-problem function; and to combine the corresponding sub-problem solutions in a preset combination order of the definition domain of the sub-problem function in the original definition domain of the problem function to be solved to obtain the solution to the problem function to be solved.

[0017] Optionally, the distributed quantum computing device also includes one or more quantum computing modules; when one quantum computing module is included, the running module sends multiple sub-problem function solving quantum circuits to the quantum computing module in a serial manner; when multiple quantum computing modules are included, the running module sends the constructed multiple sub-problem function solving quantum circuits to multiple quantum computing modules in a serial and / or parallel manner; each quantum computing module runs the sub-problem function solving quantum circuit of the corresponding computing node and sends the measurement result to the processing device.

[0018] According to another aspect of the present invention, the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores computer instructions, and the processor executes the aforementioned distributed quantum computing method when running the computer instructions.

[0019] According to another aspect of the present invention, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the aforementioned distributed quantum computing method is executed.

[0020] The present invention combines the concept of distributed computing with quantum algorithms, breaking down the task of solving complex and resource-intensive classical computing problems into a series of smaller and more manageable subtasks. These subtasks can be assigned to one or more quantum computing modules and processed in serial or parallel ways, thereby achieving efficient solutions to classical computing problems. While reducing the demand for quantum resources, the impact of line noise on the quantum state is significantly reduced due to the reduction in the number of quantum bits used, thereby improving quantum fidelity and further improving the computational accuracy of the solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The preferred embodiments of the present invention will be further described in detail below with reference to the accompanying drawings, wherein: Figure 1 is a flow chart of a distributed quantum computing method according to an embodiment of the present invention; Figure 2 is a flow chart of a method for constructing a sub-problem function corresponding to a computing node according to an embodiment of the present invention; Figure 3 is a flow chart of a method for constructing a first problem function corresponding to each computing node in order from high to low according to an embodiment of the present invention; Figure 4 is a schematic diagram of a known quantum circuit for a classical computing problem according to an embodiment of the present invention; Figure 5 is a flow chart of running a sub-problem function to solve a quantum circuit according to one embodiment of the present invention; Figure 6 is a schematic diagram of a quantum circuit for a problem to be solved according to an embodiment of the present invention; Figure 7 is a schematic diagram of a quantum circuit for a problem to be solved according to another embodiment of the present invention; Figure 8 is a quantum circuit diagram of a Deutsch problem function according to an embodiment of the present invention; Fig. 9 is a flow chart of a method for calculating a problem to be solved based on multiple computing nodes and quantum circuits thereof according to an embodiment of the present invention; Fig.10 is a schematic diagram of a quantum circuit for solving a search problem function according to the first application embodiment of the present invention; Fig.11 is a schematic diagram of a quantum circuit for solving a sub-problem function corresponding to a computing node according to the second application embodiment of the present invention; Fig.12 1 is a schematic diagram of a quantum circuit for solving a Simon problem function according to a second application example of the present invention; Fig.131 is a schematic diagram of a quantum circuit for solving a BV problem function according to the third application example of the present invention; Fig.14 is a principle block diagram of a distributed quantum computing device according to an embodiment of the present invention; Fig.15 is a principle block diagram of a distributed quantum computing device according to another embodiment of the present invention; Fig.16 is a principle block diagram of a distributed quantum computing device according to yet another embodiment of the present invention; Fig.17 It is a structural principle block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] In the following detailed description, reference may be made to the various specification drawings that are part of the present application and are used to illustrate specific embodiments of the present application. In the accompanying drawings, similar reference numerals describe substantially similar components in different figures. The various specific embodiments of the present application are described in sufficient detail below so that a person of ordinary skill in the art with relevant knowledge and skills in the art can implement the technical solutions of the present application. It should be understood that other embodiments may also be utilized or structural, logical or electrical changes may be made to the embodiments of the present application. In addition, the "first", "second", etc. in the names of the technical features of the present invention are not used to indicate sorting, but to distinguish different technical features of the same name.

[0024] In today's noisy intermediate-scale quantum (NISQ) era, the technical path to realize small-scale quantum processors is more feasible than building a large-scale general-purpose quantum computer. The concept of distributed quantum computing (DQC) is an innovative move that cleverly combines the essence of distributed systems with quantum information processing technology. The implementation of this architecture relies on carefully designed distributed quantum algorithms to ensure its effectiveness in practical applications.

[0025] See also Figure 1 , Figure 1 It is a flow chart of a distributed quantum computing method according to an embodiment of the present invention, which is used to solve a classical computing problem P. The Boolean function corresponding to the classical computing problem P in the present invention is represented by fp: {0,1} n →{0,1}m , n and m are natural numbers, {0,1} n It is called the domain of the function, n is the number of binary bits of the independent variable, referred to as the number of domain bits; {0,1} m is called the function range, m is the number of binary bits of the dependent variable, referred to as the range bit number. The method comprises the following steps: Step S1, obtain the problem function to be solved, the number of computing nodes and the number of domain quantum bits of each computing node. Among them, the computing node in the present invention can also be called a computing task that completes a problem solution. Multiple computing nodes are also multiple computing tasks. Multiple computing tasks can be implemented in a serial manner by a quantum computing module or in a parallel manner by multiple quantum computing modules. Each computing node includes at least a quantum bit corresponding to the domain of the problem function, which is referred to as the domain quantum bit of the computing node in the following description. Among them, the sum of the number of domain quantum bits of all computing nodes is equal to the number of original domain bits of the problem function to be solved.

[0026] Step S2, construct a subproblem function corresponding to each computing node. Specifically, a subproblem function corresponding to each computing node is constructed based on the number of domain qubits of each computing node and the original domain and original range of the problem function to be solved. The domain of each subproblem function is a subdomain of the original domain. The domain of each subproblem function has a unique position in the original domain. The domains of all subproblem functions form a preset combination in the original domain. The domains of all subproblem functions, when combined together in the preset combination order, form the original domain of the problem function to be solved. Each subproblem function includes a subproblem solution to be solved. For the convenience of description, the subproblem function is represented as g j : {0,1} nj →{0,1} mj ,in, , n j 、m j are natural numbers, which are the number of domain bits and the number of range bits of the subproblem function respectively, t is the number of computing nodes, and j is the sequence number of the computing node.

[0027] Step S3, constructing a sub-problem function corresponding to each computing node to solve the quantum circuit.

[0028] Step S4, respectively running the sub-problem functions to solve the quantum circuit to obtain the corresponding sub-problem solutions to be solved.

[0029] Step S5, combining the corresponding sub-problem solutions in the order of the positions of the definition domains of the sub-problem functions in the original definition domain of the problem function to be solved to obtain a solution to the problem function to be solved.

[0030] In step S1, the number of computing nodes is set to t, where the number of computing nodes t satisfies 2≤t≤n. Based on the number of qubits of each computing node, the number of qubits n that can be used in its domain is determined. j , where j represents the serial number of any computing node, j∈{0,1,…,t-1}. The sum of the number of domain qubits of all computing nodes is equal to the number of bits of the original domain of the problem function to be solved, that is, .

[0031] In one embodiment of step S2, the sub-problem function g j is the first problem function whose range bits are equal to the original range bits of the problem function to be solved, that is, m j = m. That is, the subproblem function g j The range of is a sub-range of the original range of the problem function to be solved. When constructing the first problem function corresponding to each computing node, see Figure 2 , Figure 2 is a flow chart of a method for constructing a first problem function corresponding to a computing node according to an embodiment of the present invention, comprising the following steps: Step S21, divide the original definition domain of the problem function to be solved to obtain a composite definition domain. Specifically, according to the number of domain qubits of the computing node, the same number of first bits are determined from the bits of the original definition domain of the problem function to be solved as the definition domain bits of the first problem function, and the remaining second bits are used as the bits of the second definition domain; the first bit value is sequentially extracted from each original independent variable value of the original definition domain to correspond to each first independent variable value of the first problem function, and all the first independent variable values ​​constitute the definition domain of the first problem function of the computing node; the second bit value is sequentially extracted from each original independent variable value of the original definition domain to correspond to each second independent variable value, and all the second independent variable values ​​constitute the second definition domain. Among them, when determining the definition domain bits of the first problem function from the original definition domain bits of the problem function to be solved, the first bit at any position in the original definition domain of the problem function to be solved can be used as the bit of the first definition domain of the first problem function, and the bits of the first definition domain of all the first problem functions corresponding to all the computing nodes are not repeated. The definition domain of each first problem function and the second definition domain constitute a composite definition domain.

[0032] Step S22, based on the composite domain, obtain the corresponding original dependent variable value from the original value domain of the problem function to be solved as the first original dependent variable value. Specifically, a first independent variable value of the first problem function is respectively combined with each second independent variable value according to the order of their respective bits in the original domain to form an original independent variable value in the original domain, and the corresponding original dependent variable value is obtained from the original value domain of the problem function to be solved as the first original dependent variable value.

[0033] Step S23, determining the value range of the first problem function. Specifically, determining a first original dependent variable value as the first dependent variable value corresponding to the first independent variable value from a plurality of first original dependent variable values ​​corresponding to each first independent variable value according to the same value function, wherein the first dependent variable value corresponding to each first independent variable value constitutes the value range of the first problem function of the computing node.

[0034] In step S22 of this embodiment, a composite domain is obtained by compounding the domain of the first problem function and the second domain. In one embodiment, the second domain serves as the first-level domain, and the domain of the first problem function is the second-level domain. Corresponding to the composite function of the composite domain, the dependent variable obtained based on each independent variable of the first-level domain is a sub-function based on the second-level domain. The number of sub-functions is determined by the number of bits of the independent variables in the first-level domain; with an independent variable value in the second-level domain, that is, a first independent variable value in the domain of the first problem function, a unique original dependent variable value can be determined from the original value domain through the sub-function, which is named the first original dependent variable value in the present invention.

[0035] For example, the jth compute node Note j As the target computing node, the number of domain qubits that can be used is expressed as n j . Then the domain of the corresponding first problem function is expressed as {0,1} nj , that is, the first independent variable bit of the first problem function has n j Since the original domain of the problem function to be solved is {0,1} n , that is, the original independent variable of the problem function to be solved has n bits in total, and the second independent variable in the second domain has n bits in total j Therefore, the value of the dependent variable obtained based on each value of the second independent variable in the second domain is a subfunction, and its number is 2 (n-nj) , each first independent variable value of the first problem function corresponds to 2 (n-nj) The first original dependent variable value.

[0036] In step S23, when a first original dependent variable value is determined from multiple first original dependent variable values ​​corresponding to each first independent variable value according to the same valuation function as the first dependent variable value corresponding to the first independent variable value, the valuation function used is adapted to the problem to be solved.

[0037] In addition, when the number of computing nodes t is greater than or equal to 2, when constructing the first problem function corresponding to t computing nodes, all the computing nodes can be sorted, and then according to the sorting of the computing nodes, the first bit with the same number of domain quantum bits as each computing node can be cut out in the bits of the original domain in order from high to low or from low to high to obtain the domain bits of the first problem function corresponding to each computing node.

[0038] For example, see Figure 3 , Figure 3 1 is a flow chart of a method for constructing a first problem function corresponding to each computing node in order from high to low according to an embodiment of the present invention, the method comprising the following steps: Step S201, determine parameters. The parameters include the number of domain bits n, the number of range bits m, the number of computing nodes and the number of quantum bits they support, and the number of quantum bits n of the domain of each computing node is determined based on these parameters. j , and sort the computing nodes. The computing node number is represented by the letter j, j∈{0,1,…,t-1}. Among them, the number of quantum bits used to define the domain of each computing node is n j satisfy , that is, the domain bits of the first problem function corresponding to each computing node correspond one-to-one to the quantum bits used by the computing node for the domain.

[0039] Step S202, constructing the first first problem function corresponding to the 0th computing node, that is, the case of j=0. The construction process of the first first problem function is as follows: Step S2021, divide the original definition domain of the problem function to be solved to obtain multiple sub-functions. Specifically, as shown in expression 1-1, after selecting binary bits to divide the problem function to be solved, thus obtaining the following sub-functions, namely .

[0040] 1-1 Among them, k represents the sequence number of the sub-function, ; , is an n j The binary number of bits, m krepresents the independent variable of the k-th sub-function, and is also the first independent variable of the first problem function corresponding to the j-th computation node; The second independent variable is composed of the remaining binary bits in the original domain except the domain bits of the first problem function of the jth computing node, which can also be used as the binary representation of k. second independent variable values, all the second independent variable values ​​constitute the second domain.

[0041] From the above expression, we can see that corresponding to the domain of the first problem function, the same first independent variable value is respectively The second independent variable value is combined to form The original independent variable value of the problem function to be solved is then determined from the original value range of the problem function to be solved. dependent variable values, for the sake of distinction, these dependent variable values ​​are called the first original dependent variable values.

[0042] Step S2022: Process the first original dependent variable value obtained based on multiple sub-functions through the value function Sp to obtain the first dependent variable of the first problem function, as shown in Expression 1-2.

[0043] in, 1-2 in, , is the first independent variable of the jth first problem function, f j,0 (m j ) etc. correspond to the first independent variable m j The first original dependent variable value of ; is the corresponding first dependent variable, thus obtaining the first problem function of the jth computing node .

[0044] Step S203: construct the first problem function corresponding to the jth computing node, that is, j∈{1,1,…,t-2}. As shown in Expression 1-3, select the first problem function from the original definition domain of the problem function to be solved. After The problem function to be solved is divided into bits, and the following is obtained sub-functions, namely .

[0045] 1-3 Among them, k represents the sequence number of the sub-function, ; , is an n j The binary number of bits, m k represents the independent variable of the k-th sub-function, and is also the first independent variable of the first problem function corresponding to the j-th computation node; , is the second independent variable consisting of the remaining binary bits in the original domain except the domain bits of the first problem function of the jth computing node, which can also be used as the binary representation of k. second independent variable values, all the second independent variable values ​​constitute the second domain.

[0046] From the above expression, we can see that corresponding to the domain of the first problem function, the same first independent variable value is respectively The second independent variable value is constructed The original independent variable value is obtained from the original value range. The first original dependent variable value.

[0047] Then, based on the value function Sp determined by the problem function to be solved, the first original dependent variable value obtained based on multiple sub-functions is processed to obtain the first dependent variable of the first problem function, as shown in Expression 1-4.

[0048] 1-4 in, , is the first independent variable value of the jth first problem function, etc. corresponds to the first independent variable m j The first original dependent variable value of ; is the corresponding first dependent variable, that is, the first problem function of the jth computing node is obtained .

[0049] Step S204: construct the first problem function corresponding to the last computing node, i.e., the case where j=t-1. For the last computing node, as shown in Expression 1-5, select the first problem function from the original definition domain of the problem function to be solved. binary bits to divide the problem function to be solved, and we get the following sub-functions, namely .

[0050] 1-5 Among them, k represents the sequence number of the sub-function, ; is a j The binary number of bits, m k represents the independent variable of the k-th sub-function, and is also the first independent variable of the first problem function corresponding to the j-th computation node; is the second independent variable consisting of the remaining binary bits in the original domain except the domain bits of the first problem function of the jth computing node, which can also be used as the binary representation of k. second independent variable values, all the second independent variable values ​​constitute the second domain.

[0051] From the above expression, we can see that corresponding to the domain of the first problem function, the same first independent variable value is respectively The second independent variable value is combined to form The original independent variable value of the problem function to be solved is then determined from the original value range of the problem function to be solved. The first original dependent variable value.

[0052] Then, the first original dependent variable value obtained based on the multiple sub-functions is processed by the value function Sp to obtain the first dependent variable of the first problem function, as shown in Expression 1-6.

[0053] 1-6 in, , is the first independent variable value of the jth first problem function, f j,0 (m j ) etc. correspond to the first independent variable m j The first original dependent variable value of ; is the corresponding first dependent variable, thus obtaining the first problem function of the jth computing node .

[0054] In this embodiment, the domain bit number n of the first problem function is j is any value less than the number of bits in the original domain, n, when n j When the value is 1, n first problem functions are obtained, and the number of quantum bits used for calculation in the corresponding computing node is 1. The corresponding sub-problem solution is obtained by running the corresponding quantum circuit n times. By increasing the number of runs, the demand for quantum bits for calculation can be minimized. The aforementioned value function Sp provides a composite technique, so that multiple first original dependent variable values ​​can be processed to obtain the first dependent variable of the first problem function.

[0055] In another embodiment of step S2, the sub-problem function g j The number of range bits is less than the number of original range bits of the problem function to be solved, that is, m j In this embodiment, firstly, based on the number of domain qubits of the computing node, the original domain of the problem function to be solved, and the original range, a first problem function is constructed, the number of range bits of which is equal to the number of original range bits of the problem function to be solved. The specific process is as described above. Figure 2As shown in it and its description, it will not be elaborated here. Then, according to the fact that the domain of the sub-problem function is the same as that of the first problem function, each first dependent variable value in the range of the first problem function is mapped to a sub-dependent variable value with a number of bits less than that of the original range of the problem function to be solved, thereby obtaining a sub-problem function with a number of bits in the range less than that of the original range of the problem function to be solved.

[0056] When mapping each first dependent variable value in the range of the first problem function to a sub-dependent variable value with a number of bits less than that of the original range of the problem function to be solved, first, determine the number of bits m of the sub-problem range according to the conditions that the number of bits in the range of the problem function to be solved needs to meet j , and m j < m, that is, the number of bits m of the sub-problem range j is less than the number of bits m of the original range of the problem function to be solved. Of course, if there is no requirement for the number of bits in the range of the problem function to be solved, a value less than m is randomly determined as m j .

[0057] Then, each first dependent variable value is sequentially mapped to a sub-dependent variable value, and the mapping needs to be carried out according to the relationship of the dependent variable values of the problem-solving function. For example, for the Simon problem function, there are two identical dependent variable values in its range. Therefore, during the mapping process, it is necessary to compare whether the two dependent variable values are the same. If they are the same, their mapping values are the same; if they are different, the mapping values are different.

[0058] In this embodiment, the above-mentioned range mapping reduces the number of auxiliary qubits corresponding to the range in the quantum circuit, and further reduces the requirement for the number of qubits.

[0059] In this embodiment, the number of bits m of the range of the sub-problem function g j is less than the number of bits m of the original range of the problem function to be solved, that is, m j < m. When the number of bits in the range is 1, the number of required auxiliary qubits reaches the minimum, thereby minimizing the requirement for the number of auxiliary qubits. j <m. When the number of bits in the range is 1, the number of required auxiliary qubits reaches the minimum, thereby minimizing the requirement for the number of auxiliary qubits.

[0060] In the present invention, the problem to be solved is a classical computing problem, and there is at least one known quantum algorithm for solving it. The quantum algorithm has at least one corresponding quantum circuit. Refer to Figure 4 , Figure 4 is a schematic diagram of a known quantum circuit for a classical computing problem according to an embodiment of the present invention. The quantum circuit needs to calculate qubits and auxiliary qubits. As shown in the figure, there are n domain qubits corresponding to the domain bits for calculation, and m auxiliary qubits corresponding to the range bits. Module The quantum algorithm used to implement the problem function to be solved is composed of a series of quantum gates. At the output of the quantum circuit, the final state direct product state corresponding to the n computational quantum bits for: , which corresponds to the solution of the classical computational problem, where Indicates the corresponding The quantum state of the computational qubits, and , the auxiliary bits fall back to the all-0 state.

[0061] The sub-problem function g in the present invention j The problem structure that satisfies the original classical computing problem function fp is just smaller in scale and uses fewer quantum bits, so the corresponding sub-problem function g j The quantum circuit structure of the classical computing problem function fp is the same as that of the quantum circuit of the classical computing problem function fp. Each sub-problem function g j The quantum circuit includes modules that implement the corresponding quantum algorithm , corresponding to n j The final direct product state of the computational qubit for: , which corresponds to the subproblem solution where Indicates the corresponding computational qubits, and , the auxiliary quantum bit falls back to the all-0 state.

[0062] See also Figure 5 , Figure 5 1 is a flow chart of running a subproblem function to solve a quantum circuit according to an embodiment of the present invention. The steps of running the subproblem function to solve the quantum circuit to obtain the corresponding solution to the subproblem to be solved include: Step S41, preparing n j domain qubits and m j In this embodiment, the initial state is the ground state 0.

[0063] Step S42, based on the initial state n j domain qubits and m j The auxiliary quantum bits execute the subproblem function to solve the quantum circuit. After the quantum circuit evolves, n j The final state of the domain quantum bit is either 0 or 1.

[0064] Step S43, for n j The final state of a domain qubit Do a tensor product to get n j Direct product states of domain qubits , the direct product state is the solution to the corresponding sub-problem.

[0065] Among them, m j The final state of the auxiliary quantum bit is the same as the initial state before executing the subproblem function to solve the quantum circuit, that is, it returns to the ground state 0.

[0066] Correspondingly, in step S5, tensor product calculations are performed on the respective sub-problem solutions in turn according to the preset combination order of the sub-problem function domains in the original domain of the problem function to be solved, and the final state direct product state of the n domain qubits corresponding to the calculation results is taken as the solution of the problem function to be solved. .Right now: .

[0067] See also Figure 6 , Figure 6 is a schematic diagram of a quantum circuit of a problem to be solved according to an embodiment of the present invention. In this embodiment, t sub-problem functions g are constructed based on the problem function to be solved. j , corresponding to t computing nodes, the sub-problem function g j The number of domain bits is n j , the number of range bits is m j , that is, the number of domain qubits used for calculation in the corresponding computing node is n j , the number of auxiliary qubits is m j This embodiment runs multiple sub-problem functions in a serial manner to solve the quantum circuit. Each sub-problem function g j The quantum circuit includes modules that implement the corresponding quantum algorithm , as shown in the figure to .based on Figure 3 and Figure 4 It can be seen that since the final state of the auxiliary quantum bit after the quantum circuit is evolved is the same as the initial state, when the previous sub-problem function is run to solve the quantum circuit, only the next sub-problem function is prepared to solve the quantum circuit. j The initial state of the domain quantum bit is determined by running the previous sub-problem function to solve the quantum circuit, and the final state of the auxiliary quantum bit obtained by running the previous sub-problem function to solve the quantum circuit is used as the initial state of the auxiliary quantum bit of the next sub-problem function to solve the quantum circuit.

[0068] By measuring each subproblem function, the final state of each computational qubit in the quantum circuit is solved. , after solving each sub-problem function, the final state of each computational quantum bit of the quantum circuit Perform tensor product calculation to obtain the subproblem solution of the subproblem solution ,like Figure 6As shown in , there are t computing nodes in total, and each computing node is used to implement a sub-problem function solution. Therefore, a total of t sub-problem solutions are obtained. , as shown in the figure to Then solve each sub-problem in turn. Perform tensor product calculation, that is: . Thus we get the solution of the problem function to be solved .

[0069] In addition, it can be known that the initial state of the auxiliary quantum bit of each sub-problem function solving the quantum circuit in this embodiment can also be the same as the initial state of the calculation quantum bit. Re-prepare before.

[0070] See also Figure 7 , Figure 7 is a schematic diagram of a quantum circuit for a problem to be solved according to another embodiment of the present invention. In this embodiment, t sub-problem functions g are constructed based on the problem to be solved. j , corresponding to t computing nodes, such as computing node 0 to computing node t-1 in the figure. Subproblem function g j The number of domain bits is n j , the number of value ranges is m, that is, the number of domain qubits used for calculation in the corresponding computing node is n j , the number of auxiliary quantum bits is m. This embodiment runs multiple sub-problem functions in parallel to solve the quantum circuit.

[0071] Solve each subproblem function to find the final state of each computational qubit in the quantum circuit Perform tensor product calculation to obtain the subproblem solution of the subproblem solution , and then solve each sub-problem in turn Perform tensor product calculation, that is: , thus obtaining the solution of the problem function to be solved .

[0072] The foregoing Figure 6 and Figure 7 The quantum circuit in the same way applies to the subproblem function g j The case where the number of domain bits is 1 and the number of range bits is 1.

[0073] In another embodiment of step S2, when constructing the sub-problem function g j When dividing the domain of the problem function to be solved, each bit is used as a sub-problem function domain bit, and the number of domain bits is made 1 by range mapping, so as to construct the sub-problem function g j: {0,1}→{0,1}. It is equivalent to the problem of judging whether a Boolean function is a balanced function or a constant function. The balanced function means that for two input strings, the corresponding output strings are different, one is 0 and the other is 1. The constant function means that for two input strings, the corresponding output strings are the same. Corresponding to the problem to be solved with the domain and range being 1 bit respectively, corresponding to the two independent variable values, if the dependent variable values ​​are 0 and 1 respectively, that is, the two dependent variable values ​​are different, then it is a balanced function. When the dependent variable values ​​are the same, either 0 or 1, then it is a constant function. Realize the judgment of a Boolean function g j The function that determines whether it is a balanced function or a constant function is called the Deutsch problem function.

[0074] See also Figure 8 , Figure 8 FIG. 1 is a schematic diagram of a quantum circuit of a Deutsch problem function according to an embodiment of the present invention. The quantum circuit of the Deutsch problem function acts on a quantum bit, wherein the module It is an Oracle (black box function, or query function) quantum circuit unit, which can realize the calculation of Deutsch problem function. Oracle can perform the following operations: , .

[0075] where the encoding function h is the phase of the input qubit j (y), therefore, in h j When (y)=0, the phase of the input quantum bit remains unchanged. j When (y)=1, the phase of the input quantum bit is flipped.

[0076] In this quantum circuit, the input quantum bit is initialized to obtain the initial state for: .

[0077] Generate superposition state using Hadamard gate for: .

[0078] The quantum state after passing through Oracle's quantum circuit unit for: .

[0079] If h j (y)=0, the phase remains unchanged. If h j When (y)=1, the phase is reversed.

[0080] The Hadamard gate is used to convert phase information into amplitude, and the quantum state obtained is for: .

[0081] The calculation results are: .

[0082] At this time, if the quantum bit is measured, the measurement result is , we can know that h j (y) is a constant function, if the measurement result is , we can know that h j (y) is the equilibrium function.

[0083] Therefore, this embodiment can use the quantum circuit of the Deutsch problem function to obtain the sub-problem solution of each sub-problem function. , and then solve each sub-problem in turn Perform tensor product calculation, that is: . Thus we get the solution of the problem function to be solved .

[0084] The present invention constructs a corresponding sub-problem function for each computing node through the processing of step S2, thereby reducing the number of quantum bits required for the computing node. In addition, the embodiment of the present invention can flexibly construct the corresponding sub-problem function according to the number of quantum bits provided by the existing quantum computing module, and can fully utilize the resources of the existing device.

[0085] For a specific classical computing problem P, there is a quantum algorithm (i.e., module ), and the output final state is a direct product state, the present invention proposes a distributed quantum computing method, which is based on the computing method as a model and is no longer limited by quantum resources. It can flexibly and efficiently solve the classical computing problem P based on the existing quantum resources, which meets the needs of the NISQ era.

[0086] Compared with the original quantum algorithm, the distributed quantum computing method provided by the present invention requires fewer quantum bits on a single computing node and is more likely to be implemented in physical experiments. In addition, due to the small number of quantum bits, the impact of line noise on the quantum state is also significantly reduced, thereby improving the quantum fidelity and further improving the computational accuracy of the solution.

[0087] The combination mode of quantum circuits used for calculation in the present invention is flexible and changeable. When the number of quantum bits is small, a serial calculation mode can be adopted. When the number of quantum bits is large, a parallel calculation mode can be adopted. A combination of series and parallel modes can also be adopted to improve the calculation efficiency while making full use of existing quantum resources.

[0088] Fig. 9 is a flow chart of a method for calculating a problem to be solved based on multiple computing nodes and their quantum circuits according to an embodiment of the present invention. Figure 6 The quantum circuit shown, the method comprises the following steps: Step S101, let j=0.

[0089] Step S102: Generate the sub-problem function of the jth computing node .

[0090] Step S103, constructing a corresponding quantum circuit based on each sub-problem function, wherein the modules in the quantum circuit The specific structure and the original quantum circuit module of the problem to be solved Similar.

[0091] Step S104, initializing the domain qubit and auxiliary qubit of the jth computing node to a base state. In one embodiment, the initialized base state is state.

[0092] Step S105, running the quantum circuit.

[0093] Step S106, measure the final state of the domain quantum bit and calculate the solution to the subproblem .

[0094] Step S107, determine whether j=t-1 is satisfied. If so, execute step S108. If not, in step S109, set j=j+1 and return to step S102.

[0095] Step S108: Solve the subproblems obtained by t computing nodes. , perform tensor product calculations in order, and the calculation results are the solutions to the problem function to be solved. . .

[0096] The above method of the present invention is exemplified below by using application examples.

[0097] Application Example 1 In this embodiment, the problem to be solved is a search problem, and its Boolean function is , that is, the number of domain bits is n, and the number of range bits is m=1, so only one auxiliary quantum bit is needed in its quantum circuit, and the solution process of the search problem function is as follows: First, construct the subproblem function g j The sub-problem function in this embodiment is ,in, , j is the computing node number, j=0,1,…,t-1. The number of quantum bits supported by the computing node is n j +1, the build process is as follows Figure 3 In this embodiment, the value function Sp is an OR function. For example, for the sub-problem function of the 0th node Each dependent variable value of is calculated by the OR function shown in the following expression 2-1: 2-1 Where m j ∈{0,1} nj , is the first independent variable of the subproblem function, f j,0 (m j ) etc. correspond to the first independent variable m j of This embodiment performs an OR operation on the multiple first original dependent variable values, and uses the OR operation result as the sub-dependent variable value of the sub-problem function.

[0098] Then build Fig.10 The quantum circuit shown in the figure is run to obtain the solution of each subproblem. .in, Fig.10 Schematic diagram of a quantum circuit for solving a search problem function according to the first application embodiment of the present invention.

[0099] Finally, perform tensor product calculations on all sub-problem solutions in order to obtain the solution to the search problem. : .

[0100] Application Example 2 In this embodiment, the problem to be solved is the Simon problem, and its corresponding Boolean function is , , the function satisfies the following properties: there is an unknown string , so that for all values ​​of the independent variable ,have , if and only if or ( In the process of solving the Simon problem function, the solution obtained by the method of the present invention is used as an intermediate value of the process of solving the Simon problem function. Multiple intermediate values ​​are obtained by running the quantum circuit multiple times, and then the final solution is obtained based on the multiple intermediate values. The specific process is as follows: First, construct the first problem function, and its construction process is as follows Figure 3 As shown. The value function is a maximum value function or a minimum value function. For example, the first problem function g of the jth node j Each first dependent variable value of is calculated by taking the maximum value function as shown in the following expression 2-2, where j=0.

[0101] 2-2 Where m j ∈{0,1} nj , is the first independent variable of the first problem function, f j,0 (m j ) etc. are the corresponding first independent variable m j of This embodiment performs a maximum value operation on multiple first original dependent variable values, and uses the operation result as the first dependent variable value of the first problem function, thereby obtaining the first problem function g j .

[0102] In this embodiment, for the first problem function g j The value range of is mapped to obtain a sub-problem function h whose number of bits is less than the number of bits of the original value range of the problem function to be solved j . Subproblem function h j The domain of the first problem function g j The domain of is the same, and the number of range bits is less than the number of bits of the original range of the problem function to be solved. For example, the mapping process is as follows: First, determine the number of range bits m j , for example m j =n j -1. Then, according to the first problem function g j The order of the first dependent variable values ​​is used to map the first dependent variable value to a binary number with all bit values ​​0. This binary number is the subproblem function h j The first sub-dependent variable value of . When the current first dependent variable value is different from the previous first dependent variable value, the mapped current sub-dependent variable value is added 1 to the lowest bit of the previous sub-dependent variable value. If the current first dependent variable value is the same as the previous first dependent variable value, the mapped current sub-dependent variable value is the same as the previous sub-dependent variable value. A mapping relationship is shown in Table 1 below, where m=4, n j =4,mj =4-1=3.

[0103] Table 1

[0104] The aforementioned mapping process starts from the minimum value of the binary number, and realizes the incremental mapping by adding 1 to the lowest bit, and the incremental value realized is a positive number, that is, the binary number 1 with the same number of bits. For example, in the aforementioned Table 1, the second second dependent variable value 000 is increased by 001 to obtain the third second dependent variable value 001, and the fourth second dependent variable value 001 is increased by 001 to obtain the fifth second dependent variable value 010. However, it can be known that the incremental value can be other binary numbers that meet the conditions besides the binary number 001. The satisfying conditions described here are, for example, that the value range after mapping meets the Simon problem function.

[0105] In addition, the aforementioned mapping process may also start from the maximum value, that is, start from the bit value of all 1, and the increment value at this time is a negative number, such as -001, thereby realizing a decreasing mapping.

[0106] In another embodiment, when mapping each first dependent variable value in the value domain of the first problem function to a sub-dependent variable value of a sub-problem function whose number of bits is less than the number of bits of the original value domain of the problem function to be solved, each first dependent variable value is first mapped to a decimal value in turn, and in the mapping process, the same first dependent variable value is mapped to the same decimal value; then, according to the determined number of bits in the value domain of the sub-problem function, each decimal value is converted into a corresponding binary value in turn, and the binary value is the sub-dependent variable value. For example, according to the order of the first dependent variable values, the mapping starts from the decimal value 0, that is, the first first dependent variable value is mapped to 0. When the current first dependent variable value is different from the previous first dependent variable value, the mapped current decimal value is the previous decimal value plus 1. If the current first dependent variable value is the same as the previous first dependent variable value, the mapped current decimal value is the same as the previous decimal number, as shown in the following Table 2 for a mapping relationship, where n j =4, m j =4-1=3.

[0107] Table 2

[0108] Then, according to the determined number of bits in the sub-problem function value range, each decimal value is converted into the corresponding binary value in turn, as shown in Table 3.

[0109] Table 3

[0110] In the above embodiment, the first decimal value is 0, and the next different decimal value is an increment of 1 to the previous decimal value. However, it can be known that the increment value can be any value that satisfies the value range of the function of the problem to be solved. This embodiment starts from the minimum value 0 when mapping to decimal values, and the increment value is a positive number, thereby realizing an incremental mapping. Of course, it can also start from a maximum decimal value and set the increment value to a negative number, for example, according to the number of bits m in the second value range j , set the first decimal value to 2 mj -1, the increment value is -1. As in the above embodiment, m j =3, then the first value is 2 3 -1=7, so the mapped decimal values ​​are 7 to 0 respectively.

[0111] Then construct the quantum circuit of each sub-problem function, such as Fig.11 shown. Fig.11 1 is a schematic diagram of a quantum circuit for solving a subproblem function corresponding to a computing node according to the second application embodiment of the present invention. The quantum bits required by the computing node include n corresponding to the domain of the subproblem function. j qubits and corresponding to the range m j qubits, of which the module Bh j The quantum circuit unit that can realize the Oracle (black box function, or query function) of the subproblem function can realize The quantum circuit unit is the same as the quantum circuit unit used by Daniel Simon to solve the Simon problem by quantum computing. A person skilled in the art can know it based on common sense in the industry or by referring to relevant literature, and will not be described in detail here.

[0112] A quantum circuit that runs all subproblem functions in parallel, such as Fig.12 As shown, Fig.12 Schematic diagram of the quantum circuit for solving the Simon problem function according to the second application example of the present invention. The quantum circuit corresponding to each sub-problem function is run once, and the quantum state after the run is measured to obtain a measurement value, which is used as an intermediate result. For a domain with a quantum bit number of n j The computing nodes are l =n j -1 run, get n j -1 measurement value. Based on n j -1 measurement value constructs a system of equations, and a local solution can be obtained by solving the system of equations.

[0113] The solution of the Simon problem function to be solved is obtained by combining the corresponding local solutions in the order of the positions of the definition domains of the sub-problem functions in the definition domain of the Simon problem to be solved.

[0114] In this embodiment, the number of auxiliary quantum bits is reduced by range mapping, thereby further reducing the number of quantum bits used.

[0115] Application Example 3 In this embodiment, the problem to be solved is the Bernstein-Vazirani problem (hereinafter referred to as the BV problem). For a Boolean function , there exists s∈{0,1} n So that the function fs relationship shown in the following expression 2-3 holds true: 2-3 Where x∈{0,1} n s is the string to be solved, i.e., the final solution of this application embodiment. The solution process of the BV problem is as follows: First, construct the subproblem function g j Among them, t sub-problem functions are generated according to the number of computing nodes t and the problem function to be solved fs , where m j ∈{0,1} nj , , j is the computing node number, j=0,1,…,t-1. Sn j is a substring, which is a component of the string s to be found. The construction process is as follows Figure 3 As shown, no further description is given here.

[0116] Then construct the quantum circuit corresponding to each computing node, such as Fig.13 As shown, Fig.13 Schematic diagram of quantum circuit for solving BV problem function according to the third application example of the present invention. The quantum circuit is composed of t subcircuits, each subcircuit corresponds to a computing node, and the module Ofs in each computing node nj (m j ) implements the calculation shown in the following expression 2-4: 2-4 .

[0117] After running the quantum circuit, the quantum state is obtained , and then through the ground state The measurement of the substring Sn j .

[0118] Finally, combine all substrings Sn in orderj , get the string s to be found. Where s=Sn0Sn1…Sn j …Sn t-1 .

[0119] In another aspect, the invention provides a distributed quantum computing device. Fig.14 , Fig.14 1 is a block diagram of a distributed quantum computing device according to an embodiment of the present invention. The distributed quantum computing device (hereinafter referred to as computing device) 10 of this embodiment is used to solve a classical computing problem P. The classical computing problem function is , wherein n and m are natural numbers, which are the number of domain bits and the number of range bits of the classical computing problem function, respectively. In this embodiment, the computing device 10 includes a parameter acquisition module 1, a sub-problem function construction module 2, a quantum circuit construction module 3, an operation module 4 and a computing module 5, wherein the parameter acquisition module 1 is used to obtain the problem function to be solved, the number of computing nodes and the number of domain quantum bits of each computing node, wherein the sum of the number of domain quantum bits of all computing nodes is equal to the number of original domain bits of the problem function to be solved. The sub-problem function construction module 2 is connected to the parameter acquisition module 1, and a sub-problem function corresponding to each computing node is constructed based on the number of domain quantum bits of each computing node, the original domain of the problem function to be solved and the original range; the domains of all sub-problem functions are combined together according to a preset combination order to form the original domain of the problem function to be solved, and each sub-problem function includes a sub-problem solution to be solved. For details, please refer to the aforementioned method description, which will not be repeated here. The quantum circuit construction module 3 is connected to the sub-problem function construction module 2 to construct a sub-problem function solving quantum circuit corresponding to each computing node. The operation module 4 is connected to the quantum circuit construction module 3 to send the sub-problem function solving quantum circuits to the corresponding quantum computing modules respectively, and receive the measurement results returned by the quantum computing modules. The computing module 5 is connected to the operation module 4, and based on the measurement results returned by the quantum computing module running the sub-problem function solving quantum circuit, the corresponding sub-problem solution to be solved is calculated; the corresponding sub-problem solution to be solved is combined according to the preset combination order of the definition domain of the sub-problem function in the original definition domain of the problem function to be solved to obtain the solution of the problem function to be solved.

[0120] See also Fig.15 , Fig.15It is a principle block diagram of a distributed quantum computing device according to another embodiment of the present invention. The computing device 10 in this embodiment also includes a quantum computing module 6. In this embodiment, the sub-problem function construction module 2 constructs multiple sub-problem functions according to the number of quantum bits supported by the quantum computing module 6. Correspondingly, the quantum circuit construction module 3 constructs a solution quantum circuit corresponding to each sub-problem function, and the operation module 4 sends the solution quantum circuit to the quantum computing module 6 in a serial manner. The quantum computing module 6 runs the solution quantum circuit in sequence and sends the measurement result to the operation module 4. The operation module 4 sends the measurement result to the computing module 5. The computing module 5 obtains the corresponding solution to the sub-problem based on the received measurement result, and then combines the solution to the sub-problem corresponding to all the sub-problem functions to obtain the solution to the problem function to be solved. According to this embodiment, a quantum computing module 6 with fewer quantum bits can solve classical computing problems that previously required a large number of quantum bits.

[0121] See also Fig.16 , Fig.16 : is a block diagram of the principle of a distributed quantum computing device according to another embodiment of the present invention. The computing device 10 in this embodiment includes multiple quantum computing modules, such as the first quantum computing module 71, the second quantum computing module 72, and the t-th quantum computing module 7t. The processing device 10 is connected to each quantum computing module respectively. In one embodiment, the processing device 10 constructs multiple corresponding sub-problem functions and corresponding solution quantum circuits according to the number of quantum bits supported by each quantum computing module, and sends the solution quantum circuits to the corresponding quantum computing modules in a parallel manner. Each quantum computing module runs the corresponding solution quantum circuit and sends the measurement result to the processing device 10. The processing device 10 obtains the solution of the problem function to be solved after processing. In this embodiment, multiple quantum computing modules run their respective solution quantum circuits in parallel, which effectively improves the processing efficiency. Of course, if it is impossible to complete the processing at one time based on the resources of the current multiple quantum computing modules, one or more of the quantum computing modules can also be used to run multiple sub-problem function solution quantum circuits in a serial manner in a time-sharing manner.

[0122] in, Fig.14 The processing device 10 in the embodiment can be implemented by a classical computing device, and the aforementioned quantum computing module 6 and the like can be a quantum simulator implemented by a classical computing device, or a quantum real machine.

[0123] On the other hand, an embodiment of the present invention further provides an electronic device, see Fig.17 , Fig.17 is a block diagram of the structure principle of an electronic device according to an embodiment of the present invention. Fig.17As shown, the electronic device includes a processor and a memory, wherein the memory stores computer instructions, and when the processor runs the computer instructions, the distributed quantum computing method provided by the present invention is executed.

[0124] Specifically, the processor 601 may include a central processing unit (CPU) or a graphics processing unit (GPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of an embodiment of the present invention. The memory 602 may include a memory for data or instructions. For example, the memory 602 may be at least one of the following: a hard disk drive (HDD), a read-only memory (ROM), a random access memory (RAM), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, a universal serial bus (USB) drive, or other physical / tangible memory storage device. For another example, the memory 602 includes a removable or non-removable (or fixed) medium. For another example, the memory 602 may be inside or outside the integrated gateway disaster recovery device. The memory 602 may be a non-volatile solid-state memory. In other words, the memory 602 generally includes a tangible (non-transitory) computer-readable storage medium (such as a memory device) encoded with executable instructions, wherein the stored executable instructions are executed by the processor 601 (such as executed by one or more processors), and the distributed quantum computing method in the embodiment of the present invention can be implemented.

[0125] In one example, Fig.17 The electronic device shown may also include a communication interface 603 and a bus 610. The processor 601, the memory 602, and the communication interface 603 are connected and communicate with each other via the bus 610. The communication interface 603 is mainly used to implement communication between modules, devices, units, and / or devices in the electronic device.

[0126] The bus 610 includes hardware, software or both, and can couple the components of the online data traffic billing device to each other. For example, the bus may include at least one of the following: an accelerated graphics port (AGP) or other graphics bus, an enhanced industrial standard architecture (EISA) bus, a front-side bus (FSB), a hypertransport (HT) interconnect, an industrial standard architecture (ISA) bus, an infinite bandwidth interconnect, a low pin count (LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable bus. The bus 610 may include one or more buses. Although the embodiments of the present invention describe or show a specific bus, the embodiments of the present invention may consider any suitable bus or interconnection method.

[0127] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the aforementioned distributed quantum computing method is implemented. The computer-readable storage medium is, for example, a classical computer-readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device, or a storage medium for storing quantum information and readable by a quantum computer, such as a quantum random access memory (QRAM). QRAM can be regarded as a quantum version of RAM in a classical computer. Through QRAM, a quantum superposition state containing information can be created. Compared with RAM, which needs to be read one by one, superimposed data can be read with superimposed addresses. QRAM can be implemented in physical ways such as optics, semiconductor quantum dots, superconducting circuits, and ion traps.

[0128] The flowchart and / or block diagram of the method and system of the embodiment of the present invention are described above by way of example, and various aspects of the related aspects are described. It should be understood that each box or combination thereof in the flowchart and / or block diagram can be implemented by computer program instructions, or by dedicated hardware that performs a specified function or action, or by a combination of dedicated hardware and computer instructions. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc.; when implemented in software, it is a program or code segment used to perform the required task. The program or code segment can be stored in a memory, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0129] The above embodiments are only used to illustrate the present invention, but not to limit the present invention. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the scope of the present invention. Therefore, all equivalent technical solutions should also fall within the scope of the present invention.

Claims

1. A distributed quantum computing method, characterized in that: The method comprises: Obtain the problem function to be solved, the number of computing nodes, and the number of domain qubits of each computing node, wherein the sum of the number of domain qubits of all computing nodes is equal to the number of original domain bits of the problem function to be solved; Constructing a subproblem function corresponding to each computing node based on the number of domain qubits of each computing node, the original domain of the problem function to be solved, and the original range, wherein the original domain of the problem function to be solved includes the domains of all subproblem functions combined in a preset combination order, and each subproblem function includes a subproblem solution to be solved; Construct a sub-problem function corresponding to each computing node to solve the quantum circuit; Run the subproblem function to solve the quantum circuit to obtain the solution to the subproblem; The corresponding sub-problem solutions are combined in a preset combination order of the sub-problem function definition domains in the original definition domain of the problem function to be solved to obtain a solution to the problem function to be solved.

2. The distributed quantum computing method according to claim 1, characterized in that: The sub-problem function is a first problem function, and the number of bits in the value range of the first problem function is equal to the number of bits in the original value range of the problem function to be solved.

3. The distributed quantum computing method according to claim 1, characterized in that: The steps of constructing a sub-problem function corresponding to each computing node based on the number of domain qubits of each computing node, the original domain of the problem function to be solved, and the original range include: Constructing a first problem function corresponding to each computing node based on the number of domain qubits of each computing node, the original domain and the original range of the problem function to be solved, wherein the number of range bits of the first problem function is equal to the number of original range bits of the problem function to be solved; Based on each first problem function, a sub-problem function is constructed whose number of value range bits is less than the number of bits of the original value range of the problem function to be solved, wherein the domain of the sub-problem function is the same as the domain of the first problem function, and each first dependent variable value in the value range of the first problem function is mapped to a sub-dependent variable value whose number of bits is less than the number of bits of the original value range of the problem function to be solved.

4. The distributed quantum computing method according to claim 3, characterized in that: The number of domain bits of the first problem function is 1, and / or the number of range bits of the subproblem function is 1.

5. The distributed quantum computing method according to claim 2, 3 or 4, characterized in that: The step of constructing a first problem function corresponding to each computing node based on the number of domain qubits of each computing node, the original domain of the problem function to be solved, and the original range includes: According to the number of domain qubits of the computing node, determine the same number of first bits from the bits of the original domain of the problem function to be solved as the domain bits of the first problem function, and the remaining second bits as the second domain bits; Sequentially extracting the first digit value from each original independent variable value in the original definition domain to correspond to each first independent variable value constituting the first problem function, and all the first independent variable values ​​constitute the definition domain of the first problem function of the computing node; Sequentially extract the second bit value from each original independent variable value in the original definition domain to form the second independent variable value, and all the second independent variable values ​​form the second definition domain; Combining each first independent variable value of the first problem function with each second independent variable value according to the order of their respective bits in the original definition domain to form the original independent variable value in the original definition domain; Acquire an original dependent variable value corresponding to the original independent variable value from the original value range of the problem function to be solved as a first original dependent variable value; A first original dependent variable value is determined from multiple first original dependent variable values ​​corresponding to each first independent variable value according to the same valuation function as the first dependent variable value corresponding to the first independent variable value, wherein the first dependent variable value corresponding to each first independent variable value constitutes the value range of the first problem function of the computing node.

6. The distributed quantum computing method according to claim 5, characterized in that: The step of constructing a first problem function corresponding to each computing node based on the number of domain qubits of each computing node, the original domain of the problem function to be solved, and the original range further includes: Sort all computing nodes; When the same number of first bits are determined from the bits of the original domain of the problem function to be solved as the domain bits of the first problem function according to the number of domain quantum bits of the computing nodes, the first bits with the same number as the domain quantum bits of each computing node are respectively cut out in the order from high to low or from low to high in the bits of the original domain according to the sorting of the computing nodes to obtain the domain bits of the first problem function corresponding to each computing node.

7. The distributed quantum computing method according to claim 1, characterized in that: The input quantum bits of each sub-problem function to solve the quantum circuit include n j domain qubits and m j auxiliary qubits, where n j is the number of bits in the sub-problem function definition domain, which is smaller than the number of bits in the original definition domain of the problem function to be solved; the m j is the number of bits in the value range of the subproblem function, and the number of bits in the value range of the subproblem function is less than or equal to the number of bits in the original value range of the problem function to be solved; correspondingly, the step of running the subproblem function to solve the quantum circuit to obtain the solution to the subproblem to be solved includes: Preparation j domain qubits and m j The initial state of the auxiliary qubits; Based on the initial state n j domain qubits and m j The auxiliary qubits execute the subproblem function to solve the quantum circuit and measure n j The final state of the domain qubit; For j The final state of the domain qubits is calculated by tensor product to obtain n j The direct product state of the domain quantum bits is the solution to the subproblem to be solved; Among them, m j The final state of the auxiliary qubits is the same as the initial state before executing the subproblem function to solve the quantum circuit.

8. The distributed quantum computing method according to claim 7, characterized in that: The step of running a subproblem function to solve a quantum circuit to obtain a solution to a subproblem to be obtained includes: running multiple subproblem functions in a serial / parallel manner to solve the quantum circuit.

9. The distributed quantum computing method according to claim 8, characterized in that: The step of running multiple sub-problem functions in a serial manner to solve the quantum circuit includes: after running the previous sub-problem function to solve the quantum circuit, preparing the next sub-problem function to solve the quantum circuit j The initial state of the domain quantum bit is defined, and the final state of the auxiliary quantum bit obtained by running the previous subproblem function to solve the quantum circuit is used as the initial state of the auxiliary quantum bit of the next subproblem function to solve the quantum circuit.

10. The distributed quantum computing method according to claim 1, characterized in that: The step of combining the corresponding sub-problem solutions according to the preset combination order of the definition domain of the sub-problem function in the original definition domain of the problem function to be solved to obtain the solution of the problem function to be solved includes: Tensor product calculations are performed on the solutions of each subproblem in turn according to the preset combination order of the definition domains of the subproblem functions in the original definition domain of the problem function to be solved, and the final direct product state of the quantum bits with the number of bits in the original definition domain corresponding to the calculation results is taken as the solution to the problem function to be solved.

11. A distributed quantum computing device, characterized in that: The device comprises: A parameter acquisition module is configured to obtain the problem function to be solved, the number of computing nodes, and the number of domain qubits of each computing node, wherein the sum of the number of domain qubits of all computing nodes is equal to the number of original domain bits of the problem function to be solved; A subproblem function construction module is configured to construct a subproblem function corresponding to each computing node based on the number of domain qubits of each computing node, the original domain of the problem function to be solved, and the original range, wherein the original domain of the problem function to be solved includes the domains of all subproblem functions combined together in a preset combination order, and each subproblem function includes a subproblem solution to be solved; A quantum circuit construction module configured to construct a sub-problem function solving quantum circuit corresponding to each computing node; An operation module is configured to send sub-problem function solution quantum circuits to corresponding quantum computing modules respectively, and receive measurement results returned by the quantum computing modules; The computing module is configured to calculate the measurement results returned by the quantum computing module based on the sub-problem function solving quantum circuit to obtain the sub-problem solution to be solved of the corresponding sub-problem function; and to combine the corresponding sub-problem solutions according to the preset combination order of the sub-problem function definition domain in the original definition domain of the problem function to be solved to obtain the solution of the problem function to be solved.

12. The distributed quantum computing device according to claim 11, characterized in that: The method comprises one or more quantum computing modules; when one quantum computing module is included, the operation module sends multiple sub-problem function solution quantum circuits to the quantum computing module in a serial manner; when multiple quantum computing modules are included, the operation module sends multiple sub-problem function solution quantum circuits to multiple quantum computing modules in a serial and / or parallel manner; Each quantum computing module runs the sub-problem function of the corresponding computing node to solve the quantum circuit and sends the measurement result to the operation module.

13. An electronic device comprising a processor and a memory, characterized in that: The memory stores computer instructions, and when the processor runs the computer instructions, it executes the distributed quantum computing method as described in any one of claims 1 to 10.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the distributed quantum computing method according to any one of claims 1 to 10 is executed.

Citation Information

Patent Citations

  • Quantum computer quantum processing unit, quantum circuit and quantum circuit quantum algorithm

    CN110490327A

  • Vehicle path optimization method and device based on quantum algorithm, equipment and medium

    CN117291323A

  • Distributed multi-target quantum search method and device, medium and equipment

    CN118014095A

  • Data classification method and device based on distributed quantum computing, equipment and medium

    CN118917431A

  • Quantum computing method, device and equipment for unit commitment optimization and medium

    CN118966371A