Quantum-classical hybrid computing task scheduling method and quantum-classical hybrid architecture

Through the collaborative work of the quantum cloud platform and the task scheduling server, the machine learning model is used to allocate quantum classical hybrid computing tasks to the appropriate processor, solving the problem of low scheduling efficiency of quantum classical hybrid computing tasks and achieving efficient computing task execution.

CN118690863BActive Publication Date: 2024-11-22HEFEI MICRO ERA DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411170545.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-11-22
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

The scheduling and allocation efficiency of quantum classical hybrid computing tasks between different processors is low, resulting in low execution efficiency of quantum classical hybrid computing tasks.

Method used

The quantum classic hybrid computing task is sent to the task scheduling server through the quantum cloud platform, divided into classic computing tasks and quantum computing tasks, and features are extracted through the trained machine learning model, predicted and allocated to the appropriate processor, improving computing efficiency .

Benefits of technology

It significantly improves the overall computing efficiency of quantum classical hybrid computing tasks, improves the execution performance of classical computing tasks and quantum computing tasks, and solves the problem of low processor resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690863B_ABST
    Figure CN118690863B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a quantum classical hybrid computing task scheduling method and a quantum classical hybrid architecture, the method comprising: a quantum cloud platform obtains a quantum classical hybrid computing task and sends it to a task scheduling server; the task scheduling server divides the task into a classical computing task and a quantum computing task, and extracts classical program features and quantum program features respectively; the classical program features are input into a first machine learning model to obtain a prediction result, and the classical computing task is allocated to a classical task pool according to the prediction result; the quantum program features are input into a second machine learning model to obtain the output quantum computing task prediction execution time and prediction execution accuracy of each quantum processor, and the quantum computing task is allocated to a quantum task pool corresponding to the shortest quantum computing task prediction execution time; the classical processor obtains the classical computing task from the classical task pool for execution, and the quantum processor obtains the quantum computing task from the quantum task pool for execution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of quantum computing scheduling, and in particular, to a quantum-classical hybrid computing task scheduling method and a quantum-classical hybrid architecture. Background Art

[0002] There are essential differences between quantum computers and classical computers in computing principles and architectures, which leads to significant differences in task processing and resource management between the two. Classical computers rely on logical operations of binary bits, while quantum computers use the properties of quantum bits (qubits) such as quantum state superposition and entanglement to achieve exponential growth in computing power. Although quantum computers have shown computing potential that surpasses classical computers in specific problems, such as solving large-scale combinatorial optimization and quantum chemical simulation, their practical application still faces challenges.

[0003] Quantum-classical hybrid computing tasks require the collaborative computing of classical computers and quantum computers. Different classical processors of classical computers and different quantum processors of quantum computers have different characteristics. Therefore, for quantum-classical hybrid computing tasks, how to schedule them and improve the overall execution efficiency of heterogeneous architectures for quantum-classical hybrid computing tasks is an important issue in industry research. Summary of the invention

[0004] The purpose of the present disclosure is to provide a quantum-classical hybrid computing task scheduling method and a quantum-classical hybrid architecture, which aims to improve the execution efficiency of quantum-classical hybrid computing tasks by scheduling and allocating quantum-classical hybrid computing tasks among different processors.

[0005] In order to achieve the above-mentioned object, the first aspect of the present disclosure provides a quantum classical hybrid computing task scheduling method, which is applied to a quantum classical hybrid architecture, wherein the quantum classical hybrid architecture includes a quantum cloud platform, a task scheduling server connected to the quantum cloud platform in communication, a classical computer and a quantum computer connected to the task scheduling server in communication, the classical computer includes a classical processor, and the quantum computer includes a quantum processor. The method includes:

[0006] The quantum cloud platform obtains the constructed quantum classical hybrid computing task, and sends the quantum classical hybrid computing task to the task scheduling server;

[0007] The task scheduling server divides the quantum classical hybrid computing task into a classical computing task and a quantum computing task, and extracts the classical program features of the classical computing task and the quantum program features of the quantum computing task respectively;

[0008] The task scheduling server inputs the classic program features into the trained first machine learning model to obtain a prediction result, and allocates the classic computing task to the classic task pool of the classic processor according to the prediction result, wherein the prediction result is a predicted execution time of the classic computing task or a predicted allocation strategy representation score for achieving optimal execution performance on different types of classic processors when the classic computing task is executed;

[0009] The task scheduling server inputs the quantum program features into the trained second machine learning model to obtain the output of the quantum computing task prediction execution time and prediction execution accuracy corresponding to each quantum processor, and among the quantum processors whose prediction execution accuracy is greater than or equal to a preset threshold and whose quantum bit number is greater than or equal to the quantum bit number required for the quantum computing task, allocates the quantum computing task to the quantum task pool of the quantum processor corresponding to the shortest quantum computing task prediction execution time;

[0010] The classical processor obtains classical computing tasks from a classical task pool for execution, and the quantum processor obtains quantum computing tasks from a quantum task pool for execution.

[0011] Optionally, when the prediction result is a predicted execution time of a classic computing task, allocating the classic computing task to a classic task pool of a classic processor according to the prediction result includes:

[0012] The classical computing task is allocated to a classical task pool of a classical processor corresponding to the shortest classical computing task predicted execution time according to the prediction result.

[0013] Optionally, the first machine learning model is any one of a multivariate linear regression model, a multi-output random forest regression model or a multi-output gradient boosting regression model.

[0014] Optionally, the classic program features include the total number of allocation instructions, the total number of floating-point multiplication operations, the total number of floating-point division instructions, the total number of conditional check instructions, the total number of floating-point subtraction instructions, the total number of function call instructions, the total number of all instructions, the total number of integer operations, and the total number of loop operations.

[0015] Optionally, the classic processor includes a central processing unit and a graphics processing unit, and when the prediction result is a characterization score of the prediction allocation strategy, allocating the classic computing task to a classic task pool of the classic processor according to the prediction result includes:

[0016] The classical computing task is allocated to the classical task pool of the classical processor according to the allocation strategy corresponding to the predicted allocation strategy characterization score. The allocation strategy is to allocate the classical computing task solely to the classical task pool of the central processing unit, to allocate the classical computing task solely to the classical task pool of the graphics processing unit, or to allocate the classical computing task to the classical task pool of the central processing unit and the classical task pool of the graphics processing unit respectively according to the proportion corresponding to the predicted allocation strategy characterization score.

[0017] Optionally, the second machine learning model is any one of a multivariate linear regression model, a multi-output random forest regression model or a multi-output gradient boosting regression model.

[0018] Optionally, the quantum program features include the number of quantum circuit bits, the number of quantum circuit measurements, the number of single quantum logic gates without parameters, the number of single quantum logic gates with parameters, the number of double quantum logic gates without parameters, the number of double quantum logic gates with parameters, the number of multi-quantum logic gates without parameters, the number of multi-quantum logic gates with parameters, the number of conditional check instructions, and the number of loop instructions.

[0019] Optionally, the classic processor obtains a classic computing task from a classic task pool for execution, including:

[0020] When the classic task pool corresponding to the classic processor itself is not empty, the classic processor obtains a classic computing task from the classic task pool corresponding to itself for execution;

[0021] When the classic task pool corresponding to the classic processor itself is empty, the task scheduling server schedules classic computing tasks from other non-empty classic task pools to the empty classic task pool, so that the classic processor obtains classic computing tasks from its corresponding classic task pool for execution.

[0022] Optionally, the quantum processor obtains a quantum computing task from a quantum task pool for execution, including:

[0023] When the quantum task pool corresponding to the quantum processor itself is not empty, the quantum processor obtains a quantum computing task from the quantum task pool corresponding to itself for execution;

[0024] When the quantum task pool corresponding to the quantum processor itself is empty, the task scheduling server schedules quantum computing tasks from other non-empty quantum task pools to the empty quantum task pool, so that the quantum processor obtains quantum computing tasks from the quantum task pool corresponding to itself for execution.

[0025] In a second aspect, the present disclosure provides a quantum classical hybrid architecture, the architecture comprising:

[0026] Quantum cloud platform;

[0027] A task scheduling server, connected to the quantum cloud platform for communication;

[0028] A classical computer, connected to the task scheduling server for communication, wherein the classical computer includes a classical processor;

[0029] A quantum computer, connected to the task scheduling server for communication, wherein the quantum computer includes a quantum processor;

[0030] The quantum cloud platform is used to obtain the constructed quantum classical hybrid computing task and send the quantum classical hybrid computing task to the task scheduling server;

[0031] The task scheduling server is used to divide the quantum classical hybrid computing task into a classical computing task and a quantum computing task, and respectively extract the classical program features of the classical computing task and the quantum program features of the quantum computing task;

[0032] The task scheduling server is further used to input the classical program features into the trained first machine learning model to obtain a prediction result, and allocate the classical computing task to the classical task pool of the classical processor according to the prediction result, wherein the prediction result is a predicted execution time of the classical computing task or a predicted allocation strategy characterization score for achieving optimal execution performance on different types of classical processors when the classical computing task is executed;

[0033] The task scheduling server is further used to input the quantum program features into the trained second machine learning model to obtain the output quantum computing task predicted execution time and predicted execution accuracy corresponding to each quantum processor, and among the quantum processors whose predicted execution accuracy is greater than or equal to a preset threshold and whose quantum bit number is greater than or equal to the quantum bit number required for the quantum computing task, allocate the quantum computing task to the quantum task pool of the quantum processor corresponding to the shortest predicted execution time of the quantum computing task;

[0034] The classical processor is used to obtain classical computing tasks from a classical task pool for execution, and the quantum processor is used to obtain quantum computing tasks from a quantum task pool for execution.

[0035] Through the above technical solution, after the quantum cloud platform sends the quantum-classical hybrid computing task to the task scheduling server, the task scheduling server divides it into classical computing tasks and quantum computing tasks, and predicts their characteristics through the trained machine learning model respectively. According to the output results of the machine learning model, the classical computing tasks and quantum computing tasks are respectively assigned to appropriate processors to improve the computing efficiency of classical computing tasks and quantum computing tasks, and based on this, the overall computing efficiency of quantum-classical hybrid computing tasks is improved.

[0036] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0038] Figure 1 It is a diagram of an application scenario of a quantum-classical hybrid architecture according to an exemplary embodiment.

[0039] Figure 2 The figure is a block diagram of a task scheduling server according to an exemplary embodiment.

[0040] Figure 3 The present invention is a flowchart of performing quantum computing in a quantum-classical hybrid architecture according to an exemplary embodiment.

[0041] Figure 4 It is a block diagram of a quantum classical hybrid architecture according to an exemplary embodiment.

[0042] Figure 5 The present invention is a flowchart of a method for scheduling quantum classical hybrid computing tasks according to an exemplary embodiment. DETAILED DESCRIPTION

[0043] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0044] Figure 1 is an application scenario diagram of a quantum classical hybrid architecture according to an exemplary embodiment. Figure 4 is a block diagram of a quantum classical hybrid architecture according to an exemplary embodiment, see Figure 1 and Figure 4 , the architecture includes:

[0045] Quantum cloud platform;

[0046] A task scheduling server, connected to the quantum cloud platform for communication;

[0047] A classical computer, connected to the task scheduling server for communication, wherein the classical computer includes a classical processor;

[0048] A quantum computer is communicatively connected to the task scheduling server, and the quantum computer includes a quantum processor.

[0049] The quantum cloud platform is used to obtain the constructed quantum classical hybrid computing task and send the quantum classical hybrid computing task to the task scheduling server;

[0050] The task scheduling server is used to divide the quantum classical hybrid computing task into a classical computing task and a quantum computing task, and respectively extract the classical program features of the classical computing task and the quantum program features of the quantum computing task;

[0051] The task scheduling server is further used to input the classical program features into the trained first machine learning model to obtain a prediction result, and allocate the classical computing task to the classical task pool of the classical processor according to the prediction result, wherein the prediction result is a predicted execution time of the classical computing task or a predicted allocation strategy characterization score for achieving optimal execution performance on different types of classical processors when the classical computing task is executed;

[0052] The task scheduling server is further used to input the quantum program features into the trained second machine learning model to obtain the output quantum computing task predicted execution time and predicted execution accuracy corresponding to each quantum processor, and among the quantum processors whose predicted execution accuracy is greater than or equal to a preset threshold and whose quantum bit number is greater than or equal to the quantum bit number required for the quantum computing task, allocate the quantum computing task to the quantum task pool of the quantum processor corresponding to the shortest predicted execution time of the quantum computing task;

[0053] The classical processor is used to obtain classical computing tasks from a classical task pool for execution, and the quantum processor is used to obtain quantum computing tasks from a quantum task pool for execution.

[0054] The quantum cloud platform is a platform that uses cloud computing technology to provide quantum computing resources and services. Users can build quantum circuits through code programming or quantum simulator graphical user interface. In possible implementations, users can also submit quantum circuit information that meets the quantum cloud platform's quantum circuit construction standards in the form of files to build quantum circuits. Figure 1 as well as Figure 4 The quantum cloud platform 110 can be accessed through a computer terminal, which may include a Python programming module and a drag-and-drop graphical programming module. The Python programming module is used for users to edit quantum circuits of quantum computing tasks using the Python programming language, and the drag-and-drop graphical programming module is used for users to drag quantum logic gates to the target position of the quantum circuit to construct the quantum circuit.

[0055] The task scheduling server is a server used to schedule and allocate computing tasks. It allocates computing tasks to appropriate classical processors and / or quantum processors according to certain rules. There can be one or more task scheduling servers, such as Figure 1As shown, the quantum cloud platform 110 is connected to the task scheduling server 121 and the task scheduling server 122, and multiple task scheduling servers work together. The task scheduling server may include a quantum circuit optimization module, a quantum circuit cutting module, and a quantum circuit topology mapping module, which are respectively used to implement corresponding functions.

[0056] See also Figure 2 The task scheduling server may include a processor 1922, which may be one or more, and a memory 1932 for storing a computer program executable by the processor 1922. The computer program stored in the memory 1932 may include one or more modules each corresponding to a set of instructions.

[0057] In addition, the task scheduling server 1900 may further include a power supply component 1926 and a communication component 1950, wherein the power supply component 1926 may be configured to perform power management of the electronic device 1900, and the communication component 1950 may be configured to implement communication of the electronic device 1900, for example, wired or wireless communication. In addition, the electronic device 1900 may further include an input / output (I / O) interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, etc.

[0058] In a quantum-classical hybrid architecture, there can be one or more classical computers and one or more quantum computers, as shown in Figure 1 , the classical computer may include a classical computer 131 and a classical computer 132, and the quantum computer may include a quantum computer 133 and a quantum computer 134. Figure 4 , Classical processors include central processing units (CPUs) and graphics processing units (GPUs). As part of a classical computer, a classical processor works under the control of a classical computer. A quantum processor is a component that uses quantum bits to perform quantum computing. As part of a quantum computer, it works under the control of a quantum computer. Different quantum computers, such as optical quantum computers, ion trap quantum computers, superconducting quantum computers, and semiconductor quantum computers, use different quantum processors.

[0059] Optionally, when the prediction result is a predicted execution time of a classic computing task, the task scheduling server is further used to:

[0060] The classical computing task is allocated to a classical task pool of a classical processor corresponding to the shortest classical computing task predicted execution time according to the prediction result.

[0061] Optionally, the first machine learning model is any one of a multivariate linear regression model, a multi-output random forest regression model or a multi-output gradient boosting regression model.

[0062] Optionally, the classic program features include the total number of allocation instructions, the total number of floating-point multiplication operations, the total number of floating-point division instructions, the total number of conditional check instructions, the total number of floating-point subtraction instructions, the total number of function call instructions, the total number of all instructions, the total number of integer operations, and the total number of loop operations.

[0063] Optionally, the classic processor includes a central processing unit and a graphics processing unit, and when the prediction result is a representation score of the prediction allocation strategy, the task scheduling server is further used to:

[0064] The classical computing task is allocated to the classical task pool of the classical processor according to the allocation strategy corresponding to the predicted allocation strategy characterization score. The allocation strategy is to allocate the classical computing task solely to the classical task pool of the central processing unit, to allocate the classical computing task solely to the classical task pool of the graphics processing unit, or to allocate the classical computing task to the classical task pool of the central processing unit and the classical task pool of the graphics processing unit respectively according to the proportion corresponding to the predicted allocation strategy characterization score.

[0065] Optionally, the first machine learning model includes a first support vector machine, a second support vector machine and a third support vector machine, the first support vector machine is used to predict whether the classical computing task achieves optimal execution performance when running alone on the central processing unit, the second support vector machine is used to predict whether the classical computing task achieves optimal execution performance when running alone on the graphics processing unit, and when the first support vector machine predicts that the classical computing task cannot achieve optimal execution performance when running alone on the central processing unit and the second support vector machine predicts that the classical computing task cannot achieve optimal execution performance when running alone on the graphics processing unit, the third support vector machine is used to predict the distribution ratio of the classical computing task running on the central processing unit and the graphics processing unit.

[0066] Optionally, the classic program features include the number of int-type integer operations, the number of int4-type integer operations, the number of float-type floating-point operations, the number of float4-type floating-point operations, the number of built-in mathematical operations, barrier instructions, the number of memory accesses, the percentage of local memory accesses, the percentage of merged memory accesses, the compute-to-memory ratio, the size of data transfers, the amount of computation for each data transfer, and the number of work items.

[0067] Optionally, the second machine learning model is any one of a multivariate linear regression model, a multi-output random forest regression model or a multi-output gradient boosting regression model.

[0068] Optionally, the quantum program features include the number of quantum circuit bits, the number of quantum circuit measurements, the number of single quantum logic gates without parameters, the number of single quantum logic gates with parameters, the number of double quantum logic gates without parameters, the number of double quantum logic gates with parameters, the number of multi-quantum logic gates without parameters, the number of multi-quantum logic gates with parameters, the number of conditional check instructions, and the number of loop instructions.

[0069] Optionally, when the classic task pool corresponding to the classic processor itself is not empty, the classic processor is further used to obtain a classic computing task from the classic task pool corresponding to itself for execution;

[0070] When the classic task pool corresponding to the classic processor itself is empty, the task scheduling server is also used to schedule classic computing tasks from other non-empty classic task pools to the empty classic task pool, so that the classic processor obtains classic computing tasks from its corresponding classic task pool for execution.

[0071] Optionally, when the quantum task pool corresponding to the quantum processor itself is not empty, the quantum processor is further used to obtain a quantum computing task from the quantum task pool corresponding to itself for execution;

[0072] When the quantum task pool corresponding to the quantum processor itself is empty, the task scheduling server is further used to schedule quantum computing tasks from other non-empty quantum task pools to the empty quantum task pool, so that the quantum processor obtains quantum computing tasks from the quantum task pool corresponding to itself for execution.

[0073] The quantum-classical hybrid architecture can intelligently split quantum-classical hybrid computing tasks into parts that can be processed by classical processors and quantum processors, and dynamically adjust resources based on the estimated execution time of quantum computing tasks to achieve efficient collaborative processing of tasks, thereby improving the user-friendliness and computing efficiency of quantum computing. Figure 3 In a possible implementation, the process of a user using it to perform general quantum computing includes:

[0074] S1, after the user logs in to the quantum cloud platform, he submits a quantum computing request;

[0075] S2, the quantum cloud platform determines the user's permission to submit tasks;

[0076] S3, the quantum cloud platform submits the quantum computing request to the task scheduling server, and the task scheduling server reasonably allocates computing resources;

[0077] S4, the task scheduling server performs line optimization, topology mapping, and line cutting;

[0078] S5, the task scheduling server requests computing resources from the quantum computer or simulator, and the quantum computer or simulator performs the computing task; wherein the simulator is implemented based on a classical computer;

[0079] S6, the quantum computer or simulator feeds back the calculation results to the task scheduling server, the task scheduling server feeds back the specific results to the quantum cloud platform, and the quantum cloud platform displays the results to the user.

[0080] In step S3, if the quantum cloud platform determines that the user has the submission permission, it will queue up for computing tasks and store the submitted tasks; the tasks are stored in the computing resource storage of the quantum cloud platform. If the user does not have the submission permission, the permissionless information will be fed back to the cloud platform and displayed to the user.

[0081] In step S6, the quantum computer performs calculations based on the data submitted by the user, and provides feedback on whether the submitted quantum language or circuit meets the requirements and can be executed. If it can run normally and obtain results, the results will be fed back to the task scheduling server; if it cannot run normally, an error message will be returned, and the task scheduling server will then feed back the specific results to the quantum cloud platform, which will display the results to the user.

[0082] To further illustrate, in step S6, the quantum computing process of the quantum computer on the external user is as follows.

[0083] S61, the quantum program submitted by the user is first transmitted to the quantum computer system.

[0084] S62, call the loading interface to parse the quantum program.

[0085] Specifically, the system uses the loading interface to parse the received quantum program and convert it into an instruction sequence. If this process is successful, the system will feedback the number of quantum bits required; otherwise, it will specify the error details.

[0086] S63, the interface system converts the quantum program into a quantum instruction set. If the parsing is successful, the interface system returns the number of quantum bits required for the current quantum program; if the parsing fails, the error type is returned.

[0087] After the quantum program is parsed successfully, the computing unit selection interface is called to select the quantum computer as the computing unit.

[0088] The task scheduling server can be used for:

[0089] 1. Task splitting and merging strategy: First, the quantum classical hybrid computing tasks submitted by the user are intelligently split into quantum computing tasks suitable for quantum processors and classical computing tasks suitable for classical processors. Quantum computing tasks are merged through predefined merging rules, such as task gate line depth, quantum bit usage, and task requirements for specific quantum bits, to maximize the parallel computing capabilities of the quantum processor. For quantum computing tasks that do not meet the merging conditions, they will be queued or directly fed back with unauthorized information.

[0090] 2. Dynamic resource allocation and scheduling optimization: According to the predicted execution time and required quantum resources of quantum computing tasks, the task queue is adjusted dynamically, and the highest response ratio priority algorithm is used for queuing to ensure that the resources of the quantum processor are reasonably allocated. The task scheduling server requests computing resources from the quantum computer based on the nature of the task and resource requirements, realizing instant scheduling and efficient utilization of resources.

[0091] 3. Optimization of quantum computer execution process: At the quantum computer execution level, the quantum program is parsed through the loading interface, converted into a quantum instruction list, and filled into the specified memory space in the order of instructions. The FPGA driver controls the microwave transmitter to perform quantum computing tasks. After the calculation is completed, the results are fed back to the task scheduling server. This process optimizes the efficiency of reading and executing quantum instructions and ensures the accuracy of the calculation results.

[0092] 4. Multi-task parallel processing and result feedback: The system has designed multiple types of task queues, and divides tasks according to task attributes, such as gate circuit depth and number of quantum bits, to achieve orderly execution of tasks. After the task is completed, the task scheduling server will split the integrated calculation results and feedback them to the user in the order submitted by the user or according to specific rules, ensuring the timeliness and accuracy of the user's results.

[0093] 5. System architecture and user interface: The system architecture integrates the Web side and the server side. Users can submit tasks, view historical task execution status and quantum bit resource usage through the Web interface. The system also introduces a task manager to record and display task execution status, enhancing user experience and transparency of task management.

[0094] The above technical solution not only significantly improves the efficiency of bit resource utilization of quantum computers, but also greatly enhances computing efficiency, allowing ordinary users to conveniently use quantum computing resources without having to deeply understand the complexity of quantum computing. This method and system provides important technical support for the popularization and application of quantum computing technology, solves the key problem of the difficulty in efficient use of quantum computer resources, and lays a solid foundation for the future large-scale application of quantum computing technology.

[0095] The following describes the quantum-classical hybrid architecture in combination with the quantum-classical hybrid computing task scheduling method. Figure 5 is a flowchart of a method for scheduling quantum classical hybrid computing tasks according to an exemplary embodiment. The method can be applied to Figure 1 and Figure 4 The quantum classical hybrid architecture shown, Figure 5 As shown, the quantum classical hybrid computing task scheduling method includes:

[0096] S501, the quantum cloud platform obtains the constructed quantum-classical hybrid computing task, and sends the quantum-classical hybrid computing task to the task scheduling server.

[0097] S502, the task scheduling server divides the quantum-classical hybrid computing task into a classical computing task and a quantum computing task, and extracts the classical program features of the classical computing task and the quantum program features of the quantum computing task respectively.

[0098] S503, the task scheduling server inputs the classic program features into the trained first machine learning model to obtain a prediction result, and allocates the classic computing task to the classic task pool of the classic processor according to the prediction result, wherein the prediction result is the predicted execution time of the classic computing task or the predicted allocation strategy representation score of different types of classic processors to achieve the best execution performance when the classic computing task is executed.

[0099] S504, the task scheduling server inputs the quantum program features into the trained second machine learning model, obtains the output quantum computing task predicted execution time and predicted execution accuracy corresponding to each quantum processor, and allocates the quantum computing task to the quantum task pool of the quantum processor corresponding to the shortest predicted execution time of the quantum computing task among the quantum processors whose predicted execution accuracy is greater than or equal to a preset threshold and whose number of quantum bits is greater than or equal to the number of quantum bits required for the quantum computing task.

[0100] S505, the classical processor obtains a classical computing task from a classical task pool for execution, and the quantum processor obtains a quantum computing task from a quantum task pool for execution.

[0101] In step S501, the quantum cloud platform can obtain the quantum classical hybrid computing task constructed by the user through code programming, quantum simulator graphical user interface, etc., and then send the quantum classical hybrid computing task to the task scheduling server.

[0102] Quantum-classical hybrid computing tasks consist of quantum computing tasks and classical computing tasks, such as variational quantum algorithms (VQA), quantum approximate optimization algorithms (QAOA), and hybrid computing tasks consisting of quantum algorithms and classical processing such as error correction of quantum computing results using classical computing methods.

[0103] After step S501 is completed, step S502 may be executed. In step S502, the task scheduling server first divides the quantum classical hybrid computing task into a classical computing task and a quantum computing task. For example, for VQA, the part that uses quantum bits to run is a quantum computing task, and the part that iterates and updates the parameters is a classical computing task; for the hybrid computing task that includes the above-mentioned error correction process, the quantum algorithm part is a quantum computing task, and the error correction part is a classical computing task.

[0104] After being divided into classical computing tasks and quantum computing tasks, classical program features for characterizing program features of classical computing tasks and quantum program features for characterizing program features of quantum computing tasks are extracted respectively. For example, classical program features may include the number of different types of data, the number of various control statements, etc., and quantum program features may include the number of various quantum logic gates, the number of quantum circuit bits, the number of quantum circuit measurements, etc. In a possible implementation, the corresponding program features may be extracted by a static code analyzer, etc.

[0105] After step S502 is executed, step S503 may be executed. In step S503, the task scheduling server inputs the classic program features into the first machine learning model, and the first machine learning model is trained in advance using corresponding training data, so that the trained first machine learning model can calculate the corresponding prediction results based on the classic program features, and then allocate the classic computing tasks according to the prediction results.

[0106] To train the first machine learning model, sample data and label data can be prepared in advance. The sample data can be the classic program features of different classic computing tasks, and the label data can be the actual execution time of the classic processor, or the actual allocation strategy representation score of different types of classic processors when the best execution performance is achieved. 80% of the sample data and label data are reserved for training, and the remaining 20% ​​are used for testing and evaluation.

[0107] Optionally, when the prediction result is the predicted execution time of a classical computing task, the first machine learning model is any one of a multivariate linear regression model, a multi-output random forest regression model, or a multi-output gradient boosting regression model. These three models are all supervised machine learning models, whose output values ​​are continuous, and are also regression models, and can be used to output the predicted execution time of classical computing tasks of multiple classical processors.

[0108] Corresponding to the above three first machine learning models, optionally, the classic program features include the total number of allocation instructions, the total number of floating-point multiplication operations, the total number of floating-point division instructions, the total number of conditional check instructions, the total number of floating-point subtraction instructions, the total number of function call instructions, the total number of all instructions, the total number of integer operations, and the total number of loop operations.

[0109] There are many types of classic program features, such as the total number of return instructions, the total number of control instructions, the total number of storage instructions, the four arithmetic instructions of floating-point numbers and integers, the total number of functions, the number of floating-point and integer data, the total number of loop operations, etc. If all classic feature data are input into the first machine learning model, more computing resources are required and the computing efficiency is not high. In order to simplify the number of features, feature selection is performed on these classic program features.

[0110] Specifically, the Pearson correlation method can be used to calculate the correlation between classic program features, and then find out the important features. According to the Pearson correlation method, features are divided into positively correlated features and negatively correlated features. Since the use of positively correlated features for training will result in lower prediction accuracy, negatively correlated features are selected here, such as classic program features with correlation values ​​less than or equal to -0.1. The above-mentioned total number of instructions, total number of floating-point multiplication operations, total number of floating-point division instructions, total number of conditional check instructions, total number of floating-point subtraction instructions, total number of function call instructions, total number of all instructions, total number of integer operations, and total number of loop operations, a total of 9 classic program features, are all negatively correlated. Using these classic program features to train the first machine learning model and subsequent prediction calculations can reduce overfitting, improve the accuracy of the classifier, and reduce training time.

[0111] Optionally, when the prediction result is a predicted execution time of a classic computing task, in step S503, allocating the classic computing task to a classic task pool of a classic processor according to the prediction result includes:

[0112] The classical computing task is allocated to a classical task pool of a classical processor corresponding to a shortest classical computing task predicted execution time according to the prediction result.

[0113] The classic processor may include multiple CPUs and GPUs. The classic program features are input into the trained first machine learning model. The first machine learning model outputs the predicted execution time of the classic computing tasks of each CPU and GPU, determines the shortest execution time and the corresponding classic processor, and then allocates the classic computing tasks corresponding to the input classic program features to the classic task pool corresponding to the classic processor.

[0114] Optionally, the first machine learning model includes a first support vector machine, a second support vector machine and a third support vector machine, the first support vector machine is used to predict whether the classical computing task achieves optimal execution performance when running alone on the central processing unit, the second support vector machine is used to predict whether the classical computing task achieves optimal execution performance when running alone on the graphics processing unit, and when the first support vector machine predicts that the classical computing task cannot achieve optimal execution performance when running alone on the central processing unit and the second support vector machine predicts that the classical computing task cannot achieve optimal execution performance when running alone on the graphics processing unit, the third support vector machine is used to predict the distribution ratio of the classical computing task running on the central processing unit and the graphics processing unit.

[0115] Specifically, under certain types of architectures, the differences between the various CPUs in the classic processors are small, and the differences between the various GPUs are also small, and even the same type of CPUs and the same type of GPUs are used. At this time, more attention is paid to the allocation of classic computing tasks between different types of classic processors. For example, in order to achieve the best computing performance, classic computing tasks can be divided into classic computing tasks running alone on the CPU, classic computing tasks running alone on the GPU, and classic computing tasks distributed on the CPU and GPU. In this case, the first machine learning model can use a hierarchical classifier, which can include a two-level classifier, the first level classifier includes a first support vector machine and a second support vector machine, and the second level classifier includes a third support vector machine.

[0116] When using this hierarchical classifier, classic program features may include the number of int-type integer operations, the number of int4-type integer operations, the number of float-type floating-point operations, the number of float4-type floating-point operations, the number of built-in math operations, barrier instructions, the number of memory accesses, the percentage of local memory accesses, the percentage of merged memory accesses, the computation-to-memory ratio, the size of data transfers, and the amount of computation for each data transfer and the number of work items.

[0117] Among them, the number of int integer operations, int4 integer operations, float floating-point operations, float4 floating-point operations, built-in math operations, barrier instructions, and memory accesses can use normalized data. These data can be normalized by multiplying them by the number of work items and then dividing them by the data transfer size to eliminate the difference in eigenvalues ​​caused by inconsistent input data scales when different programs are executed.

[0118] In the first-level classifier, it is possible to screen out classical computing tasks that are suitable for running alone on the CPU and classical computing tasks that are suitable for running alone on the GPU. In a possible implementation, the principal component analysis method can be used to convert these classical feature data into two principal components, and then these two principal components are input into the first support vector machine to predict whether the corresponding classical computing task is suitable for running alone on the CPU. For example, the first support vector machine can output "0" or "1" to represent the prediction results of "no" and "yes" respectively. And these two principal components are input into the second support vector machine to determine whether the corresponding classical computing task is suitable for running alone on the GPU. Similarly, the second support vector machine can output "0" or "1" to represent the prediction results of "no" and "yes" respectively. For example, for the same classical computing task, the first support vector machine outputs "0" and the second support vector machine outputs "1", then it is determined that the classical computing task is suitable for running alone on the GPU, and the prediction work of the classical computing task can be ended at this time.

[0119] If the first support vector machine and the second support vector machine in the first-level classifier both give a prediction result indicating "no", the extracted classic program features can be converted into 11 principal components using principal component analysis, and then input into the third support vector machine of the second-level classifier. The third support vector machine gives a score representing the predicted allocation strategy running on the CPU and GPU. For example, the output number "1" indicates that the corresponding classic computing task is suitable for an allocation strategy of 10% allocation to the CPU and 90% allocation to the GPU, and the output number "6" indicates that the corresponding classic computing task is suitable for an allocation strategy of 60% allocation to the CPU and 40% allocation to the GPU.

[0120] Optionally, when the prediction result is the prediction allocation strategy characterization score, in step S503, the classic computing task is allocated to a classic task pool of a classic processor according to the prediction result, including:

[0121] The classical computing task is allocated to the classical task pool of the classical processor according to the allocation strategy corresponding to the predicted allocation strategy characterization score. The allocation strategy is to allocate the classical computing task solely to the classical task pool of the central processing unit, to allocate the classical computing task solely to the classical task pool of the graphics processing unit, or to allocate the classical computing task to the classical task pool of the central processing unit and the classical task pool of the graphics processing unit respectively according to the proportion corresponding to the predicted allocation strategy characterization score.

[0122] Continuing with the previous example, if the predicted allocation strategy characterization score indicates that the classic computing task is suitable for being allocated to the CPU or GPU alone in order to achieve the best execution performance when executed, the task scheduling server can allocate the classic computing task alone to the CPU's classic task pool or the GPU's classic task pool. If the predicted allocation strategy characterization score indicates that the classic computing task is suitable for being allocated to the CPU and GPU respectively in a certain proportion in order to achieve the best execution performance when executed, the classic computing task will be allocated to a CPU's classic task pool and a GPU's classic task pool according to the proportion.

[0123] After step S502 is executed, step S504 can be executed. In step S504, the quantum computing task can be written in a quantum programming language such as OpenQASM, which includes a description of features such as quantum logic gates of the quantum circuit, and then the quantum program features can be extracted. For example, in a possible implementation, the quantum program features include the number of quantum circuit bits, the number of quantum circuit measurements, the number of single quantum logic gates without parameters, the number of single quantum logic gates with parameters, the number of double quantum logic gates without parameters, the number of double quantum logic gates with parameters, the number of multi-quantum logic gates without parameters, the number of multi-quantum logic gates with parameters, the number of conditional check instructions, and the number of loop instructions.

[0124] Different quantum processors may have completely different types, such as optical quantum processors, ion trap quantum processors, superconducting quantum processors, semiconductor quantum processors, etc., so their performance is different. In addition, the calculation results of current quantum processors all contain noise, so it is necessary to pay attention to the execution accuracy of different quantum computing tasks on different quantum processors. For quantum computing tasks, a certain number of quantum bits are required for the operation of quantum circuits. Therefore, in order to ensure the correct execution of quantum computing tasks, the number of quantum bits of the quantum computer needs to be greater than or equal to the number of quantum bits required to run the quantum computing task.

[0125] Optionally, the second machine learning model is any one of a multivariate linear regression model, a multi-output random forest regression model, or a multi-output gradient boosting regression model. Input the quantum program features into the trained second machine learning model to obtain the predicted execution time and predicted execution accuracy of the corresponding quantum computing task for each quantum processor. Compare the predicted execution accuracy with a preset threshold value such as 90%, compare the number of qubits of the quantum computer with the number of qubits required for the quantum computing task, determine the quantum processor whose predicted execution accuracy is greater than or equal to the preset threshold and whose qubit is greater than or equal to the number of qubits required for the quantum computing task, and then select the quantum processor with the shortest predicted execution time of the quantum computing task, and assign the quantum computing task to the quantum task pool of the quantum processor.

[0126] After step S503 and step S504 are executed, step S505 can be executed. In step S505, for the classical computing tasks in the classical task pool of each classical processor, the classical processor can first obtain the classical computing tasks from its corresponding classical task pool in a sequence such as a first-in-first-out order to perform the operation. For the quantum computing tasks in the quantum task pool of each quantum processor, the quantum processor can first obtain the quantum computing tasks from its corresponding quantum task pool in a sequence such as a first-in-first-out order to perform the operation. In a possible implementation, if some classical task pools and some quantum task pools are empty, tasks can be scheduled between different task pools to improve the task processing efficiency of the overall architecture.

[0127] Through the above technical solution, after the quantum cloud platform sends the quantum-classical hybrid computing task to the task scheduling server, the task scheduling server divides it into classical computing tasks and quantum computing tasks, and predicts their characteristics through the trained machine learning model respectively. According to the output results of the machine learning model, the classical computing tasks and quantum computing tasks are respectively assigned to appropriate processors to improve the computing efficiency of classical computing tasks and quantum computing tasks, and based on this, the overall computing efficiency of quantum-classical hybrid computing tasks is improved.

[0128] Optionally, in step S505, the classic processor obtains a classic computing task from the classic task pool for execution, including:

[0129] S5051, when the classic task pool corresponding to the classic processor itself is not empty, the classic processor obtains a classic computing task from the classic task pool corresponding to itself for execution.

[0130] S5052, when the classic task pool corresponding to the classic processor itself is empty, the task scheduling server schedules classic computing tasks from other non-empty classic task pools to the empty classic task pool, so that the classic processor obtains classic computing tasks from its corresponding classic task pool for execution.

[0131] In step S5051, each classic processor first checks its corresponding classic task pool. If the classic task pool is not empty, that is, there are classic computing tasks in it, the classic processor first obtains the classic computing task from its corresponding classic task pool for execution. For example, for classic processor I and classic processor II, they correspond to classic task pool I and classic task pool II respectively. If there are classic computing tasks in both classic task pool I and classic task pool II, classic processor I obtains the classic computing task from classic task pool I for execution, and classic processor II obtains the classic computing task from classic task pool II for execution.

[0132] In step S5052, if the classical task pool corresponding to a certain classical processor appears to be empty, namely there is no classical computing task wherein, then the task scheduling server schedules classical computing tasks from other non-empty classical task pools to the classical task pool that is empty, so that the originally classical task pool that is empty becomes non-empty, and then its classical processor can obtain the classical computing task therefrom and execute.Continue to use the aforementioned example, if classical task pool I is empty, and classical task pool II is non-empty, then the task scheduling server can schedule a classical computing task from classical task pool II to classical task pool I, and then the classical processor I obtains the classical computing task from classical task pool I and executes.When scheduling, the classical processor of the same type can be first considered, for example, for the classical task pool of the empty CPU, first schedule the classical computing task from the classical task pool of other non-empty CPUs to the described classical task pool that is empty, and for the classical task pool of the empty GPU, first schedule the classical computing task from the classical task pool of other non-empty GPUs to the described classical task pool that is empty.

[0133] Optionally, in step S505, the quantum processor obtains a quantum computing task from a quantum task pool for execution, including:

[0134] S505a, when the quantum task pool corresponding to the quantum processor itself is not empty, the quantum processor obtains a quantum computing task from the quantum task pool corresponding to itself for execution.

[0135] S505b, when the quantum task pool corresponding to the quantum processor itself is empty, the task scheduling server schedules quantum computing tasks from other non-empty quantum task pools to the empty quantum task pool, so that the quantum processor obtains quantum computing tasks from the quantum task pool corresponding to itself for execution.

[0136] The execution process of step S505a and step S505b can refer to step S5051 and step S5052, which will not be repeated here. Through step S5051 and step S5052, as well as step S505a and step S505b, intelligent load balancing can be performed on classical computing tasks and quantum computing tasks, reducing the occurrence of unbalanced loads on each processor and improving the overall execution efficiency of the architecture for computing tasks.

[0137] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0138] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0139] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A method for scheduling quantum classical hybrid computing tasks, characterized in that: Applied to a quantum classical hybrid architecture, the quantum classical hybrid architecture includes a quantum cloud platform, a task scheduling server communicatively connected to the quantum cloud platform, a classical computer and a quantum computer communicatively connected to the task scheduling server, the classical computer includes a classical processor, the quantum computer includes a quantum processor, and the method includes: The quantum cloud platform obtains the constructed quantum classical hybrid computing task, and sends the quantum classical hybrid computing task to the task scheduling server; The task scheduling server divides the quantum classical hybrid computing task into a classical computing task and a quantum computing task, and extracts the classical program features of the classical computing task and the quantum program features of the quantum computing task respectively; The task scheduling server inputs the classic program features into the trained first machine learning model to obtain a prediction result, and allocates the classic computing task to the classic task pool of the classic processor according to the prediction result, wherein the prediction result is the predicted execution time of the classic computing task or the predicted allocation strategy representation score of different types of classic processors to achieve the best execution performance when the classic computing task is executed, wherein the predicted allocation strategy representation score indicates that the allocation strategy suitable for allocation to the central processing unit alone or to the graphics processing unit alone or to the central processing unit and the graphics processing unit respectively in a certain proportion to achieve the best execution performance when the classic computing task is executed; The task scheduling server inputs the quantum program features into the trained second machine learning model to obtain the output of the quantum computing task prediction execution time and prediction execution accuracy corresponding to each quantum processor, and among the quantum processors whose prediction execution accuracy is greater than or equal to a preset threshold and whose quantum bit number is greater than or equal to the quantum bit number required for the quantum computing task, allocates the quantum computing task to the quantum task pool of the quantum processor corresponding to the shortest quantum computing task prediction execution time; The classical processor obtains classical computing tasks from a classical task pool for execution, and the quantum processor obtains quantum computing tasks from a quantum task pool for execution.

2. The method according to claim 1, characterized in that When the prediction result is a predicted execution time of a classic computing task, allocating the classic computing task to a classic task pool of a classic processor according to the prediction result includes: The classical computing task is allocated to a classical task pool of a classical processor corresponding to the shortest classical computing task predicted execution time according to the prediction result.

3. The method according to claim 2, characterized in that The first machine learning model is any one of a multivariate linear regression model, a multi-output random forest regression model, or a multi-output gradient boosting regression model.

4. The method according to claim 3, characterized in that The classic program features include the total number of allocation instructions, the total number of floating-point multiplication operations, the total number of floating-point division instructions, the total number of conditional check instructions, the total number of floating-point subtraction instructions, the total number of function call instructions, the total number of all instructions, the total number of integer operations, and the total number of loop operations.

5. The method according to claim 2, characterized in that: The classic processor includes a central processing unit and a graphics processing unit. When the prediction result is a characterization score of the prediction allocation strategy, allocating the classic computing task to a classic task pool of the classic processor according to the prediction result includes: The classical computing task is allocated to the classical task pool of the classical processor according to the allocation strategy corresponding to the predicted allocation strategy characterization score. The allocation strategy is to allocate the classical computing task solely to the classical task pool of the central processing unit, to allocate the classical computing task solely to the classical task pool of the graphics processing unit, or to allocate the classical computing task to the classical task pool of the central processing unit and the classical task pool of the graphics processing unit respectively according to the proportion corresponding to the predicted allocation strategy characterization score.

6. The method according to claim 1, characterized in that The second machine learning model is any one of a multivariate linear regression model, a multi-output random forest regression model, or a multi-output gradient boosting regression model.

7. The method according to claim 6, characterized in that The quantum program features include the number of quantum circuit bits, the number of quantum circuit measurements, the number of single quantum logic gates without parameters, the number of single quantum logic gates with parameters, the number of double quantum logic gates without parameters, the number of double quantum logic gates with parameters, the number of multi-quantum logic gates without parameters, the number of multi-quantum logic gates with parameters, the number of conditional check instructions, and the number of loop instructions.

8. The method according to claim 1, characterized in that The classic processor obtains a classic computing task from a classic task pool for execution, including: When the classic task pool corresponding to the classic processor itself is not empty, the classic processor obtains a classic computing task from the classic task pool corresponding to itself for execution; When the classic task pool corresponding to the classic processor itself is empty, the task scheduling server schedules classic computing tasks from other non-empty classic task pools to the empty classic task pool, so that the classic processor obtains classic computing tasks from its corresponding classic task pool for execution.

9. The method according to claim 1, characterized in that: The quantum processor obtains a quantum computing task from a quantum task pool for execution, including: When the quantum task pool corresponding to the quantum processor itself is not empty, the quantum processor obtains a quantum computing task from the quantum task pool corresponding to itself for execution; When the quantum task pool corresponding to the quantum processor itself is empty, the task scheduling server schedules quantum computing tasks from other non-empty quantum task pools to the empty quantum task pool, so that the quantum processor obtains quantum computing tasks from the quantum task pool corresponding to itself for execution.

10. A quantum classical hybrid architecture, characterized in that: The architecture includes: Quantum cloud platform; A task scheduling server, connected to the quantum cloud platform for communication; A classical computer, connected to the task scheduling server for communication, wherein the classical computer includes a classical processor; A quantum computer, connected to the task scheduling server for communication, wherein the quantum computer includes a quantum processor; The quantum cloud platform is used to obtain the constructed quantum classical hybrid computing task and send the quantum classical hybrid computing task to the task scheduling server; The task scheduling server is used to divide the quantum classical hybrid computing task into a classical computing task and a quantum computing task, and respectively extract the classical program features of the classical computing task and the quantum program features of the quantum computing task; The task scheduling server is also used to input the classic program features into the trained first machine learning model to obtain a prediction result, and allocate the classic computing task to the classic task pool of the classic processor according to the prediction result, wherein the prediction result is the predicted execution time of the classic computing task or the predicted allocation strategy representation score of different types of classic processors to achieve the best execution performance when the classic computing task is executed, wherein the predicted allocation strategy representation score indicates that the allocation strategy suitable for allocation to the central processing unit alone or to the graphics processing unit alone or to the central processing unit and the graphics processing unit respectively in a certain proportion to achieve the best execution performance when the classic computing task is executed; The task scheduling server is further used to input the quantum program features into the trained second machine learning model to obtain the output quantum computing task predicted execution time and predicted execution accuracy corresponding to each quantum processor, and among the quantum processors whose predicted execution accuracy is greater than or equal to a preset threshold and whose quantum bit number is greater than or equal to the quantum bit number required for the quantum computing task, allocate the quantum computing task to the quantum task pool of the quantum processor corresponding to the shortest predicted execution time of the quantum computing task; The classical processor is used to obtain classical computing tasks from a classical task pool for execution, and the quantum processor is used to obtain quantum computing tasks from a quantum task pool for execution.