Task scheduling method, quantum computer, storage medium and system

The quantum approximation optimization algorithm converts isomorphic parallel machine scheduling into qubit state, solving the problems of inefficient use of production resources and low reliability of target bit strings in isomorphic parallel machine scheduling, achieving more efficient resource allocation and more reliable scheduling results.

CN119808971APending Publication Date: 2025-04-11YANGTZE DELTA IND INNOVATION CENT OF QUANTUM SCI & TECH
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411849280.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The problems of inefficient use of production resources and low reliability of target bit strings in isomorphic parallel machine scheduling.

Method used

By introducing a quantum approximation optimization algorithm, isomorphic parallel machine scheduling is converted into the state of qubits, a quantum circuit model is constructed, and the task quantum circuit is optimized through the global search capability of quantum computing to obtain the optimal solution.

Benefits of technology

It reduces the risk of falling into local optimal solutions, improves the rationality of allocating production resources, reduces resource waste, improves the utilization rate and utilization efficiency of production resources, and improves the reliability of the target bit string.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808971A_ABST
    Figure CN119808971A_ABST
Patent Text Reader

Abstract

The invention discloses a task scheduling method, a quantum computer, a storage medium and a system, and the task scheduling method comprises the steps: inputting task operation parameters of a to-be-scheduled task into a quantum circuit model to obtain a task quantum circuit, carrying out the iteration of the parameters of the task quantum circuit until a preset optimization condition is satisfied, and obtaining a target quantum circuit; the target quantum circuit is operated, a target bit string is obtained based on an output result of the target quantum circuit, classic bits in the target bit string represent to-be-scheduled machines correspondingly distributed by to-be-processed jobs in the to-be-scheduled tasks, and values of the classic bits represent whether the to-be-processed jobs are operated on the correspondingly distributed to-be-scheduled machines or not; and controlling to execute the to-be-scheduled task based on the target bit string. According to the method, the isomorphic parallel machine scheduling task is converted into the quantum circuit, the task allocation is optimized through quantum computing global search, local optimum is avoided, the resource allocation reasonability is improved, and the production resource utilization rate and the use efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of quantum computers, and in particular to task scheduling methods, quantum computers, storage media and systems. Background Art

[0002] The task of scheduling homogeneous parallel machines refers to processing a batch of workpieces on a series of identical machines. Each machine processes only one workpiece at a time, and each workpiece can only be processed by one machine at a time. Each workpiece has a specific processing time. The purpose of scheduling homogeneous parallel machines is to assign all workpieces to corresponding machines for processing in a certain processing order, so that the system performance indicators can reach the optimal level.

[0003] At present, the scheduling of homogeneous parallel machines is mainly based on meta-heuristic algorithms (such as firefly algorithm, hybrid frog leaping algorithm, genetic algorithm, etc.), exact methods (such as dynamic programming, etc.) and heuristic algorithms (such as iterative greedy, taboo search, etc.). Meta-heuristic algorithms and heuristic algorithms usually rely on heuristic information or rules to guide the search process, and these information or rules may lead the search to a biased area, resulting in the homogeneous parallel machine scheduling based on meta-heuristic algorithms and heuristic algorithms falling into a local optimal solution. The scheduling of homogeneous parallel machines based on the exact method requires a large number of computing machines. When facing complex homogeneous parallel machine scheduling, due to the limitation of computing machines, the scheduling of homogeneous parallel machines based on the exact method needs to adopt a heuristic pruning strategy, resulting in the homogeneous parallel machine scheduling falling into a local optimal solution. The homogeneous parallel machine scheduling falling into a local optimal solution leads to uneven distribution of production resources and inefficient use of production resources, and the target bit string output by the system has low reliability.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The purpose of this application is to provide a task scheduling method, quantum computer, storage medium and system, aiming to solve the problems of inefficient use of production resources and low reliability of target bit strings in the scheduling of homogeneous parallel machines.

[0006] To achieve the above objectives, the present application proposes a task scheduling method, which includes:

[0007] Inputting the task operation parameters of the task to be scheduled into the quantum circuit model to obtain the task quantum circuit, and iterating the parameters of the task quantum circuit until the preset optimization conditions are met to obtain the target quantum circuit;

[0008] Running the target quantum circuit and obtaining a target bit string based on an output result of the target quantum circuit, wherein the classical bit in the target bit string represents the machine to be scheduled to which the job to be processed in the task to be scheduled is allocated, and the value of the classical bit represents whether the job to be processed is running on the corresponding allocated machine to be scheduled;

[0009] The to-be-scheduled task is controlled to be executed based on the target bit string.

[0010] In some embodiments of the present application, before the step of inputting the task operation parameters of the task to be scheduled into the quantum circuit model to obtain the task quantum circuit, the method further includes:

[0011] Building an Ising model based on the task constraints corresponding to the tasks to be scheduled;

[0012] A problem Hamiltonian is constructed based on the Ising model, and the quantum circuit model is constructed based on the problem Hamiltonian.

[0013] In some embodiments of the present application, the step of constructing an Ising model based on the task constraint conditions corresponding to the task to be scheduled includes:

[0014] Constructing a decision variable, and constructing a loss function based on the decision variable and the task constraint condition corresponding to the task to be scheduled, wherein the decision variable represents the machine to be scheduled for processing the job to be executed in the task to be scheduled;

[0015] The loss function is mapped to an unconstrained optimization function, and the unconstrained optimization function is mapped to an Ising model.

[0016] In some embodiments of the present application, the step of constructing a loss function based on the decision variables and the task constraints corresponding to the task to be scheduled includes:

[0017] Based on the decision variables, construct an objective function by minimizing the maximum completion time of each of the machines to be scheduled in the tasks to be scheduled;

[0018] Constructing a constraint function based on the decision variables and the task constraints corresponding to the task to be scheduled;

[0019] A loss function is constructed based on the objective function, the constraint function and a preset penalty factor.

[0020] In some embodiments of the present application, the step of iterating the parameters of the task quantum circuit until a preset optimization condition is satisfied to obtain a target quantum circuit includes:

[0021] Analyzing the task quantum circuit to obtain an expected value parameter-containing function corresponding to the task quantum circuit;

[0022] Iterate the parameters in the expected value parameter-containing function until the preset optimization conditions are met to determine the optimal parameters;

[0023] The target quantum circuit is determined according to the optimal parameters and the task quantum circuit.

[0024] In some embodiments of the present application, the step of iterating the parameters in the expected value parameter-containing function until a preset optimization condition is satisfied to determine the optimal parameters includes:

[0025] Drawing an expected value landscape diagram in a preset parameter space based on the expected value parameter-containing function;

[0026] Determine a target parameter value corresponding to a global minimum value in the preset parameter space in the expected value landscape graph, and determine an initialization parameter range with the target parameter value as the center;

[0027] The parameters in the expected value parameter function are iterated based on the initialization parameter range until the number of parameter iterations reaches a preset threshold or the parameters are within a preset error range, and it is determined that the preset optimization conditions are met, and the parameters are determined as optimal parameters.

[0028] In some embodiments of the present application, the step of running the target quantum circuit and obtaining a target bit string based on an output result of the target quantum circuit includes:

[0029] According to a preset sampling number, the target quantum circuit is run and each quantum bit of the target quantum circuit is measured to obtain a plurality of classical bit strings;

[0030] A classic bit string among the multiple classic bit strings that meets a preset selection condition is determined as a target bit string.

[0031] In addition, to achieve the above-mentioned purpose, the present application proposes a quantum computer, on which a computer program is stored, and when the computer program is executed by a processor, the task scheduling method described above is implemented.

[0032] In addition, to achieve the above-mentioned purpose, the present application proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the task scheduling method described above is implemented.

[0033] In addition, to achieve the above purpose, the present application proposes a task scheduling system, which includes:

[0034] A parameter optimization module is used to input the task operation parameters of the task to be scheduled into the quantum circuit model to obtain the task quantum circuit, and iterate the parameters of the task quantum circuit until the preset optimization conditions are met to obtain the target quantum circuit;

[0035] A quantum circuit analysis module, used to run the target quantum circuit and obtain a target bit string based on the output result of the target quantum circuit, wherein the classical bit in the target bit string represents the machine to be scheduled corresponding to the job to be processed in the task to be scheduled, and the value of the classical bit represents whether the job to be processed is running on the corresponding machine to be scheduled;

[0036] A control module controls the execution of the task to be scheduled based on the target bit string.

[0037] In this application, the quantum approximate optimization algorithm is introduced to convert the scheduling of isomorphic parallel machines into the state of quantum bits to obtain a quantum circuit model, and then the actual task to be scheduled is input into the quantum circuit model to obtain the task quantum circuit of the task to be scheduled, and the task quantum circuit is optimized through the global search capability of quantum computing to obtain the optimal solution of the task to be scheduled. In the process of obtaining the optimal solution, the quantum approximate optimization algorithm can explore a wider solution space and reduce the risk of falling into a local optimal solution. At the same time, the characteristics of quantum superposition and quantum entanglement enable the quantum algorithm to find the global optimal solution based on multiple possible job allocation methods at the same time, avoiding falling into a local optimal solution in the process of solving the scheduling of isomorphic parallel machines, thereby improving the rationality of allocating production resources, reducing resource waste, and improving the utilization and efficiency of production resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0040] Figure 1 A flowchart of the first embodiment of the task scheduling method provided in this application;

[0041] Figure 2 A flowchart of the second embodiment of the task scheduling method provided in this application;

[0042] Figure 3 A flowchart of a third embodiment of the task scheduling method provided in this application;

[0043] Figure 4 A flowchart of a fourth embodiment of the task scheduling method provided in this application;

[0044] Figure 5 A flowchart of a fifth embodiment of the task scheduling method provided in this application;

[0045] Figure 6 A flowchart of a sixth embodiment of the task scheduling method provided in this application;

[0046] Figure 7 A flowchart of the seventh embodiment of the task scheduling method provided in this application;

[0047] Figure 8 A schematic diagram of the structure of a task scheduling system provided in some embodiments of the present application;

[0048] Fig. 9 A schematic diagram of the structure of a homogeneous parallel machine scheduling system based on a quantum approximate optimization algorithm provided in some embodiments of the present application;

[0049] Fig.10 A flowchart of a method for scheduling homogeneous parallel machines based on a quantum approximate optimization algorithm provided in some embodiments of the present application;

[0050] Fig.11 (a) Fig.11 (b) is a scheduling Gantt chart of two isomorphic parallel machine scheduling cases provided in some embodiments of the present application;

[0051] Fig.12 (a) Fig.12 (b) is a diagram showing the analytical numerical verification results of two isomorphic parallel machine scheduling cases provided in some embodiments of the present application;

[0052] Fig.13 A time comparison chart of obtaining quantum simulation values ​​and analytical theoretical values ​​for two isomorphic parallel machine scheduling cases provided in some embodiments of the present application;

[0053] Fig.14 (a) Fig.14 (b) Solution state distribution diagram of two isomorphic parallel machine scheduling cases provided in some embodiments of the present application.

[0054] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0055] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0056] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0057] Existing scheduling of homogeneous parallel machines is mainly based on meta-heuristic algorithms (such as firefly algorithm, hybrid frog leaping algorithm, genetic algorithm, etc.), exact methods (such as dynamic programming, etc.) and heuristic algorithms (such as iterative greedy, taboo search, etc.). Meta-heuristic algorithms generally have the following problems: First, the computational cost is high. Meta-heuristic algorithms usually require a large amount of computing machines and time to execute. Especially when dealing with large-scale problems, the iteration speed is slow and the convergence is poor; second, meta-heuristic algorithms usually involve the adjustment and optimization of multiple parameters. When the search space of the problem is very complex, it is easy to fall into the local optimal solution; third, the genetic operator in the meta-heuristic algorithm has randomness, which makes the reliability and stability of the algorithm poor. Exact methods generally have the following problems: first, the time complexity of the exact method grows exponentially with the growth of the problem scale, so the complexity of the exact method is high; second, the exact method usually requires a large amount of memory to store intermediate results, which leads to the lack of memory when the problem scale is large; third, the exact method may still fall into the local optimal solution in some complex situations. Heuristic algorithms generally have the following shortcomings: Heuristic algorithms are usually based on empirical knowledge and are used to guide the search process or decision-making, but these rules are based on specific characteristics or patterns of the problem, which makes the heuristic algorithm perform well on specific problems but poorly on other problems. Therefore, the applicability of heuristic algorithms is poor.

[0058] This application introduces a quantum approximate optimization algorithm to convert the scheduling of homogeneous parallel machines into the state of quantum bits to obtain a quantum circuit model, and then inputs the actual task to be scheduled into the quantum circuit model to obtain the task quantum circuit of the task to be scheduled, and optimizes the task quantum circuit through the global search capability of quantum computing to obtain the optimal solution of the task to be scheduled. In the process of obtaining the optimal solution, the quantum approximate optimization algorithm can explore a wider solution space and reduce the risk of falling into a local optimal solution. At the same time, the characteristics of quantum superposition and quantum entanglement enable the quantum algorithm to find the global optimal solution based on a variety of possible job allocation methods, avoiding falling into a local optimal solution in the process of solving the scheduling of homogeneous parallel machines, thereby improving the rationality of allocating production resources, reducing resource waste, and improving the utilization and efficiency of production resources.

[0059] Compared with the meta-heuristic algorithm, the embodiment of the present application utilizes the principle of quantum superposition, allowing quantum bits to represent multiple states at the same time, and can evaluate multiple potential solutions in a single operation, rather than evaluating them one by one like the classical algorithm. This parallelism reduces the demand for computing machines and reduces processing costs. In addition, the embodiment of the present application explores the solution space by alternately applying the unitary transformation of the problem Hamiltonian and the driving Hamiltonian. This quantum parallelism enables the algorithm to find a better solution within a smaller number of iterations, improves the convergence speed, and in the embodiment of the present application, only the intermediate variation parameters β and γ in the quantum approximate optimization algorithm need to be optimized, and the parameter adjustment process is simpler and more direct, thereby improving the efficiency of isomorphic parallel machine scheduling.

[0060] Compared with the exact method, the quantum approximate optimization algorithm can find the approximate optimal solution faster in complex situations through quantum parallelism, thereby reducing the time complexity and improving the efficiency of scheduling of homogeneous parallel machines. In addition, the quantum approximate optimization algorithm explores the solution space through the evolution of quantum states, and does not need to store the states of all solutions, thereby reducing memory requirements and reducing the consumption of computing machines.

[0061] Compared with heuristic algorithms, quantum approximate optimization algorithms do not rely on heuristic rules for specific problems, but rely on the principles of quantum mechanics. The embodiments of the present application can be applied to various optimization problems without being restricted by the characteristics of specific problems. In addition, the decision-making process of the quantum approximate optimization algorithm is based on the evolution of quantum states rather than empirical knowledge, reducing dependence on specific problem patterns.

[0062] This application provides a task scheduling method. Figure 1 Schematic diagram of the process of task scheduling method in some embodiments of the present application. In some embodiments of the present application, the task scheduling method includes steps S10 to S20.

[0063] Step S10, inputting the task operation parameters of the task to be scheduled into the quantum circuit model to obtain the task quantum circuit, and iterating the parameters of the task quantum circuit until the preset optimization conditions are met to obtain the target quantum circuit.

[0064] It should be noted that the task to be scheduled refers to the task that currently needs to be scheduled on a homogeneous parallel machine. The task can be an industrial production process or a coordinated scheduling task in other fields (such as the economic field), and there is no limitation here.

[0065] The task operation parameters are parameters that characterize the specific information and requirements of each pending job in the scheduled task. The task operation parameters may include the number of pending jobs, the number of machines executing the jobs, the duration of the job, and other parameters. In some embodiments of the present application, there is no limitation on the method of obtaining the task operation parameters. The task operation parameters may be received based on an interactive interface; or the task operation parameters may be obtained by collecting the number of jobs and the number of machines through sensors connected to quantum computer communication. The parameters may be set according to actual needs.

[0066] The quantum circuit model refers to a quantum circuit that can be executed on a quantum computer. This quantum circuit model can solve the scheduling problem of isomorphic parallel machines. The quantum circuit model contains a series of quantum logic gates and the connection relationship between quantum logic gates. The quantum logic gates and the connection relationship together define the structure of the quantum circuit.

[0067] The task operation parameters of the task to be scheduled are input into the quantum circuit model to obtain the task quantum circuit that can be executed on the quantum computer corresponding to the task to be scheduled. The task quantum circuit may include a single-layer quantum circuit, that is, the task quantum circuit is a quantum circuit generated by the quantum circuit model for a specific task (such as the task to be scheduled). The task quantum circuit includes variable values ​​(i.e., parameters in the task quantum circuit) for defining and controlling the structure and behavior of the quantum circuit. The parameters in the task quantum circuit can affect the operation of the quantum logic gate and the connection method and information transmission between quantum bits. When different methods are used to optimize the task quantum circuit, the parameters in the task quantum circuit are different. For example, when the variational method is used to optimize the task quantum circuit, the parameters in the task quantum circuit are variational parameters.

[0068] After the task quantum circuit is generated, the task quantum circuit is optimized so that the task quantum circuit can be executed efficiently and accurately on the quantum computer. The optimized task quantum circuit is called the target quantum circuit. The specific optimization algorithm is not limited here. For example, algorithms such as gradient descent and random search can be used for parameter iteration.

[0069] It should be noted that when optimizing a quantum circuit, the quantum circuit can be run and the performance of the task quantum circuit can be evaluated after each parameter iteration, and whether the optimal operating parameters are obtained can be determined based on the performance of the task quantum circuit; or an expected value function with the parameters in the task quantum circuit as independent variables can be constructed based on the task quantum circuit, and the optimal solution of the expected value function can be obtained by iterating the parameters in the task quantum circuit, and the parameters in the task quantum circuit under the optimal solution can be determined as the optimal operating parameters, so as to run the quantum circuit based on the optimal operating parameters. It can be understood that by optimizing the quantum circuit as a whole, specifically, optimizing the quantum circuit based on the expected value function, fewer quantum bit resources can be used, thereby reducing resource consumption.

[0070] Step S20, running the target quantum circuit and obtaining a target bit string based on the output result of the target quantum circuit, wherein the classical bit in the target bit string represents the machine to be scheduled to which the job to be processed in the task to be scheduled is allocated, and the value of the classical bit represents whether the job to be processed is running on the corresponding allocated machine to be scheduled.

[0071] A pending job is a task or work waiting to be executed in a production or processing process. A pending job is an object in the scheduling process that can be assigned to production resources to complete a specific processing or processing activity. Each job has a specific processing time or duration, which is the amount of time required to complete the job. A processing machine is a physical device or machine that can be used to perform the processing task of a job. A pending machine performs the actual processing work in a production environment. In the scheduling process of homogeneous parallel machines, each pending machine has the same performance and processing capability, that is, any machine can process any job, and the processing time is the same.

[0072] In industrial production processes, pending jobs can refer to work waiting to be processed or handled on the production line. These jobs include specific parts manufacturing, product assembly, quality inspection, and other work that needs to be completed on specific machines or workstations; machines to be scheduled can refer to physical equipment used for processing jobs, such as lathes, milling machines, injection molding machines, welding robots, automated assembly lines, etc. These machines have specific functions and are used to perform specific processing tasks. In other areas of overall scheduling, pending jobs can refer to tasks or work units that need to be performed. For example, in project management, pending jobs can be tasks or milestones in a project. In transportation, pending jobs can be vehicles or flights that need to be scheduled. In cloud computing, pending jobs can be jobs or data streams waiting to be calculated. Machines to be scheduled can refer to machines or service units required to perform jobs. For example, in the field of logistics, machines to be scheduled can be transportation vehicles, such as trucks, ships, or airplanes. In energy management, machines to be scheduled can be power generation units or regulating equipment in power grids.

[0073] It should be noted that the target bit string refers to the output result after the target quantum circuit is run. The target bit string is composed of classical bits that measure the collapse of all quantum bits to the classical state. The classical bit X in the target bit string is represented by X_{i,j}, where i represents the number of the job to be processed, that is, the i-th job to be processed, and j represents the number of the machine to be scheduled, that is, the j-th machine to be scheduled. The value of X_{i,j} (0 or 1) indicates whether job i is running on machine j. If X_{i,j}=1, it means that the i-th job is running on the j-th machine. If X_{i,j}=0, it means that the i-th job is not running on the j-th machine.

[0074] In some embodiments of the present application, after obtaining the target bit string, if the target bit string is not optimal or does not meet all constraints of the task to be scheduled, the target bit string can continue to be optimized. The specific process includes: detecting whether the target bit string meets the target constraints of the task to be scheduled. If the target bit string meets the target constraints, sending the target bit string to the control device; if the target bit string does not meet the target constraints, performing a local search on the target bit string until the target bit string meets the target constraints.

[0075] Step S30, controlling the execution of the task to be scheduled based on the target bit string.

[0076] The quantum computer and the control device are connected in communication. After obtaining the target bit string, the target bit string is sent to the control device through the communication connection. The control device controls the scheduled machine to process the pending job according to the target bit string. It should be noted that the control device refers to the device that controls the execution of the scheduled task. There is no specific limitation here. It can be different devices in different fields. For example, in the field of industrial production, the control device can be an industrial production control device.

[0077] This application uses a quantum approximate optimization algorithm to explore a large number of possible scheduling schemes in a short period of time, obtain the global optimal solution to the task to be scheduled, and determine the optimal variational parameters of the quantum circuit, which helps to improve the convergence speed of the algorithm and the quality of the solution, thereby improving scheduling efficiency.

[0078] In some embodiments of this application, please refer to Figure 2 Before the step S10 of inputting the task operation parameters of the task to be scheduled into the quantum circuit model to obtain the task quantum circuit, the method further includes:

[0079] Step S01, constructing an Ising model based on the task constraints corresponding to the task to be scheduled;

[0080] It should be noted that the task constraint condition is used to characterize the task requirements of the task to be scheduled, and can be set according to the actual task conditions of the task to be scheduled, and is not limited here. In some embodiments of the present application, the task constraint condition of the isomorphic parallel machine scheduling task includes: the task constraint condition is that each job in the isomorphic parallel machine scheduling task is processed once, and the cumulative running time of each machine is not greater than the maximum time, and the maximum time is the maximum value of the cumulative running time of each machine.

[0081] The Ising model of homogeneous parallel machine scheduling tasks is constructed based on task preset conditions. The Ising model characterizes the energy state of the system and is used to simulate the interaction between quantum bits, so that the quantum superposition and quantum entanglement characteristics of quantum computers can be used to obtain the approximate optimal solution to the homogeneous parallel machine scheduling problem.

[0082] Step S02: constructing a problem Hamiltonian based on the Ising model, and constructing a quantum circuit model based on the problem Hamiltonian.

[0083] The spin variables in the Ising model are mapped to quantum bits. The values ​​of the spin variables include +1 and -1, which can be mapped to two different ground states of the quantum bits, where the spin variable value of +1 corresponds to the ground state of the quantum bit 1, and the spin variable value of -1 corresponds to the ground state of the quantum bit 0; the interaction terms that characterize the interaction relationship between the spin variables in the Ising model are mapped to the connection and information transmission between quantum logic gates (i.e., the product of Pauli operators); the problem Hamiltonian is constructed based on the quantum bits and quantum logic gates obtained by the mapping.

[0084] The Ising model is converted into the problem Hamiltonian of a single-layer quantum circuit, and a driving Hamiltonian whose ground state is easy to prepare is constructed. Specifically, the problem Hamiltonian is converted into a parameter-containing problem unitary operator, and the driving Hamiltonian is converted into a parameter-containing driving unitary operator. The parameter-containing problem unitary operator and the parameter-containing driving unitary operator are alternately applied to the uniform quantum superposition state to obtain a wave function. The quantum computer performs calculations through quantum circuits, and the parameter-containing problem unitary operator is represented by a set of parameter-containing rotating gates, and the parameter-containing driving unitary operator is represented by another set of parameter-containing rotating gates. The parameter-containing rotating gates of the parameter-containing problem unitary operator and the parameter-containing driving unitary operator are substituted into the wave function to obtain a single-layer quantum circuit, that is, a quantum circuit model.

[0085] This application maps the task to be scheduled into a quantum circuit model that can be run on a quantum computer, so that the task to be scheduled can be solved by quantum computing, thereby improving the efficiency of the solution. In addition, the quantum superposition and quantum entanglement characteristics of the quantum computer make it possible to explore multiple possible solutions simultaneously when solving the task to be scheduled, thereby improving the accuracy and reliability of solving the scheduling task.

[0086] In some embodiments of this application, please refer to Figure 3 , Step S01: The step of constructing an Ising model based on the task constraint conditions corresponding to the task to be scheduled includes:

[0087] Step S011, constructing a decision variable, and constructing a loss function based on the decision variable and the task constraint conditions corresponding to the task to be scheduled, wherein the decision variable represents the machine to be scheduled for processing the job to be executed in the task to be scheduled;

[0088] It should be noted that the decision variable represents the unknown quantity that needs to be determined in the mathematical model corresponding to the task to be scheduled. In some embodiments of the present application, the decision variable represents the machine to be scheduled that is used to process the job to be executed in the task to be scheduled, that is, to determine which machine to be scheduled should process each job to be processed. After constructing the decision variable, the loss function is constructed with the decision variable satisfying the task constraint corresponding to the task to be scheduled. The process of constructing the loss function is not limited here and can be set according to the actual task to be scheduled and the requirements.

[0089] Step S012: Map the loss function to an unconstrained optimization function, and map the unconstrained optimization function to an Ising model.

[0090] It should be noted that the unconstrained optimization function is a function in which there are no constraints during the optimization process. By mapping the loss function to an unconstrained optimization function, complex problems with constraints can be converted into unconstrained optimization problems, simplifying the subsequent solution process of tasks to be scheduled. The unconstrained optimization function is not restricted here and can be set according to actual needs. In some embodiments of the present application, the unconstrained optimization function can be a quadratic unconstrained binary optimization function.

[0091] After mapping the loss function to an unconstrained optimization function, the variables in the unconstrained optimization function are mapped to spin variables in the Ising model, thereby converting the unconstrained optimization function into an Ising model. It can be understood that by making the task to be scheduled unconstrained and then mapping it to the Ising model, the complex task scheduling task is converted into an easy-to-handle optimization task, thereby improving the efficiency of subsequent solving of the task to be scheduled.

[0092] In some embodiments of this application, please refer to Figure 4 , Step S011: The step of constructing a loss function based on the decision variables and the task constraints corresponding to the task to be scheduled includes:

[0093] Step S0111, based on the decision variables, construct an objective function by minimizing the maximum completion time of each machine to be scheduled in the task to be scheduled;

[0094] It should be noted that the maximum completion time represents the maximum time required for all pending jobs to be completed on the machines to be scheduled. In some embodiments of the present application, the pending tasks are homogeneous parallel machine scheduling tasks. During the execution of the homogeneous parallel machine scheduling tasks, multiple pending jobs are processed on the machines to be processed with the same processing speed. The maximum completion time is the completion time of the job with the latest completion time among the pending jobs. The objective function is constructed with the decision variables as function variables and the minimization of the maximum completion time as the optimization goal.

[0095] In some embodiments of the present application, the task to be scheduled may be a homogeneous parallel machine scheduling task, which is described as follows: n independent jobs N = {0, 1, .... n-1} are processed on m homogeneous parallel machines M = {0, 1, ...., m-1}, each job i∈N must select a unique machine j∈M for processing, interruption is not allowed during the job processing, each machine can only process one job at the same time, and the processing time of each job i∈N on any machine is l i ,The task optimization goal is to minimize the maximum completion time of each machine.

[0096] Based on the task description of the homogeneous parallel machine scheduling task, construct n×m decision variables x ij , when the variable value of the decision variable is 1, it means that the i-th job is processed on the j-th machine to be scheduled. Assuming that the processing time of machine 0 is the longest, the objective function of the scheduling task of the isomorphic parallel machine is the running time of machine 0 (that is, the maximum completion time), and the time for all tasks to be completed (that is, the objective function) is defined as:

[0097]

[0098] Step S0112, constructing a constraint function based on the decision variables and the task constraints corresponding to the task to be scheduled;

[0099] In some embodiments of the present application, the task constraint conditions of the homogeneous parallel machine scheduling task are: each job to be scheduled can only be processed once, and the total running time of each machine to be scheduled is not greater than the maximum completion time (i.e., the running time of machine 0). Based on this, a set of constraints are defined to ensure that the solution is feasible. Specifically, based on the constraint condition: each job to be scheduled can only be processed once, the constraint function is defined as:

[0100]

[0101] Based on the constraint condition: the total running time of each machine to be scheduled should not be greater than the running time of machine 0, the constraint function is defined as:

[0102]

[0103] Step S0113, constructing a loss function based on the objective function, the constraint function and the preset penalty factor.

[0104] In some embodiments of the present application, the loss function of scheduling tasks on a homogeneous parallel machine is constructed by the objective function (1), the constraint functions (2) and (3) and the preset penalty factor:

[0105]

[0106] Among them, A and B are penalty factors. In some embodiments of the present application, the penalty factor can be set as a multiple of the maximum completion time. The larger A is, the greater the constraint on the feasible solution. The larger B is, the greater the constraint on the optimal scheduling. Usually, A>B.

[0107] In some embodiments of the present application, based on the constructed loss function, a single-layer quantum approximate optimization (QAOA) quantum circuit for scheduling tasks on homogeneous parallel machines is constructed. The specific steps are as follows: a column vector with a length of K = nm is used to represent all decision variables x ij ,get:

[0108]

[0109] Represent the column vector as K = nm decision variables x i ,i∈V={0,1,......nm-1}, job processing time and The associated column vector is represented as and vector represents the total processing time of all jobs on the i-th machine:

[0110]

[0111] vector Indicates the special case where the i-th job is processed on all machines simultaneously and other jobs are not allowed to process:

[0112]

[0113] Based on the above vector, the loss function (4) is converted into an unconstrained optimization function, specifically a quadratic unconstrained binary optimization function (QUBO). The general formula of the quadratic unconstrained binary optimization function is:

[0114] f QUBO (x) = x T Q′x+g′ T x+c′ (8)

[0115] Where Q' is the quadratic coefficient matrix, g' is the linear coefficient vector, and c' is the constant offset. And the loss function (4) is obtained:

[0116]

[0117] Here, let Q be the (nm×nm) quadratic coefficient matrix:

[0118]

[0119] set up is a (nm×1) linear coefficient column vector:

[0120]

[0121] Where c is a constant: c = An (12). The loss function can be expressed as a quadratic unconstrained binary optimization function:

[0122]

[0123] Then, the Hamiltonian of the problem of scheduling tasks on homogeneous parallel machines is constructed based on the quadratic unconstrained binary optimization function. Specifically, formula (13) is expressed as:

[0124]

[0125] Where V = {0, 1, ..., nm-1}.

[0126] Since the Hamiltonian in the problem is obtained by replacing the rotation variables s of the Ising model i ∈{-1,1} maps to Pauli Z i The characteristic value of the operator is obtained, so the decision variables are mapped to rotation variables to obtain the Ising model. Specifically, based on the vector Derived Thus, the mapping relationship between the rotation variables and the decision variables is obtained as follows: Substituting this mapping relationship into equation (14), we get the Ising model for scheduling tasks on homogeneous parallel machines:

[0127]

[0128] Among them, Therefore, the Ising model (15) can be rewritten as:

[0129]

[0130] The rotation variable s in equation (19) i Replace with Z i , represents the Pauli Z operator acting on the i-th quantum bit, and obtains the problem Hamiltonian H that can be implemented on a quantum computer C , Const in equation (19) only changes the phase of the Hamiltonian and has no effect on the eigenstate or minimum energy state corresponding to the Hamiltonian.

[0131] Finally, based on the adiabatic principle, quantum approximate optimization also requires a driving Hamiltonian whose ground state is easy to prepare, where the driving Hamiltonian is

[0132] Based on the problem Hamiltonian, a parameterized problem unitary operator is constructed, and based on the driving Hamiltonian, a parameterized driven unitary operator is constructed. In the uniform quantum superposition state Alternating application of p-times parameter-containing problem unitary operator U(H C ,γ i ) and the parameter-driven unitary operator U(H M ,β i ), we get the wave function:

[0133]

[0134] Where β=(β1,β2,...β p ), γ=(γ1,γ2,...γ p ) is the variational parameter, and the unitary operator of the parameter problem is The parameter-driven unitary operator is

[0135] For the quantum state ψ p (γ,β)> is measured to obtain the Hamiltonian H C In ψ p Expected value on (γ,β)>:

[0136] E p (γ,β)=<ψ p (γ,β)|H C ψ p (γ,β)> (24)

[0137] For the initial quantum uniform superposition state, we can obtain Upper effect The gate obtains; for the problem with parameters, the unitary operator U(H C ,γ k ), which can be expressed as R with parameters ZZ and R Z Revolving door, specifically:

[0138]

[0139] For the parameter-driven unitary operator U(H M ,β k ), which can be expressed as R with parameters X Revolving door, specifically:

[0140]

[0141] In some embodiments of this application, please refer to Figure 5 , step S10: iterating the parameters of the task quantum circuit until the preset optimization conditions are met to obtain the target quantum circuit, including:

[0142] Step S101, analyzing the task quantum circuit to obtain the expected value parameter function corresponding to the task quantum circuit;

[0143] The expected value parameter function characterizes the expected value of the quantum state in the quantum circuit for the observed quantity. In some embodiments of the present application, when the task quantum circuit is constructed based on the homogeneous parallel machine scheduling task, the expected value parameter function characterizes the expected value of the homogeneous parallel machine task (that is, the job to be scheduled is executed by a certain machine to be scheduled) for the observed quantity (that is, the maximum completion time).

[0144] In some embodiments of the present application, the task to be scheduled may be a homogeneous parallel machine scheduling task. From equations (21) to (24), it can be seen that the single-layer quantum approximate optimization expected value of the homogeneous parallel machine scheduling task is:

[0145]

[0146] Further analysis shows that the analytical expression of the single-layer quantum approximate expected value of the scheduling task of the homogeneous parallel machine is:

[0147]

[0148] Step S102, iterating the parameters in the expected value parameter function until the preset optimization conditions are met to determine the optimal parameters;

[0149] It should be noted that there is no restriction on the method of optimizing the parameters in the expected value parameter-containing function, and methods such as gradient descent and stochastic gradient descent can be used. The preset optimization condition is the condition for stopping the optimization iteration of the parameter, which can be set according to actual needs, and the iterated parameter that meets the preset optimization condition is taken as the optimal parameter.

[0150] Step S103, determining the target quantum circuit according to the optimal parameters and the task quantum circuit.

[0151] The optimal parameters are input into the task quantum circuit to obtain the target quantum circuit. The target quantum circuit represents that under the same task to be scheduled, it can produce a better output result (i.e., the maximum completion time is minimized).

[0152] In some embodiments of this application, please refer to Figure 6 , step S102: iterating the parameters in the expected value parameter function until the preset optimization conditions are met to determine the optimal parameters, including:

[0153] Step S1021, drawing an expected value landscape diagram in a preset parameter space based on the expected value parameter-containing function;

[0154] The expected value landscape diagram can characterize the changes of the expected value parameter-containing function in the preset parameter space, where the horizontal axis of the landscape diagram represents the parameter value in the parameter space, and the vertical axis represents the corresponding expected value.

[0155] Step S1022, determining the target parameter value corresponding to the global minimum value in the preset parameter space in the expected value landscape diagram, and determining the initialization parameter range with the target parameter value as the center;

[0156] According to the position of the global minimum value in the expected value landscape (i.e., the target parameter value), a reasonable initialization parameter range is set. Specifically, the target parameter value is centered and a preset value margin is used as the value range to obtain the initialization parameter range.

[0157] Step S1023, iterate the parameters in the expected value parameter function based on the initialization parameter range until the number of parameter iterations reaches a preset threshold or the parameters are within a preset error range, determine that the preset optimization conditions are met, and determine the parameters as optimal parameters.

[0158] The parameters in the expected value parameter function are iterated based on the initialization parameter range. It should be noted that the parameters in the expected value parameter function are variable values ​​used to define and control the quantum circuit in the task quantum circuit. Specifically, the parameters in the expected value parameter function can be variational parameters, and the iteration process can be to optimize the parameters using the Powell gradient-free optimizer. If the output result meets the set error range or when the number of iterations reaches the set maximum number of iterations, it is determined that the parameters meet the preset optimization conditions, and the parameter iteration is stopped to obtain the optimal variational parameter (γ * ,β * ).

[0159] In some embodiments of this application, please refer to Figure 7 Step S20: running the target quantum circuit and obtaining the target bit string based on the output result of the target quantum circuit, including:

[0160] Step S201, running the target quantum circuit and measuring each quantum bit of the target quantum circuit to obtain multiple classical bit strings according to a preset sampling number;

[0161] The preset sampling number is the number of times the quantum circuit is measured. Quantum measurement is random, and a single measurement result may not accurately reflect the true output of the quantum circuit. Therefore, the quantum circuit is run multiple times according to the preset sampling number and its results are measured to obtain more reliable data. The quantum bit is in a superposition state before measurement. When the quantum bit is measured, each quantum bit collapses to the classical bit state 0 or 1, thereby obtaining a classical bit. The sequence of multiple classical bits is a classical bit string, which represents the state of the quantum bit after measurement.

[0162] Specifically, run the optimal parameter (γ * ,β * )'s single-layer quantum approximation optimizes the quantum circuit, and then measures the quantum bits, each of which collapses to the classical bit state 0 or 1 with a certain probability. In some embodiments of the present application, the classical bit string can be saved in a classical register for subsequent task scheduling by a classical computer based on the classical bit string.

[0163] Step S202: determine a classic bit string that meets a preset selection condition among multiple classic bit strings as a target bit string.

[0164] A target bit string is obtained by screening multiple classic bit strings based on preset selection conditions. The preset selection conditions can be set according to actual needs. For example, the preset selection condition can be the one with the highest frequency of occurrence among the classic bit strings.

[0165] It can be understood that by screening out a target bit string that meets preset selection conditions from multiple classic bit strings, the redundancy and complexity of data are reduced, providing a basis for subsequent analysis, decoding or application.

[0166] In this application, the quantum approximate optimization algorithm is introduced to convert the scheduling of isomorphic parallel machines into the state of quantum bits to obtain a quantum circuit model, and then the actual task to be scheduled is input into the quantum circuit model to obtain the task quantum circuit of the task to be scheduled, and the task quantum circuit is optimized through the global search capability of quantum computing to obtain the optimal solution of the task to be scheduled. In the process of obtaining the optimal solution, the quantum approximate optimization algorithm can explore a wider solution space and reduce the risk of falling into a local optimal solution. At the same time, the characteristics of quantum superposition and quantum entanglement enable the quantum algorithm to find the global optimal solution based on multiple possible job allocation methods at the same time, avoiding falling into a local optimal solution in the process of solving the scheduling of isomorphic parallel machines, thereby improving the rationality of allocating production resources, reducing resource waste, and improving the utilization and efficiency of production resources.

[0167] This application also provides a task scheduling system, please refer to Figure 8 , the task scheduling system includes:

[0168] A parameter optimization module is used to input the task operation parameters of the task to be scheduled into the quantum circuit model to obtain the task quantum circuit, and iterate the parameters of the task quantum circuit until the preset optimization conditions are met to obtain the target quantum circuit;

[0169] A quantum circuit analysis module is used to run the target quantum circuit and obtain a target bit string based on the output result of the target quantum circuit, wherein the classical bit in the target bit string represents the machine to be scheduled corresponding to the job to be processed in the scheduled task, and the value of the classical bit represents whether the job to be processed is running on the corresponding machine to be scheduled;

[0170] The control module controls the execution of the scheduled task based on the target bit string.

[0171] In some embodiments of this application, please refer to Fig. 9 The task scheduling system may include a parallel machine scheduling model building module, a single-layer quantum approximate optimization (Quantum Approximate Optimization Algorithm) quantum circuit design module, a single-layer quantum approximate optimization analytical calculation module, a single-layer quantum approximate optimization variational parameter optimization module, a single-layer quantum approximate optimization quantum circuit analytical module, and an optimal scheduling result display module.

[0172] The parallel machine scheduling model building module is used to mathematically model the scheduling of homogeneous parallel machines, including the loss function model of homogeneous parallel machine scheduling and its QUBO (Quadratic Unconstrained Binary Optimization) formula and Ising Hamiltonian.

[0173] The single-layer quantum approximate optimization quantum circuit design module is used to construct quantum approximate optimization quantum circuits based on the modeled Ising Hamiltonian and Trotterization principle.

[0174] The single-layer quantum approximate optimization analytical expression calculation module is used to calculate the expected value analytical expression of single-layer quantum approximate optimization scheduled by homogeneous parallel machines.

[0175] The single-layer quantum approximate optimization variational parameter optimization module is used to obtain the optimal variational parameters of the single-layer quantum approximate optimization quantum circuit scheduled by homogeneous parallel machines. The specific process includes: drawing the expected value landscape diagram according to the expected value analytical expression, and then deriving a reasonable parameter initialization range, and finally using the classical optimizer Powell to optimize the parameter-containing expected value analytical expression to obtain the optimal parameters.

[0176] The single-layer quantum approximate optimization quantum circuit analysis module is used to solve the quantum approximate optimization quantum circuit for isomorphic parallel machine scheduling, including running the single-layer quantum approximate optimization circuit with optimal parameters, measuring all quantum bits, and saving the classical bit state after collapse.

[0177] The optimal scheduling result display module is used to adapt the optimal target bit string (i.e. the optimal result) to the corresponding scheduling service node, specifically including: producing a corresponding scheduling Gantt chart according to the solution result obtained as the scheduling solution for actual production.

[0178] The data control management module is used for data management during job scheduling and records the actual corresponding production data.

[0179] The homogeneous parallel machine scheduling application service platform is used to schedule homogeneous parallel machines based on the optimal scheduling results.

[0180] This application proposes a method for scheduling homogeneous parallel machines based on quantum approximate optimization algorithm. Fig.10 ,The scheduling methods for homogeneous parallel machines include:

[0181] Step 1, construct a mathematical model for scheduling tasks on homogeneous parallel machines, specifically, construct decision variables, and construct a loss function based on the decision variables and task constraints corresponding to the tasks to be scheduled;

[0182] Step 2, constructing a single-layer quantum circuit of a quantum approximate optimization algorithm, specifically, mapping the loss function to an unconstrained optimization function, and mapping the unconstrained optimization function to an Ising model, constructing a problem Hamiltonian based on the Ising model, and constructing a quantum circuit model based on the problem Hamiltonian;

[0183] Step 3, obtaining a parameter-containing analytical expression for solving a single-layer quantum circuit. Specifically, the task quantum circuit is analyzed to obtain an expected value parameter-containing function corresponding to the task quantum circuit;

[0184] Step 4, setting the initial variational parameters, specifically, drawing an expected value landscape diagram in a preset parameter space based on the expected value parameter-containing function; determining the target parameter value corresponding to the global minimum value in the preset parameter space in the expected value landscape diagram, and determining the initialization parameter range with the target parameter value as the center;

[0185] Step 5, check whether the preset optimization conditions are met, if yes, go to step 6; if no, go to step 7;

[0186] Step 6, using the Powell optimizer to optimize the variational parameters, specifically, iterating the parameters in the expected value parameter function based on the initialization parameter range until the number of parameter iterations reaches a preset threshold or the parameter is within a preset error range, determining that the preset optimization conditions are met, and determining the parameter as the optimal parameter; and determining the target quantum circuit according to the optimal parameter and the task quantum circuit;

[0187] Step 7, input the task operation parameters of the task to be scheduled into a single-layer quantum circuit (i.e., a target quantum circuit) containing optimal parameters, measure the quantum bits, and obtain the optimal solution of the task to be scheduled. Specifically, input the task operation parameters of the task to be scheduled into the target quantum circuit with optimal parameters; run the target quantum circuit and obtain the target bit string based on the output result of the target quantum circuit.

[0188] As two specific examples of the homogeneous parallel machine scheduling task (6,2) and the homogeneous parallel machine scheduling task (7,3), refer to Fig.11 (a), there are 6 jobs to be processed, and 2 isomorphic parallel machines (Machine1, Machine2). The processing time of each job is L = [5, 2, 1, 3, 3, 2]; see Fig.11 (b) There are 7 jobs to be processed and 3 homogeneous parallel machines. The processing time of each job is L = [7, 5, 3, 2, 2, 2, 2].

[0189] like Fig.12 (a) and Fig.12 (b) shows that Fig.11 The numerical verification results of the single-layer quantum approximate optimization analytical formula for the homogeneous parallel machine scheduling task (6,2) and the homogeneous parallel machine scheduling task (7,3) are shown in Fig.12 (a) In this example, set A = 5000, B = 50. Fig.12 (b) In this example, A=7000 and B=70. Fig.12 It can be seen that the theoretical values ​​of the analytical expressions derived in some embodiments of the present application are consistent with the quantum simulation values, which shows that the derived parameter-containing analytical expressions can be used to replace the single-layer quantum approximation to optimize the quantum circuit, saving quantum machines; at the same time, the analytical expression can simulate any scale of isomorphic parallel machine scheduling task instances, laying the foundation for the subsequent use of quantum computers to solve large-scale problems.

[0190] like Fig.13 As shown, it provides Fig.11 The time comparison chart of obtaining quantum simulation value and analytical value of single-layer quantum approximate optimization of scheduling tasks of two isomorphic parallel machines in ; Fig.13 It can be seen that as the scale of the problem increases, the time to obtain the quantum simulation value increases rapidly, while the time to obtain the analytical value remains almost unchanged. Specifically, the speed of obtaining the analytical value is 1 to 3 orders of magnitude faster than the simulation value. Therefore, optimizing the parameter-containing analytical expression can greatly save time, thereby running the quantum approximate optimization quantum circuit on a quantum simulator or real device with optimal parameters to obtain the solution to the problem.

[0191] like Fig.14 (a) and Fig.14(b) shows the solution state distribution diagram of the single-layer quantum approximate optimization of the homogeneous parallel machine scheduling task (6,2) and the homogeneous parallel machine scheduling task (7,3), where black is the optimal solution, gray is the feasible solution, and white is the infeasible solution. Fig.14 It can be seen that running a single-layer quantum approximate optimization quantum circuit with optimal parameters can obtain the optimal solution or a feasible solution with good quality at one time with the highest probability. Fig.14 (a) It can be seen that the solution state with the most sampling times in the homogeneous parallel machine scheduling task (6,2) is the optimal solution 1690 = [0,1,1,0,1,0,0,1,1,0,1,0]. Further observation shows that all the solutions of this instance are feasible solutions. Fig.14 (b) It can be seen that although there is no optimal solution in the solution state, the solution state with the most sampling times is a feasible solution, which is equivalent to running a quantum approximate optimization quantum circuit once. 21 A feasible solution is directly obtained from the possible solutions, and the complexity is much lower than the classical algorithm.

[0192] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the task scheduling method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0193] The present application provides a quantum computer, on which a computer program is stored, and when the computer program is executed by a processor, the task scheduling method in the above embodiment is implemented. The quantum computer of the present application can solve the technical problem of inefficient use of production resources in the scheduling of homogeneous parallel machines. Compared with the prior art, the beneficial effects of the quantum computer provided by the present application are the same as the beneficial effects of the task scheduling method provided by the above embodiment, and other technical features in the quantum computer are the same as the features disclosed in some embodiments of the present application, which will not be repeated here.

[0194] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0195] The present application provides a storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the task scheduling method in the above-mentioned embodiment. The readable storage medium provided by the present application is a computer-readable storage medium, and the computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned task scheduling method, which can solve the technical problem of inefficient use of production resources in the scheduling of homogeneous parallel machines. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the task scheduling method provided in the above-mentioned embodiment, and will not be repeated here.

[0196] The present application also provides a computer program product, including a computer program, which implements the above-mentioned task scheduling method when executed by a processor.

[0197] The computer program product provided by the present application can solve the technical problem of inefficient use of production resources in the scheduling of homogeneous parallel machines. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the task scheduling method provided by the above embodiment, which will not be repeated here.

[0198] The above are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A task scheduling method, characterized in that: The method comprises: Inputting the task operation parameters of the task to be scheduled into the quantum circuit model to obtain the task quantum circuit, and iterating the parameters of the task quantum circuit until the preset optimization conditions are met to obtain the target quantum circuit; Running the target quantum circuit and obtaining a target bit string based on an output result of the target quantum circuit, wherein the classical bit in the target bit string represents the machine to be scheduled to which the job to be processed in the task to be scheduled is allocated, and the value of the classical bit represents whether the job to be processed is running on the corresponding allocated machine to be scheduled; The to-be-scheduled task is controlled to be executed based on the target bit string.

2. The method according to claim 1, characterized in that: Before the step of inputting the task operation parameters of the task to be scheduled into the quantum circuit model to obtain the task quantum circuit, the method further includes: Building an Ising model based on the task constraints corresponding to the tasks to be scheduled; A problem Hamiltonian is constructed based on the Ising model, and the quantum circuit model is constructed based on the problem Hamiltonian.

3. The method according to claim 2, characterized in that: The step of constructing an Ising model based on the task constraint conditions corresponding to the task to be scheduled includes: Constructing a decision variable, and constructing a loss function based on the decision variable and the task constraint condition corresponding to the task to be scheduled, wherein the decision variable represents the machine to be scheduled for processing the job to be executed in the task to be scheduled; The loss function is mapped to an unconstrained optimization function, and the unconstrained optimization function is mapped to an Ising model.

4. The method according to claim 3, characterized in that: The step of constructing a loss function based on the decision variables and the task constraints corresponding to the task to be scheduled includes: Based on the decision variables, construct an objective function by minimizing the maximum completion time of each of the machines to be scheduled in the tasks to be scheduled; Constructing a constraint function based on the decision variables and the task constraints corresponding to the task to be scheduled; A loss function is constructed based on the objective function, the constraint function and a preset penalty factor.

5. The method according to claim 1, characterized in that: The step of iterating the parameters of the task quantum circuit until the preset optimization conditions are met to obtain the target quantum circuit includes: Analyzing the task quantum circuit to obtain an expected value parameter-containing function corresponding to the task quantum circuit; Iterate the parameters in the expected value parameter-containing function until the preset optimization conditions are met to determine the optimal parameters; The target quantum circuit is determined according to the optimal parameters and the task quantum circuit.

6. The method according to claim 5, characterized in that The step of iterating the parameters in the expected value parameter-containing function until the preset optimization conditions are met to determine the optimal parameters includes: Drawing an expected value landscape diagram in a preset parameter space based on the expected value parameter-containing function; Determine a target parameter value corresponding to a global minimum value in the preset parameter space in the expected value landscape graph, and determine an initialization parameter range with the target parameter value as the center; The parameters in the expected value parameter function are iterated based on the initialization parameter range until the number of parameter iterations reaches a preset threshold or the parameters are within a preset error range, and it is determined that the preset optimization conditions are met, and the parameters are determined as optimal parameters.

7. The method according to any one of claims 1 to 6, characterized in that: The step of running the target quantum circuit and obtaining a target bit string based on an output result of the target quantum circuit comprises: According to a preset sampling number, the target quantum circuit is run and each quantum bit of the target quantum circuit is measured to obtain a plurality of classical bit strings; A classic bit string among the multiple classic bit strings that meets a preset selection condition is determined as a target bit string.

8. A quantum computer, characterized in that: A computer program is stored on the quantum computer, and when the computer program is executed by the processor, the task scheduling method according to any one of claims 1 to 7 is implemented.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the task scheduling method according to any one of claims 1 to 7 is implemented.

10. A task scheduling system, characterized in that: The task scheduling system comprises: A parameter optimization module is used to input the task operation parameters of the task to be scheduled into the quantum circuit model to obtain the task quantum circuit, and iterate the parameters of the task quantum circuit until the preset optimization conditions are met to obtain the target quantum circuit; A quantum circuit analysis module, used to run the target quantum circuit and obtain a target bit string based on the output result of the target quantum circuit, wherein the classical bit in the target bit string represents the machine to be scheduled corresponding to the job to be processed in the task to be scheduled, and the value of the classical bit represents whether the job to be processed is running on the corresponding machine to be scheduled; A control module controls the execution of the task to be scheduled based on the target bit string.

Citation Information

Cited By

  • Enterprise project service management system and method based on intelligent agent

    CN120218541A

  • Intelligent scheduling and resource management system of microbiological detection laboratory

    CN120236700A

  • Intelligent scheduling and resource management system for microbiological testing laboratories

    CN120236700B

  • Task arrangement method, robot control method and robot control system

    CN120326642A