Task parallel execution method, device and system
By introducing service submodules and multi-threaded parallel execution mechanisms on the server side of the quantum computing task execution device, the problem of too long execution time caused by task execution devices one by one when multiple users send quantum computing tasks at the same time is solved, and efficient parallel execution of quantum computing tasks is achieved.
Patent Information
- Application Number
- CN202311124141.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-31
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2043-08-31
AI Technical Summary
In the process of quantum computing, when multiple users send quantum computing tasks to task execution devices at the same time, the task execution device needs to perform each quantum computing task one by one, resulting in a long execution time and affecting the quantum computing efficiency.
By introducing the first and second service submodules into the service control module of the server, the first service submodule is communicatively connected with the task execution device, and the second service submodule includes a plurality of threads for performing quantum computing tasks in parallel. The method includes the first service submodule obtaining task information from the first list and sending it to the second service submodule, the second service submodule filtering out task identifications that can be executed in parallel and sending them to the task execution device, and the task execution device calls multiple threads to execute these tasks in parallel.
By performing quantum computing tasks in parallel, the execution time of all quantum computing tasks is effectively shortened, the execution efficiency of quantum computing tasks is improved, and the overall efficiency of quantum computing is improved.
Smart Images

Figure CN119539105A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of quantum computing technology, and in particular to a method, device and system for parallel execution of tasks. Background Art
[0002] Quantum computing is a computational model that uses the basic properties of quantum mechanics to solve problems. It is achieved by building a quantum physics hardware system that can be precisely operated and running quantum computing software to implement quantum algorithms, solve computational problems, and apply quantum computing to specific problems or fields.
[0003] During the quantum computing process, users can directly send quantum computing tasks to the task execution device, which will execute the received quantum computing tasks and obtain the task execution results. For example, when the task execution device is a measurement and control device in a quantum computing measurement and control system, when the measurement and control device receives a quantum computing task such as a quantum state test sent by the user, it will execute the quantum computing task and obtain the corresponding task execution results.
[0004] In related technologies, when multiple users send quantum computing tasks to a task execution device at the same time, the task execution device will execute each quantum computing task in sequence according to the order of the received quantum computing tasks. The execution time of all quantum computing tasks is relatively long, which affects the efficiency of quantum computing. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a method, device and system for executing tasks in parallel, so as to shorten the time required for executing all quantum computing tasks and improve the efficiency of quantum computing. The specific technical solution is as follows:
[0006] The embodiment of the present application provides a method for executing tasks in parallel, which is applied to a service control module in a server, wherein the service control module includes a first service submodule and a second service submodule, wherein the first service submodule is communicatively connected to a task execution device, and the task execution device includes a plurality of threads for executing quantum computing tasks in parallel, wherein the method includes:
[0007] The first service submodule obtains at least one first task information from the first list, and sends the obtained first task information to the second service submodule; the first list caches task information of the first quantum computing task, and the task information includes a task identifier and parallel judgment data corresponding to the first quantum computing task;
[0008] The second service submodule caches the received at least one first task information into the second list, and obtains the task identifiers corresponding to the parallel quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list, to obtain a target identifier set;
[0009] The second service submodule sends the target identifier set to the first service submodule;
[0010] The first service submodule forwards the received target identifier set to the task execution device, so that the task execution device calls the multiple threads to execute the parallel quantum computing tasks corresponding to each task identifier in the target identifier set in parallel according to the received target identifier set.
[0011] The embodiment of the present application also provides a task parallel execution device, the device is a service control module in a server, the service control module includes a first service submodule and a second service submodule, the first service submodule is communicatively connected with a task execution device, and the task execution device includes a plurality of threads for executing quantum computing tasks in parallel;
[0012] The first service submodule is used to obtain at least one first task information from the first list, and send the obtained first task information to the second service submodule; the first list caches the task information of the first quantum computing task, and the task information includes the task identifier and parallel judgment data corresponding to the first quantum computing task;
[0013] The second service submodule is used to cache the received at least one first task information into the second list, and obtain the task identifiers corresponding to the parallel quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list, to obtain a target identifier set; and send the target identifier set to the first service submodule;
[0014] The first service submodule is further used to forward the received target identifier set to the task execution device, so that the task execution device calls the multiple threads to parallelly execute the parallel quantum computing tasks corresponding to each task identifier in the target identifier set according to the received target identifier set.
[0015] The embodiment of the present application also provides a task parallel execution system, the system includes a server and a task execution device, the server includes a service control module, the service control module includes a first service submodule and a second service submodule, the first service submodule is communicatively connected with the task execution device, and the task execution device includes a plurality of threads for executing quantum computing tasks in parallel;
[0016] The first service submodule is used to obtain at least one first task information from the first list, and send the obtained first task information to the second service submodule; the first list caches the task information of the first quantum computing task, and the task information includes the task identifier and parallel judgment data corresponding to the first quantum computing task;
[0017] The second service submodule is used to cache the received at least one first task information into the second list, and obtain the task identifiers corresponding to the parallel quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list, to obtain a target identifier set; and send the target identifier set to the first service submodule;
[0018] The first service submodule is further configured to forward the received target identification set to the task execution device;
[0019] The task execution device is used to call the multiple threads to execute the parallel quantum computing tasks corresponding to each task identifier in the target identifier set in parallel according to the received target identifier set.
[0020] An embodiment of the present application also provides a quantum control system to implement any of the above-mentioned task parallel execution method steps.
[0021] An embodiment of the present application also provides a quantum computer, including the quantum control system.
[0022] Beneficial effects of the embodiments of the present invention:
[0023] According to the technical solution provided by the embodiment of the present invention, the first service submodule in the service control module obtains the first task information corresponding to at least one first quantum computing task from the first list cached by itself, and sends the obtained first task information to the second service submodule in the service control device, and the second service submodule caches the received first task information in the second list. The second service submodule obtains the task identifiers corresponding to the parallel quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task cached in the second list, obtains the target identifier set, and sends the target identifier set to the task execution device through the first service submodule, and the task execution device calls multiple threads to execute each parallel quantum computing task in parallel, thereby realizing the parallel execution of multiple quantum computing tasks.
[0024] Compared with the method in which the task execution device of the related technology needs to execute each quantum computing task one by one, the quantum computing tasks to be executed provided by the embodiment of the present application are judged for parallel execution in the second service sub-module of the server, and the second service sub-module screens out parallel quantum computing tasks that can be executed in parallel, so that the task identifier of the parallel quantum computing task is sent to the task execution device, so that the task execution device can use multiple threads to execute multiple quantum computing tasks at the same time, effectively shortening the time required for the execution of all quantum computing tasks, improving the execution efficiency of quantum computing tasks, and thus improving the quantum computing efficiency.
[0025] In addition, the parallel execution judgment process of the quantum computing task is deployed in a server that is communicatively connected to the task execution device. Compared with the method in which the task execution device directly performs parallel execution judgment of the quantum computing task, the embodiment of the present application saves the computing resources of the task execution device while ensuring the parallel execution of the quantum computing task, and improves the processing capability of the task execution device for the quantum computing task.
[0026] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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 paying creative work.
[0028] Figure 1 A structural diagram of a task execution system in the related technology;
[0029] Figure 2 A first signaling diagram of a method for executing tasks in parallel provided in an embodiment of the present application;
[0030] Figure 3 A first structural diagram of a task parallel execution system provided in an embodiment of the present application;
[0031] Figure 4 A second signaling diagram of the task parallel execution method provided in an embodiment of the present application;
[0032] Figure 5 A third signaling diagram of the task parallel execution method provided in an embodiment of the present application;
[0033] Figure 6 A fourth signaling diagram of the task parallel execution method provided in an embodiment of the present application;
[0034] Figure 7 A fifth signaling diagram of the task parallel execution method provided in an embodiment of the present application;
[0035] Figure 8 A sixth signaling diagram of the task parallel execution method provided in an embodiment of the present application;
[0036] Fig. 9 A seventh signaling diagram of the task parallel execution method provided in an embodiment of the present application;
[0037] Fig.10 An eighth signaling diagram of the task parallel execution method provided in an embodiment of the present application;
[0038] Fig.11 A ninth signaling diagram of the task parallel execution method provided in an embodiment of the present application;
[0039] Fig.12 A schematic diagram of a structure of a task parallel execution device provided in an embodiment of the present application;
[0040] Fig.13 A second structural diagram of the task parallel execution system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0042] like Figure 1 As shown, Figure 1 FIG. 1 is a structural diagram of a task execution system in the related art. The task execution system includes a user terminal 101 and a task execution device 102. The task execution device 102 can be connected to multiple user terminals 101 for communication ( Figure 1 not shown).
[0043] Different users can send quantum computing tasks to be executed to the task execution device through their respective user terminals. The task execution device needs to process the quantum computing tasks it receives one by one to obtain the task execution results. Since all quantum computing tasks in the task execution device need to be executed one by one, it will take a long time to complete all quantum computing tasks.
[0044] In addition, with the increasing number of connected user terminals and the increasing number of quantum computing tasks that users need to perform, quantum computing tasks may be queued in the task execution devices, resulting in the inability to execute quantum computing tasks for a long time, affecting the user experience.
[0045] In order to solve the problems in the related art, the present application embodiment provides a method for executing tasks in parallel. Figure 2 As shown, Figure 2 The first signaling diagram of the task parallel execution method provided in the embodiment of the present application. The method can be applied to a service control module in a server, and the service control module includes a first service submodule and a second service submodule. The first service submodule is connected to a task execution device in communication, and the task execution device includes multiple threads for executing quantum computing tasks in parallel. Figure 2 The method shown includes the following steps.
[0046] Step S201, the first service submodule obtains at least one first task information from the first list, and sends the obtained first task information to the second service submodule; the first list caches task information of the first quantum computing task, and the task information includes a task identifier and parallel judgment data corresponding to the first quantum computing task.
[0047] In step S202, the second service submodule caches the received at least one first task information into the second list, and obtains the task identifier corresponding to the parallel quantum computing task that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list, and obtains the target identifier set.
[0048] Step S203: the second service submodule sends a target identifier set to the first service submodule.
[0049] In step S204, the first service submodule forwards the received target identifier set to the task execution device, so that the task execution device calls multiple threads to execute the parallel quantum computing tasks corresponding to each task identifier in the target identifier set in parallel according to the received target identifier set.
[0050] In the embodiment of the present application, the user terminal, the server and the task execution device can together constitute a task parallel execution system. Figure 3 As shown, Figure 3 A first structural diagram of a task parallel execution system provided in an embodiment of the present application.
[0051] The server may be composed of a service module and a service control module, wherein the service control module may include a first service submodule, a second service submodule and a third service submodule.
[0052] The server in the above-mentioned task parallel execution system is respectively communicated with the user end and the task execution device, which can be specifically expressed as: the user end is communicated with the service module in the server, the service module is communicated with the first service sub-module and the third service sub-module in the service control module, and the first service sub-module is communicated with the task execution device.
[0053] Above Figure 3 The task parallel execution system shown only shows the communication connection between the user end and the server. In addition, the user end can also be connected to the task execution device. For example, after the task execution device executes the quantum computing task in parallel and obtains the task execution result, the user end can directly communicate with the task execution device to obtain the task execution result of its corresponding quantum computing task.
[0054] The task execution device is pre-deployed with a plurality of threads for executing quantum computing tasks in parallel. Here, the number of threads in the task execution device is not specifically limited.
[0055] In an embodiment of the present application, the service control module in the above-mentioned server can be a service instance or a hardware unit. In addition, the number of the service control modules in the above-mentioned server can be one or more. When the number of the service control modules in the server is multiple, the number of the corresponding task execution devices is also multiple, that is, the task execution device and the service control module in the server are one-to-one corresponding. Here, the expression form of the service control module in the above-mentioned task parallel execution system, as well as the number of service control modules and task execution devices are not specifically limited.
[0056] Regarding the above Figure 3 The information interaction process between different devices can be found in the following description and will not be described in detail here.
[0057] Through the method provided by the embodiment of the present application, the first service submodule in the service control module obtains the first task information corresponding to at least one first quantum computing task from the first list cached by itself, and sends the obtained first task information to the second service submodule in the service control device, and the second service submodule caches the received first task information in the second list. The second service submodule obtains the task identifiers corresponding to the parallel quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task cached in the second list, obtains the target identifier set, and sends the target identifier set to the task execution device through the first service submodule, and the task execution device calls multiple threads to execute each parallel quantum computing task in parallel, thereby realizing the parallel execution of multiple quantum computing tasks.
[0058] Compared with the method in which the task execution device of the related technology needs to execute each quantum computing task one by one, the quantum computing tasks to be executed provided by the embodiment of the present application are judged for parallel execution in the second service sub-module of the server, and the second service sub-module screens out parallel quantum computing tasks that can be executed in parallel, so that the task identifier of the parallel quantum computing task is sent to the task execution device, so that the task execution device can use multiple threads to execute multiple quantum computing tasks at the same time, effectively shortening the time required for the execution of all quantum computing tasks, improving the execution efficiency of quantum computing tasks, and thus improving the quantum computing efficiency.
[0059] In addition, the parallel execution judgment process of the quantum computing task is deployed in a server that is communicatively connected to the task execution device. Compared with the method in which the task execution device directly performs parallel execution judgment of the quantum computing task, the embodiment of the present application saves the computing resources of the task execution device while ensuring the parallel execution of the quantum computing task, and improves the processing capability of the task execution device for the quantum computing task.
[0060] The embodiments of the present application are described below through specific examples.
[0061] For the above step S201, the first service submodule obtains at least one first task information from the first list and sends the obtained first task information to the second service submodule; the first list caches the task information of the first quantum computing task, and the task information includes the task identifier and parallel judgment data corresponding to the first quantum computing task.
[0062] In the embodiment of the present application, the first service submodule stores a task list (referred to as the first list) corresponding to the quantum computing tasks to be executed. The first list caches task information (referred to as the first task information) corresponding to each quantum computing task to be executed (referred to as the first quantum computing task). Each task information may include a task identifier and parallel judgment data corresponding to the first quantum computing task.
[0063] The first service submodule may obtain one or more first task information from the first list. The first service submodule may send all the obtained first task information to the second service submodule.
[0064] In an optional embodiment, when acquiring the at least one first task information mentioned above, the first service submodule may acquire one or more first task information according to the cache duration corresponding to each first task information in the first list, in order of cache duration from long to short.
[0065] In another optional embodiment, when acquiring the at least one first task information mentioned above, the first service submodule may acquire first task information of the same type or with an error within a preset error threshold between task execution times based on the type of the first quantum computing task corresponding to each first task information in the first list, or the task execution time of the first quantum computing task corresponding to each first task information.
[0066] In the embodiment of the present application, the task execution time of the first quantum computing task can be determined according to the historical execution time of the same type of quantum computing tasks. The preset error threshold can be set according to user needs, etc. Here, the acquisition method of the at least one first task information, the calculation method of the task execution time of the first quantum computing task, and the preset error threshold are not specifically limited.
[0067] In an optional embodiment, the parallel judgment data in the above-mentioned first task information may include: one or more of: a quantum bit identifier and quantum bit co-local oscillation data corresponding to the first quantum computing task.
[0068] The above-mentioned quantum bit identification is the identification corresponding to the quantum bit used to perform quantum computing. The quantum bit identification can be used to determine whether the quantum bits used in the quantum computing tasks executed in parallel conflict.
[0069] The above-mentioned quantum bit co-local oscillator data may include the frequency and channel information corresponding to the quantum bit. The quantum bit co-local oscillator data is used to determine whether there is a local oscillator conflict problem in quantum computing tasks executed in parallel. In related technologies, since the frequency range of the signal that can be generated by a local oscillator source is limited, in order to reduce the cost increase caused by configuring a separate local oscillator source for each quantum bit, multiple quantum bits in a quantum chip often share a local oscillator source. The above-mentioned quantum co-intrinsic data can be used to detect local oscillator conflicts, thereby determining whether the quantum bits corresponding to the quantum computing tasks executed in parallel share the same extrinsic source.
[0070] In the embodiment of the present application, the above parallel judgment data may be different according to the various tests and calculations included in the quantum computing process, as well as the differences in the quantum chip design. For example, in addition to the above quantum bit identification and quantum bit common local oscillation data, the above parallel judgment data may also include parameters such as signal reading frequency and amplitude. Here, the parameters included in the above parallel judgment data and the above quantum bit common local oscillation data are not specifically limited.
[0071] For the above step S202, the second service submodule caches the received at least one first task information into the second list, and obtains the task identifier corresponding to the parallel quantum computing task that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list, and obtains the target identifier set.
[0072] In an embodiment of the present application, the second service submodule may store a task list (referred to as a second list) corresponding to the quantum computing task to be executed. The second list caches the task information sent by the first service submodule. For ease of distinction, the second list caches the second task information of the second quantum computing task.
[0073] Since the second task information in the second list is all task information sent by the first service submodule, the second task information in the second list also includes the task identifier and parallel judgment data corresponding to the quantum computing task. The second task information can refer to the description of the first task information, which will not be repeated here.
[0074] After the first service submodule sends the at least one first task information to the second service submodule, the second service submodule will receive the first task information sent by the first service submodule. At this time, the second service submodule can cache the received first task information into the second list.
[0075] According to the parallel judgment data in the second task information corresponding to each second quantum computing task in the above second list, the second service submodule can determine the parallel quantum computing tasks that can be executed in parallel from the second quantum computing tasks, thereby obtaining the task identifier in the second task information corresponding to each parallel quantum computing task, and obtaining the target identifier set.
[0076] The second task information corresponding to the second quantum computing task is the task information cached in the second list. The number of parallel quantum computing tasks determined by the second service submodule is at least two. The corresponding target identifier set includes at least two task identifiers corresponding to the second quantum computing task. Here, the number of task identifiers included in the parallel quantum tasks and the target identifier set is not specifically limited.
[0077] The method for obtaining the above target identification set can be found in the description below and will not be elaborated here.
[0078] In an optional embodiment, the number of task information that can be cached in the second list is a preset number. That is, at most a preset number of task information can be cached in the second list. Here, the preset number is not specifically limited.
[0079] With respect to the above step S203, the second service submodule sends the target identifier set to the first service submodule.
[0080] In the embodiment of the present application, the first service submodule and the second service submodule. After obtaining the target identifier set, the second service submodule can send all task identifiers in the target identifier set to the first service submodule. Here, the information exchange method between the first service submodule and the second service submodule is not specifically limited.
[0081] In an optional embodiment, when the second service submodule sends the target identifier set to the first service submodule, for each task identifier in the target identifier set, the second service submodule may remove the task information including the task identifier from the second list. For example, the second task information including the task identifier is deleted from the second list. For another example, the second task information including the task identifier is moved to another list (recorded as the third list).
[0082] With respect to the above step S204, the first service submodule forwards the received target identification set to the task execution device, so that the task execution device calls multiple threads to execute the parallel quantum computing tasks corresponding to each task identification in the target identification set in parallel according to the received target identification set.
[0083] In the embodiment of the present application, after the second service submodule sends the target identifier set to the first service submodule, the first service submodule will receive the target identifier set. At this time, the first service submodule can forward all task identifiers in the target identifier set to the task execution device connected to it.
[0084] After receiving the target identifier set, the task execution device calls multiple threads included in itself to execute the parallel quantum computing tasks corresponding to each task identifier in parallel according to each task identifier in the target identifier set. The number of threads called by the task execution device matches the number of quantum computing tasks in the parallel quantum computing task, and each thread executes only one quantum computing task in the parallel quantum computing task.
[0085] In an optional embodiment, the preset database stores the task identifiers corresponding to all quantum computing tasks and all the computing data required to execute each quantum computing. When the task execution device executes the above-mentioned parallel quantum computing tasks in parallel, for each task identifier in the above-mentioned target identifier set, all the computing data corresponding to the task identifier can be obtained from the preset database according to the task identifier. After obtaining all the computing data corresponding to all the task identifiers in the target identifier set, the task execution device can call a corresponding number of threads to perform parallel quantum computing according to all the computing data corresponding to each task identifier to obtain the task execution result.
[0086] In the embodiment of the present application, for the above-mentioned target identifier set, the number of task identifiers included in the target identifier set may be the same as or different from the number of threads included in the task execution device.
[0087] For example, when the number of threads in the task execution device is a fixed number, when the second service submodule obtains the target identification set, if the number of parallel quantum computing tasks determined is less than or equal to the fixed value, the second service submodule can obtain the task identification of each parallel quantum computing task to obtain the target identification set. If the number of parallel quantum computing tasks determined is greater than the fixed number, the second service submodule can obtain the task identification of the fixed number of parallel quantum computing tasks to obtain the target identification set, such as obtaining the task identifications corresponding to the first fixed number of parallel quantum computing tasks in the order of cache time from long to short to obtain the target identification set.
[0088] For another example, if the number of threads initially included in the task execution device is the fixed number mentioned above, but the number of threads is adjustable, then when the number of task identifiers in the target identifier set received by the task execution device is less than or equal to the fixed number, the number of threads in the task execution device may remain unchanged; when the number of task identifiers in the target task set received by the task execution device is greater than the fixed number, the task execution device may create new threads, and the number of newly created threads is the difference between the number of task identifiers in the target task set and the fixed number.
[0089] In an optional embodiment, for a scenario where the number of threads in a task execution device is adjustable, after the parallel quantum computing tasks corresponding to each task identifier in the above target identifier set are executed, the task execution device may delete the newly created thread or may not perform any processing.
[0090] In the embodiment of the present application, there is no specific limitation on the number of task identifiers included in the above target identifier set and the number of threads included in the task execution device.
[0091] Above Figure 2 In the method shown, only one round of parallel quantum computing tasks is performed by the task execution device as an example. In actual application, when there are multiple quantum computing tasks to be executed, the task execution device may need to execute multiple rounds of parallel quantum computing tasks to complete the execution process of all quantum computing tasks to be executed. The execution process of each round of parallel quantum computing tasks can refer to the above Figure 2 The method shown is carried out and will not be described in detail here.
[0092] In an optional embodiment, according to the above Figure 2The method shown in the figure, the embodiment of the present application also provides a method for executing tasks in parallel. Figure 4 As shown, Figure 4 The second signaling diagram of the task parallel execution method provided in the embodiment of the present application. Figure 4 The following step is added to the method shown, namely step S205.
[0093] Step S205, when the first service submodule receives the thread release instruction, it returns to execute the step of obtaining at least one first task information from the first list; the thread release instruction is sent when the task execution device completes the parallel execution of the parallel quantum computing tasks corresponding to each task identifier in the target identifier set.
[0094] In this step, when the task execution device calls multiple threads to execute the above-mentioned parallel quantum computing tasks in parallel, if each parallel quantum computing task is executed and the corresponding task execution result is obtained, the task execution device can send a thread release instruction to the above-mentioned server. The first service submodule in the server that is in communication with the task execution device will receive the thread release instruction. The first service submodule can determine that the task execution device has completed the execution process of the parallel quantum computing tasks corresponding to each task identifier in the target identifier set issued in the above-mentioned step S204 based on the received thread release instruction. At this time, the first service submodule can return to execute the above-mentioned step S201, that is, return to execute the above-mentioned step of obtaining at least one first task information from the first list.
[0095] In an embodiment of the present application, by sending and receiving the above-mentioned thread release instructions, the first service sub-module can promptly determine that the parallel quantum computing tasks it has issued have been fully executed when the task execution device completes the parallel execution of a round of parallel quantum computing tasks. At this time, the first service sub-module can start a new round of parallel execution of parallel quantum computing tasks, which effectively improves the resource utilization of the task execution device, thereby improving the execution efficiency of the quantum computing tasks.
[0096] In an optional embodiment, when the amount of task information that can be cached in the second list is a preset amount, according to the above Figure 2 The method shown in the figure, the embodiment of the present application also provides a method for executing tasks in parallel. Figure 5 As shown, Figure 5 The third signaling diagram of the task parallel execution method provided in the embodiment of the present application. Figure 5 In the method shown, the above step S201 is refined into the following steps, namely step S2011-step S2012.
[0097] Step S2011: the first service submodule obtains a second number of first task information from the first list according to the first number of second task information cached in the second list at the current moment, where the second number is the difference between the preset number and the first number.
[0098] In an embodiment of the present application, since the parallel processing process of this round of quantum computing tasks can be in any round of the execution process of all quantum computing tasks, the number of second task information included in the second list cached by the above-mentioned second service sub-module can be empty or other numbers, such as the first number.
[0099] Before sending the first task information to the second service submodule, the first service submodule may determine the amount of task information cached in the second service submodule, and thereby determine the amount of first task information to be acquired from the first list based on the amount.
[0100] For example, if the number of second task information included in the second list cached by the second service submodule at the current moment is the first number, the first service submodule can calculate the difference between the preset number of task information that can be cached in the second list and the first number (recorded as the second number). The first service submodule can obtain the second first task information from the first list.
[0101] In an optional embodiment, when the first number is empty, that is, when the second list of the second service submodule is empty, the second number is equal to the preset number.
[0102] In an optional embodiment, for the first number, the first service submodule may determine the first number based on its own log information or by directly communicating with the second service submodule. Here, the method for determining the first number is not specifically limited.
[0103] Step S2012: The first service submodule sends the obtained first task information to the second service submodule.
[0104] Through the above-mentioned steps S2011-step S2012, since the maximum number of second task information in the second list cached by the second service sub-module is fixed, that is, the above-mentioned preset number, therefore, when the first service sub-module sends the first task information to the second service sub-module, it can obtain the second number of first task information according to the preset number and the number of second task information cached in the second task information at the current moment, while ensuring that the number of second task information cached in the second list is maintained at the above-mentioned preset number, the occurrence of task information loss caused by sending more first task information is avoided.
[0105] In addition, by sending a second number of first task information to the second service submodule, the first service submodule can maintain the number of second task information cached in the second service submodule at a preset number. While ensuring that the number of cached task information in the second list is the largest, the number of parallel quantum computing tasks determined based on the second list can be maximized, thereby effectively improving the execution efficiency of quantum computing tasks.
[0106] In the above Figure 5 In the illustrated embodiment, the first service submodule determines the quantity of the first task information to be acquired (i.e., the second quantity) based on the first quantity. In addition, the first service submodule may also acquire the corresponding quantity of the first task information based on the quantity of the task identifiers included in the target identifier set issued by itself during the execution of the previous round of parallel quantum computing tasks, thereby ensuring that the quantity of the second task information cached in the second service submodule is the preset quantity.
[0107] In an optional embodiment, when the parallel judgment data in the second task information includes the quantum bit identifier and the quantum bit common local oscillation data, according to the above Figure 2 The method shown in the figure, the embodiment of the present application also provides a method for executing tasks in parallel. Figure 6 As shown, Figure 6 This is a fourth signaling diagram of the task parallel execution method provided in the embodiment of the present application. Figure 6 In the method shown, the above step S202 can be subdivided into the following steps, namely, step S2021 to step S2023.
[0108] Step S2021: The second service submodule caches the received at least one first task information into the second list.
[0109] Step S2022: The second service submodule selects, according to the parallel judgment data included in the second task information corresponding to each second quantum computing task in the second list, a second quantum computing task with different quantum bit identifiers and quantum bit co-local oscillation data satisfying a preset co-local oscillation condition as a parallel quantum computing task that can be executed in parallel.
[0110] In an optional embodiment, the qubit co-local oscillation data may include frequency and channel information corresponding to the qubit. The preset co-local oscillation condition may be that the difference between the frequencies corresponding to the qubits executing quantum computation in parallel is the same.
[0111] For the quantum bit identifiers in the parallel judgment data, the second service submodule can compare the quantum bit identifiers in the parallel judgment data corresponding to each two second task information in the second list to obtain a comparison result. The comparison result indicates whether the quantum bit identifiers in the parallel judgment data corresponding to the two second task information are the same.
[0112] For the quantum bit co-local oscillation data in the parallel judgment data, the second service submodule can determine the adjacent quantum bits according to the channels included in the quantum bit co-local oscillation data corresponding to each second task information in the second list, and then calculate the frequency difference between the two adjacent quantum bits for the two quantum bits. The second service submodule can determine whether the frequency difference between each two adjacent quantum bits is the same value. If so, a judgment result indicating that the quantum bit co-local oscillation data meets the preset co-local oscillation condition is obtained. If not, a judgment result indicating that the quantum bit co-local oscillation data does not meet the preset co-local oscillation condition is obtained.
[0113] According to the above comparison results and judgment results, the second service submodule can determine the parallel quantum computing tasks in the second quantum computing tasks. That is, for each two second quantum computing tasks, when the comparison results corresponding to the two second quantum computing tasks indicate that the quantum bit identifiers are different, and the judgment results corresponding to the two second quantum computing tasks indicate that the quantum bit co-local oscillation data meets the preset co-local oscillation condition, the two quantum computing tasks are determined to be parallel quantum computing tasks that can be executed in parallel.
[0114] In an optional embodiment, for the above-mentioned comparison results and judgment results, if the above-mentioned comparison results indicate that the quantum bit identifiers in the parallel judgment data corresponding to the two second task information are different, and / or the above-mentioned judgment results indicate that the co-local oscillation data of the quantum bits does not meet the above-mentioned preset co-local oscillation conditions, the second service submodule can determine that the second quantum computing tasks corresponding to the two second execution tasks cannot be executed in parallel.
[0115] The second service submodule can determine the second quantum bit tasks that can be executed in parallel (referred to as parallel quantum bit tasks) based on the comparison results and judgment results of the second quantum computing tasks corresponding to every two second task information in the second list.
[0116] Step S2023: The second service submodule obtains the task identifier of each parallel quantum computing task to obtain a target identifier set.
[0117] Through the above steps S2021 to S2023, the second service submodule can determine the quantum computing tasks that can be executed in parallel in the second quantum computing task by comparing the quantum bit identifiers and judging whether the quantum bit co-local oscillation data meets the preset co-local oscillation conditions, thereby avoiding the impact of conflicts on the parallel execution of quantum computing tasks and providing guarantee for the parallel execution of quantum computing tasks.
[0118] In the above Figure 6In the illustrated embodiment, only the case where the parallel task data includes the quantum bit identifier and the quantum bit co-local oscillation data is taken as an example to illustrate the determination of the above-mentioned parallel quantum computing tasks. In addition, when the above-mentioned parallel determination data also includes other data, the second service submodule may also consider the other data in the parallel determination data when determining the parallel quantum computing tasks.
[0119] For ease of understanding, the above-mentioned parallel determination data also includes reading frequency and amplitude as an example for explanation.
[0120] In an optional embodiment, in a known quantum chip, the signal in the reading cavity corresponding to each quantum bit can be read through the same reading bus according to the frequency division multiplexing technology, and the demodulation of the signal in the reading bus can determine the task execution result obtained after each quantum bit executes the quantum computing task. Therefore, for this quantum chip, the above-mentioned parallel judgment data can also include the reading frequency and amplitude. The second service submodule can perform parallel judgment of the frequency division multiplexing dimension on the second quantum computing tasks corresponding to different second task information according to the reading frequency and amplitude included in each second task information in the above-mentioned second list, so as to determine the second quantum computing task that meets the frequency division multiplexing requirements. The second service submodule can select the second quantum computing task with different quantum bit identifiers, quantum bit common local oscillation data that meets the preset common local oscillation conditions, and the reading frequency and amplitude that meet the frequency division multiplexing requirements to obtain a parallel quantum computing task.
[0121] In the embodiment of the present application, the parameters included in the parallel judgment data in the task information will also be different according to the differences in the above-mentioned quantum chip, application scenario, user needs, etc. When the parameters included in the parallel judgment parameters are different, the way in which the second service submodule determines the parallel quantum computing task based on the parallel judgment parameters will also be different. Here, the way to determine the above-mentioned parallel quantum computing task is not specifically limited.
[0122] In an optional embodiment, according to the above Figure 2 The method shown in the figure, the embodiment of the present application also provides a method for executing tasks in parallel. Figure 7 shown. Figure 7 The fifth signaling diagram of the task parallel execution method provided in the embodiment of the present application. Figure 7 In the method shown, the above step S202 can be subdivided into the following steps, namely, step S2024 to step S2026.
[0123] Step S2024: The second service submodule caches the received at least one first task information into the second list.
[0124] Step S2025, the second service submodule determines a fourth quantum computing task that can be executed in parallel with the target quantum computing task according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list, and the second task information corresponding to the target quantum computing task has the longest cache time in the second list.
[0125] In this step, according to the cache duration of each second task information in the second list, the second service submodule can determine the second task information with the longest cache duration as the target task information. The second service submodule can determine the quantum computing task (recorded as the fourth quantum computing task) that can be executed in parallel with the target quantum computing task corresponding to the target task information according to the parallel judgment data in the target task information and the parallel judgment data in other task information (recorded as the fourth task information) in the second list except the target task information.
[0126] In the embodiment of the present application, the fourth quantum computing task is a quantum computing task in the second quantum computing task corresponding to the fourth task information, which can be executed in parallel with the target quantum computing task. The fourth task information includes the task information of the fourth quantum computing task. The fourth quantum computing task and the target quantum computing task together constitute the parallel quantum computing task in the above step S202. Here, the number of the fourth quantum computing tasks determined is not specifically limited.
[0127] In an optional embodiment, for the above-mentioned target task information, when the second service submodule determines the fourth quantum computing task to be executed in parallel with the target quantum computing task corresponding to the target task information, the number of the fourth quantum computing task determined may be empty. That is, among the second quantum computing tasks corresponding to the task information cached in the second list, there is no second quantum computing task that can be executed in parallel with the target quantum computing task. At this time, the second service submodule can send the task identifier in the target task information to the first service submodule, and the task identifier received by the first service submodule is forwarded to the task execution device, and the task execution device executes the target quantum computing task according to the received task identifier. Alternatively, the second service submodule can determine the next task information as the target task information in the order of the cache duration of each task information in the second list from long to short, and re-execute the above-mentioned step S2025. Here, when the number of the above-mentioned fourth quantum computing task is empty, the execution steps of the second service submodule are not specifically limited.
[0128] Step S2026: The second service submodule obtains the task identifier of the target quantum computing task and the task identifier of the fourth quantum computing task to obtain a target identifier set.
[0129] In this step, the second service submodule can obtain the target task identifier and the fourth task information corresponding to each fourth quantum computing task from the second list. The second service submodule obtains the task identifier from the obtained target task information and the fourth task information to obtain a target identifier set.
[0130] Through the above steps S2024-S2026, the second service submodule can obtain a fourth quantum computing task that can be executed in parallel with the target quantum computing task for the above target quantum computing task, so that the task execution device can execute the target quantum computing task and the fourth quantum computing task in parallel, while giving priority to executing the target quantum computing task according to the cache duration of each quantum computing task, and executing the fourth quantum computing task in parallel, thereby realizing the parallel execution of multiple quantum computing tasks, ensuring the orderliness of the execution of quantum computing tasks, shortening the total execution time of all quantum computing tasks, and improving quantum computing efficiency and user experience.
[0131] In another optional embodiment, according to the above Figure 2 The method shown in the figure, the embodiment of the present application also provides a method for executing tasks in parallel. Figure 8 As shown, Figure 8 The sixth signaling diagram of the task parallel execution method provided in the embodiment of the present application. Figure 8 In the method shown, the above step S202 can be refined into the following steps, namely step S2027 to step S2029.
[0132] Step S2027: The second service submodule caches the received at least one first task information into the second list.
[0133] Step S2028: The second service submodule obtains at least one combination method corresponding to the second quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list.
[0134] In an optional embodiment, the second service submodule can determine, for each second task information in the second list, the quantum computing task to be executed in parallel with the second task information based on the parallel judgment data in the second task information and the parallel judgment data in other second task information, and obtain a combination of the second quantum computing tasks executed in parallel corresponding to the second task information.
[0135] In the embodiment of the present application, the combination of the second quantum computing tasks executed in parallel corresponding to each second task information may be empty, one or more, and the quantum computing tasks included in each combination are different.
[0136] In an optional embodiment, when a combination method corresponding to a certain second task information is empty, the second service submodule may determine that there is no quantum computing task in the second list that can be executed in parallel with the second quantum computing task corresponding to the second task information.
[0137] Step S2029: The second service submodule obtains the task identifier corresponding to each second quantum computing task in the target combination mode to obtain a target identifier set, wherein the target combination mode includes the largest number of second quantum computing tasks in at least one combination mode.
[0138] In this step, for all the combinations determined in step S2028, the second service submodule counts the number of second quantum computing tasks included in each combination, thereby obtaining the combination with the largest number of second quantum computing tasks as the target combination. The second service submodule can obtain the task identifier corresponding to each second quantum computing task in the target combination from the second task information included in the second list, and obtain a target identifier set.
[0139] Each second quantum computing task included in the above target combination method is the parallel quantum computing task in the above step S202.
[0140] Through the above steps S2027-S2029, when the second service submodule determines that there are multiple combinations, the combination method that includes the most second quantum computing tasks is determined as the target combination method. This enables the task execution device to simultaneously execute the quantum computing tasks included in the target combination method when executing quantum computing tasks in parallel, thereby maximizing the quantum computing tasks executed in parallel by the task execution device and improving the quantum computing efficiency.
[0141] In the above Figure 7 and Figure 8 In the embodiment shown, the task execution device will respectively give priority to executing parallel quantum computing tasks that can be executed in parallel with the target quantum computing task, and execute parallel quantum computing tasks in parallel according to the target combination with the largest number of parallel quantum computing tasks. In addition, when obtaining the target identification set, the task execution device can also comprehensively execute the target identification set. Figure 7 and Figure 8 The target identification set is obtained as shown.
[0142] For ease of understanding, the above Figure 7 and Figure 8 The combination of the target identification set acquisition method is illustrated by an example.
[0143] In an optional embodiment, when the second service submodule obtains the fourth quantum computing task that can be executed in parallel with the target quantum computing task according to the above steps S2024-S2025, if multiple groups of fourth quantum computing tasks that can be executed in parallel with the target quantum computing task are obtained, the second service submodule can refer to Figure 8 In the illustrated embodiment, the combination method including the largest number of fourth quantum computing tasks is selected as the target combination method, and the task identifier corresponding to each quantum computing task in the target combination method is obtained to obtain a target identifier set.
[0144] In an optional embodiment, according to the above Figure 1 The method shown in the figure, the embodiment of the present application also provides a method for executing tasks in parallel. Fig. 9 As shown, Fig. 9 The seventh signaling diagram of the task parallel execution method provided in the embodiment of the present application. Fig. 9 The following steps are added to the method shown, namely step S206 to step S207.
[0145] Step S206: The service module receives the third task information sent by the user for the third quantum computing task, and sends the third task information to the first service submodule.
[0146] In this step, the user can send the task information (referred to as the third task information) of the quantum computing task to be executed (referred to as the third quantum computing task) to the server through the user terminal. At this time, the service module in the server that is connected to the user terminal in communication can receive the third task information. The service module can send the received third task information to the first service submodule.
[0147] The number of the third task information may be one or more. Here, the number of the third task information is not specifically limited.
[0148] Step S207: the first service submodule caches the received third task information into the first list.
[0149] In this step, after receiving the third task information sent by the service module, the first service submodule can cache the third task information in the first list. At this time, the third task information is recorded as the first task information cached in the first list.
[0150] Through the above steps S206 and S207, the user can send the task information of the quantum computing task to be executed to the server through the user terminal, and the first service submodule in the server updates the first list according to the received task information.
[0151] In the embodiment of the present application, the above steps S206 to S207 may be performed before, during or after any of the above steps S201 to S204. Fig. 9 The example of executing step S206 to step S207 after step S201 to step S204 is used for illustration only and does not serve any limiting purpose.
[0152] In an optional embodiment, when the server includes a service module and multiple service control modules, and each service control module also includes a third service submodule, according to the above Figure 2 The method shown in the figure, the embodiment of the present application also provides a method for executing tasks in parallel. Fig.10 As shown, Fig.10 The eighth signaling diagram of the task parallel execution method provided in the embodiment of the present application. The method comprises the following steps.
[0153] Step S1001: The third service submodule receives an initialization instruction sent by the service module, where the initialization instruction includes initialization parameters and address information of a task execution module.
[0154] In the embodiment of the present application, the service module in the above-mentioned server can also be communicated with the third service submodule in addition to being communicated with the above-mentioned first service submodule. For each service control module included in the server, the user can trigger the initialization operation of the service control module through the user terminal. At this time, the user terminal will send an initialization instruction to the service module in the server. The initialization instruction includes the module identification of the service control module, initialization parameters and address information of the task execution module.
[0155] After receiving the initialization instruction sent by the user end, the service module can forward the initialization instruction to the third service submodule in the corresponding service control module (recorded as the target service control module) according to the module identifier. At this time, the third service submodule will receive the initialization instruction.
[0156] In step S1002, the third service sub-module initializes and configures the first service sub-module and the second service sub-module in the target service control module based on the initialization parameters, and establishes a communication connection between the task execution module and the first service sub-module in the target service control module based on the address information. The target service control module is the service control module where the third service sub-module is located.
[0157] Here, the above-mentioned initialization configuration process and communication connection establishment process are not described in detail.
[0158] Through the above steps S1001-S1002, the third service submodule in the service control module can complete the initialization process of the first service submodule and the second service submodule in the service control module, so that the configured first service submodule and the second service submodule can operate normally.
[0159] Step S1003, the first service submodule obtains at least one first task information from the first list, and sends the obtained first task information to the second service submodule; the first list caches the task information of the first quantum computing task, and the task information includes the task identifier and parallel judgment data corresponding to the first quantum computing task.
[0160] Step S1004: The second service submodule caches the received at least one first task information into the second list, and obtains the task identifier corresponding to the parallel quantum computing task that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list, and obtains the target identifier set.
[0161] Step S1005: The second service submodule sends a target identifier set to the first service submodule.
[0162] Step S1006: The first service submodule forwards the received target identifier set to the task execution device, so that the task execution device calls multiple threads to execute the parallel quantum computing tasks corresponding to each task identifier in the target identifier set in parallel according to the received target identifier set.
[0163] The above steps S1003 to S1006 are the same as the above steps S201 to S204.
[0164] In an optional embodiment, according to the above Fig.10 The method shown in the figure, the embodiment of the present application also provides a method for executing tasks in parallel. Fig.11 As shown, Fig.11 The ninth signaling diagram of the task parallel execution method provided in the embodiment of the present application. The method comprises the following steps.
[0165] Step S1101: The third service submodule receives an initialization instruction sent by the service module, where the initialization instruction includes initialization parameters and address information of the task execution module.
[0166] Step S1102, the third service sub-module initializes the configuration of the first service sub-module and the second service sub-module in the target service control module based on the initialization parameters, and establishes a communication connection between the task execution module and the first service sub-module in the target service control module based on the address information. The target service control module is the service control module where the third service sub-module is located.
[0167] The above steps S1101 to S1102 are the same as the above steps S1001 to S1002.
[0168] Step S1103: When the third service submodule detects a start command triggered by the user through the service module, the third service submodule starts the first service submodule and the second service submodule in the target service control module where the third service submodule is located.
[0169] In an optional embodiment, the user terminal may be installed with application software of the service module in the server. The user may trigger a start command through the application software. The start command may include a module identifier of the service control module.
[0170] After receiving the above-mentioned start command, the service module can forward the start instruction to the corresponding service control module according to the module identifier in the start command. At this time, the third service submodule will detect the start instruction and determine that the user has triggered the start command through the service module. At this time, the third service submodule can start the first service submodule and the second service submodule in the target service control module where it is located.
[0171] By detecting the above startup command, the third service submodule can start the first service submodule and the second service submodule in the service control module according to user requirements.
[0172] Step S1104, the first service submodule obtains at least one first task information from the first list, and sends the obtained first task information to the second service submodule; the first list caches task information of the first quantum computing task, and the task information includes a task identifier and parallel judgment data corresponding to the first quantum computing task.
[0173] Step S1105: The second service submodule caches the received at least one first task information into the second list, and obtains the task identifier corresponding to the parallel quantum computing task that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list, and obtains the target identifier set.
[0174] Step S1106: The second service submodule sends a target identifier set to the first service submodule.
[0175] Step S1107: The first service submodule forwards the received target identifier set to the task execution device, so that the task execution device calls multiple threads to execute the parallel quantum computing tasks corresponding to each task identifier in the target identifier set in parallel according to the received target identifier set.
[0176] The above steps S1104 to S1107 are the same as the above steps S1003 to S1006.
[0177] Step S1108: When receiving the stop instruction sent by the user through the service module, the third service submodule stops the first service submodule and the second service submodule in the target service control module where the third service submodule is located.
[0178] In an embodiment of the present application, a user may send a stop instruction to a server through a user terminal, wherein the stop instruction includes a module identifier of a service control module. When receiving the stop instruction, the service module in the server may forward the stop instruction to a corresponding target service control module according to the module identifier in the stop instruction. At this time, the third service submodule will receive the stop instruction and stop the first service submodule and the second service submodule in the target service control module where the third service submodule is located according to the stop instruction.
[0179] By sending and receiving the above-mentioned stop instruction, the third service submodule can stop the first service submodule and the second service submodule in the service control module according to user requirements, thereby realizing control over the service control module.
[0180] Based on the same inventive concept, according to the task parallel execution method provided in the above application embodiment, the present application embodiment also provides a task parallel execution device. Fig.12 As shown, Fig.12 A structural diagram of a task parallel execution device provided in an embodiment of the present application. The device is a service control module 1202 in a server 1201, the service control module 1202 includes a first service submodule 1203 and a second service submodule 1204, the first service submodule 1203 is in communication connection with a task execution device, and the task execution device includes multiple threads for executing quantum computing tasks in parallel;
[0181] The first service submodule 1203 is used to obtain at least one first task information from the first list, and send the obtained first task information to the second service submodule 1204; the first list caches the task information of the first quantum computing task, and the task information includes the task identifier and parallel judgment data corresponding to the first quantum computing task;
[0182] The second service submodule 1204 is configured to cache the received at least one first task information into the second list, and obtain the task identifiers corresponding to the parallel quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list, and obtain a target identifier set; and send the target identifier set to the first service submodule 1203;
[0183] The first service submodule 1203 is further configured to forward the received target identifier set to a task execution device, so that the task execution device calls multiple threads to execute in parallel the parallel quantum computing tasks corresponding to each task identifier in the target identifier set according to the received target identifier set.
[0184] Optionally, the server 1201 may further include a service module;
[0185] The above-mentioned service module is used to receive the third task information sent by the user for the third quantum computing task, and send the third task information to the first service submodule 1203; and cache the received third task information into the first list.
[0186] Optionally, the second service submodule 1204 may be specifically configured to determine, according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list, a fourth quantum computing task that can be executed in parallel with the target quantum computing task, and the second task information corresponding to the target quantum computing task has the longest cache time in the second list;
[0187] The task identifier of the target quantum computing task and the task identifier of the fourth quantum computing task are obtained to obtain a target identifier set.
[0188] Optionally, the second service submodule 1204 may be specifically configured to obtain at least one combination mode corresponding to the second quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list;
[0189] The task identifiers corresponding to the second quantum computing tasks in the target combination method are obtained to obtain a target identifier set, wherein the target combination method includes the largest number of second quantum computing tasks in at least one combination method.
[0190] Optionally, the parallel judgment data in the above-mentioned second task information includes one or more of the quantum bit identification and quantum bit common local oscillation data corresponding to the second quantum computing task.
[0191] Optionally, the second service submodule 1204 may be specifically configured to select, if the parallel judgment data in the second task information includes a quantum bit identifier and quantum bit co-local oscillation data, a second quantum computing task with a different quantum bit identifier and quantum bit co-local oscillation data satisfying a preset co-local oscillation condition as a parallel quantum computing task that can be executed in parallel, according to the parallel judgment data included in the second task information corresponding to each second quantum computing task in the second list;
[0192] Obtain the task identifier of each parallel quantum computing task and obtain a target identifier set.
[0193] Optionally, the server 1201 includes a service module and multiple service control modules 1202; each service control module 1202 also includes a third service submodule;
[0194] The above-mentioned third service sub-module is used to receive the initialization instruction sent by the service module, and the initialization instruction includes initialization parameters and address information of the task execution module; based on the initialization parameters, the first service sub-module 1203 and the second service sub-module 1204 in the target service control module are initialized and configured, and based on the address information, a communication connection is established between the task execution module and the first service sub-module 1203 in the target service control module, and the target service control module is the service control module where the third service sub-module is located.
[0195] Optionally, the third service submodule may also be used to start the first service submodule 1203 and the second service submodule 1204 in the target service control module where the third service submodule is located when a start command triggered by the user through the service module is detected;
[0196] or,
[0197] The third service submodule may also be configured to stop the first service submodule 1203 and the second service submodule 1204 in the target service control module where the third service submodule is located when receiving a stop instruction sent by the user through the service module.
[0198] Optionally, the above-mentioned first service submodule 1203 can also be used to return to the step of obtaining at least one first task information from the first list when a thread release instruction is received after forwarding the received target identification set to the task execution device; the thread release instruction is sent when the task execution device completes the parallel execution of the parallel quantum computing tasks corresponding to each task identification in the target identification set.
[0199] Optionally, the number of task information that can be cached in the second list is a preset number;
[0200] The first service submodule 1203 may be specifically configured to obtain a second number of first task information from the first list according to a first number of second task information cached in the second list at the current moment, where the second number is a difference between the preset number and the first number.
[0201] Through the device provided by the embodiment of the present application, the first service submodule in the service control module obtains the first task information corresponding to at least one first quantum computing task from the first list cached by itself, and sends the obtained first task information to the second service submodule in the service control device, and the second service submodule caches the received first task information in the second list. The second service submodule obtains the task identifier corresponding to the parallel quantum computing task that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task cached in the second list, obtains the target identifier set, and sends the target identifier set to the task execution device through the first service submodule, and the task execution device calls multiple threads to execute each parallel quantum computing task in parallel, thereby realizing the parallel execution of multiple quantum computing tasks.
[0202] Compared with the method in which the task execution device of the related technology needs to execute each quantum computing task one by one, the quantum computing tasks to be executed provided by the embodiment of the present application are judged for parallel execution in the second service sub-module of the server, and the second service sub-module screens out parallel quantum computing tasks that can be executed in parallel, so that the task identifier of the parallel quantum computing task is sent to the task execution device, so that the task execution device can use multiple threads to execute multiple quantum computing tasks at the same time, effectively shortening the time required for the execution of all quantum computing tasks, improving the execution efficiency of quantum computing tasks, and thus improving the quantum computing efficiency.
[0203] In addition, the parallel execution judgment process of the quantum computing task is deployed in a server that is communicatively connected to the task execution device. Compared with the method in which the task execution device directly performs parallel execution judgment of the quantum computing task, the embodiment of the present application saves the computing resources of the task execution device while ensuring the parallel execution of the quantum computing task, and improves the processing capability of the task execution device for the quantum computing task.
[0204] Based on the same inventive concept, according to the task parallel execution method provided in the above application embodiment, the present application embodiment also provides a task parallel execution system. Fig.13 As shown, Fig.13 A second structural diagram of a task parallel execution system provided in an embodiment of the present application. The system includes a server 1301 and a task execution device 1302, the server 1301 includes a service control module 1303, the service control module 1303 includes a first service submodule 1304 and a second service submodule 1305, the first service submodule 1304 is in communication with the task execution device 1302, and the task execution device 1302 includes multiple threads for executing quantum computing tasks in parallel;
[0205] The first service submodule 1304 is used to obtain at least one first task information from the first list, and send the obtained first task information to the second service submodule 1305; the first list caches the task information of the first quantum computing task, and the task information includes the task identifier and parallel judgment data corresponding to the first quantum computing task;
[0206] The second service submodule 1305 is used to cache the received at least one first task information into the second list, and obtain the task identifiers corresponding to the parallel quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list, and obtain the target identifier set; and send the target identifier set to the first service submodule 1304;
[0207] The first service submodule 1304 is further configured to forward the received target identification set to the task execution device 1302;
[0208] The task execution device 1302 is used to call multiple threads to execute the parallel quantum computing tasks corresponding to each task identifier in the target identifier set in parallel according to the received target identifier set.
[0209] Optionally, the server 1301 further includes a service module;
[0210] The above-mentioned service module is used to receive the third task information sent by the user for the third quantum computing task, and send the third task information to the first service submodule 1304; and cache the received third task information into the first list.
[0211] Optionally, the second service submodule 1305 may be specifically configured to determine, according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list, a fourth quantum computing task that can be executed in parallel with the target quantum computing task, and the second task information corresponding to the target quantum computing task has the longest cache time in the second list;
[0212] The task identifier of the target quantum computing task and the task identifier of the fourth quantum computing task are obtained to obtain a target identifier set.
[0213] Optionally, the second service submodule 1305 may be specifically used to obtain at least one combination method corresponding to the second quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list;
[0214] The task identifiers corresponding to the second quantum computing tasks in the target combination method are obtained to obtain a target identifier set, wherein the target combination method includes the largest number of second quantum computing tasks in at least one combination method.
[0215] Optionally, the parallel judgment data in the above-mentioned second task information includes one or more of the quantum bit identification and quantum bit common local oscillation data corresponding to the second quantum computing task.
[0216] Optionally, the second service submodule 1305 may be specifically used to select, if the parallel judgment data in the second task information includes a quantum bit identifier and quantum bit co-local oscillation data, a second quantum computing task with a different quantum bit identifier and quantum bit co-local oscillation data satisfying a preset co-local oscillation condition as a parallel quantum computing task that can be executed in parallel, according to the parallel judgment data included in the second task information corresponding to each second quantum computing task in the second list;
[0217] Obtain the task identifier of each parallel quantum computing task and obtain a target identifier set.
[0218] Optionally, the server 1301 includes a service module and multiple service control modules 1303; each service control module 1303 also includes a third service submodule;
[0219] The above-mentioned third service sub-module is used to receive the initialization instruction sent by the service module, and the initialization instruction includes initialization parameters and address information of the task execution module; based on the initialization parameters, the first service sub-module 1304 and the second service sub-module 1305 in the target service control module are initialized and configured, and based on the address information, a communication connection is established between the task execution module and the first service sub-module 1304 in the target service control module, and the target service control module is the service control module where the third service sub-module is located.
[0220] Optionally, the third service submodule may also be used to start the first service submodule 1304 and the second service submodule 1305 in the target service control module where the third service submodule is located when a start command triggered by the user through the service module is detected;
[0221] or,
[0222] The third service submodule may also stop the first service submodule 1304 and the second service submodule 1305 in the target service control module where the third service submodule is located when receiving a stop instruction sent by the user through the service module.
[0223] Optionally, the above-mentioned first service sub-module 1304 can also be used to return to the step of obtaining at least one first task information from the first list when a thread release instruction is received after forwarding the received target identification set to the task execution device 1302; the thread release instruction is sent when the task execution device 1302 completes the parallel execution of the parallel quantum computing tasks corresponding to each task identification in the target identification set.
[0224] Optionally, the number of task information that can be cached in the second list is a preset number;
[0225] The first service submodule 1304 may be specifically configured to obtain a second number of first task information from the first list according to a first number of second task information cached in the second list at the current moment, where the second number is a difference between the preset number and the first number.
[0226] Through the system provided by the embodiment of the present application, the first service submodule in the service control module obtains the first task information corresponding to at least one first quantum computing task from the first list cached by itself, and sends the obtained first task information to the second service submodule in the service control device, and the second service submodule caches the received first task information in the second list. The second service submodule obtains the task identifiers corresponding to the parallel quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task cached in the second list, obtains the target identifier set, and sends the target identifier set to the task execution device through the first service submodule, and the task execution device calls multiple threads to execute each parallel quantum computing task in parallel, thereby realizing the parallel execution of multiple quantum computing tasks.
[0227] Compared with the method in which the task execution device of the related technology needs to execute each quantum computing task one by one, the quantum computing tasks to be executed provided by the embodiment of the present application are judged for parallel execution in the second service sub-module of the server, and the second service sub-module screens out parallel quantum computing tasks that can be executed in parallel, so that the task identifier of the parallel quantum computing task is sent to the task execution device, so that the task execution device can use multiple threads to execute multiple quantum computing tasks at the same time, effectively shortening the time required for the execution of all quantum computing tasks, improving the execution efficiency of quantum computing tasks, and thus improving the quantum computing efficiency.
[0228] In addition, the parallel execution judgment process of the quantum computing task is deployed in a server that is communicatively connected to the task execution device. Compared with the method in which the task execution device directly performs parallel execution judgment of the quantum computing task, the embodiment of the present application saves the computing resources of the task execution device while ensuring the parallel execution of the quantum computing task, and improves the processing capability of the task execution device for the quantum computing task.
[0229] Based on the same inventive concept, according to the task parallel execution method provided in the above-mentioned embodiment of the present application, the embodiment of the present application also provides a quantum control system to implement the task parallel execution method steps described in any of the above-mentioned items.
[0230] Based on the same inventive concept, according to the task parallel execution method provided in the above-mentioned embodiment of the present application, the embodiment of the present application also provides a quantum computer, including the quantum control system.
[0231] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0232] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0233] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for embodiments such as devices, systems, quantum control systems, and quantum computers, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0234] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A task parallel execution method, characterized in that: A service control module applied to a server, the service control module comprising a first service submodule and a second service submodule, the first service submodule being communicatively connected to a task execution device, the task execution device comprising a plurality of threads for executing quantum computing tasks in parallel, the method comprising: The first service submodule obtains at least one first task information from the first list, and sends the obtained first task information to the second service submodule; the first list caches task information of the first quantum computing task, and the task information includes a task identifier and parallel judgment data corresponding to the first quantum computing task; The second service submodule caches the received at least one first task information into the second list, and obtains the task identifiers corresponding to the parallel quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list, to obtain a target identifier set; The second service submodule sends the target identifier set to the first service submodule; The first service submodule forwards the received target identifier set to the task execution device, so that the task execution device calls the multiple threads to execute the parallel quantum computing tasks corresponding to each task identifier in the target identifier set in parallel according to the received target identifier set.
2. The method according to claim 1, characterized in that The server also includes a service module; The method further comprises: The service module receives third task information sent by the user for the third quantum computing task, and sends the third task information to the first service submodule; The first service submodule caches the received third task information into the first list.
3. The method according to claim 1, characterized in that: The step of obtaining task identifiers corresponding to parallel quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list to obtain a target identifier set includes: Determine, according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list, a fourth quantum computing task that can be executed in parallel with the target quantum computing task, wherein the second task information corresponding to the target quantum computing task has the longest cache time in the second list; The task identifier of the target quantum computing task and the task identifier of the fourth quantum computing task are obtained to obtain a target identifier set.
4. The method according to claim 1, characterized in that The step of obtaining task identifiers corresponding to parallel quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list to obtain a target identifier set includes: Acquire at least one combination method corresponding to the second quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list; Obtain task identifiers corresponding to the second quantum computing tasks in a target combination method to obtain a target identifier set, wherein the target combination method includes the largest number of second quantum computing tasks in the at least one combination method.
5. The method according to claim 1, characterized in that The parallel determination data in the second task information includes one or more of a quantum bit identifier and quantum bit co-local oscillation data corresponding to the second quantum computing task.
6. The method according to claim 5, characterized in that If the parallel determination data in the second task information includes the quantum bit identifier and the quantum bit co-local oscillation data, the step of obtaining the task identifiers corresponding to the parallel quantum computing tasks that can be executed in parallel according to the parallel determination data in the second task information corresponding to each second quantum computing task in the second list to obtain the target identifier set includes: According to the parallel judgment data included in the second task information corresponding to each second quantum computing task in the second list, selecting the second quantum computing tasks whose quantum bit identifiers are different and whose quantum bit co-local oscillation data satisfy a preset co-local oscillation condition as parallel quantum computing tasks that can be executed in parallel; Obtain the task identifier of each parallel quantum computing task and obtain a target identifier set.
7. The method according to claim 1, characterized in that The server includes a service module and a plurality of service control modules; each service control module also includes a third service submodule; The method further comprises: The third service submodule receives an initialization instruction sent by the service module, wherein the initialization instruction includes initialization parameters and address information of a task execution module; The third service submodule initializes and configures the first service submodule and the second service submodule in the target service control module based on the initialization parameters, and establishes a communication connection between the task execution module and the first service submodule in the target service control module based on the address information. The target service control module is the service control module where the third service submodule is located.
8. The method according to claim 7, characterized in that The method further comprises: When the third service submodule detects a start command triggered by the user through the service module, the first service submodule and the second service submodule in the target service control module where the third service submodule is located are started; or, When receiving a stop instruction sent by the user through the service module, the third service submodule stops the first service submodule and the second service submodule in the target service control module where the third service submodule is located.
9. The method according to claim 1, characterized in that: After forwarding the received target identification set to the task execution device, the method further includes: When the first service submodule receives the thread release instruction, it returns to execute the step of obtaining at least one first task information from the first list; the thread release instruction is sent when the task execution device completes the parallel execution of the parallel quantum computing tasks corresponding to each task identifier in the target identifier set.
10. The method according to claim 1, characterized in that The number of task information that can be cached in the second list is a preset number; The step of acquiring at least one first task information from the first list includes: According to the first quantity of the second task information cached in the second list at the current moment, a second quantity of the first task information is obtained from the first list, where the second quantity is a difference between the preset quantity and the first quantity.
11. A task parallel execution device, characterized in that: The device is a service control module in a server, the service control module includes a first service submodule and a second service submodule, the first service submodule is communicatively connected with a task execution device, and the task execution device includes a plurality of threads for executing quantum computing tasks in parallel; The first service submodule is used to obtain at least one first task information from the first list, and send the obtained first task information to the second service submodule; the first list caches the task information of the first quantum computing task, and the task information includes the task identifier and parallel judgment data corresponding to the first quantum computing task; The second service submodule is used to cache the received at least one first task information into the second list, and obtain the task identifiers corresponding to the parallel quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list, to obtain a target identifier set; and send the target identifier set to the first service submodule; The first service submodule is further used to forward the received target identifier set to the task execution device, so that the task execution device calls the multiple threads to parallelly execute the parallel quantum computing tasks corresponding to each task identifier in the target identifier set according to the received target identifier set.
12. A task parallel execution system, characterized in that: The system includes a server and a task execution device, the server includes a service control module, the service control module includes a first service submodule and a second service submodule, the first service submodule is communicatively connected with the task execution device, and the task execution device includes a plurality of threads for executing quantum computing tasks in parallel; The first service submodule is used to obtain at least one first task information from the first list, and send the obtained first task information to the second service submodule; the first list caches the task information of the first quantum computing task, and the task information includes the task identifier and parallel judgment data corresponding to the first quantum computing task; The second service submodule is used to cache the received at least one first task information into the second list, and obtain the task identifiers corresponding to the parallel quantum computing tasks that can be executed in parallel according to the parallel judgment data in the second task information corresponding to each second quantum computing task in the second list, to obtain a target identifier set; and send the target identifier set to the first service submodule; The first service submodule is further configured to forward the received target identification set to the task execution device; The task execution device is used to call the multiple threads to execute the parallel quantum computing tasks corresponding to each task identifier in the target identifier set in parallel according to the received target identifier set.
Citation Information
Patent Citations
Task execution method and device, electronic equipment and medium
CN116339934A
Proxy server for cloud streaming service, cloud streaming system and method using the same
KR1020160102683A
Task processing method and apparatus, device, and medium
WO2023082560A1