Distributed quantum computing method and device for Simon problem, equipment and medium
By splitting the Simon problem into multiple sub-problems and processing them in parallel on multiple computing nodes, the existing Simon algorithm requires a large number of qubits when solving the Simon problem, achieving a more efficient and economical computing process.
Patent Information
- Application Number
- CN202510281391.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-03-11
AI Technical Summary
The existing Simon algorithm requires a large number of qubits when solving the Simon problem, resulting in high computing costs, low computing efficiency and limited quantum fidelity.
A distributed quantum computing method is proposed to split the original Simon problem into multiple sub-Simon problems and process it in parallel on multiple computing nodes. The number of qubits of the sub-Simon problem processed by each computing node is reduced, thereby reducing the overall quantum resource demand.
Through distributed processing, the computing cost is reduced, the computing efficiency and quantum fidelity are improved, and more efficient Simon problem solving is achieved.
Smart Images

Figure CN119808977A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum computing technology, and in particular to a distributed quantum computing method, apparatus, device and medium for Simon problem. 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 to solve with traditional algorithms. 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] So far, researchers have developed a series of quantum algorithms and achieved remarkable results in many fields. Among them, the Simon algorithm not only promoted the development of Fourier transform algorithms based on quantum computing, but also laid the foundation for the famous Shor algorithm. With the advantage of quantum parallelism, the Shor algorithm can theoretically efficiently decompose large integers in polynomial time, which has brought disruptive changes to the field of cryptography. The Simon algorithm has also shown great potential in solving practical problems, especially in cryptography and coding. For example, the Simon algorithm can effectively crack encryption schemes based on Simon functions.
[0004] The Simon algorithm was proposed by Daniel Simon in 1994 to solve a specific problem, namely, to determine whether a black box function is a one-to-one function or a two-to-one function and find the corresponding binary string. Specifically, given a Boolean function ,in , is the range of values that the independent variable can take, called the domain. is the range of the dependent variable value, called the range. This 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 ( represents modulo 2 addition, or XOR operation).
[0005] The goal of solving the Simon problem is to determine the string s based on the given domain and range. Currently, there are two main methods to solve the Simon problem: one is the classical algorithm, and the other is the Simon algorithm proposed by Daniel Simon based on quantum computing. The query complexity of using the classical algorithm to solve the Simon problem is O(2n ), the query complexity of using the Simon algorithm to solve the Simon problem is O(n). Compared with the classical computing method, the computing speed of the existing Simon algorithm is exponentially accelerated.
[0006] However, when the domain and range of the Simon problem are given, the number of quantum bits required to solve the Simon problem using the existing Simon algorithm is n+m. When n and m are large, the number of quantum bits required will increase significantly, which means that a large-scale general-purpose quantum computer is needed to complete the calculation. For today's quantum technology, the use of large-scale general-purpose quantum computers to solve the Simon problem will face many problems. First, building and running such computers requires a lot of financial support; second, the computing efficiency is low, because the increase in the number of quantum bits will lead to a significant increase in the depth and complexity of the quantum circuit, thereby slowing down the calculation speed; in addition, quantum fidelity will be limited, and quantum bits are susceptible to noise and errors during operation, which will have a large negative impact on the accuracy of the calculation. Summary of the invention
[0007] In view of the technical problems existing in the prior art, the present invention proposes a distributed quantum computing method, device, equipment and medium for the Simon problem, which reduces the computing cost and improves the solution accuracy and computing efficiency.
[0008] In order to solve the technical problems in the prior art, according to one aspect of the present invention, the present invention proposes a distributed quantum computing method for the Simon problem, comprising the following steps: Obtain the Simon 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 binary bits of the original domain of the Simon problem function to be solved; Constructing a sub-Simon problem function corresponding to each computing node based on the number of domain qubits of each computing node and the original domain and range of the Simon problem function to be solved, wherein the original domain of the Simon problem function to be solved includes the domains of all sub-Simon problem functions combined together in a preset combination order, the range of each sub-Simon problem function is a subdomain of the original range of the Simon problem function to be solved, and each sub-Simon problem function includes a corresponding substring to be solved; Construct a sub-Simon problem function corresponding to each computing node to solve the quantum circuit; Run the sub-Simon problem functions separately to solve the quantum circuit to obtain the corresponding substrings to be solved; The substrings to be solved are combined in a preset combination order of the definition domains of the sub-Simon problem functions in the original definition domain of the Simon problem function to be solved to obtain the string to be solved of the Simon problem function to be solved.
[0009] Optionally, the step of constructing a sub-Simon problem function corresponding to each computing node includes: According to the number of domain qubits of the computing node, determine the same number of second bits from the bits of the original domain of the Simon problem function to be solved as the domain bits of the sub-Simon problem function, and the remaining bits as the first bits of the first domain; Sequentially extract the second bit value corresponding to each sub-independent variable value constituting the sub-Simon problem function from each original independent variable value in the original definition domain, and all the sub-independent variable values constitute the definition domain of the sub-Simon problem function of the computing node; Sequentially extract the first digit value from each original independent variable value in the original definition domain to form each first independent variable value, and all the first independent variable values form the first definition domain; Combine each sub-independent variable value of the sub-Simon problem function with each first independent variable value in the order of their respective bits in the original definition domain to form an 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 domain of the Simon problem function to be solved as the first dependent variable value; A first dependent variable value is determined from multiple first dependent variable values corresponding to each sub-independent variable value according to the same valuation function as the sub-dependent variable value corresponding to the sub-independent variable value, wherein the sub-dependent variable value corresponding to each sub-independent variable value constitutes the value range of the sub-Simon problem function of the computing node.
[0010] Optionally, the valuation function is a maximum value function or a minimum value function; correspondingly, a first dependent variable value with the largest or smallest numerical value is determined from multiple first dependent variable values corresponding to each sub-independent variable value as the sub-dependent variable value corresponding to the sub-independent variable value.
[0011] Optionally, when constructing the sub-Simon problem function corresponding to each computing node, the following steps are further included: Sort all computing nodes; When determining the same number of second bits from the bits of the original domain of the Simon problem function to be solved as the number of domain bits of the sub-Simon problem function according to the number of domain quantum bits of each computing node, the second bits with the same number as the domain quantum bits of each computing node are respectively cut out in the bits of the original domain according to the sorting of the computing nodes in the order from high to low or from low to high to obtain the domain bits of the sub-Simon problem function corresponding to each computing node.
[0012] Optionally, when the sub-Simon problem functions are respectively run to solve the quantum circuits to obtain the corresponding sub-strings to be obtained, the sub-Simon problem functions are run in a serial and / or parallel manner to solve the quantum circuits to solve the corresponding sub-Simon problem functions.
[0013] According to another aspect of the present invention, the present invention also proposes a distributed quantum computing device for Simon problem, comprising a parameter acquisition module, a sub-Simon problem function construction module, a quantum circuit construction module, an operation module and a computing module, wherein the parameter acquisition module is configured to acquire the Simon 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 binary bits of the original domain of the Simon problem function to be solved; the sub-Simon problem function construction module is configured to construct a sub-Simon problem function corresponding to each computing node based on the number of domain quantum bits of each computing node and the original domain and range of the Simon problem function to be solved, wherein the domains of all sub-Simon problem functions, when combined together in a preset combination order, constitute the Simon problem function to be solved. The original domain of the problem function, the value range of each sub-Simon problem function is a sub-domain of the original value range of the Simon problem function to be solved, and each sub-Simon problem function includes a corresponding sub-string to be solved; the quantum circuit construction module is configured to construct a sub-Simon problem function solving quantum circuit corresponding to each computing node; the running module is configured to send the sub-Simon problem function solving quantum circuit to the corresponding quantum computing module respectively, and receive the measurement result returned by the quantum computing module; the computing module is configured to calculate the corresponding sub-Simon problem function to be solved sub-string based on the measurement result returned by the quantum computing module running the sub-Simon problem function solving quantum circuit; the corresponding sub-string to be solved is combined according to the preset combination order of the domain of the sub-Simon problem function in the original domain of the Simon problem function to be solved to obtain the sub-string to be solved of the Simon problem function to be solved.
[0014] Optionally, the computing device further includes one or more quantum computing modules; when one quantum computing module is included, the running module sends the constructed multiple sub-Simon 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-Simon problem function solving quantum circuits to multiple quantum computing modules in a serial and / or parallel manner; each quantum computing module runs the sub-Simon problem function solving quantum circuit of the corresponding computing node, and sends the measurement result to the running module.
[0015] According to another aspect of the present invention, the present invention further proposes an electronic device, comprising a processor and a memory, wherein the memory stores computer instructions, and when the processor runs the computer instructions, the distributed quantum computing method for the Simon problem is executed.
[0016] According to another aspect of the present invention, the present invention further proposes 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 for the Simon problem is executed.
[0017] The present invention combines the concept of distributed computing with quantum algorithms, breaking down the complex and resource-intensive Simon problem 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 solution to the Simon problem. While reducing the demand for quantum resources and lowering computing costs, 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
[0018] 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 for Simon problem according to an embodiment of the present invention; Figure 2 is a flow chart of a method for constructing a sub-Simon problem function corresponding to a target computing node according to an embodiment of the present invention; Figure 3 is a schematic diagram of a quantum circuit for solving a sub-Simon problem function corresponding to a computing node according to an embodiment of the present invention; Figure 4 is a flow chart of a method for solving Simon problem based on multiple computing nodes and quantum circuits according to an embodiment of the present invention; Figure 5 is a schematic diagram of a quantum circuit for solving a problem when multiple computing nodes execute respective Simon problem functions in parallel according to an embodiment of the present invention; Figure 6 is a principle block diagram of a distributed quantum computing device for Simon problem according to an embodiment of the present invention; Figure 7 is a principle block diagram of a distributed quantum computing device for Simon problem according to another embodiment of the present invention; Figure 8 is a principle block diagram of a distributed quantum computing device for Simon problem according to yet another embodiment of the present invention; Fig. 9 It is a structural principle block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0019] 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.
[0020] 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 below in sufficient detail 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 used or structural, logical or electrical changes may be made to the embodiments of the present application.
[0021] In addition, the “first”, “second”, etc. in the names of the technical features of the present invention are not used to indicate order, but to distinguish different technical features with the same name.
[0022] 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.
[0023] See also Figure 1 , Figure 1 is a flow chart of a distributed quantum computing method for Simon problem according to an embodiment of the present invention. In the present invention, the Boolean function in the Simon problem to be solved is: , n is the number of binary bits of the original independent variable, referred to as the number of bits of the original domain, is called the original definition domain; m is the number of binary bits of the original dependent variable, referred to as the number of bits in the original range. , is called the original range; and satisfies: for all values of the independent variable ,have , if and only if or , s is the string to be requested, , the Boolean function in the aforementioned Simon problem to be solved is referred to as the Simon problem function to be solved. The distributed quantum computing method for the Simon problem of this embodiment includes the following steps: Step S1, obtaining the Simon 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 binary bits of the original domain of the Simon problem function to be solved.
[0024] Step S2, constructing a sub-Simon problem function corresponding to each computing node. The sub-Simon problem function corresponding to each computing node is constructed based on the number of domain qubits of each computing node and the original domain and range of the Simon problem function to be solved. The domains of all sub-Simon problem functions, when combined together in a preset combination order, constitute the original domain of the Simon problem function to be solved. The range of each sub-Simon problem function is a subdomain of the original range of the Simon problem function to be solved, and each sub-Simon problem function has a substring to be solved.
[0025] Step S3, constructing a sub-Simon problem function corresponding to each computing node to solve the quantum circuit.
[0026] Step S4, based on the computing nodes, respectively run the corresponding sub-Simon problem function to solve the quantum circuit to solve the corresponding sub-Simon problem function to obtain the corresponding sub-string to be solved.
[0027] Step S5, combining the corresponding sub-strings to be solved in accordance with the preset combination order of the domain of each sub-Simon problem function in the original domain of the Simon problem function to be solved to obtain the string s to be solved of the Simon problem function to be solved.
[0028] The computing node in the present invention can also be called a computing task that completes a solution to the Simon problem. Multiple computing nodes, that is, multiple computing tasks, can be implemented in a serial manner by one quantum computing module or in a parallel manner by multiple quantum computing modules.
[0029] 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 Simon problem to be solved, that is, Therefore, the total number of qubits per computing node is n j +m.
[0030] In step S2, when constructing the sub-Simon problem function corresponding to each computing node, see Figure 2 , Figure 2 1 is a flowchart of a method for constructing a sub-Simon problem function corresponding to a computing node according to an embodiment of the present invention, which includes the following steps: Step S21, dividing the original definition domain of the Simon problem function to be solved to obtain a composite definition domain. Specifically, according to the number of domain quantum bits of the target computing node, the same number of second bits are determined from the bits of the original domain of the Simon problem function to be solved as the domain bits of the sub-Simon problem function, and the remaining bits are used as the first bits of the first domain; the second bit values corresponding to each sub-independent variable value of the sub-Simon problem function are sequentially extracted from each original independent variable value of the original domain, and all the sub-independent variable values constitute the domain of the sub-Simon problem function of the target computing node; the first bit value is sequentially extracted from each original independent variable value of the original domain to correspond to each first independent variable value, and all the first independent variable values constitute the first domain; wherein, when determining the domain bits of the sub-Simon problem function from the original domain bits of the Simon problem function to be solved, bits can be extracted from any position in the original domain of the Simon problem function to be solved as the domain bits of the sub-Simon problem function, and the domain bits of all sub-Simon problem functions corresponding to all computing nodes are not repeated, and the domain of the sub-Simon problem function and the first sub-domain constitute a composite domain.
[0031] Step S22, based on the composite domain, the corresponding original dependent variable value is obtained from the original value domain of the Simon problem function to be solved as the first dependent variable value. Specifically, each sub-independent variable value in the domain of the sub-Simon problem function is respectively combined with each first independent variable value in the first sub-domain in the order 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 Simon problem function to be solved as the first dependent variable value.
[0032] Step S23, determining the value range of the sub-Simon problem function. Specifically, a first dependent variable value is determined from a plurality of first dependent variable values corresponding to each sub-independent variable value according to the same value function as the sub-dependent variable value corresponding to the sub-independent variable value, wherein the sub-dependent variable value corresponding to each sub-independent variable value constitutes the sub-value range of the sub-Simon problem function of the target computing node.
[0033] In step S22 of this embodiment, a composite domain is obtained by compounding the domain of the target sub-Simon problem function and the first sub-domain. In one embodiment, the first sub-domain is used as the first-level domain, and the domain of the target sub-Simon problem function is the second-level domain. In the composite function corresponding to the composite domain, the dependent variable value obtained based on each first independent variable value 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 binary bits of the first independent variable value in the first-level domain; with an independent variable value in the second-level domain, that is, a sub-independent variable value in the domain of the sub-Simon problem function, a unique original dependent variable value can be determined from the original value domain through the sub-function, which is named as the first dependent variable value in the present invention, and the total number of first dependent variable values is determined by the number of binary bits of the independent variable in the second-level domain and the number of sub-functions.
[0034] For example, the jth compute node Note j As the target computing node, the number of qubits available in its domain is represented by n j The domain of the corresponding target sub-Simon problem function is expressed as {0,1} nj , that is, the number of sub-independent variable bits of the target sub-Simon problem function is n j Since the original domain of the Simon problem function to be solved is {0,1} n , that is, the original independent variable of the function to be solved for the Simon problem has n bits in total, so the first independent variable in the first domain has n bits in total. j Therefore, the value of the dependent variable obtained based on each value of the first independent variable in the first domain is a subfunction, and its number is 2 (n-nj)The number of first dependent variable values calculated by all sub-functions is 2 nj •2 (n-nj) =2 n Each target sub-Simon problem function has a sub-variable value corresponding to 2 (n-nj) The value of the first dependent variable.
[0035] In step S23, the value function is a maximum value function or a minimum value function. Correspondingly, when constructing the value range of the sub-Simon problem function, in the 2 corresponding to a sub-independent variable value (n-nj) When a sub-dependent variable value as a sub-Simon problem function is determined from the first dependent variable values, the first dependent variable value with the largest or smallest dependent variable value is used as the sub-dependent variable value corresponding to the sub-independent variable value.
[0036] In addition, when the number of computing nodes t is greater than or equal to 2, when constructing the corresponding sub-Simon problem functions for t computing nodes, all computing nodes can be sorted, and then according to the sorting of the computing nodes, the second bits with the same number of domain quantum bits as each computing node can be split out in the bits of the original domain in order from high to low or from low to high, respectively, to obtain the domain bits of the sub-Simon problem function corresponding to each computing node.
[0037] For example, the method of constructing the sub-Simon problem function corresponding to each computing node in order from high to low is described as follows: First, corresponding to the Simon problem function to be solved, the number of binary bits in its domain is n, the number of binary bits in its range is m, and there are t computing nodes in total. After sorting them, the computing node sequence is represented by the letter j, j∈{0,1,…,t-1}. Among them, the number of quantum bits used for the domain of each computing node is n j ,satisfy , and j∈{0,1,…,t-1}, that is, the binary bits of the definition domain of the sub-Simon problem function corresponding to each computing node correspond one-to-one to the quantum bits used by the computing node for the definition domain.
[0038] For the 0th computing node, that is, j=0, the construction process of the sub-Simon problem function is as follows: After selecting from the original domain of the Simon problem function to be solved Binary bits are used to divide the Simon problem function to be solved, resulting in the following sub-functions, namely: .
[0039] ,
[0040] 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 sub-independent variable of the sub-Simon problem function corresponding to the j-th computation node; , is the remaining binary bits in the original domain except the domain bits of the sub-Simon problem function of the j-th computing node, with a total of bits, which constitute the first subdomain bit, and are also the binary representation of k.
[0041] From the above expression, we can see that corresponding to the definition domain of the sub-Simon problem function, the same sub-independent variable value corresponds to A sub-function can be combined with a determined sub-independent variable value and a determined first independent variable value of a sub-function to form an original independent variable value of the Simon problem function to be solved, so that a specific dependent variable value can be determined from the original value range of the Simon problem function to be solved. Therefore, a sub-independent variable value corresponding to the sub-Simon problem function can be determined from the original value range of the Simon problem function to be solved. For factorization, these dependent variable values are called the first dependent variable values.
[0042] Then, based on the maximum value formula: ,in , A specific independent variable value m corresponding to the sub-Simon problem function of the jth computation node j ,from The maximum value is taken from the first dependent variable values as the corresponding sub-dependent variable value, thus obtaining the sub-Simon problem function of the jth computing node .
[0043] For the jth node , select the previous After Binary bits are divided into the Simon problem function to be solved, and the following is obtained sub-functions, namely .
[0044] , 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 sub-independent variable of the sub-Simon problem function corresponding to the j-th computation node; , is the remaining binary bits in the original domain except the domain bits of the sub-Simon problem function of the j-th computing node, with a total of which constitute the first subdomain bits, which is also the binary representation of k.
[0045] From the above expression, we can see that corresponding to the definition domain of the sub-Simon problem function, the same sub-independent variable value corresponds to subfunctions, which can be obtained from the range of the Simon problem function to be solved The value of the first dependent variable.
[0046] Then, based on the maximum value formula:
[0047] in , corresponding to a specific sub-variable value m of the sub-Simon problem function of the jth computation node j ,from The maximum value of the first dependent variable values is taken as the corresponding sub-dependent variable value, thus obtaining the sub-Simon problem function of the jth computing node .
[0048] For the last compute node , select the previous binary bits to divide the Simon problem function to be solved, and we get the following sub-functions, namely .
[0049] ,
[0050] 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 sub-independent variable of the sub-Simon problem function corresponding to the j-th computation node; , is the remaining binary bits in the original domain except the domain bits of the sub-Simon problem function of the j-th computing node, and is also the binary representation of k.
[0051] From the above expression, we can see that corresponding to the definition domain of the sub-Simon problem function, the same sub-independent variable value corresponds to subfunctions, which can be obtained from the range of the Simon problem function to be solved The value of the first dependent variable.
[0052] Then, based on the maximum value formula: in , corresponding to an independent variable value m of the sub-Simon problem function of the jth computation node j ,from The maximum value of the first dependent variable values is taken as the corresponding sub-dependent variable value, thus obtaining the sub-Simon problem function of the jth computing node .
[0053] In addition, although the aforementioned scheme determines the maximum value from a plurality of first dependent variable values as the sub-dependent variable value, the minimum value may also be determined from a plurality of first dependent variable values as the sub-dependent variable value.
[0054] After the processing of the aforementioned step S2, a corresponding sub-Simon problem function is constructed for each computing node, which reduces the number of quantum bits required for the computing node. In addition, the embodiment of the present invention can flexibly construct the corresponding sub-Simon problem function according to the number of quantum bits provided by the existing quantum computing module, and can make full use of the resources of the existing device.
[0055] In step S3, the sub-Simon problem function corresponding to each computing node is constructed to solve the quantum circuit such as Figure 3 As shown, Figure 3 It is a schematic diagram of a quantum circuit for solving a sub-Simon problem function corresponding to a computing node according to an embodiment of the present invention.
[0056] The qubits required for a computing node include n corresponding to the domain of the sub-Simon problem function j qubits and m qubits corresponding to the value range, where the module In order to realize the quantum circuit unit corresponding to the Oracle (black box function, or query function) of the sub-Simon problem function, the Oracle can realize x and y are the two sub-variable values of the sub-Simon problem function, g j (x) is the value of the dependent variable of the sub-Simon problem function corresponding to the value of the sub-independent variable x. For the l The quantum circuit unit is the same as the quantum circuit unit used by Daniel Simon to solve the Simon problem by quantum computing. The specific quantum circuit depends on the specific function parameters n and m, which can be known by ordinary technicians in this field according to common sense in the industry or by referring to relevant literature, and will not be described here.
[0057] Figure 4 1 is a flow chart of a method for solving Simon's problem based on multiple computing nodes and quantum circuits according to an embodiment of the present invention. Figure 3 , the method comprises the following steps: Step S101, let j=0.
[0058] Step S102, set l =1.
[0059] Step S103, initializing n j domain qubits, in one embodiment, initialize n j The domain qubit is .
[0060] Step S104, initializing m range qubits. In one embodiment, the m range qubits are initialized to .
[0061] Step S105, according to Figure 2 The method generates a sub-Simon problem function corresponding to the computing node .
[0062] Step S106, qubits perform a Hadamard gate ( Door).
[0063] Step S107, execute on all quantum bits ,in, , , .
[0064] Step S108, for the first n j qubits perform a Hadamard gate ( Door).
[0065] Step S109, measuring the first n j qubits, and get the first measurement value .
[0066] Step S110, determine whether l =n j If satisfied, execute step S112; if not satisfied, in step S111, l = l +1, and return to step S103.
[0067] Step S112, solving the linear equation system 1-1 to obtain the substring S j ,in, .
[0068]
[0069] ... ... 1-1 Step S113, determine whether j=t-1 is satisfied. If so, execute step S115. If not, in step S114, set j=j+1 and return to step S102.
[0071] Step S115, sum up t substrings S j Get the string s of the Simon problem to be solved. Among them, s∈{0,1} n .
[0072] Among them, step S103 to step S109 is an evolution and measurement process, and the measurement result . For a universal quantum solution to the Simon problem, the measurement result satisfies Orthogonality with the string s to be determined, so an equation is obtained based on the measurement results of each time To solve the string s in the Simon problem, we need to perform at least n-1 times to obtain n-1 different measurement results. , and then a system of equations is obtained to solve the string s to be solved. Corresponding to this embodiment, for each sub-Simon problem function, it is necessary to measure n j times, thus obtaining the above equation set 1-1. The query complexity of solving each sub-Simon problem is O(n j ), which obviously further reduces the query complexity compared to the current query complexity O(n) of the Simon problem.
[0073] exist Figure 4 In the processing method shown, each computing node is executed in a serial manner to obtain its own substring. However, it can be known that the computing nodes can also be executed in parallel, such as Figure 5 As shown, Figure 5 According to one embodiment of the present invention, the calculation node Note 0 To Note t-1 Schematic diagram of the quantum circuit for solving the sub-Simon problem functions in parallel. First, according to the number of computing nodes, Figure 2 The method shown in the figure calculates the corresponding sub-Simon problem functions g0,…,g t-1 , and construct quantum circuits for each computing node respectively. The quantum circuit units Bg0 to Bgt-1 Execute the corresponding Oracle function calculations respectively to solve the corresponding sub-Simon problem functions.
[0074] The technical solution of the present invention is exemplarily described below through a specific embodiment.
[0075] In the Simon problem in this embodiment, n=4, m=3, assuming that the string to be solved is s=1001, the truth table of the Boolean function f corresponding to the Simon problem in this embodiment is shown in Table 1 below.
[0076] Table 1: Truth table of the Simon problem function to be solved
[0077] In Table 1, x is the original independent variable, and f(x) is the original dependent variable. The number of binary bits in the original domain is 4, and the number of binary bits in the original range is 3. In this embodiment, two quantum computing modules supporting 5 qubits are used for calculation, so there are two corresponding computing nodes, and the domain qubits of each computing node are 2.
[0078] According to the aforementioned method for constructing a sub-Simon problem function, the original domain is first divided to obtain the domain of the target sub-Simon problem function, and then the corresponding range is obtained. In this embodiment, the computation nodes are numbered 0 and 1. Corresponding to the 0th computation node, the two high bits on the left are selected as the domain bits of the sub-Simon problem function, and the two low bits on the right are selected as the first domain bits. Thus, 2 2 There are 4 sub-functions, represented by f 0 00 、f 0 01 、f 0 10 and f 0 11 , where the superscript 0 represents the 0th computation node, and the subscripts 00, 01, 10, and 11 represent a specific independent variable value in the first domain, which can also be considered as the binary representation of the sub-function sequence number. The sub-independent variables corresponding to the domain of the sub-Simon problem function obtain the corresponding sub-dependent variable values from the original value domain, and the truth values corresponding to the four sub-functions are shown below.
[0079] Table 2: The first subfunction f 0 00 The truth table of
[0080] Table 3: The second sub-function f 0 01 The truth table of
[0081] Table 4: The third sub-function f 0 10 The truth table of
[0082] Table 5: The fourth sub-function f 0 11 The truth table of
[0083] The x in the above four tables 子 is the sub-independent variable of the sub-Simon problem function.
[0084] Based on the above four truth tables, for each sub-Simon problem function's sub-independent variable value x 子 , take the maximum value of every 4 values as a corresponding value in the value range of the sub-Simon problem dependent variable. Thus, the sub-Simon problem function g0 of the 0th node is generated, and its truth table is shown below.
[0085] Table 6: Truth table of the sub-Simon problem function g0 for the 0th node
[0086] The quantum circuit diagram of the function g0 of the Simon problem can be found in Figure 3 , corresponding to this embodiment, n j =2,m=3,according to Figure 4 Run the steps in and measure twice to get a system of equations, and solve it to get the corresponding substring .
[0087] Similarly, for the first computing node, determine the lower two bits as its domain and the upper two bits as the first domain. Referring to the above method, four sub-functions can be obtained: f 1 00 , f 1 01 , f 1 10 , f 1 11 , and thus we get the sub-Simon problem function g1, whose truth table is shown below.
[0088] Table 7: Truth table of the sub-Simon problem function g1 of the first node
[0089] Execute the quantum circuit of the sub-Simon problem function g1 and solve it to get the substring .
[0090] Finally, the two strings are sorted and combined according to the order of the domains of the two sub-Simon problem functions in the original definition. That is, if the domain of the sub-Simon problem function is high in the original definition, the substring is ranked high; that is, if the domain of the sub-Simon problem function is low in the original definition, the substring is ranked low. The final string to be obtained is .
[0091] It can be seen from this embodiment that even if there is only one 5-qubit quantum computing module, the original Simon problem can still be solved, while the quantum solution method in the current prior art requires 7 qubits to solve it. As the parameters n and m in the Simon problem function increase, the effect achieved by the method provided by the present invention will be more significant.
[0092] In another aspect, the invention provides a distributed quantum computing device for the Simon problem. Figure 6 , Figure 6 1 is a principle block diagram of a distributed quantum computing device for Simon problem according to an embodiment of the present invention. In this embodiment, a distributed quantum computing device for Simon problem (hereinafter referred to as a solving device) 10 includes a parameter acquisition module 1, a sub-Simon problem function construction module 2, a quantum circuit construction module 3, an operation module 4 and a calculation module 5, wherein the parameter acquisition module 1 is configured to obtain the Simon problem function to be solved, the number of computing nodes and the number of domain quantum bits of each computing node, wherein the Simon problem function to be solved is: , n is the number of binary bits in the original domain, m is the number of binary bits in the original range, , and satisfies: for all independent variable values ,have , if and only if or , s is the string to be requested, , the sum of the number of domain quantum bits of all computing nodes is equal to the number of binary bits of the original domain of the Simon problem function to be solved. The sub-Simon problem function construction module 2 is connected to the parameter acquisition module 1, and is configured to construct a sub-Simon problem function corresponding to each computing node based on the number of domain quantum bits of each computing node and the original domain and range of the Simon problem function to be solved, wherein the domains of all sub-Simon problem functions, when combined together in a preset combination order, constitute the original domain of the Simon problem function to be solved, the range of each sub-Simon problem function is a subdomain of the original range of the Simon problem function to be solved, and each sub-Simon problem function has a substring to be solved. The quantum circuit construction module 3 is connected to the sub-Simon problem function construction module 2, and is configured to construct a sub-Simon problem function solving quantum circuit corresponding to each computing node. The operation module 4 is configured to send the sub-Simon problem function solving quantum circuits to the corresponding quantum computing modules respectively, and receive the measurement results returned by the quantum computing modules. The calculation module 5 is connected to the operation module 4, and is configured to calculate the required substring of the corresponding sub-Simon problem function based on the measurement result returned by the quantum calculation module when the sub-Simon problem function is solved; and combine the corresponding substrings according to the preset combination order of the definition domain of the sub-Simon problem function in the original definition domain of the Simon problem function to be solved to obtain the required string s of the Simon problem function to be solved.
[0093] See also Figure 7 , Figure 7 It is a principle block diagram of a distributed quantum computing device for Simon problem according to another embodiment of the present invention. The solving device 10 in this embodiment also includes a quantum computing module 6. In this embodiment, the parameter acquisition module 1 in the solving device 10 configures the computing nodes and the number of domain quantum bits of each computing node according to the number of quantum bits supported by the quantum computing module 6, and the operation module 4 sends the quantum circuit to be solved to the quantum computing module 6 in a serial manner. The quantum computing module 6 runs the quantum circuit to be solved in sequence and sends the measurement results to the operation module 4. The operation module 4 sends the received measurement results to the calculation module 5. The calculation module 5 constructs a system of equations based on the received measurement results, obtains the corresponding substrings based on the solution of the system of equations, and then combines the substrings corresponding to all the sub-Simon problem functions to obtain the string of the Simon problem function to be solved. According to this embodiment, the Simon problem that previously required a large number of quantum bits can be solved by a quantum computing module 6 with fewer quantum bits.
[0094] See also Figure 8 , Figure 8: is a principle block diagram of a distributed quantum computing device for Simon problem according to another embodiment of the present invention. The solution device 10 in this embodiment also 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 operation module 4 is connected to each quantum computing module respectively. In one embodiment, the parameter acquisition module 1 in the solution device 10 configures the computing node and the number of domain quantum bits of each computing node according to the number of quantum bits supported by each quantum computing module, and the operation module 4 sends the solution quantum circuit to the corresponding quantum computing module in parallel. Each quantum computing module runs the corresponding solution quantum circuit and sends the measurement result to the operation module 4. The operation module 4 sends the received measurement result to the calculation module 5. The calculation module 5 obtains the string of the Simon problem function to be solved after calculation. In this embodiment, multiple quantum computing modules run their respective solution quantum circuits in parallel, which effectively improves the solution efficiency. Of course, if it is not possible to complete the solution at one time based on the resources of the current multiple quantum computing modules, one or more of the quantum computing modules can be used to run multiple sub-Simon problem functions in a serial manner to solve quantum circuits and complete the solution to the Simon problem.
[0095] in, Figure 7 and Figure 8 The solving device 10 in the embodiment can be implemented by a classical computing device, and the quantum computing module can be a quantum simulator implemented by a classical computing device or a quantum real machine.
[0096] On the other hand, an embodiment of the present invention further provides an electronic device, see Fig. 9 , Fig. 9 is a block diagram of the structure principle of an electronic device according to an embodiment of the present invention. Fig. 9 As 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 for the Simon problem provided by the present invention is executed.
[0097] 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, typically the memory 602 includes a tangible (non-transitory) computer-readable storage medium (such as a memory device) encoded with executable instructions, wherein when the stored executable instructions are executed by the processor 601 (such as executed by one or more processors), the distributed quantum computing method for the Simon problem in an embodiment of the present invention can be implemented.
[0098] In one example, Fig. 9 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.
[0099] 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.
[0100] 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 for the Simon problem 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.
[0101] 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.
[0102] 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 for Simon problem, characterized in that: The method comprises: Obtain the Simon 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 binary bits of the original domain of the Simon problem function to be solved; Constructing a sub-Simon problem function corresponding to each computing node based on the number of domain qubits of each computing node and the original domain and original range of the Simon problem function to be solved, wherein the original domain of the Simon problem function to be solved includes the domains of all sub-Simon problem functions combined together according to a preset combination order, the range of each sub-Simon problem function is a subdomain of the original range of the Simon problem function to be solved, and each sub-Simon problem function includes a corresponding substring to be solved; Construct a sub-Simon problem function corresponding to each computing node to solve the quantum circuit; Run the sub-Simon problem functions respectively to solve the quantum circuit to obtain the corresponding substring to be solved; The corresponding substrings are combined according to the preset combination order of the definition domain of the sub-Simon problem function in the original definition domain of the Simon problem function to be solved to obtain the required string of the Simon problem function to be solved.
2. The distributed quantum computing method for Simon problem according to claim 1, characterized in that: The steps of constructing the sub-Simon problem function corresponding to each computing node include: According to the number of domain qubits of the computing node, determine the same number of second bits from the bits of the original domain of the Simon problem function to be solved as the domain bits of the sub-Simon problem function, and the remaining bits as the first bits of the first domain; Sequentially extract the second bit value corresponding to each sub-independent variable value constituting the sub-Simon problem function from each original independent variable value in the original definition domain, and all the sub-independent variable values constitute the definition domain of the sub-Simon problem function of the computing node; Sequentially extract the first digit value from each original independent variable value in the original definition domain to form each first independent variable value, and all the first independent variable values form the first definition domain; Combine each sub-independent variable value of the sub-Simon problem function with each first independent variable value in the order of their respective bits in the original definition domain to form an 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 domain of the Simon problem function to be solved as the first dependent variable value; A first dependent variable value is determined from multiple first dependent variable values corresponding to each sub-independent variable value according to the same valuation function as the sub-dependent variable value corresponding to the sub-independent variable value, wherein the sub-dependent variable value corresponding to each sub-independent variable value constitutes the value range of the sub-Simon problem function of the computing node.
3. The distributed quantum computing method for Simon problem according to claim 2, characterized in that: The value function is a maximum value function or a minimum value function; correspondingly, a first dependent variable value with the largest or smallest value is determined from multiple first dependent variable values corresponding to each sub-independent variable value as the sub-dependent variable value corresponding to the sub-independent variable value.
4. The distributed quantum computing method for Simon problem according to claim 2, characterized in that: The step of constructing a sub-Simon problem function corresponding to each computing node further comprises: Sort all computing nodes; When determining the same number of second bits as the domain bits of the sub-Simon problem function from the bits of the original domain of the Simon problem function to be solved according to the number of domain quantum bits of each computing node, the second bits equal to the number of domain quantum bits of each computing node are respectively cut out in the bits of the original domain according to the order of the computing nodes in the order from high to low or from low to high to obtain the domain bits of the sub-Simon problem function corresponding to each computing node.
5. The distributed quantum computing method for Simon problem according to claim 1, characterized in that: When the sub-Simon problem functions are respectively run to solve the quantum circuit to obtain the corresponding sub-strings to be obtained, the sub-Simon problem functions are run in a serial and / or parallel manner to solve the quantum circuit to solve the corresponding sub-Simon problem functions.
6. A distributed quantum computing device for Simon problem, characterized in that: The device comprises: A parameter acquisition module configured to acquire a Simon problem function to be solved, a number of computing nodes, and a 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 binary bits of the original domain of the Simon problem function to be solved; A sub-Simon problem function construction module is configured to construct a sub-Simon problem function corresponding to each computing node based on the number of domain qubits of each computing node and the original domain and range of the Simon problem function to be solved, wherein the domains of all sub-Simon problem functions, when combined together in a preset combination order, constitute the original domain of the Simon problem function to be solved, the range of each sub-Simon problem function is a subdomain of the original range of the Simon problem function to be solved, and each sub-Simon problem function includes a corresponding substring to be solved; A quantum circuit construction module configured to construct a sub-Simon problem function solving quantum circuit corresponding to each computing node; An operation module is configured to send the sub-Simon 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 is configured to calculate the required substring of the corresponding sub-Simon problem function based on the measurement result returned by the quantum computing module when the sub-Simon problem function is solved; and to combine the required substrings according to the preset combination order of the definition domain of the sub-Simon problem function in the original definition domain of the Simon problem function to be solved to obtain the required string of the Simon problem function to be solved.
7. The distributed quantum computing device for Simon problem according to claim 6, characterized in that: The computing device further comprises one or more quantum computing modules; when one quantum computing module is included, the operation module sends the multiple sub-Simon problem function solving quantum circuits to the quantum computing module in a serial manner; when multiple quantum computing modules are included, the operation module sends the multiple sub-Simon problem function solving quantum circuits to multiple quantum computing modules in a serial and / or parallel manner; Each quantum computing module runs the sub-Simon problem function of the corresponding computing node to solve the quantum circuit and sends the measurement result to the operation module.
8. 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 for the Simon problem according to any one of claims 1 to 5.
9. 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 for the Simon problem according to any one of claims 1 to 5 is executed.
Citation Information
Patent Citations
Quantum circuit determination method and device
CN112651509A
Quantum computing task scheduling method and device and quantum computer operating system
CN114912618A
Quantum optimization method and device
CN116739101A
Distributed multi-target quantum search method and device, medium and equipment
CN118014095A
Quantum circuit construction method and related device
CN118171748A