Quantum computing system, quantum computing method, and computer-readable storage medium
By compiling the optimal parameters of quantum circuits and calculating the objective function in classical computers, the problems of long computing time and short quantum chip life are solved, and more efficient quantum computing and longer quantum chip service life are achieved. .
Patent Information
- Application Number
- CN202210849641.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-19
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2042-07-19
AI Technical Summary
When executing variable component quantum algorithms, existing quantum computing systems need to call quantum chips multiple times, resulting in too long calculation time, decreasing the service life of the quantum chip, and being unable to effectively serve user tasks.
By compiling quantum circuits in classical computers and calculating the optimal parameters of the objective function and handing them over to classical computers for processing, the quantum chip is only responsible for performing the final sampling operation on the compiled quantum circuits, reducing dependence on quantum chips.
This significantly reduces the time required to complete a task, increases the lifespan of quantum chips, and increases the number of users that can serve by at least one order of magnitude.
Smart Images

Figure CN115271082B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum computing technology, and in particular to a quantum computing system, a method for performing quantum computing using the system, and a computer-readable storage medium. Background Art
[0002] Quantum computing is a new computing paradigm that completes corresponding computing tasks by manipulating the state of quantum bits. As the basic information unit of quantum computing, quantum bits can be in a superposition of state 0 and state 1, unlike classical bits. For a quantum computing system containing n quantum bits, when all quantum bits are in a superposition state, the system simultaneously represents 2 n basis vector states, while the classical computing system can only be in one of the basis vector states at any moment. Based on this exponential state space representation capability, quantum computing has significant advantages over classical computing in solving certain problems by manipulating state evolution through appropriate algorithm design. For example, the famous Shor algorithm has exponential acceleration performance in solving the problem of large number prime factorization compared to existing classical algorithms. Based on whether the manipulated state evolution is continuous or discrete, quantum computing can generally be divided into analog quantum computing and digital quantum computing. The quantum annealing machine of Canada's D-Wave company is a representative of analog quantum computing, while the representative of digital quantum computing is the "Plane Tree" superconducting computing system that Google demonstrated the so-called "quantum supremacy" in 2019. Digital quantum computing (also known as gate model quantum computing), similar to the classical computing architecture, uses a universal quantum logic gate group (including single-qubit gates and two-qubit entanglement gates) to manipulate qubit states to achieve computing tasks. Digital quantum computing is currently a key research direction. Well-known domestic and foreign companies such as Google, IBM, BAT, Huawei, and universities and research institutes such as Harvard, MIT, USTC, and Beijing Institute of Quantum Computing have all invested heavily in building their own quantum computing systems.
[0003] According to the different physical systems that realize quantum bits, quantum computing is divided into superconducting, ion trap, quantum dot, etc. Among them, the superconducting quantum bit system is considered to be one of the most promising systems for realizing quantum computing due to its high fidelity of gate operation and good scalability. At present, the number of quantum bits in superconducting quantum computing systems has reached about 60. In terms of quantum bit quality, the gate error rate of a single quantum bit can be controlled within 10 -3 Below, while the error rate of the two-qubit entanglement gate is 10 -2 -10 -3 In contrast, the error rate of basic gate operations of classical computers is as low as 10 -15. The main reason for this huge difference is that the quantum bit system is very fragile and can easily decoherently lose quantum information when interacting with the surrounding environment. The best single quantum bit lifetime reported so far is only about 500 microseconds, while the average lifetime of quantum bits in multi-bit chips is generally less than 100 microseconds. Due to the constraints of quantum decoherence mechanism, it is extremely unlikely that the error rate of quantum bit logic gates will be reduced to the level of classical bit logic gates, so it is impossible to achieve universal quantum computing simply by reducing the gate error rate. One possible solution is to use error correction coding, that is, to encode a logical quantum bit with a certain number of physical quantum bits, and to achieve universal quantum computing by making the control accuracy of the logical quantum bit gate reach the classical level. Under the current quantum bit gate error rate, according to calculations, the number of physical quantum bits required to encode a logical quantum bit reaches the order of thousands, so a meaningful quantum computing system requires millions of quantum bits, which is an extremely difficult challenge in the foreseeable future. In view of the short-term impossibility of error-corrected universal quantum computing, people have begun to focus on NISQ systems, that is, medium-scale (about 100 quantum bits) noisy quantum computing systems in recent years. By designing quantum algorithms suitable for NISQ systems, such as QAOA (quantum approximate optimization algorithm) for solving combinatorial optimization problems, people expect that quantum advantages over classical computing can be demonstrated in some practical problems in the near future.
[0004] Due to performance limitations, NISQ quantum chips can only support the operation of shallow quantum circuits. Therefore, the most suitable quantum algorithms for NISQ chips are variational quantum algorithms, such as VQE (variational quantum eigensolver), QAOA (quantum approximate optimization algorithm) and QML (quantum machine learning). These algorithms are used to solve quantum chemistry problems, combinatorial optimization problems and machine learning related problems. However, variational quantum algorithms require the interactive collaboration of quantum computing and classical computing, and require multiple calls to quantum chips to execute quantum circuits containing parameters. This computing mode has three main limitations: 1) The computing time is greatly increased. Current experimental data show that it takes at least hundreds of seconds to execute a sampling of a parameterized quantum circuit for a chip with dozens of quantum bits. The current computing mode requires calling the quantum chip at least dozens of times, and it takes at least one hour to execute a problem with a scale of dozens of bits; 2) Multiple calls to the quantum chip will greatly reduce the service life of the chip; 3) One calculation takes too long to calculate the quantum chip, which greatly limits the user tasks that can be served. Summary of the invention
[0005] In view of at least one drawback of the prior art, the present invention provides a quantum computing system, comprising:
[0006] A problem acquisition unit, configured to determine the problem to be solved according to the type of problem provided by the user and parameters related to the actual application scenario;
[0007] A classical computing unit, coupled to the problem acquisition unit, configured to compile a quantum circuit according to the problem to be solved, calculate a first parameter required by the quantum circuit, and output the compiled quantum circuit and the first parameter;
[0008] a quantum computing unit, coupled to the classical computing unit, configured to perform a sampling operation on a corresponding area of the quantum chip according to the compiled quantum circuit and the first parameter, and output a sampling result;
[0009] A solution feedback unit is coupled to the quantum computing unit and is configured to process the sampling result into a solution to a corresponding problem and feed it back to a user who raises the corresponding problem.
[0010] According to one aspect of the present invention, the question acquisition unit includes a database mathematically modeled according to question types, and the question acquisition unit is further configured to:
[0011] A matching search is performed in the database according to the type of question provided by the user to determine the problem to be solved.
[0012] According to one aspect of the present invention, the classical computing unit further comprises:
[0013] A first preprocessing module is configured to convert the problem to be solved into a quantum circuit and determine an objective function to be optimized;
[0014] A parameter calculation module, coupled to the first preprocessing module, configured to call a corresponding algorithm in an embedded algorithm library to calculate and obtain a first parameter that minimizes the objective function to be optimized;
[0015] A compiling module, coupled to the first preprocessing module, configured to call a corresponding compiling algorithm in an embedded algorithm library and compile a quantum circuit according to pre-stored structural performance data of the quantum chip;
[0016] The first output module is coupled to the parameter calculation module and the compilation module respectively, and is configured to output the compiled quantum circuit and the first parameter that minimizes the objective function to be optimized.
[0017] According to one aspect of the present invention, the parameter calculation module and the compilation module work in parallel.
[0018] According to one aspect of the present invention, the quantum computing unit further comprises:
[0019] a second preprocessing module, coupled to the first output module, configured to generate a quantum assembly language instruction set according to the compiled quantum circuit and the first parameter;
[0020] A timing calculation module, coupled to the second preprocessing module, configured to call a pre-stored quantum gate operation instruction according to the quantum assembly language instruction set to calculate and generate a first execution timing of the quantum circuit;
[0021] an initialization module, coupled to the second preprocessing module, configured to select a corresponding area on the quantum chip for initialization according to the quantum assembly language instruction set;
[0022] A quantum chip, coupled to the timing calculation module and the initialization module respectively, configured to perform quantum gate operations on the corresponding area according to the first execution timing and perform sampling measurements;
[0023] The second output module is coupled to the quantum chip and configured to output the sampling measurement result of the quantum chip.
[0024] According to one aspect of the present invention, the timing calculation module and the initialization module work in parallel.
[0025] According to one aspect of the present invention, wherein the quantum chip performs the quantum gate operation multiple times, the initialization module is further configured to:
[0026] Before each execution of the quantum gate operation, the initialization module sets the quantum bits on the corresponding region to a zero state.
[0027] According to one aspect of the present invention, the quantum computing system comprises at least one classical computing unit and at least one quantum computing unit, wherein:
[0028] The classical computing unit includes one or more of a CPU and a GPU, and the quantum computing unit includes one or more of a superconducting quantum chip, an ion trap quantum chip, a semiconductor quantum chip, an atomic quantum chip, and a photon quantum chip.
[0029] According to one aspect of the present invention,
[0030] The question acquisition unit is configured to:
[0031] Obtaining at least one question raised by a user, marking the time at which the question raised by the user is asked, and determining the problem to be solved;
[0032] Sending the problem to be solved to one of the classical computing units;
[0033] The solution feedback unit is configured as follows:
[0034] receiving a sampling result output by one of the quantum computing units and processing the result into a solution to a corresponding problem;
[0035] The solution to the corresponding question is fed back to the corresponding user according to the question time mark.
[0036] According to one aspect of the present invention, the question acquisition unit and the solution feedback unit are integrated in a server, and a user asks a question to the server through a terminal, and the terminal comprises:
[0037] One or more of mobile phone, computer, web page, and cloud.
[0038] The present invention also provides a method for performing quantum computing using the quantum computing system as described above, comprising:
[0039] The problem acquisition unit determines the problem to be solved according to the problem type provided by the user and parameters related to the actual application scenario;
[0040] Compiling a quantum circuit according to the problem to be solved by the classical computing unit, calculating a first parameter required by the quantum circuit, and outputting the compiled quantum circuit and the first parameter;
[0041] Performing a sampling operation on a corresponding area of the quantum chip according to the compiled quantum circuit and the first parameter by the quantum computing unit, and outputting a sampling result;
[0042] The sampling result is processed into a solution to a corresponding question by the solution feedback unit and fed back to a user who raises the corresponding question.
[0043] The present invention also provides a non-transitory computer-readable storage medium having computer-readable instructions stored thereon. When the instructions are executed by a processor, the processor is enabled to execute the method described above.
[0044] The quantum computing system and method for performing quantum computing provided by the present invention, through the collaborative work of classical computers, all the work of compiling quantum circuits and calculating the optimal parameters of the target function is handled by classical computers, and the quantum chip only completes the final sampling work on the compiled quantum circuit, and finally feeds back the sampling result to the user who originally asked the question after processing. The quantum computing system and method for performing quantum computing provided by the present invention do not need to repeatedly call the quantum chip, which increases the life of the quantum chip and saves the time required to complete a task, so the number of users that can be served is correspondingly increased by at least one order of magnitude. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without exceeding the scope of protection required by the present application.
[0046] Figure 1 A quantum computing system provided by one embodiment of the present invention is shown;
[0047] Figure 2 A classical computing unit in a quantum computing system provided by an embodiment of the present invention is shown;
[0048] Figure 3 A quantum computing unit in a quantum computing system provided by an embodiment of the present invention is shown;
[0049] Figure 4 A quantum computing system provided by one embodiment of the present invention is shown;
[0050] Figure 5 A quantum computing system provided by one embodiment of the present invention is shown;
[0051] Figure 6 A quantum computing system provided by one embodiment of the present invention is shown;
[0052] Figure 7 A method for performing quantum computing provided by one embodiment of the present invention is shown. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0054] The embodiments of the present application are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. At the same time, changes or deformations made by those skilled in the art based on the ideas of the present application, the specific implementation methods and the scope of application of the present application, all belong to the scope of protection of the present application. In summary, the content of this specification should not be construed as a limitation on the present application.
[0055] The current computing model using NISQ quantum chips is the so-called quantum-classical hybrid computing, which is to first use the quantum chip to perform quantum circuit sampling calculations containing parameters, then use classical computing to process the sampling results and call the classical optimizer to calculate the iterative new parameters, and then the quantum chip performs quantum circuit sampling calculations containing new parameters to replace the original parameters, and repeats this process until the convergence conditions are met. The above iterative method reduces the service life of the quantum chip, and because the quantum chip needs to be called multiple times, it takes too long to complete a computing task.
[0056] The quantum algorithm that is currently most suitable for NISQ chips is the variational quantum algorithm. For the variational quantum algorithm executed on the quantum chip, the core is to find the optimal parameters of the corresponding objective function. Due to the current situation that the NISQ quantum chip can only effectively execute shallow quantum circuits, the present invention provides a quantum computing system. Through the collaborative work of classical computers, the work of compiling quantum circuits and calculating the optimal parameters of the objective function is all handled by classical computers. The quantum chip only completes the final sampling work on the compiled quantum circuit, and finally feeds back the sampling results to the user who originally asked the question after processing. The quantum computing system provided by the present invention does not need to repeatedly call the quantum chip, which increases the life of the quantum chip, greatly reduces the computing time required to complete a task, and also increases the number of tasks submitted by users.
[0057] According to one embodiment of the present invention, Figure 1 As shown, the present invention provides a quantum computing system 100, including a problem acquisition unit 110, a classical computing unit 120, a quantum computing unit 130 and a solution feedback unit 140. Among them:
[0058] The problem acquisition unit 110 is configured to determine the problem to be solved according to the problem type provided by the user and the parameters related to the actual application scenario. Optionally, the problem acquisition unit 110 locally stores a database including mathematical modeling, and the problem acquisition unit 110 receives the problem description provided by the user and the parameters related to the actual application scenario, performs matching according to the problem description and the parameters related to the actual application scenario, finds a mathematical model suitable for the problem to be solved, converts the problem provided by the user into a mathematical problem to be solved, and outputs the parameters of the problem to be solved and the related application scenario.
[0059] The classical computing unit 120 is coupled to the problem acquisition unit 110, and is configured to compile a quantum circuit according to the problem to be solved, calculate the first parameter required for the quantum circuit, and output the compiled quantum circuit and the first parameter. Optionally, the classical computing unit 120 includes one or more of a central processing unit (CPU) and a graphics processing unit (GPU), and stores the structure and performance data of the quantum chip. The classical computing unit 120 generates a quantum circuit description for executing the algorithm corresponding to the problem to be solved by compiling the CPU or GPU, and compiles the shortest execution circuit. Optionally, the classical computing unit 120 also includes an algorithm library, which stores a set of algorithms for solving the optimal parameters of the model corresponding to the mathematical model stored in the problem acquisition unit 110. The classical computing unit 120 calls a pre-stored algorithm to calculate the optimal parameters corresponding to the compiled quantum circuit, that is, the first parameter required for the quantum circuit, and outputs the compiled quantum circuit and the first parameter required for the quantum circuit.
[0060] The quantum computing unit 130 is coupled to the classical computing unit 120 and configured to perform a sampling operation on the corresponding area of the quantum chip according to the compiled quantum circuit and the first parameter, and output the sampling result. After receiving the compiled quantum circuit and the first parameter required by the quantum circuit sent by the classical computing unit 120, the quantum computing unit 130 optionally converts the compiled quantum circuit into a quantum assembly language instruction set. According to the quantum assembly language instruction set, the quantum computing unit 130 initializes the corresponding area on the quantum chip, sets the quantum bit that is about to perform the quantum gate operation to a zero state, and determines the operation sequence of the quantum gate according to the quantum assembly language instruction set, so that each quantum gate is connected through the timing sequence and the execution time is the shortest. After the preparation work is completed, the quantum circuit on the corresponding area of the quantum chip is connected to the microwave or laser signal according to the determined operation timing to realize the gate operation, and the quantum computing unit 130 performs sampling measurement. Optionally, the timing operation is repeatedly performed on the quantum chip, and the distribution probability of the bit string is measured.
[0061] The solution feedback unit 140 is coupled to the quantum computing unit 130 and is configured to process the sampling results into a solution to the corresponding question and feed it back to the user who asked the corresponding question. The solution feedback unit 140 receives the probability distribution results of the bit string measured multiple times by the quantum computing unit 130, processes the probability distribution results, and feeds back the processed probability distribution results as the solution to the question asked by the user to the corresponding user.
[0062] According to one embodiment of the present invention, in the quantum computing system 100, the problem acquisition unit 110 includes a database mathematically modeled according to the problem type, and the problem acquisition unit 110 is further configured to:
[0063] A matching search is performed in the database according to the type of question provided by the user to determine the problem to be solved.
[0064] According to one embodiment of the present invention, Figure 2 As shown, in the quantum computing system 100 provided by the present invention, the classical computing unit 120 further includes: a first preprocessing module 121, a parameter calculation module 122, a compilation module 123 and a first output module 124. Among them:
[0065] The first preprocessing module 121 is configured to convert the problem to be solved into a quantum circuit and determine the objective function to be optimized. The problem preprocessing module 121 preprocesses the problem to be solved, mainly realizing the preliminary conversion of the problem to be solved into a quantum circuit with optimal parameters to be determined that can be run on the quantum chip, and determining the objective function to be optimized according to the problem to be solved. After the preprocessing is completed, the quantum circuit information and the objective function to be optimized are sent to the parameter calculation module 122 and the compilation module 123.
[0066] The parameter calculation module 122 is coupled to the first preprocessing module 121 and is configured to call the corresponding algorithm in the embedded algorithm library to calculate and obtain the first parameter that minimizes the objective function to be optimized, and the first parameter is the optimal parameter required for the parameter-containing subcircuit to execute the variational quantum algorithm. The parameter calculation module 122 calls the classical algorithm in the embedded algorithm library to perform calculations based on the objective function to be optimized output by the first preprocessing module 121, and obtains the first parameter corresponding to minimizing the objective function to be optimized.
[0067] The compiling module 123 is coupled to the first preprocessing module 121 and is configured to call the corresponding compiling algorithm in the embedded algorithm library and compile the quantum circuit according to the pre-stored structural performance data of the quantum chip. The compiling module 123 calls the quantum compiling algorithm in the embedded algorithm library to calculate the quantum circuit of the partial area that is most suitable for the quantum chip operation according to the pre-stored performance attributes of the operable quantum chip, such as the chip structure and the performance parameters of the quantum bits on the chip.
[0068] The first output module 124 is coupled to the parameter calculation module 122 and the compilation module 123 respectively, and is configured to output the compiled quantum circuit and the first parameter that minimizes the objective function to be optimized. The first parameter that minimizes the objective function calculated by the parameter calculation module 122 and the compiled quantum circuit information compiled by the compilation module 123 are then sent to the first output module 124. After integrating various information, the first output module 124 outputs the compiled quantum circuit including the first parameter to the quantum computing unit 130.
[0069] According to an embodiment of the present invention, the parameter calculation module 122 and the compilation module 123 are independent of each other and can work in parallel. The parameter calculation module 122 calls the classical algorithm in the embedded algorithm library according to the objective function to be optimized, and calculates the first parameter that minimizes the objective function to be optimized. At the same time, the compilation module 123 calls the compilation algorithm in the embedded algorithm library according to the pre-stored structural performance data of the quantum chip, and compiles the quantum circuit that executes the variational quantum algorithm on the partial area of the quantum chip. After receiving the quantum circuit information and the objective function to be optimized sent by the first preprocessing module 121, the parameter calculation module 122 and the compilation module 123 are processed in parallel to save the time of the quantum computing system 100 as a whole to perform the computing task.
[0070] According to one embodiment of the present invention, Figure 3 As shown, in the quantum computing system 100 provided by the present invention, the quantum computing unit 130 further includes: a second preprocessing module 131, a timing calculation module 132, an initialization module 133, a quantum chip 134 and a second output module 135. Among them:
[0071] The second preprocessing module 131 is coupled to the first output module 124 and is configured to generate a quantum assembly language instruction set according to the compiled quantum circuit including the first parameter. After the first output module 124 outputs the compiled quantum circuit information including the first parameter of the minimized objective function to the second preprocessing module 131 of the quantum computing unit 130, the second preprocessing module 131 converts the quantum circuit information (description or graphical description of circuit components and connection relationships) into a quantum assembly language instruction set.
[0072] The timing calculation module 132 is coupled to the second preprocessing module 131 and is configured to calculate a first execution timing according to the quantum assembly language instruction set, wherein the first execution timing is an execution timing of a quantum gate operation. After receiving the quantum assembly language instruction set, the timing calculation module 132 calls a suitable instruction for implementing a quantum gate operation in a locally stored operation instruction library, and then calculates the optimal time sequence for executing these quantum gate operation instructions, and the calculated optimal quantum gate operation time sequence is sent to the quantum chip 134.
[0073] The initialization module 133 is coupled to the second preprocessing module 131 and is configured to initialize the corresponding area on the quantum chip according to the quantum assembly language instruction set. The initialization module 133 selects a suitable computing area containing a corresponding number of quantum bits on the quantum chip according to the received quantum assembly language instruction set corresponding to the compiled quantum circuit and performs initialization preparation for the quantum bits.
[0074] The quantum chip 134 is coupled to the timing calculation module 132 and the initialization module 133 respectively, and is configured to perform quantum gate operations on the corresponding area according to the first execution timing and perform multiple measurements, and output the measurement results. The quantum chip 134 performs quantum gate operations and performs sampling measurements in the selected chip area according to the received quantum gate operation time series information (i.e., the first execution timing) and the quantum chip preparation information. After the measurement, the initialization module 133 initializes the quantum bits in the selected chip area again, and repeats the same quantum gate operation and sampling measurements on the selected chip area of the quantum chip 134, and repeats a certain number of sampling times. The sampling results are then sent to the second output module 135.
[0075] The second output module 135 is coupled to the quantum chip 134 and configured to output the sampled measurement result of the quantum chip 134. The second output module 135 processes the sampled measurement result of the quantum chip 134, ie, the probability distribution information of the bit string and outputs it to the solution feedback unit 140.
[0076] According to one embodiment of the present invention, the timing calculation module 132 and the initialization module 133 are independent of each other and can work in parallel. The timing calculation module 132 calculates the first execution timing according to the quantum assembly language instruction set, that is, the timing of passing microwave or laser signals on the quantum chip to realize the quantum gate operation, and sends the calculated optimal quantum gate operation timing to the quantum chip 134. At the same time, the initialization module 133 initializes the corresponding area on the quantum chip according to the compiled quantum circuit, that is, the quantum bits of the selected area on the quantum chip that perform the sampling operation are set to zero. After receiving the quantum assembly language instruction set sent by the second preprocessing module 131, the timing calculation module 132 and the initialization module 133 start working at the same time, and the timing calculation and chip initialization are processed in parallel to save the time of the quantum computing system 100 as a whole to perform computing tasks.
[0077] According to one embodiment of the present invention, Figure 4 As shown, the quantum computing system 100 provided by the present invention includes at least one classical computing unit 120 and at least one quantum computing unit 130 . Figure 4 , a quantum computing system 100 includes a plurality of classical computing units 120 and a plurality of quantum computing units 130. The number of the plurality of classical computing units 120 and the number of the plurality of quantum computing units 130 may be the same or different. These embodiments are within the scope of protection of the present invention.
[0078] The classical computing unit 120 includes one or more of a CPU and a GPU. Multiple classical computing units 120 may be located at the same place / node or distributed at different places / nodes. The quantum chip in the quantum computing unit 130 includes one or more of a superconducting type, an ion trap type, a semiconductor type, an atomic type, and a photon type. The information output after being processed by the classical computing unit 120 is transmitted to a suitable quantum computing unit 130 for sampling and processing. Multiple quantum computing units 130 may be located at the same place / node or distributed at different places / nodes.
[0079] According to one embodiment of the present invention, each classical computing unit 120 is integrated with each quantum computing unit 130 to form a classical collaborative quantum computer. According to another embodiment of the present invention, some of the classical computing units 120 are integrated with some of the quantum computing units 130 to form a classical collaborative quantum computer. According to another embodiment of the present invention, all the classical computing units 120 that process quantum computing tasks are integrated with the quantum computing units 130 to form a multi-core CPU / GPU-NISQ processing system. In the multi-core CPU / GPU-NISQ processing system, the first output modules 124 of the multiple classical computing units 120 are coupled with the second pre-processing modules 131 of the multiple quantum computing units 130, and the classical computing units 120 dispatch sampling tasks to the multiple quantum computing units 130 according to task requirements.
[0080] According to one embodiment of the present invention, Figure 5 As shown, in the quantum computing system 100 provided by the present invention, the problem acquisition unit 110 is configured as follows:
[0081] Obtaining at least one question raised by a user, marking the time at which the question raised by the user is asked, and determining the problem to be solved;
[0082] The problem to be solved is sent to one of the classical computing units 120 .
[0083] The question acquisition unit 110 can acquire questions raised by multiple users, and mark the question time of the questions provided by the users, that is, stamp the questions raised by the users with a timestamp. The question acquisition unit 110 converts the questions raised by the users into problems to be solved by database retrieval including mathematical modeling, and sends them to the classical computing units 120 whose current remaining working time is less than the first preset time length among the above-mentioned multiple classical computing units 120. The question acquisition unit 110 is configured to communicate with the above-mentioned multiple classical computing units 120, acquire the current operating status of the above-mentioned multiple classical computing units 120, such as whether they are idle / running, the current remaining working time estimated by the classical computing unit 120, etc., and allocate the problems to be solved to the classical computing units 120 whose current remaining working time is less than the first preset time length according to the current remaining working time estimated by the multiple classical computing units 120.
[0084] The solution feedback unit 140 is further configured to:
[0085] receiving a sampling result output by one of the quantum computing units 130 and processing it into a solution to a corresponding problem;
[0086] The solution to the corresponding question is fed back to the corresponding user according to the question time mark.
[0087] The solution feedback unit 140 receives the measurement results of the multiple sampling and measurement outputs of the quantum computing unit 130, that is, multiple bit string probability distribution information, processes the multiple bit string probability distribution information, and obtains the solution of the corresponding problem. According to the question time mark (timestamp) of the corresponding question, the solution of the corresponding problem is fed back to the corresponding user in the order of first-in-first-out (FIFO).
[0088] According to one embodiment of the present invention, Figure 6 As shown, the problem acquisition unit 110 and the solution feedback unit 140 are integrated in the cloud server, and the user provides the problem type and relevant parameters in the actual application scenario to the server through the terminal. The terminals that the user can use include but are not limited to: mobile phone, computer, web page, and cloud. The at least one classical computing unit 120 and the at least one quantum computing unit 130 are connected to the server for communication, and the task execution and dispatch of each classical computing unit 120 and quantum computing unit 130 are uniformly managed by the server.
[0089] The service process of the quantum computing system 100 is as follows: the user raises questions through different types of terminals and uploads them to the server. The server (question acquisition unit 110) stamps the questions raised by the user with a timestamp, and performs a matching search in a database including mathematical modeling. The questions raised by the user are converted into problems to be solved and sent to the quantum computer (including at least one classical computing unit 120 and at least one quantum computing unit 130). The classical computing unit 120 compiles the quantum circuit and solves the first parameter of the minimized objective function, and transmits the compiled quantum circuit and the first parameter to the quantum computing unit 130. The quantum computing unit 130 initializes the quantum bits in the corresponding area according to the compiled quantum circuit, designs the execution sequence of each quantum gate, and the quantum chip performs the sampling task in the corresponding area according to the designed execution sequence, and performs the distribution probability of the bit string for multiple times, and outputs the measurement result of the distribution probability to the server (including the solution feedback unit 130). The server (including the solution feedback unit 130) processes the sampled data and timely feeds back the processing result of the sampled data according to the timestamp of the corresponding user question.
[0090] The quantum computing system 100 provided by the above-mentioned multiple embodiments of the present invention overcomes the deficiency of the existing quantum-classical hybrid computing mode that requires multiple calls to quantum chip operations, thereby greatly increasing the computing time. The new quantum computing mode can reduce the computing time by at least 10 times, thereby increasing the number of users that can be served by at least one order of magnitude.
[0091] According to one embodiment of the present invention, Figure 7 As shown, the present invention also provides a method 10 for performing quantum computing using the quantum computing system 100 as described above, comprising steps S101 to S104. In which:
[0092] In step S101, the problem obtaining unit determines the problem to be solved according to the type of problem provided by the user and parameters related to the actual application scenario.
[0093] In step S102, the quantum circuit is compiled according to the problem to be solved by the classical computing unit, and a first parameter required by the quantum circuit is calculated, and the compiled quantum circuit and the first parameter are output.
[0094] In step S103, the quantum computing unit performs a sampling operation on a corresponding area of the quantum chip according to the compiled quantum circuit and the first parameter, and outputs a sampling result.
[0095] In step S104, the sampling result is processed into a solution to the corresponding question by the solution feedback unit, and is fed back to the user who raised the corresponding question.
[0096] The specific limitations of the above-mentioned method 10 for performing quantum computing are similar to the specific limitations in the aforementioned quantum computing system 100. Please refer to the above introduction to the quantum computing system 100, and will not be repeated here.
[0097] According to one embodiment of the present invention, the present invention also provides a non-transitory computer-readable storage medium having computer-readable instructions stored thereon. When the instructions are executed by a processor, the processor executes the method 10 for performing quantum computing as described above.
[0098] The quantum computing system and method for performing quantum computing provided by the present invention, through the collaborative work of classical computers, all the work of compiling quantum circuits and calculating the optimal parameters of the target function is handled by classical computers, and the quantum chip only completes the final sampling work on the compiled quantum circuit, and finally feeds back the sampling result to the user who originally asked the question after processing. The quantum computing system and method for performing quantum computing provided by the present invention do not need to repeatedly call the quantum chip, which increases the life of the quantum chip and saves the time required to complete a task, so the number of users that can be served is correspondingly increased by at least one order of magnitude.
[0099] The types of problems provided by users involved in the present invention include, but are not limited to: traveling salesman problem, production scheduling problem, knapsack problem, packing problem, graph coloring problem, clustering problem, maximum clique problem, most-cut problem, etc.
[0100] The quantum chip involved in the present invention includes a wafer provided with one or more quantum bits and is capable of performing quantum gate operations.
[0101] The quantum bits involved in the present invention include information carriers having a 0 state, a 1 state, and a superposition state.
Claims
1. A quantum computing system, characterized in that: include: A problem acquisition unit, configured to determine the problem to be solved according to the type of problem provided by the user and parameters related to the actual application scenario; A classical computing unit, coupled to the problem acquisition unit, configured to compile a quantum circuit according to the problem to be solved, calculate a first parameter required by the quantum circuit, and output the compiled quantum circuit and the first parameter; a quantum computing unit, coupled to the classical computing unit, configured to perform a sampling operation on a corresponding area of the quantum chip according to the compiled quantum circuit and the first parameter, and output a sampling result; A solution feedback unit is coupled to the quantum computing unit and configured to process the sampling result into a solution to a corresponding problem and feed it back to a user who raises the corresponding problem. Wherein, the classical computing unit further comprises: A first preprocessing module is configured to convert the problem to be solved into a quantum circuit and determine an objective function to be optimized; a parameter calculation module, coupled to the first preprocessing module, configured to call a corresponding algorithm in an embedded algorithm library to calculate and obtain a first parameter that minimizes the objective function to be optimized, wherein the first parameter is an optimal parameter required for a parameter-containing subcircuit to execute a variational quantum algorithm; A compiling module is coupled to the first preprocessing module and configured to call a corresponding compiling algorithm in an embedded algorithm library and compile a quantum circuit according to the pre-stored structural performance data of the quantum chip, wherein the parameter calculation module works in parallel with the compiling module. The quantum chip only completes the final sampling on the compiled quantum circuit.
2. The quantum computing system of claim 1, wherein the problem acquisition unit comprises a database mathematically modeled according to the problem type, and the problem acquisition unit is further configured to: A matching search is performed in the database according to the type of question provided by the user to determine the problem to be solved.
3. The quantum computing system of claim 1 or 2, wherein the classical computing unit further comprises: The first output module is coupled to the parameter calculation module and the compilation module respectively, and is configured to output the compiled quantum circuit and the first parameter that minimizes the objective function to be optimized.
4. The quantum computing system of claim 3, wherein the quantum computing unit further comprises: a second preprocessing module, coupled to the first output module, configured to generate a quantum assembly language instruction set according to the compiled quantum circuit and the first parameter; A timing calculation module, coupled to the second preprocessing module, configured to call a pre-stored quantum gate operation instruction according to the quantum assembly language instruction set to calculate and generate a first execution timing of the quantum circuit; an initialization module, coupled to the second preprocessing module, configured to select a corresponding area on the quantum chip for initialization according to the quantum assembly language instruction set; A quantum chip, coupled to the timing calculation module and the initialization module respectively, configured to perform quantum gate operations on the corresponding area according to the first execution timing and perform sampling measurement; The second output module is coupled to the quantum chip and configured to output the sampling measurement result of the quantum chip.
5. The quantum computing system of claim 4, wherein the sequential computing module operates in parallel with the initialization module.
6. The quantum computing system of claim 4, wherein the quantum chip performs the quantum gate operation multiple times, and the initialization module is further configured to: Before each execution of the quantum gate operation, the initialization module sets the quantum bits on the corresponding region to a zero state.
7. The quantum computing system of claim 1 or 2, comprising at least one classical computing unit and at least one quantum computing unit, wherein: The classical computing unit includes one or more of a CPU and a GPU, and the quantum computing unit includes one or more of a superconducting quantum chip, an ion trap quantum chip, a semiconductor quantum chip, an atomic quantum chip, and a photon quantum chip.
8. A quantum computing system as claimed in claim 7, wherein The question acquisition unit is configured to: Obtaining at least one question raised by a user, marking the time at which the question raised by the user is asked, and determining the problem to be solved; Sending the problem to be solved to one of the classical computing units; The solution feedback unit is configured as follows: receiving a sampling result output by one of the quantum computing units and processing the result into a solution to a corresponding problem; The solution to the corresponding question is fed back to the corresponding user according to the question time mark.
9. The quantum computing system according to claim 1 or 2, wherein the question acquisition unit and the solution feedback unit are integrated in a server, and a user asks a question to the server through a terminal, and the terminal comprises: One or more of mobile phone, computer, web page, and cloud.
10. A method for performing quantum computing using the quantum computing system according to any one of claims 1 to 9, characterized in that: include: The problem acquisition unit determines the problem to be solved according to the problem type provided by the user and parameters related to the actual application scenario; Compiling a quantum circuit according to the problem to be solved by the classical computing unit, calculating a first parameter required by the quantum circuit, and outputting the compiled quantum circuit and the first parameter; Performing a sampling operation on a corresponding area of the quantum chip according to the compiled quantum circuit and the first parameter by the quantum computing unit, and outputting a sampling result; The sampling result is processed into a solution to a corresponding question by the solution feedback unit and fed back to a user who raises the corresponding question.
11. A non-transitory computer-readable storage medium having computer-readable instructions stored thereon, which, when executed by a processor, causes the processor to perform the method according to claim 10.
Citation Information
Patent Citations
Hybrid quantum algorithm-based combinatorial optimization solving method, system and solver architecture
CN113392580A