Execution method and device of quantum computing task and medium
By setting the priority execution period and priority execution task set in quantum computing tasks, the user experience reduction and calculation error problems caused by task queuing during the execution of quantum computing tasks are solved, and closer task iteration and higher computing accuracy and user experience are achieved.
Patent Information
- Application Number
- CN202311736528.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-15
- Publication Date
- 2025-06-17
AI Technical Summary
During the execution of quantum computing tasks, multiple iterations of tasks need to be queued for execution, resulting in a reduced user experience. Due to the limitations of quantum chip hardware conditions, it is difficult to run a quantum computing task within a complete period of time, resulting in calculation errors.
By setting the priority execution period of the quantum computing task, a set of priority execution quantum computing tasks is created, and the creation time is recorded. The priority execution period is set based on the coherence time of the real quantum chip to be executed. The quantum computing sub-task is submitted to the quantum chip for execution, and whether the continuous execution time exceeds the priority execution period, and the task priority is reduced in response to exceeding the period.
It realizes that the execution iteration of quantum computing subtasks of different batches is closer, reducing the computational efficiency problems caused by other users interspersing other tasks during the priority execution period, and improving computing accuracy and user experience.
Smart Images

Figure CN120163258A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of quantum computing, and particularly relates to a method, device, and medium for executing quantum computing tasks. Background Art
[0002] A quantum computer is a physical device that performs high-speed mathematical and logical operations, stores, and processes quantum information in accordance with the laws of quantum mechanics. When a device processes and calculates quantum information and runs quantum algorithms, it is a quantum computer. Due to its relatively more efficient ability to process mathematical problems compared to ordinary computers, for example, it can accelerate the time to crack RSA keys from hundreds of years to a few hours, a quantum computer has become a key technology under research.
[0003] During the process of a quantum chip executing quantum computing tasks, a complete quantum computing task needs to be iterated multiple times, and each submitted quantum computing task during each iteration has to queue up and wait for execution within the quantum operating system. During the queuing or the execution of a quantum computing task, if a user submits other quantum computing tasks to be inserted into the task execution queue of the quantum chip, this will undoubtedly bring an obvious sense of fragmentation to a complete quantum computing task, resulting in a reduction in the user experience. And currently, due to the limitations of the quantum chip hardware conditions, if it is possible to run a quantum computing task within a complete period of time, it also helps to prevent calculation errors caused by the characteristics or noise of the quantum chip itself. Therefore, how to solve the above problems has become an important research content at present. Summary of the Invention
[0004] The purpose of the present invention is to provide a method, device, and medium for executing quantum computing tasks to solve the deficiencies in the prior art. By setting the priority execution period of the quantum computing tasks, the execution iteration of different batches of quantum computing subtasks within a set of quantum computing tasks is made more compact, the problem of low computing efficiency caused by other users interspersing and executing other quantum computing tasks during the priority execution period is reduced, and the computing accuracy and user experience are improved.
[0005] An embodiment of the present application provides a method for executing a quantum computing task, the method comprising:
[0006] Create a set of quantum computing tasks with priority execution and record the creation time of the set of quantum computing tasks;
[0007] Set the priority execution period of the set of quantum computing tasks with the creation time as the start time and the coherence time of the actual quantum chip of the task to be executed, wherein the length of the priority execution period is less than the coherence time;
[0008] Submit the quantum computing subtasks in the set of quantum computing tasks to the real quantum chip for the tasks to be executed, and determine whether the continuous execution time of the current quantum computing subtask exceeds the priority execution period;
[0009] In response to the continuous execution time of the current quantum computing subtask exceeding the priority execution period, reduce the execution priority of the current quantum computing subtask.
[0010] Optionally, the method further includes:
[0011] If the continuous execution time of the current quantum computing subtask does not exceed the priority execution period, queue and execute the quantum computing subtasks according to the creation time of the quantum computing subtasks in the set of quantum computing tasks.
[0012] Optionally, creating the set of quantum computing tasks with priority execution includes:
[0013] Obtain the quantum computing tasks to be executed, sort all the quantum computing tasks to be executed according to the sequence of their creation times, and set the execution priorities, to generate a set of quantum computing tasks with priority execution.
[0014] Optionally, submitting the quantum computing subtasks in the set of quantum computing tasks to the real quantum chip for the tasks to be executed includes:
[0015] Submit the first quantum computing subtask in the set of quantum computing tasks as a non-priority execution task to the task queue of the real quantum chip for the tasks to be executed, and queue and execute according to the task submission sequence of the task queue; and
[0016] Submit the remaining quantum computing subtasks in the set of quantum computing tasks as priority execution tasks to the task queue of the real quantum chip for execution.
[0017] Another embodiment of the present application provides an execution device for quantum computing tasks, and the device includes:
[0018] A creation module, configured to create a set of quantum computing tasks with priority execution and record the creation time of the set of quantum computing tasks;
[0019] A setting module, configured to set the priority execution period of the set of quantum computing tasks with the creation time as the start time and the coherence time of the real quantum chip for the tasks to be executed, wherein the length of the priority execution period is less than the coherence time;
[0020] A judgment module, configured to submit the quantum computing subtasks in the quantum computing task set to a real quantum chip of the task to be executed for execution, and judge whether the continuous execution time of the current quantum computing subtask exceeds the priority execution period;
[0021] A response module, configured to lower the execution priority of the current quantum computing subtask in response to the continuous execution time of the current quantum computing subtask exceeding the priority execution period.
[0022] Optionally, the device further includes:
[0023] A queuing module, configured to queue and execute the quantum computing subtasks in the quantum computing task set according to the creation time of the quantum computing subtasks if the continuous execution time of the current quantum computing subtask does not exceed the priority execution period.
[0024] Optionally, the creation module includes:
[0025] An obtaining unit, configured to obtain the quantum computing tasks to be executed, sort all the quantum computing tasks to be executed according to the sequence of the creation time of the quantum computing tasks to be executed, and set the execution priority, so as to generate a set of quantum computing tasks to be preferentially executed.
[0026] Optionally, the judgment module includes:
[0027] A submission unit, configured to submit the first quantum computing subtask in the quantum computing task set as a non-priority execution task to the task queue of the real quantum chip of the task to be executed, and queue and execute it according to the task submission sequence of the task queue; and
[0028] Submit the remaining quantum computing subtasks in the quantum computing task set to the task queue of the real quantum chip of the task to be executed for execution as priority execution tasks.
[0029] An embodiment of the present application provides a quantum computer operating system, which implements the execution method of the quantum computing task by using the method described in any one of the above.
[0030] An embodiment of the present application provides a quantum-supercomputer collaborative operating system, and the quantum-supercomputer collaborative operating system implements the execution method of the quantum computing task according to the method described in any one of the above.
[0031] An embodiment of the present application provides a quantum computer, and the quantum computer includes the quantum computer operating system described above.
[0032] An embodiment of the present application provides a storage medium, in which a computer program is stored, and the computer program is configured to execute the method described in any one of the above when running.
[0033] An embodiment of the present application provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method described in any one of the above.
[0034] Compared with the prior art, the present invention first creates a set of quantum computing tasks with priority execution and records the creation time of the set of quantum computing tasks, and then sets the priority execution period of the set of quantum computing tasks with the creation time as the start time and the coherence time of the real quantum chip of the task to be executed. The quantum computing subtasks in the set of quantum computing tasks are submitted to the real quantum chip of the task to be executed for execution, and it is determined whether the continuous execution time of the current quantum computing subtask exceeds the priority execution period. Finally, in response to the continuous execution time of the current quantum computing subtask exceeding the priority execution period, the execution priority of the current quantum computing subtask is reduced. By setting the priority execution period of the quantum computing task, the execution iteration of different batches of quantum computing subtasks in a set of quantum computing tasks is made closer, the problem of low computing efficiency caused by other users interspersing and executing other quantum computing tasks during the priority execution period is reduced, and the computing accuracy and user experience are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is a system network block diagram of a method for executing a quantum computing task provided by an embodiment of the present invention;
[0036] Figure 2 is a flowchart of a method for executing a quantum computing task provided by an embodiment of the present invention;
[0037] Figure 3 is a structural diagram of an apparatus for executing a quantum computing task provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0038] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be construed as limiting the present invention.
[0039] An embodiment of the present invention first provides a method for executing a quantum computing task, which can be applied to an electronic device, such as a computer terminal, specifically, a general computer, a quantum computer, etc.
[0040] The following takes running on a computer terminal as an example for a detailed description. Figure 1It is a system network block diagram of a method for executing a quantum computing task provided by an embodiment of the present invention. The system applied to the method for executing a quantum computing task may include a network 110, a server 120, a wireless device 130, a client 140, a storage unit 150, a classical processing system 160, and a quantum processing system 170. It may also include additional memories, classical processors, quantum processors, and other devices not shown.
[0041] The network 110 is a medium that provides communication links between various devices and computers connected together within the system network of the method for executing a quantum computing task, including but not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. The connection method may employ wired, wireless communication links, optical fiber cables, etc.
[0042] The server 120 and the client 140 are conventional data processing systems, which may contain data and have application programs or software tools for executing conventional computing processes. The client 140 may be a personal computer or a network computer, and thus the data may also be provided by the server 120. The wireless device 130 may be a smart phone, a tablet, a laptop computer, a smart wearable device, etc. The storage unit 150 may include a database 151, which may be configured to store data such as qubit parameters, quantum logic gate parameters, quantum circuits, and quantum programs.
[0043] The classical processing system 160 (quantum processing system 170) may include a classical processor 161 (quantum processor 171) for processing classical data (quantum data) and a memory 163 (memory 172) for storing classical data (quantum data). The classical data (quantum data) may be a boot file, an operating system image, and an application program 162 (application program 173). The application program 162 (application program 173) may be used to implement a quantum algorithm compiled according to the method for executing a quantum computing task provided by an embodiment of the present invention.
[0044] Any data or information stored or generated in the classical processing system 160 (quantum processing system 170) may also be configured to be stored or generated in another classical (quantum) processing system in a similar manner. Similarly, any application program executed by it may be configured to be executed in another classical (quantum) processing system in a similar manner.
[0045] It should be noted that a real quantum computer has a hybrid structure, which at least includes Figure 1 two major parts: the classical processing system 160, which is responsible for executing classical computing and control; and the quantum processing system 170, which is responsible for running quantum programs to implement quantum computing.
[0046] The above-mentioned classical processing system 160 and quantum processing system 170 can be integrated into one device or distributed in two different devices. For example, the first device including the classical processing system 160 runs a classical computer operating system, on which quantum application development tools and services are provided, and storage and network services required for quantum applications are also provided. Users develop quantum applications through the quantum application development tools and services thereon, and send the quantum program to the second device including the quantum processing system 170 through the network services thereon. The second device runs a quantum computer operating system, parses the code of the quantum program through the quantum computer operating system, and compiles it into instructions that can be recognized and executed by the quantum computer measurement and control system. The quantum processor 170 implements the quantum algorithm corresponding to the quantum program according to the instructions.
[0047] In the classical processing system 160 based on a silicon chip, the units of the classical processor 161 are CMOS transistors. Such computing units are not restricted by time and coherence, that is, such computing units are not restricted by the usage duration and are available at any time. In addition, in a silicon chip, the number of such computing units is also sufficient. Currently, the number of computing units in a classical processor is in the thousands. The sufficient number of computing units and the fixed computing logic that can be selected by CMOS transistors, for example: AND logic. When operating with CMOS transistors, a large number of CMOS transistors are combined with limited logic functions to achieve the operation effect.
[0048] Different from such logic units in the classical processing system 160, the basic computing unit of the quantum processor 171 in the quantum processing system 170 is a quantum bit. The input of a quantum bit is restricted by coherence and also by the coherence time, that is, a quantum bit is restricted by the usage duration and is not available at any time. Making full use of quantum bits within the available usage duration of quantum bits is a key problem in quantum computing. In addition, the number of quantum bits in a quantum computer is one of the representative indicators of the performance of a quantum computer. Each quantum bit realizes the computing function through the logic function configured on demand. Given the limited number of quantum bits, and the logic functions in the field of quantum computing are diverse, for example: Hadamard gate (H gate), Pauli-X gate (X gate), Pauli-Y gate (Y gate), Pauli-Z gate (Z gate), X gate, RY gate, RZ gate, CNOT gate, CR gate, iSWAP gate, Toffoli gate, etc. When performing quantum computing, it is necessary to combine a limited number of quantum bits with diverse logic function combinations to achieve the operation effect.
[0049] Based on these differences, the logical function acting on the design of qubits (including the design of whether to use qubits and the design of the usage efficiency of each qubit) is the key to improving the computing performance of quantum computers and requires special design. The above-mentioned design for qubits is a technical problem that ordinary computing devices do not need to consider and do not need to face. In this application, during the process of a quantum chip executing a quantum computing task, a complete quantum computing task needs to be iterated multiple times, and each submitted quantum computing task during each iteration has to queue up for execution inside the quantum operating system. During the queuing waiting or the execution of a quantum computing task, if a user submits other quantum computing tasks to be inserted into the task execution queue of the quantum chip, this undoubtedly brings an obvious sense of fragmentation to a complete quantum computing task, resulting in a reduction in the user experience. And currently, due to the limitations of the quantum chip hardware conditions, if it is possible to run a quantum computing task within a complete period of time, it also helps to prevent calculation errors caused by the characteristics or noise of the quantum chip itself. How to solve the above problems has become an important research content currently. This application provides a method, device, and medium for executing quantum computing tasks to solve the deficiencies in the prior art. By setting the priority execution period of quantum computing tasks, the execution iteration of different batches of quantum computing subtasks within a set of quantum computing tasks is made more compact, reducing the problem of low computing efficiency caused by other users interspersing and executing other quantum computing tasks during the priority execution period, and improving the computing accuracy and user experience.
[0050] See Figure 2 , Figure 2 is a schematic flowchart of a method for executing a quantum computing task provided by an embodiment of the present invention.
[0051] An embodiment of a method for executing a quantum computing task is provided in this embodiment. The method for executing a quantum computing task may include:
[0052] S201: Create a set of quantum computing tasks with priority execution and record the creation time of the set of quantum computing tasks.
[0053] The quantum computing tasks or ordinary tasks of the current user are all a set of one or a batch of quantum circuits. These computing tasks use the most basic priorities to determine the execution order. Among the computing tasks with the same priority, they are in sequence and there is no correlation between the computing tasks.
[0054] Specifically, creating a set of quantum computing tasks with priority execution (or called session tasks) is a task set that contains multiple quantum computing tasks. There may be certain correlations among multiple quantum computing subtasks within a set. One execution of these quantum computing subtasks can be called an iteration. Insertion of other tasks should be avoided as much as possible between any two iterations to improve the execution efficiency of iterative tasks and help prevent calculation errors caused by the characteristics or noise of the real quantum chip itself.
[0055] In an alternative implementation, the creating of the set of quantum computing tasks with priority execution includes:
[0056] Obtain the quantum computing tasks to be executed, sort all the quantum computing tasks to be executed according to the chronological order of the creation time of the quantum computing tasks to be executed, and set the priority of task execution, so as to generate a set of quantum computing tasks with priority execution.
[0057] It should be noted that in quantum computing, setting the priority of task execution is an important issue because a quantum computer can process multiple tasks simultaneously, but each task has its specific execution time and priority. To effectively manage these tasks, task scheduling algorithms can be used to determine the execution order and priority of tasks. A common method is to use a priority-based queue (Priority Queue) to manage the quantum computing tasks to be executed. This method sorts the quantum computing tasks to be executed according to their importance and urgency, and gives priority to executing important and urgent tasks. In specific implementation, various different algorithms can be used to determine the priority and execution order of tasks, such as based on timestamp, based on task length, based on priority, etc. For quantum computing tasks, due to their special properties (such as quantum entanglement and quantum superposition), setting the priority of task execution requires more complex and delicate processing. The problem of setting the priority of task execution in quantum computing involves some core issues in quantum computing, such as quantum parallelism, quantum interference, etc. Therefore, according to the characteristics of quantum computing tasks, a dedicated quantum task scheduling algorithm can be designed and implemented to make full use of the advantages of quantum computing and improve the execution efficiency of tasks.
[0058] S202: Set the priority execution period of the quantum computing task set with the creation time as the start time and the coherence time of the real quantum chip of the task to be executed, where the length of the priority execution period is less than the coherence time.
[0059] Specifically, this application considers the coherence time of a real quantum chip and sets a priority execution period based on this. The coherence time of a quantum chip is a key parameter in quantum computing tasks, which refers to the length of time that a qubit can maintain its quantum state before being disturbed by the environment. In actual quantum computing, if the coherence time of a qubit is short, then the quantum computing task needs to be completed within a shorter time limit; otherwise, the qubit will lose coherence, resulting in inaccurate calculation results.
[0060] Among them, starting from the creation time, the tasks to be executed are sorted according to their importance and urgency, and a priority execution period is set. The length of the priority execution period is less than the coherence time of the quantum chip, or before the decoherence time of the quantum chip, to ensure that important and urgent tasks are completed within the coherence time of the quantum chip. In this way, quantum computing tasks can be effectively managed, and the computing efficiency and accuracy can be improved.
[0061] S203: Submit the quantum computing subtasks in the quantum computing task set to the real quantum chip of the task to be executed, and determine whether the continuous execution time of the current quantum computing subtask exceeds the priority execution period.
[0062] Specifically, in actual quantum computing, submitting a quantum computing task to a quantum chip for execution is a key step, and determining whether the continuous execution time of a quantum computing task exceeds the priority execution period is an important decision-making basis. Submit the quantum computing subtasks in the quantum computing task set to the quantum chip of the task to be executed. This process includes converting the quantum computing subtasks into instructions that can be recognized by the quantum chip and sending the instructions to the quantum chip for execution. During the execution of the quantum computing subtasks by the quantum chip, it is necessary to continuously monitor the execution time and status of the tasks to determine whether the continuous execution time of the current quantum computing subtask exceeds the priority execution period.
[0063] In an optional implementation manner, the submitting the quantum computing subtasks in the quantum computing task set to the real quantum chip of the task to be executed may include:
[0064] Submit the first quantum computing subtask in the quantum computing task set to the task queue of the real quantum chip of the task to be executed as a non-priority execution task, and queue and execute it according to the task submission order of the task queue; and
[0065] Submit the remaining quantum computing subtasks in the quantum computing task set to the task queue of the real quantum chip of the task to be executed as priority execution tasks.
[0066] Specifically, it is the process of submitting tasks in the quantum computing task set to the task queue of the real quantum chip for execution according to the priority. In this process, the first quantum computing subtask in the quantum computing task set is submitted to the task queue of the quantum chip as a non-priority execution task and queued for execution according to the task submission order in the task queue. This can ensure that the ordinary quantum computing tasks before the creation time of the quantum computing task set with priority execution are completed, so as to make full use of the computing resources of the quantum chip.
[0067] At the same time, the remaining quantum computing subtasks in the quantum computing task set are submitted to the task queue of the quantum chip as priority execution tasks for execution. These priority execution tasks will be processed and executed preferentially. Through the above task submission and execution methods, quantum computing tasks can be effectively balanced, managed and controlled, including the execution order and priority of ordinary computing tasks and quantum computing tasks with priority execution, so as to improve the efficiency and accuracy of quantum computing. In practical applications, further optimization and adjustment can also be carried out according to specific quantum computing tasks and the performance of the quantum chip to adapt to different computing requirements and scenarios.
[0068] S204: In response to the continuous execution time of the current quantum computing subtask exceeding the priority execution period, reduce the execution priority of the current quantum computing subtask.
[0069] Specifically, it is a coping strategy for the continuous execution time of the quantum computing subtask exceeding the priority execution period, that is, reducing the execution priority of this task. When the execution time of a quantum computing subtask exceeds the set priority execution period, it means that it may not be so urgent or important, so its priority can be reduced to ensure that more important tasks can be executed in time.
[0070] Exemplarily, reducing the priority of the quantum computing subtask can be achieved in various ways. A common method is to move the execution time of the quantum computing subtask from the current priority execution period to the next priority execution period, or move it from the priority execution task queue to the non-priority execution task queue. By the above methods, it helps to maintain the dynamic balance of the quantum computing task queue, so that important tasks can be processed in time, and at the same time, the quantum computing resources can also be fully utilized.
[0071] In an alternative embodiment, the method may further include:
[0072] If the continuous execution time of the current quantum computing subtask does not exceed the priority execution period, queue and execute the quantum computing subtask according to the creation time of the quantum computing subtasks in the quantum computing task set.
[0073] Exemplarily, the implementation method of the above quantum computing task may include the following steps:
[0074] Step 1: First, create a set of quantum computing tasks session1 with priority execution, and record the creation time timestamp1;
[0075] Step 2: Insert the first task session-task1 in the set of quantum computing tasks session1 with priority execution into the task queue of the actual quantum chip for the tasks to be executed. The priority of session-task1 is the same as that of ordinary tasks, which means that the execution of session-task1 needs to wait until the previous ordinary tasks are executed before it can start;
[0076] Step 3: Set the priorities of the subsequent sets of quantum computing tasks session2, session3,... in the set of quantum computing tasks session1 with priority execution to the same high priority as session1;
[0077] Step 4: Wait until the first task session-task1 in the set of quantum computing tasks session1 with priority execution is completed before executing its subsequent quantum computing subtasks session-task2, session-task3...;
[0078] Step 5: If session2 is created after the set of quantum computing tasks session1 with priority execution and they have the same priority, then the execution of both is prior to that of ordinary tasks. The tasks of session2 need to be executed after the tasks of session1 that are being executed; and if the tasks of session2 are queuing, then the tasks of session1 are brought forward before the tasks of session2 until the tasks of session1 are executed before the tasks of session2 are executed.
[0079] It should be noted that session2 has the same priority as session1. If the tasks of session2 are queuing, the tasks of session1 will not be brought forward before session2. The above-mentioned bringing the session tasks forward before the quantum task queue only means before the ordinary tasks in the quantum computing task queue.
[0080] Compared with the prior art, the present invention first creates a set of quantum computing tasks to be preferentially executed and records the creation time of the set of quantum computing tasks, then sets the preferential execution period of the set of quantum computing tasks with the creation time as the start time and the coherence time of the real quantum chip of the task to be executed, submits the quantum computing subtasks in the set of quantum computing tasks to the real quantum chip of the task to be executed, and determines whether the continuous execution time of the current quantum computing subtask exceeds the preferential execution period. Finally, in response to the continuous execution time of the current quantum computing subtask exceeding the preferential execution period, the execution priority of the current quantum computing subtask is reduced. By setting the preferential execution period of the quantum computing tasks, the execution iteration of different batches of quantum computing subtasks in a set of quantum computing tasks is made closer, the problem of low computing efficiency caused by other users interspersing and executing other quantum computing tasks during the preferential execution period is reduced, and the computing accuracy and user experience are improved.
[0081] See Figure 3 , Figure 3 FIG. is a schematic structural diagram of an execution device for a quantum computing task provided by an embodiment of the present invention, corresponding to the Figure 2 flow shown, and the device includes:
[0082] A creation module 301, configured to create a set of quantum computing tasks to be preferentially executed and record the creation time of the set of quantum computing tasks;
[0083] A setting module 302, configured to set the preferential execution period of the set of quantum computing tasks with the creation time as the start time and the coherence time of the real quantum chip of the task to be executed, where the length of the preferential execution period is less than the coherence time;
[0084] A judgment module 303, configured to submit the quantum computing subtasks in the set of quantum computing tasks to the real quantum chip of the task to be executed, and determine whether the continuous execution time of the current quantum computing subtask exceeds the preferential execution period;
[0085] A response module 304, configured to reduce the execution priority of the current quantum computing subtask in response to the continuous execution time of the current quantum computing subtask exceeding the preferential execution period.
[0086] Specifically, the device further includes:
[0087] A queuing module, configured to queue and execute the quantum computing subtasks according to the creation time of the quantum computing subtasks in the set of quantum computing tasks if the continuous execution time of the current quantum computing subtask does not exceed the preferential execution period.
[0088] Specifically, the creation module includes:
[0089] An acquisition unit, configured to acquire quantum computing tasks to be executed, sort all the quantum computing tasks to be executed according to the sequence of the creation time of the quantum computing tasks to be executed, and set the priority of task execution, so as to generate a set of quantum computing tasks to be preferentially executed.
[0090] Specifically, the judgment module includes:
[0091] A submission unit, configured to submit the first quantum computing subtask in the set of quantum computing tasks as a non-preferential execution task to the task queue of the real quantum chip of the task to be executed, and queue and execute according to the task submission sequence of the task queue; and
[0092] Submit the remaining quantum computing subtasks in the set of quantum computing tasks to the task queue of the real quantum chip of the task to be executed for execution as preferential execution tasks.
[0093] Compared with the prior art, the present invention first creates a set of quantum computing tasks to be preferentially executed and records the creation time of the set of quantum computing tasks, then sets the preferential execution period of the set of quantum computing tasks with the creation time as the start time and the coherence time of the real quantum chip of the task to be executed, submits the quantum computing subtasks in the set of quantum computing tasks to the real quantum chip of the task to be executed for execution, and determines whether the continuous execution time of the current quantum computing subtask exceeds the preferential execution period. Finally, in response to the continuous execution time of the current quantum computing subtask exceeding the preferential execution period, the execution priority of the current quantum computing subtask is reduced. By setting the preferential execution period of the quantum computing tasks, the execution iteration of different batches of quantum computing subtasks in a set of quantum computing tasks is made closer, the problem of low computing efficiency caused by other users interspersing and executing other quantum computing tasks during the preferential execution period is reduced, and the computing accuracy and user experience are improved.
[0094] An embodiment of the present application provides a quantum computer operating system, which implements the execution method of the quantum computing task by using the method described in any one of the above.
[0095] An embodiment of the present application provides a quantum-supercomputer collaborative operating system, and the quantum-supercomputer collaborative operating system implements the execution method of the quantum computing task according to the method described in any one of the above.
[0096] An embodiment of the present application provides a quantum computer, and the quantum computer includes the quantum computer operating system described above.
[0097] An embodiment of the present invention also provides a storage medium, in which a computer program is stored, and the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0098] Specifically, in this embodiment, the above storage medium may be configured to store a computer program for executing the following steps:
[0099] S201: Create a quantum computing task set with priority execution and record the creation time of the quantum computing task set;
[0100] S202: Set the priority execution period of the quantum computing task set with the creation time as the start time and the coherence time of the real quantum chip of the task to be executed, where the length of the priority execution period is less than the coherence time;
[0101] S203: Submit the quantum computing subtasks in the quantum computing task set to the real quantum chip of the task to be executed and determine whether the continuous execution time of the current quantum computing subtask exceeds the priority execution period;
[0102] S204: In response to the continuous execution time of the current quantum computing subtask exceeding the priority execution period, reduce the execution priority of the current quantum computing subtask.
[0103] Specifically, in this embodiment, the above storage medium may include, but is not limited to: various media that can store computer programs such as USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs.
[0104] An embodiment of the present invention also provides an electronic device, including a memory and a processor, characterized in that a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0105] Specifically, the above electronic device may further include a transmission device and an input / output device, where the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0106] Specifically, in this embodiment, the above processor may be configured to execute the following steps through a computer program:
[0107] S201: Create a quantum computing task set with priority execution and record the creation time of the quantum computing task set;
[0108] S202: Set the priority execution period of the quantum computing task set with the creation time as the start time and the coherence time of the real quantum chip of the task to be executed, where the length of the priority execution period is less than the coherence time;
[0109] S203: Submit the quantum computing subtasks in the quantum computing task set to the real quantum chip of the task to be executed, and determine whether the continuous execution time of the current quantum computing subtask exceeds the priority execution period;
[0110] S204: In response to the continuous execution time of the current quantum computing subtask exceeding the priority execution period, reduce the execution priority of the current quantum computing subtask.
[0111] The structure, features and effects of the present invention have been described in detail based on the embodiments shown in the drawings. The above are only the preferred embodiments of the present invention, but the present invention is not limited to the scope defined by the drawings. Any changes made according to the concept of the present invention, or equivalent embodiments modified into equivalent changes, should still be within the protection scope of the present invention as long as they do not exceed the spirit covered by the description and the drawings.
Claims
1. A method for executing a quantum computing task, characterized in that, The method includes: Creating a set of quantum computing tasks with priority execution and recording the creation time of the set of quantum computing tasks; Setting the priority execution period of the set of quantum computing tasks with the creation time as the start time and the coherence time of the real quantum chip of the task to be executed, where the length of the priority execution period is less than the coherence time; Submitting the quantum computing subtasks in the set of quantum computing tasks to the real quantum chip of the task to be executed and determining whether the continuous execution time of the current quantum computing subtask exceeds the priority execution period; In response to the continuous execution time of the current quantum computing subtask exceeding the priority execution period, reducing the execution priority of the current quantum computing subtask.
2. The method according to claim 1, characterized in that, The method further includes: If the continuous execution time of the current quantum computing subtask does not exceed the priority execution period, queuing and executing the quantum computing subtasks in the set of quantum computing tasks according to the creation time of the quantum computing subtasks.
3. The method according to claim 1, characterized in that, The creating of the set of quantum computing tasks with priority execution includes: Obtaining the quantum computing tasks to be executed, sorting all the quantum computing tasks to be executed in the order of the creation time of the quantum computing tasks to be executed and setting the priority of task execution, and generating a set of quantum computing tasks with priority execution.
4. The method according to claim 3, characterized in that, The submitting of the quantum computing subtasks in the set of quantum computing tasks to the real quantum chip of the task to be executed includes: Submitting the first quantum computing subtask in the set of quantum computing tasks to the task queue of the real quantum chip of the task to be executed as a non-priority execution task and queuing and executing it according to the task submission order of the task queue; and Submitting the remaining quantum computing subtasks in the set of quantum computing tasks to the task queue of the real quantum chip of the task to be executed for execution as priority execution tasks.
5. An apparatus for executing a quantum computing task, characterized in that, The apparatus includes: A creating module, configured to create a set of quantum computing tasks with priority execution and record the creation time of the set of quantum computing tasks; A setting module, configured to set the priority execution period of the set of quantum computing tasks with the creation time as the start time and the coherence time of the real quantum chip of the task to be executed, where the length of the priority execution period is less than the coherence time; A judging module, configured to submit the quantum computing subtasks in the set of quantum computing tasks to the real quantum chip of the task to be executed and determine whether the continuous execution time of the current quantum computing subtask exceeds the priority execution period; A responding module, configured to reduce the execution priority of the current quantum computing subtask in response to the continuous execution time of the current quantum computing subtask exceeding the priority execution period.
6. A quantum computer operating system, characterized in that, Implementing the method for executing quantum computing tasks by any one of claims 1 to 4.
7. A quantum-super cooperation operating system, characterized in that, The quantum-super cooperation operating system implements the method for executing quantum computing tasks by any one of claims 1 to 4.
8. A quantum computer, characterized in that, The quantum computer includes the quantum computer operating system according to claim 7.
9. A storage medium, characterized in that, A computer program is stored in the storage medium, wherein the computer program is configured to execute the method described in any one of claims 1 to 4 when running.
10. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method described in any one of claims 1 to 4.
Citation Information
Cited By
A resource scheduling method and related equipment for a hybrid computing cluster
CN122507519A