A method for automatic decomposition and dynamic scheduling of quantum tasks under a quantity super-fusion architecture
By automating the decomposition and dynamically scheduling of quantum tasks, the problems of manual dependence and poor scheduling adaptation in existing technologies are solved, and efficient execution and resource optimization of quantum tasks are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DAWNING INFORMATION IND (BEIJING) CO LTD
- Filing Date
- 2026-04-10
- Publication Date
- 2026-07-14
AI Technical Summary
Existing quantum simulation task execution schemes suffer from issues of manual dependence and poor scheduling adaptation, resulting in low task execution efficiency.
By acquiring the quantum task script and parsing the circuit information, multiple sub-task scripts and sub-task execution chains are automatically generated. Combining the circuit information and task scripts, a job scheduling script is generated, and the target execution script is submitted through a preset native interface, thereby realizing the automated decomposition and dynamic scheduling of quantum tasks.
Reduce reliance on manual operations, achieve precise matching between subtasks and heterogeneous supercomputing resources, and improve the execution efficiency and resource utilization of quantum tasks.
Smart Images

Figure CN122387607A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of quantum hyper-converged architecture, and in particular to an automatic decomposition and dynamic scheduling method for quantum tasks under quantum hyper-converged architecture. Background Technology
[0002] Quantum computing, with its unique properties of quantum superposition and entanglement, has become a core direction for breaking through the performance bottleneck of classical computing. The fusion of quantum computing and supercomputing, as a key path bridging the theoretical potential and practical value of quantum computing, has become a mainstream trend in the industry. The demand for quantum simulation tasks is surging, but real quantum computing machines are scarce, and researchers mainly rely on quantum simulators in classical supercomputers to verify algorithms.
[0003] The existing quantum simulation task execution scheme takes the combination of classical supercomputing clusters and quantum computing frameworks as its core. It constructs quantum circuit simulation tasks, relies on the heterogeneous resources provided by the supercomputing cluster to complete the execution, and uses a traditional scheduling system for resource allocation and task management. Each stage of task execution needs to be manually broken down and corresponding job scripts need to be written. The dependencies between subtasks also need to be manually configured. Finally, the verification results are output through a quantum simulator.
[0004] The above process suffers from numerous problems, such as reliance on manual intervention and poor scheduling adaptation, resulting in low task execution efficiency. Summary of the Invention
[0005] This application provides an automatic decomposition and dynamic scheduling method for quantum tasks under a quantum hyper-converged architecture, in order to solve the technical problem of low task execution efficiency in related technologies.
[0006] Firstly, this application provides an automatic decomposition and dynamic scheduling method for quantum tasks under a quantum hyper-converged architecture, the method comprising:
[0007] Obtain the task script corresponding to the quantum task, and parse the task script to obtain circuit information, including the number of qubits and the gate depth information.
[0008] Based on the circuit information and the task script, multiple sub-task scripts and sub-task execution chains are generated. The multiple sub-task scripts include compilation task scripts, simulation task scripts and post-processing task scripts.
[0009] For any given subtask script, determine the corresponding job scheduling script based on the circuit information.
[0010] Based on the subtask execution chain, multiple job scheduling scripts are associated and bound to generate a target execution script, which is then submitted through a preset native interface.
[0011] This enables automated decomposition and dynamic scheduling of quantum tasks under the quantum supercomputing architecture, reduces reliance on manual operation, achieves precise matching between subtasks and heterogeneous supercomputing resources, and improves the execution efficiency and resource utilization of quantum tasks.
[0012] Optionally, the method described above generates multiple subtask scripts and subtask execution chains based on the circuit information and the task script, including:
[0013] Determine the flag functions corresponding to each of the multiple preset processing stages;
[0014] Based on the flag functions corresponding to the multiple preset processing stages, the task script is split multiple times to obtain multiple sub-task scripts and multiple intermediate data files.
[0015] The subtask execution chain is determined based on multiple intermediate data files.
[0016] In this way, by splitting the task script according to the stage flag function and generating corresponding intermediate data, and combining the attributes and relationships of the intermediate data to construct an orderly sub-task execution chain, the decoupling and standardized connection of each stage of the quantum computing task is realized. This ensures that the sub-tasks are executed in an orderly manner according to their dependencies, that data is seamlessly transferred at each stage and that the flow is traceable, thereby improving the execution efficiency and resource utilization of the quantum task.
[0017] Optionally, as described above, the multiple preset processing stages include a compilation stage, a simulation stage, and a post-processing stage. Based on the flag functions corresponding to each preset processing stage, the task script is split multiple times to obtain multiple sub-task scripts and multiple intermediate data files, including:
[0018] Based on the flag functions corresponding to the compilation stage, the task script is first split to obtain the compilation task script and intermediate compilation data.
[0019] Based on the intermediate compilation data and the flag functions corresponding to the simulation stage, the task script is split into two parts to obtain the simulation task script and simulation intermediate data.
[0020] Based on the simulated intermediate data and the flag functions corresponding to the post-processing stage, the task script is split into a third part to obtain the post-processing task script.
[0021] Among them, multiple intermediate data files include compilation intermediate data and simulation intermediate data.
[0022] This achieves decoupling and standardized connection of each stage of quantum computing tasks, ensuring that subtasks are executed in an orderly manner according to their dependencies, data is seamlessly transferred at each stage and traceable, thereby improving the execution efficiency and resource utilization of quantum tasks.
[0023] Optionally, as described above, the task script is first split based on the flag function corresponding to the compilation stage to obtain the compilation task script and intermediate compilation data, including:
[0024] Based on the flag functions corresponding to the compilation stage, extract the compilation task script corresponding to the compilation stage from the task script;
[0025] Based on the compilation task script, the code logic is executed to obtain the compiled circuit object;
[0026] Based on the compiled circuit object, perform serialized data persistence operations to obtain intermediate compilation data.
[0027] In this way, the compilation task script is accurately extracted and the compilation logic is executed, enabling the acquisition of compilation circuit objects and the persistence of intermediate compilation data, thus ensuring the efficient and orderly progress of the compilation phase.
[0028] Optionally, as described above, the task script is further split based on the intermediate compilation data and the flag functions corresponding to the simulation stage to obtain the simulation task script and simulation intermediate data, including:
[0029] Based on the flag function corresponding to the simulation phase, extract the simulation task script corresponding to the simulation phase from the task script;
[0030] Based on the simulation task script and intermediate compilation data, determine the result object of the completed simulation task;
[0031] Based on the simulation task result object, perform serialization data persistence operation to obtain simulation intermediate data.
[0032] In this way, the simulation task script is accurately extracted, and the simulation logic is executed in combination with the intermediate compilation data to obtain the simulation task result object. The intermediate simulation data is also persisted, ensuring that the simulation phase proceeds in an orderly manner and that the data is traceable.
[0033] Optionally, as described above, the task script is further split into a third part based on the simulated intermediate data and the flag function corresponding to the post-processing stage, resulting in a post-processing task script, including:
[0034] Based on the flag function corresponding to the post-processing stage, extract the post-processing task script corresponding to the post-processing stage from the task script;
[0035] Based on the post-processing task script and simulation intermediate data, determine the statistical results of quantum measurement;
[0036] Save the quantum measurement statistics to a local analysis report file.
[0037] In this way, the post-processing task script is accurately extracted and combined with the simulation intermediate data to generate quantum measurement statistical results. At the same time, the results are persisted to local files, realizing the efficient generation and convenient analysis of the results in the quantum computing post-processing stage.
[0038] Optionally, in the method described above, the subtask script is a compilation task script. Based on the circuit information, the corresponding job scheduling script for the subtask script is determined, including:
[0039] Based on the number of qubits and the gate depth information, the first number of computing cores and the second number of computing cores are calculated respectively according to the resource prediction algorithm.
[0040] The maximum value among the first number of computing cores, the second number of computing cores, and the first baseline number of computing cores is determined as the first computing core requirement.
[0041] Based on the number of qubits and the gate depth information, the first basic memory value is obtained by calculation using the first memory prediction algorithm.
[0042] The initial base memory value is buffered, expanded, and rounded up to determine the initial memory requirement.
[0043] Based on the first computing core requirements, the first memory requirements, and the execution instructions corresponding to the compilation task script, a job scheduling script corresponding to the compilation task script is generated.
[0044] In this way, the computational cores and memory resources required for quantum compilation tasks can be accurately assessed, resources can be allocated and scheduled reasonably, resource waste or shortage can be avoided, and the compilation tasks can be executed efficiently and stably.
[0045] Optionally, in the method described above, the subtask script is a simulation task script. Based on the circuit information, the corresponding job scheduling script is determined, including:
[0046] Based on the number of qubits and the gate depth information, the second basic memory value is obtained by calculation using the second memory prediction algorithm.
[0047] Perform unit conversion and buffer expansion on the second base memory value to determine the second memory requirement;
[0048] Based on the number of qubits and the gate depth information, it is determined whether the simulation task script requires graphics processing unit support, the judgment result is obtained, and the graphics processing unit requirement is determined based on the judgment result and the second basic memory value.
[0049] The requirements for the second computing core are determined based on the graphics processing unit requirements, the number of qubits, and the gate depth information.
[0050] Based on the requirements of the graphics processing unit, the second computing core, the second memory, and the execution instructions corresponding to the simulation task script, a job scheduling script corresponding to the simulation task script is generated.
[0051] This allows for precise assessment of the memory, graphics processing units, and computing core resources required for quantum simulation tasks, enabling the automatic generation of simulation task scheduling scripts, improving the efficiency and rationality of quantum task scheduling, and ensuring the stable and efficient execution of simulation tasks.
[0052] Optionally, using the method described above, the requirements for the second computational core are determined based on the graphics processing unit requirements, the number of qubits, and the gate depth information, including:
[0053] Determine if the graphics processing unit requirement is zero;
[0054] If so, determine the number of second benchmark computing cores based on the number of qubits, calculate the parallel efficiency based on the gate depth information, and determine the number of second computing cores required based on the number of second benchmark computing cores and the parallel efficiency.
[0055] If not, the maximum value between the preset baseline number of computing cores and the first preset value is taken as the second computing core requirement, and the first preset value is a preset multiple of the graphics processing unit requirement.
[0056] In this way, based on the different states of the demand for graphics processing units, the demand for the second computing core is dynamically determined by combining the number of qubits, circuit gate depth information, or parameters related to the demand for graphics processing units, thereby achieving precise adaptation and efficient allocation of computing core resources during the simulation phase.
[0057] Optionally, in the method described above, the subtask script is a post-processing task script. Based on the circuit information, the corresponding job scheduling script for the subtask script is determined, including:
[0058] The value of the third basic memory is calculated and determined based on the number of qubits using a third memory prediction algorithm.
[0059] The maximum value between the third basic memory value and the preset memory value is determined as the third memory requirement.
[0060] The number of third benchmark computation cores in the post-processing stage is determined, and the number of associated computation cores is determined based on the number of qubits.
[0061] The third computing core requirement is determined based on the maximum value between the third benchmark computing core number and the associated computing core number.
[0062] Based on the requirements of the third computing core, the third memory requirements, and the execution instructions corresponding to the post-processing task script, a job scheduling script corresponding to the post-processing task script is generated.
[0063] This ensures precise matching and reasonable allocation of core count and memory requirements in the post-processing stage, guaranteeing efficient and stable operation of post-processing tasks and rapid generation of adapted job scheduling scripts.
[0064] Optionally, the task script can be parsed and processed using the method described above to obtain circuit information, including:
[0065] The task script is validated to obtain the validation results;
[0066] If the verification result is successful, the task script is loaded, and it is determined whether a circuit object exists in the task script.
[0067] If a circuit object exists in the task script, the task script will be parsed and processed to obtain the circuit information.
[0068] In this way, by performing pre-verification, condition loading, and targeted parsing of the task script, we can ensure the accurate parsing of effective task scripts and the reliable extraction of circuit information, thus laying a solid data foundation for subsequent quantum computing-related processing.
[0069] Secondly, this application provides an automatic decomposition and dynamic scheduling device for quantum tasks under a quantum hyper-fusion architecture, the device comprising:
[0070] The acquisition module is used to acquire the task script corresponding to the quantum task and parse the task script to obtain circuit information, including the number of qubits and the gate depth information.
[0071] The generation module is used to generate multiple subtask scripts and subtask execution chains based on circuit information and task scripts. The multiple subtask scripts include compilation task scripts, simulation task scripts, and post-processing task scripts.
[0072] The determination module is used to determine the corresponding job scheduling script for any given subtask script based on circuit information.
[0073] The execution module is used to associate and bind multiple job scheduling scripts according to the subtask execution chain, generate the target execution script, and submit the target execution script through a preset native interface.
[0074] Optionally, in the above-described apparatus, the generation module is specifically used for:
[0075] Determine the flag functions corresponding to each of the multiple preset processing stages;
[0076] Based on the flag functions corresponding to the multiple preset processing stages, the task script is split multiple times to obtain multiple sub-task scripts and multiple intermediate data files.
[0077] The subtask execution chain is determined based on multiple intermediate data files.
[0078] Optionally, in the above apparatus, multiple preset processing stages include a compilation stage, a simulation stage, and a post-processing stage, and the generation module is specifically used for:
[0079] Based on the flag functions corresponding to the compilation stage, the task script is first split to obtain the compilation task script and intermediate compilation data.
[0080] Based on the intermediate compilation data and the flag functions corresponding to the simulation stage, the task script is split into two parts to obtain the simulation task script and simulation intermediate data.
[0081] Based on the simulated intermediate data and the flag functions corresponding to the post-processing stage, the task script is split into a third part to obtain the post-processing task script.
[0082] Among them, multiple intermediate data files include compilation intermediate data and simulation intermediate data.
[0083] Optionally, in the above-described apparatus, the generation module is specifically used for:
[0084] Based on the flag functions corresponding to the compilation stage, extract the compilation task script corresponding to the compilation stage from the task script;
[0085] Based on the compilation task script, the code logic is executed to obtain the compiled circuit object;
[0086] Based on the compiled circuit object, perform serialized data persistence operations to obtain intermediate compilation data.
[0087] Optionally, in the above-described apparatus, the generation module is specifically used for:
[0088] Based on the flag function corresponding to the simulation phase, extract the simulation task script corresponding to the simulation phase from the task script;
[0089] Based on the simulation task script and intermediate compilation data, determine the result object of the completed simulation task;
[0090] Based on the simulation task result object, perform serialization data persistence operation to obtain simulation intermediate data.
[0091] Optionally, in the above-described apparatus, the generation module is specifically used for:
[0092] Based on the flag function corresponding to the post-processing stage, extract the post-processing task script corresponding to the post-processing stage from the task script;
[0093] Based on the post-processing task script and simulation intermediate data, determine the statistical results of quantum measurement;
[0094] Save the quantum measurement statistics to a local analysis report file.
[0095] Optionally, in the above-described apparatus, the subtask script is a compilation task script, which determines the specific use of the module for:
[0096] Based on the number of qubits and the gate depth information, the first number of computing cores and the second number of computing cores are calculated respectively according to the resource prediction algorithm.
[0097] The maximum value among the first number of computing cores, the second number of computing cores, and the first baseline number of computing cores is determined as the first computing core requirement.
[0098] Based on the number of qubits and the gate depth information, the first basic memory value is obtained by calculation using the first memory prediction algorithm.
[0099] The initial base memory value is buffered, expanded, and rounded up to determine the initial memory requirement.
[0100] Based on the first computing core requirements, the first memory requirements, and the execution instructions corresponding to the compilation task script, a job scheduling script corresponding to the compilation task script is generated.
[0101] Optionally, in the above-described apparatus, the subtask script is a simulation task script, and the determination module is specifically used for:
[0102] Based on the number of qubits and the gate depth information, the second basic memory value is obtained by calculation using the second memory prediction algorithm.
[0103] Perform unit conversion and buffer expansion on the second base memory value to determine the second memory requirement;
[0104] Based on the number of qubits and the gate depth information, it is determined whether the simulation task script requires graphics processing unit support, the judgment result is obtained, and the graphics processing unit requirement is determined based on the judgment result and the second basic memory value.
[0105] The requirements for the second computing core are determined based on the graphics processing unit requirements, the number of qubits, and the gate depth information.
[0106] Based on the requirements of the graphics processing unit, the second computing core, the second memory, and the execution instructions corresponding to the simulation task script, a job scheduling script corresponding to the simulation task script is generated.
[0107] Optionally, the above-described device determines that the module is specifically used for:
[0108] Determine if the graphics processing unit requirement is zero;
[0109] If so, determine the number of second benchmark computing cores based on the number of qubits, calculate the parallel efficiency based on the gate depth information, and determine the number of second computing cores required based on the number of second benchmark computing cores and the parallel efficiency.
[0110] If not, the maximum value between the preset baseline number of computing cores and the first preset value is taken as the second computing core requirement, and the first preset value is a preset multiple of the graphics processing unit requirement.
[0111] Optionally, in the above apparatus, the subtask script is a post-processing task script, and the determination module is specifically used for:
[0112] The value of the third basic memory is calculated and determined based on the number of qubits using a third memory prediction algorithm.
[0113] The maximum value between the third basic memory value and the preset memory value is determined as the third memory requirement.
[0114] The number of third benchmark computation cores in the post-processing stage is determined, and the number of associated computation cores is determined based on the number of qubits.
[0115] The third computing core requirement is determined based on the maximum value between the third benchmark computing core number and the associated computing core number.
[0116] Based on the requirements of the third computing core, the third memory requirements, and the execution instructions corresponding to the post-processing task script, a job scheduling script corresponding to the post-processing task script is generated.
[0117] Optionally, in the above-described apparatus, the acquisition module is specifically used for:
[0118] The task script is validated to obtain the validation results;
[0119] If the verification result is successful, the task script is loaded, and it is determined whether a circuit object exists in the task script.
[0120] If a circuit object exists in the task script, the task script will be parsed and processed to obtain the circuit information.
[0121] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0122] The memory stores instructions that the computer executes;
[0123] The processor executes computer-executable instructions stored in memory to implement any of the methods of the first aspect.
[0124] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any of the first aspects.
[0125] Fifthly, this application provides a computer program product, including a computer program that, when executed by a computer, implements the method as described in any of the first aspects.
[0126] The automatic decomposition and dynamic scheduling method for quantum tasks under a quantum hyper-converged architecture provided in this application obtains the task script corresponding to the quantum task and parses the task script to obtain circuit information, including the number of qubits and the gate depth information. Based on the circuit information and the task script, multiple sub-task scripts and sub-task execution chains are generated. The multiple sub-task scripts include compilation task scripts, simulation task scripts, and post-processing task scripts. For any sub-task script, the corresponding job scheduling script is determined based on the circuit information. Based on the sub-task execution chain, multiple job scheduling scripts are associated and bound to generate a target execution script, which is then submitted through a preset native interface, thereby improving the execution efficiency and resource utilization of quantum tasks. Attached Figure Description
[0127] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0128] Figure 1 This is a structural diagram illustrating an application scenario provided in an embodiment of this application.
[0129] Figure 2 One of the flowcharts illustrating an automatic decomposition and dynamic scheduling method for quantum tasks under a quantum hyper-converged architecture provided in this application embodiment;
[0130] Figure 3 This is a flowchart illustrating the process of parsing and processing a task script, as provided in an embodiment of this application.
[0131] Figure 4 This is a second flowchart illustrating an automatic decomposition and dynamic scheduling method for quantum tasks under a quantum hyper-converged architecture, provided as an embodiment of this application.
[0132] Figure 5 The third flowchart illustrates an automatic decomposition and dynamic scheduling method for quantum tasks under a quantum hyper-converged architecture, as provided in this application embodiment.
[0133] Figure 6 The fourth flowchart illustrates an automatic decomposition and dynamic scheduling method for quantum tasks under a quantum hyper-converged architecture, as provided in this application embodiment.
[0134] Figure 7 The fifth flowchart illustrates an automatic decomposition and dynamic scheduling method for quantum tasks under a quantum hyper-converged architecture, as provided in this application embodiment.
[0135] Figure 8 A schematic diagram of the structure of an automatic decomposition and dynamic scheduling device for quantum tasks under a quantum hyper-fusion architecture provided in an embodiment of this application;
[0136] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0137] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0138] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0139] It should be noted that although the terms "first," "second," etc., are used to describe various information in the embodiments of this application, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. Optionally, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information.
[0140] It should be understood that the terms "comprising" or "including" indicate the presence of the previously mentioned features, steps, or operations, but do not preclude the presence, occurrence, or addition of one or more other features, steps, or operations. The terms "and / or," etc., used in this application can be interpreted as inclusive, or mean any one or any combination thereof. Optionally, "A and / or B" means "any one of the following: A; B; A and B." Additionally, the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0141] Quantum computing, with its unique properties of quantum superposition and entanglement, has become a core direction for breaking through the performance bottleneck of classical computing. The fusion of quantum computing and supercomputing, as a key path bridging the theoretical potential and practical value of quantum computing, has become a mainstream trend in the industry. The demand for quantum simulation tasks is surging, but real quantum computing machines are scarce, and researchers mainly rely on quantum simulators in classical supercomputers to verify algorithms.
[0142] The existing quantum simulation task execution scheme takes the combination of classical supercomputing clusters and quantum computing frameworks as its core. It constructs quantum circuit simulation tasks, relies on the heterogeneous resources provided by the supercomputing cluster to complete the execution, and uses a traditional scheduling system for resource allocation and task management. Each stage of task execution needs to be manually broken down and corresponding job scripts need to be written. The dependencies between subtasks also need to be manually configured. Finally, the verification results are output through a quantum simulator.
[0143] The above process suffers from numerous problems, such as reliance on manual intervention and poor scheduling adaptation, resulting in low task execution efficiency.
[0144] To address the aforementioned technical issues, this application provides an automatic decomposition and dynamic scheduling method for quantum tasks within a supercomputing-integrated architecture. This method first acquires the quantum task script and parses it to obtain circuit information such as the number of qubits and gate depth. Then, based on this circuit information and the original task script, it automatically generates multiple sub-task scripts and sub-task execution chains corresponding to compilation, simulation, and post-processing. Subsequently, it matches a job scheduling script adapted to the circuit information of each sub-task script. Finally, it associates and binds all job scheduling scripts to generate a target execution script, which is then submitted for execution through a preset native interface. This achieves automated decomposition and dynamic scheduling of quantum tasks. In this way, it realizes automated decomposition and dynamic scheduling of quantum tasks within a supercomputing-integrated architecture, reducing reliance on manual operation, achieving precise adaptation between sub-tasks and heterogeneous supercomputing resources, and improving the execution efficiency and resource utilization of quantum tasks.
[0145] Below, in conjunction with Figure 1 This paper provides an example illustrating the system architecture of the automatic decomposition and dynamic scheduling method for quantum tasks under the quantum hyper-converged architecture.
[0146] Figure 1 This is a structural diagram illustrating an application scenario provided in an embodiment of this application. Please refer to [link / reference]. Figure 1 , Figure 1 It can include a user interaction layer, a task processing layer, a resource scheduling layer, and a resource layer.
[0147] The various layers collaborate and share data to jointly manage the entire process of quantum tasks, from submission to execution and result feedback. The following is a detailed description of each component:
[0148] The user interaction layer provides users with entry points for submitting quantum tasks, configuring parameters, and viewing results. Users can write quantum circuit task scripts based on the quantum framework and configure task-related parameters such as the number of qubits, quantum gate type, simulation accuracy requirements, and task priority. Simultaneously, the user interaction layer also supports functions such as querying task execution status and displaying execution results, allowing users to easily monitor task progress in real time.
[0149] The task processing layer receives quantum tasks submitted by the user interaction layer and performs task verification, parsing, automatic decomposition, and multi-stage processing. The task processing layer may include a task verification module, a task parsing module, a task decomposition module, and a multi-stage processing module.
[0150] The task verification module can be used to verify the quantum task scripts submitted by users. The verification content includes the correctness of script syntax, the completeness of parameters, and the legality of the task. The verification result is output. If the verification fails, the error message is fed back to the user interaction layer to prompt modification. If the verification passes, the task script is passed to the task parsing module.
[0151] The task parsing module can be used to load the task script after the task verification is passed and determine whether there are circuit objects in it. If there are, the task script is deeply parsed to extract circuit information such as the number of qubits and the sequence of quantum gates, and the parsing results and task script are passed to the task decomposition module.
[0152] The task decomposition module can be used to automatically decompose the original quantum task into multiple parallel subtasks based on the circuit information and task parameters obtained from the analysis, combined with the task complexity. The subtasks correspond to different stages of the quantum task, ensuring that the subtasks can be executed in parallel on different resource nodes of the resource layer to improve the overall execution efficiency of the task.
[0153] The multi-stage processing module can be used to manage the decomposed sub-tasks in stages, coordinate the execution order of each sub-task, receive the execution results of each sub-task and summarize and integrate them, and finally generate a complete task execution result to be fed back to the user interaction layer.
[0154] The resource scheduling layer enables dynamic allocation and scheduling of resources, addressing the limitations of traditional scheduling systems in handling the high complexity and multi-stage characteristics of quantum tasks. It provides functions such as resource status monitoring, dynamic resource allocation, and task scheduling optimization.
[0155] Resource status monitoring can collect resource status information such as the utilization rate of computing cores and memory usage of each resource node in the resource layer in real time, and establish a resource status ledger to provide data support for dynamic scheduling.
[0156] Dynamic resource allocation can be based on the subtask type, complexity, and priority obtained from the task decomposition module, combined with real-time resource status, to dynamically allocate each subtask to the appropriate resource node, ensuring accurate matching of resources and tasks to improve resource utilization.
[0157] Task scheduling optimization can track the execution status of each subtask in real time. If there are situations such as excessive resource node load or task execution abnormalities, resource allocation will be dynamically adjusted. At the same time, the execution order of each subtask will be reasonably adjusted according to task priority to ensure that high-priority tasks are executed first and reduce the execution delay of critical tasks.
[0158] In summary, the system architecture provided in this application, through a layered design, achieves fully automated management of quantum tasks from submission, verification, parsing, decomposition to dynamic scheduling, execution, and result feedback. It is adapted to the needs of scenarios that integrate quantum computing and classical high-performance computing, effectively solves the problems of low resource management efficiency and high task execution latency in traditional scheduling systems, and can significantly improve resource utilization and task execution efficiency, providing reliable system support for scientific research and industrial scenarios such as quantum chemical simulation and financial modeling.
[0159] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0160] Figure 2 This is one of the flowcharts illustrating an automatic decomposition and dynamic scheduling method for quantum tasks under a quantum hyper-converged architecture provided in this application. The execution entity in this application embodiment can be a configuration client or a processor within the configuration client. Please refer to... Figure 2 The method includes:
[0161] S201. Obtain the task script corresponding to the quantum task, and parse and process the task script to obtain circuit information.
[0162] Circuit information includes the number of qubits and the gate depth information.
[0163] A quantum task can refer to a quantum computing request submitted in a quantum computing platform that needs to be executed by quantum computing hardware or a simulator.
[0164] A quantum task can include core information such as the quantum circuit logic to be run, execution parameters, and output requirements.
[0165] The task script can be a structured text / code file that carries the core logic of a quantum task, in a format recognizable by the quantum computing platform.
[0166] The task script can include key data such as the topology of the quantum circuit, the sequence of gate operations, the bit mapping relationship, and the execution configuration.
[0167] Circuit information can be the set of core characteristic parameters of a quantum circuit.
[0168] The number of qubits can be the total number of qubits required for a circuit to operate.
[0169] Gate depth can be defined as the maximum number of rounds of parallel gate operations in a quantum circuit, based on the execution timing. It is an indicator of the complexity of a quantum circuit.
[0170] Parsing and processing can refer to a series of operations that read, identify, extract, calculate, and verify the structured data of a task script, transforming the machine-readable raw data in the script into circuit characteristic parameters that are human-readable and usable by the business.
[0171] It can obtain the task script corresponding to the quantum task, parse and process the script, clean up redundant data, verify its legality, and then extract and calculate circuit information such as the number of qubits and the gate depth.
[0172] Optionally, the task script can be parsed and processed to obtain circuit information in the following way: the task script is verified and a verification result is obtained; if the verification result is successful, the task script is loaded and it is determined whether a circuit object exists in the task script; if a circuit object exists in the task script, the task script is parsed and processed to obtain circuit information.
[0173] Below, in conjunction with Figure 3 The task script is parsed and processed to obtain circuit information, which is then illustrated with examples.
[0174] Figure 3 This is a flowchart illustrating the process of parsing and processing a task script, as provided in an embodiment of this application. Please refer to... Figure 3 The task script can be a Python-formatted quantum task script written based on the Qiskit framework. Circuit information includes the number of qubits and the gate depth. The process of parsing and processing the task script is as follows:
[0175] Step 1: Receive the quantum task script submitted by the user and execute two verification operations in sequence:
[0176] Step 1 Verification: Check if the task script file exists. If the task script file does not exist, display an error message and exit the process.
[0177] The second step is verification: check if the file extension of the task script file is .py. If the extension does not meet the requirements, an error message will be displayed and the process will exit.
[0178] Once both verifications pass, the verification result is considered successful, and the process proceeds to the next step.
[0179] Step 2: After successful verification, use Python's importlib module to dynamically import the .py task script and execute the script code in an independent module namespace to avoid global namespace pollution and ensure the isolation and security of the execution environment.
[0180] Step 3: After the script execution is complete, locate the corresponding quantum circuit object in the script based on the return value of the QuantumCircuit function:
[0181] If the circuit object is not found, an error message will be displayed and the process will exit.
[0182] If the circuit object is successfully found, it is determined that the circuit object exists in the task script, and the parsing phase begins.
[0183] Step 4: For the located circuit object, extract and calculate the target circuit information directly through the API provided by Qiskit:
[0184] Call the num_qubits attribute of the circuit object to get the number of qubits required for the quantum circuit;
[0185] Call the depth() method of Qiskit to calculate the gate depth information of the quantum circuit and complete the parsing and acquisition of circuit information.
[0186] S202. Based on the circuit information and task script, generate multiple subtask scripts and subtask execution chains.
[0187] The multiple sub-task scripts include compilation task scripts, simulation task scripts, and post-processing task scripts.
[0188] A subtask script can be an independent script file corresponding to a single functional stage after the complete quantum task is broken down into execution stages.
[0189] Compilation task scripts can be used to perform quantum circuit compilation operations.
[0190] For example, the compilation task script can be responsible for circuit optimization and hardware mapping, from circuit creation to the end of transpile. The core functions and operations include QuantumCircuit creation and transpile compilation configuration.
[0191] Simulation task scripts can be used to execute quantum computing simulation operations.
[0192] For example, a simulation task script can be responsible for performing quantum circuit simulation calculations, from obtaining the backend to the end of execution. The core functions and operations include obtaining the backend, executing the task, and waiting for the task.
[0193] Post-processing task scripts are scripts that can be used to perform post-processing operations on computation results.
[0194] For example, the post-processing stage can be responsible for analyzing simulation results and generating reports. From get_counts to the end of visualization, the core functions and operations include extracting counts, data processing, and plotting (plt / show()).
[0195] The subtask execution chain can be an ordered execution sequence formed by arranging multiple subtask scripts based on the execution logic of quantum tasks.
[0196] Based on circuit information and task scripts, a complete quantum task can be modularly broken down into execution stages to generate three independent sub-task scripts: compilation task script, simulation task script, and post-processing task script. At the same time, the sub-task execution chain can be arranged according to the natural execution sequence of the quantum task.
[0197] For example, the subtask execution chain is the order of compilation task script, simulation task script, and post-processing task script. The output of the compilation task is the input of the simulation task, and the output of the simulation task is the input of the post-processing task, ensuring a closed-loop process.
[0198] In this way, the modular decomposition of quantum tasks is achieved, breaking down complex, complete tasks into subtasks with single responsibilities, improving task maintainability. Subtasks are generated with circuit information as constraints, ensuring that the complexity and hardware resource requirements of the subtasks are precisely matched with those of the quantum circuits, avoiding resource waste and execution failures. The standardized subtask execution chain provides a clear execution framework for task scheduling, resource allocation, fault diagnosis, and process monitoring of the quantum computing platform, supporting the automated management of large-scale quantum tasks.
[0199] S203. For any subtask script, determine the corresponding job scheduling script based on the circuit information.
[0200] Job scheduling scripts are automated scheduling scripts that can be used to submit jobs to computing clusters, configure resources, specify execution commands, and set running parameters.
[0201] For any given subtask script, the system can analyze the resource requirements of the subtask based on the circuit information, and automatically generate a job scheduling script that matches the subtask based on the resource requirements. This achieves precise matching between the subtask and cluster resources, providing support for subsequent automated execution and scheduling.
[0202] S204. Based on the subtask execution chain, associate and bind multiple job scheduling scripts to generate a target execution script, and submit the target execution script through a preset native interface.
[0203] Association binding can be used to set multiple job scheduling scripts to have a dependency relationship according to the order of the subtask execution chain, ensuring that the next subtask runs only after the previous one succeeds.
[0204] The target execution script can be a complete automated pipeline script formed by integrating multiple associated and bound job scheduling scripts.
[0205] The default native interface can be the official program interface provided by the cluster scheduling system.
[0206] The default native interface can be used to directly submit and manage jobs without having to manually enter commands.
[0207] Based on a defined subtask execution chain, multiple job scheduling scripts can be bound to each other through dependency association. The scheduling system's post-success dependency execution mechanism sequentially links the scheduling scripts from the compilation, simulation, and post-processing stages, forming a target execution script that can be automatically triggered and executed in sequence. Simultaneously, an exception retry mechanism is enabled. If a subtask exits abnormally due to environmental fluctuations, it will be automatically resubmitted. The maximum number of retries is set to a preset number; once the retries reach the limit, automatic rescheduling stops, awaiting manual investigation. After the workflow orchestration is complete, the system can directly submit the target execution script through the scheduling system's preset native interface, starting the entire automated execution pipeline without requiring manual submission commands from the user.
[0208] This embodiment provides an automatic decomposition and dynamic scheduling method for quantum tasks in a supercomputing architecture. It obtains the task script corresponding to the quantum task and parses the script to obtain circuit information, including the number of qubits and gate depth. Based on the circuit information and the task script, multiple sub-task scripts and sub-task execution chains are generated. These sub-task scripts include compilation scripts, simulation scripts, and post-processing scripts. For any given sub-task script, the corresponding job scheduling script is determined based on the circuit information. The multiple job scheduling scripts are then associated and bound according to the sub-task execution chain to generate a target execution script, which is submitted through a preset native interface. This achieves automated decomposition and dynamic scheduling of quantum tasks in a supercomputing architecture, reducing reliance on manual operation, enabling precise matching of sub-tasks with heterogeneous supercomputing resources, and improving the execution efficiency and resource utilization of quantum tasks.
[0209] Below, in conjunction with Figure 4 The process of generating multiple subtask scripts and subtask execution chains based on circuit information and task scripts is explained.
[0210] Figure 4 This is a second flowchart illustrating an automatic decomposition and dynamic scheduling method for quantum tasks within a quantum hyper-converged architecture, provided as an embodiment of this application. Based on the above embodiments, see [link to relevant documentation]. Figure 4 The method includes:
[0211] S401. Determine the flag functions corresponding to the multiple preset processing stages.
[0212] Multiple pre-defined processing stages include a compilation stage, a simulation stage, and a post-processing stage.
[0213] The preset processing stage can refer to the preset core functional stage in the automated execution process of quantum tasks.
[0214] The compilation stage, simulation stage, and post-processing stage correspond one-to-one with the generated compilation task script, simulation task script, and post-processing task script.
[0215] The flag function can be the core function corresponding to each stage.
[0216] It can retrieve the flag functions corresponding to multiple preset processing stages from the storage space.
[0217] S402. Based on the flag function corresponding to the compilation stage, perform the first splitting process on the task script to obtain the compilation task script and intermediate compilation data.
[0218] The first splitting process can be based on the judgment logic of the flag function in the compilation stage to split the original task script in a targeted manner.
[0219] The compilation task script can be a separate script obtained by splitting it up, containing only compilation-related logic.
[0220] Compilation intermediate data can be dependency data generated during the splitting process that supports the execution of compilation tasks.
[0221] The task script can be split into two parts based on the flag functions corresponding to the compilation stage to obtain the compilation task script. The intermediate compilation data can then be determined based on the compilation task script.
[0222] Optionally, the task script can be split into a first part based on the flag function corresponding to the compilation stage to obtain the compilation task script and intermediate compilation data in the following way: extract the compilation task script corresponding to the compilation stage from the task script according to the flag function corresponding to the compilation stage; execute the code logic according to the compilation task script to obtain the compiled circuit object; and perform serialization data persistence operation according to the compiled circuit object to obtain the intermediate compilation data.
[0223] For example, the compilation task script corresponding to the compilation stage can be extracted from the task script based on the flag function corresponding to the compilation stage in the following way: the import statements corresponding to the flag function of the compilation stage can be retained, redundant imports related to simulation and post-processing can be deleted, and only the code block "from the beginning to the completion of transpile()" in the task script can be retained, containing only the core logic of circuit definition, parameter configuration, and transpile compilation.
[0224] To perform serialization data persistence operations on the compiled circuit object, you can add corresponding data persistence logic at the end of the compilation task script to save the compiled circuit object as a local file, such as circuit_optimized.pkl, and obtain intermediate compilation data.
[0225] This intermediate compilation data serves as the input dependency for the simulation stage script, enabling standardized data transfer between the compilation stage and subsequent stages.
[0226] Thus, the compilation stage is the core pre-processing step of the task script. By using dedicated flag functions for the compilation stage, the original task script is precisely split, the core compilation logic is independently extracted, circuit compilation optimization and intermediate data persistence are completed, and standardized input is provided for the subsequent simulation and post-processing stages.
[0227] S403. Based on the intermediate compilation data and the flag functions corresponding to the simulation stage, perform a second splitting process on the task script to obtain the simulation task script and simulation intermediate data.
[0228] The second splitting process can be based on the judgment logic of the simulation stage flag function to split the original task script in a targeted manner.
[0229] Based on the intermediate compilation data generated during the compilation phase, combined with the corresponding flag function during the simulation phase, the original task script can be split into two parts to obtain the simulation task script and the simulation intermediate data. During the splitting process, the exclusive script logic is extracted with the flag function of the simulation phase as the core. At the same time, the intermediate compilation data is used as the basic input dependency of the simulation task script. Redundant code related to the compilation phase in the script is removed, and only the core logic required for simulation is retained. After running the processed simulation task script, the circuit simulation operation is completed, and after generating the simulation result data, the serialized data persistence operation is performed to obtain the simulation intermediate data.
[0230] Optionally, the task script can be split into a second part based on the intermediate compilation data and the flag function corresponding to the simulation stage, to obtain the simulation task script and simulation intermediate data: extract the simulation task script corresponding to the simulation stage from the task script according to the flag function corresponding to the simulation stage; determine the completed simulation task result object based on the simulation task script and the intermediate compilation data; and perform serialization data persistence operation based on the simulation task result object to obtain the simulation intermediate data.
[0231] For example, based on the flag functions corresponding to the simulation stage, only the necessary import statements for the simulation stage can be retained, including libraries related to backend retrieval, task execution, and serialization file reading. Redundant imports related to compilation and post-processing can be deleted. The content scope should only retain the code block from "get_backend() call to execute() completion" in the original script, containing only the core logic of backend retrieval and task execution, thus obtaining the simulation task script. Based on the simulation task script, the compiled circuit object is loaded by reading the serialized file generated in the compilation stage. The code logic in the simulation task script is executed in combination with this intermediate compilation data to complete the circuit simulation operation and determine the completed simulation task result object. Finally, the serialized data persistence operation is performed on the simulation task result object. Corresponding data persistence logic is added to the end of the simulation task script to serialize and save the simulation task result object returned by execute() as a local file, such as simulation_results.json, thus obtaining the simulation intermediate data. This simulation intermediate data serves as the input dependency of the post-processing stage script, realizing standardized data transfer between the simulation stage and subsequent stages.
[0232] S404. Based on the simulated intermediate data and the flag functions corresponding to the post-processing stage, the task script is split into three parts to obtain the post-processing task script.
[0233] The third splitting process can be based on the judgment logic of the flag function in the post-processing stage to perform targeted splitting of the original task script.
[0234] Based on the intermediate simulation data generated during the simulation phase, and combined with the flag functions corresponding to the post-processing phase, the task script can be split into three parts. The code blocks corresponding to the flag functions in the original script can be retained to obtain the post-processing task script.
[0235] Optionally, the task script can be split into a third part based on the simulation intermediate data and the flag function corresponding to the post-processing stage to obtain the post-processing task script: extract the post-processing task script corresponding to the post-processing stage from the task script according to the flag function corresponding to the post-processing stage; determine the quantum measurement statistical results based on the post-processing task script and the simulation intermediate data; and save the quantum measurement statistical results to a local analysis report file.
[0236] For example, based on the flag function corresponding to the post-processing stage, the post-processing task script specific to the post-processing stage is accurately extracted from the original task script, and redundant logic unrelated to post-processing is eliminated; the extracted post-processing task script is filtered and optimized, retaining only the import statements necessary for the post-processing stage, such as result parsing and visualization-related libraries, and deleting redundant imports related to compilation and simulation; at the same time, the content scope is limited, retaining only the code block "from get_counts() call to the end of the script" in the original script, containing only the core logic of result extraction, data processing, and visualization; the serialized file generated in the simulation stage is read, the task result object is loaded, and combined with the extracted and processed post-processing task script, the core code logic is executed to determine the quantum measurement statistical results; after the calculation of the quantum measurement statistical results is completed, the endpoint adaptation operation is performed, and the quantum measurement statistical results, i.e., the get_counts() results, are saved to the local analysis report file, such as analysis_report.json, thus completing the splitting and adaptation of the post-processing script.
[0237] S405. Determine the subtask execution chain based on multiple intermediate data files.
[0238] Multiple intermediate data files include compiled intermediate data and simulated intermediate data.
[0239] Several intermediate data files also include quantum measurement statistics.
[0240] By analyzing the generation time, data identifier, and relationships of each intermediate data file, the sub-tasks corresponding to each intermediate data can be traced and linked together to form a sub-task execution chain, ensuring that each sub-task is executed in an orderly manner according to its dependencies and that data is transferred seamlessly.
[0241] The implementation details of each step in this application embodiment can be found in the description of the corresponding steps or operations in the above method embodiments; repeated content will not be repeated.
[0242] This embodiment provides an automatic decomposition and dynamic scheduling method for quantum tasks under a quantum hyper-converged architecture. It determines flag functions corresponding to multiple preset processing stages, including a compilation stage, a simulation stage, and a post-processing stage. Based on the flag function corresponding to the compilation stage, the task script undergoes a first split, yielding a compiled task script and intermediate compilation data. Based on the intermediate compilation data and the flag function corresponding to the simulation stage, the task script undergoes a second split, yielding a simulation task script and intermediate simulation data. Based on the intermediate simulation data and the flag function corresponding to the post-processing stage, the task script undergoes a third split, yielding a post-processing task script. Multiple intermediate data files include compiled intermediate data and simulation intermediate data. Based on these intermediate data files, a sub-task execution chain is determined. By splitting the task script according to stage flag functions and generating corresponding intermediate data, and combining the attributes and relationships of the intermediate data to construct an ordered sub-task execution chain, the decoupling and standardized connection of each stage of the quantum computing task are achieved. This ensures that sub-tasks are executed in an orderly manner according to dependencies, data is seamlessly transferred between stages, and the flow is traceable, thereby improving the execution efficiency and resource utilization of quantum tasks.
[0243] Below, in conjunction with Figure 5 When the subtask script is a compilation task script, the process of determining the corresponding job scheduling script based on the circuit information is explained.
[0244] Figure 5 This is the third flowchart illustrating an automatic decomposition and dynamic scheduling method for quantum tasks within a quantum hyper-converged architecture, provided as an embodiment of this application. Based on the above embodiments, see [link to relevant documentation]. Figure 5 The method includes:
[0245] S501. Based on the number of qubits and the gate depth information, the number of the first computing core and the number of computing cores are calculated respectively according to the resource prediction algorithm.
[0246] The first number of computational cores can be the core number corresponding to the number of qubits.
[0247] The second number of computed cores can be the core number based on gate depth.
[0248] Based on the number of qubits and the gate depth information, a resource prediction algorithm can be invoked to calculate the first and second number of computing cores, respectively.
[0249] Resource prediction algorithms can be either resource prediction models or resource prediction rules; no specific limitation is made here.
[0250] For example, the rules of resource prediction algorithms are as follows:
[0251] The first computational core number Cn can be determined in the following way:
[0252] When the number of qubits is ≤10, Cn = 4;
[0253] When 10 < number of qubits ≤ 20, Cn = 8;
[0254] When 20 < number of qubits ≤ 30, Cn = 16;
[0255] When the number of qubits > 30, Cn = 32.
[0256] The second computational core number C_d can be determined in the following way:
[0257] When the gate depth is ≤100, C_d = 4;
[0258] When 100 < gate depth ≤ 1000, C_d = 8;
[0259] When 1000 < gate depth ≤ 10000, C_d = 16;
[0260] When the gate depth is greater than 10000, C_d = 32.
[0261] S502. The maximum value among the first number of computing cores, the second number of computing cores, and the first baseline number of computing cores is determined as the first computing core requirement.
[0262] The first number of computing cores, the second number of computing cores, and the preset first baseline number of computing cores are compared, and the maximum value among the three is taken as the first number of computing cores required for the current compilation task.
[0263] For example, the calculation formula is as follows:
[0264] First core computational requirement = max(first baseline computational core count, first computational core count, second computational core count)
[0265] S503. Based on the number of qubits and the gate depth information, the first basic memory value is obtained by calculation using the first memory prediction algorithm.
[0266] Based on the number of qubits and the gate depth information, the first memory prediction algorithm can be invoked to perform calculations and obtain the first basic memory value.
[0267] The first memory prediction algorithm can be a preset memory prediction model or a memory calculation formula; there is no limitation here.
[0268] The initial base memory value, Memory_GB_tmp, can be calculated using the following formula:
[0269] Memory_GB_tmp=a+0.003×num_qubits²+0.0001×depth+0.00001×depth×num_qubits
[0270] Where a is the number of cores for the first benchmark computation, num_qubits is the number of qubits, and depth is the gate depth information.
[0271] S504. Buffer and round up the first base memory value to determine the first memory requirement.
[0272] Among these, buffer expansion can be used to cope with memory fluctuations during task execution.
[0273] Rounding up can be done by rounding the expanded buffer value up to the nearest power of 2, ensuring that memory allocation conforms to the resource allocation specifications of the scheduling system.
[0274] For example, buffer expansion could be achieved by multiplying the initial base memory value by 1.2, increasing the memory buffer by 20%.
[0275] The rounding up process can be calculated using the following formula:
[0276]
[0277] The first memory requirement can be Memory_GB, and ceil() is the floor function. The function is a logarithm function to the base 2, and Memory_GB_tmp can be the first base memory value.
[0278] S505. Based on the first computing core requirement, the first memory requirement, and the execution instructions corresponding to the compilation task script, generate the job scheduling script corresponding to the compilation task script.
[0279] It can integrate the first computing core requirements, the first memory requirements, and the execution instructions corresponding to the current compilation task script, and generate the job scheduling script corresponding to the compilation task script according to the script specification of the job scheduling system.
[0280] The script generation specification can explicitly specify the core parameters of the scheduling script, embed the compilation task execution instructions, and after the script is written, the scheduling script can be saved in a specified format for easy subsequent calling and execution.
[0281] The implementation details of each step in this application embodiment can be found in the description of the corresponding steps or operations in the above method embodiments; repeated content will not be repeated.
[0282] This embodiment provides an automatic decomposition and dynamic scheduling method for quantum tasks under a quantum hyper-converged architecture. It calculates a first number of computing cores and a second number of computing cores based on the number of qubits and the gate depth using a resource prediction algorithm. The maximum value among the first number of computing cores, the second number of computing cores, and a first baseline number of computing cores is determined as the first computing core requirement. A first memory prediction algorithm is used to calculate a first basic memory value based on the number of qubits and the gate depth. This first basic memory value is then buffered, expanded, and rounded up to determine the first memory requirement. Finally, a job scheduling script is generated based on the first computing core requirement, the first memory requirement, and the execution instructions corresponding to the compilation task script. This allows for accurate assessment of the computing cores and memory resources required for quantum compilation tasks, rational allocation of scheduling resources, avoidance of resource waste or insufficiency, and ensures efficient and stable execution of compilation tasks.
[0283] Below, in conjunction with Figure 6 When the subtask script is a simulation task script, the process of determining the corresponding job scheduling script based on the circuit information is explained.
[0284] Figure 6 This is the fourth flowchart illustrating an automatic decomposition and dynamic scheduling method for quantum tasks within a quantum hyper-converged architecture, provided as an embodiment of this application. Based on the above embodiments, see also... Figure 6 The method includes:
[0285] S601. Based on the number of qubits and the gate depth information, the second memory prediction algorithm is used to calculate and process the second basic memory value.
[0286] The second memory prediction algorithm can be a preset memory prediction model or a memory calculation formula; there are no restrictions here.
[0287] For example, the memory calculation formula for the second memory prediction algorithm is as follows:
[0288] Memory_bytes = StateVector_bytes × 2 + depth × 2^(num_qubits / 2) ×8
[0289] StateVector_bytes = 2^ num_qubits × 16
[0290] Among them, Memory_bytes can be the second basic memory value, StateVector_bytes can be the size of the state vector, num_qubits can be the number of qubits, and depth can be the gate depth information of the circuit.
[0291] S602. Perform unit conversion and buffer expansion processing on the second basic memory value to determine the second memory requirement.
[0292] Unit conversion can be used to convert a secondary basic memory value, which is in bytes, to gigabytes.
[0293] Buffer expansion can be achieved by multiplying the converted value by a preset value and increasing the corresponding memory buffer to cope with memory fluctuations during the execution of the simulation task and avoid task interruption due to insufficient memory.
[0294] The second basic memory value can be converted to a unit and buffered using a preset formula to determine the second memory requirement.
[0295] For example, the preset formula can be as follows:
[0296] Memory_GB = (Memory_bytes / 1073741824) × 1.5
[0297] Among them, Memory_GB can be the second memory requirement, and Memory_bytes can be the second base memory value.
[0298] S603. Based on the number of qubits and the gate depth information, determine whether the simulation task script requires graphics processing unit support, obtain the judgment result, and determine the graphics processing unit requirement based on the judgment result and the second basic memory value.
[0299] The following steps can be used to determine whether a simulation task script requires graphics processing unit (GPU) support based on the number of qubits and the gate depth information. The result is as follows: if any of the following conditions are met, the simulation task script is determined to require GPU support; otherwise, it is not.
[0300] The judgment conditions are as follows:
[0301] 1. Number of qubits ≥ 20 and gate depth information ≥ 100;
[0302] 2. Number of qubits ≥ 15 and gate depth ≥ 1000.
[0303] If graphics processing unit support is required: Based on a single graphics processing unit memory of 16GB, divide the second base memory value after unit conversion by 16GB, round the result up to obtain the initial graphics processing unit requirement, and determine the graphics processing unit requirement based on the initial graphics processing unit requirement and the preset maximum threshold.
[0304] For example, the preset maximum threshold for the number of graphics processing units is set to 8 frames, and the calculation formula is:
[0305] GPU_count = min(ceil(Memory_GB_tmp / 16), f);
[0306] Where GPU_count is the graphics processing unit requirement, Memory_GB_tmp is the second base memory value after unit conversion, and f is the preset maximum threshold.
[0307] If no graphics processing unit (GPU) support is required, the GPU requirement is 0.
[0308] S604. Determine the requirements of the second computing core based on the graphics processing unit requirements, the number of qubits, and the circuit gate depth information.
[0309] The second computational core requirement can be determined by using a computational algorithm based on the graphics processing unit requirement, the number of qubits, and the gate depth information.
[0310] Optionally, the second computational core requirement can be determined based on the graphics processing unit (GPU) requirement, the number of qubits, and the gate depth information as follows: determine whether the GPU requirement is zero; if so, determine the second baseline number of computational cores based on the number of qubits, calculate the parallel efficiency based on the gate depth information, and determine the second computational core requirement based on the second baseline number of computational cores and the parallel efficiency; if not, take the maximum value between the preset baseline number of computational cores and the first preset value as the second computational core requirement, where the first preset value is a preset multiple of the GPU requirement.
[0311] For example, when the demand for graphics processing units is zero, the number of second benchmark computing cores can be determined based on the number of qubits using the following rules:
[0312] When the number of qubits is ≤10, the number of cores for the second benchmark computation is 4;
[0313] When 10 < number of qubits ≤ 15, the number of cores for the second benchmark computation = 8;
[0314] When 15 < number of qubits ≤ 20, the number of cores for the second benchmark calculation = 16;
[0315] When 20 < number of qubits ≤ 25, the number of cores for the second benchmark computation = 32;
[0316] When the number of qubits is greater than 25, the number of cores for the second benchmark computation is 64.
[0317] Parallel efficiency can be calculated using the following formula:
[0318] parallel_efficiency = min(1.0, depth / 1000)
[0319] Where depth represents the gate depth information.
[0320] The second computing core requirement, CPU_cores, can be determined using the following formula based on the second benchmark, calculating the number of cores and parallel efficiency:
[0321] CPU_cores = max(4, CPU_cores_base × parallel_efficiency)
[0322] Where CPU_cores_base is the number of cores for the second benchmark computing, and parallel_efficiency is the parallel efficiency.
[0323] For example, when the demand for graphics processing units is not zero, the preset baseline number of computing cores is set to 4, and the first preset value is twice the demand for graphics processing units.
[0324] The maximum value between the preset baseline number of computing cores and the first preset value is taken as the second computing core requirement. The calculation formula is: Second computing core requirement CPU_cores = max(4, GPU_count×2).
[0325] Where GPU_count is the number of graphics processing units required.
[0326] S605. Based on the graphics processing unit requirements, the second computing core requirements, the second memory requirements, and the execution instructions corresponding to the simulation task script, generate the job scheduling script corresponding to the simulation task script.
[0327] Based on the graphics processing unit requirements, the second computing core requirements, the second memory requirements, and the execution instructions corresponding to the simulation task script, a job scheduling script corresponding to the simulation task script is generated in accordance with the script specifications of the job scheduling system.
[0328] The script generation specification can be to explicitly specify the core parameters of the scheduling script, embed simulated task execution instructions, and after the script is written, the scheduling script can be saved in a specified format for easy subsequent calling and execution.
[0329] The implementation details of each step in this application embodiment can be found in the description of the corresponding steps or operations in the above method embodiments; repeated content will not be repeated.
[0330] This embodiment provides an automatic decomposition and dynamic scheduling method for quantum tasks under a quantum hyper-converged architecture. It calculates a second basic memory value based on the number of qubits and the gate depth using a second memory prediction algorithm. This second basic memory value is then converted to units and buffered to determine the required second memory. Based on the number of qubits and the gate depth, it determines whether the simulation task script requires graphics processing unit (GPU) support, obtaining the result. Based on the result and the second basic memory value, the GPU requirement is determined. The second computational core requirement is determined based on the GPU requirement, the number of qubits, and the gate depth. Finally, based on the GPU requirement, the second computational core requirement, the second memory requirement, and the execution instructions corresponding to the simulation task script, a job scheduling script is generated for the simulation task script. This method accurately assesses the memory, GPU, and computational core resources required for quantum simulation tasks, enabling automatic generation of simulation task job scheduling scripts, improving the efficiency and rationality of quantum task scheduling, and ensuring stable and efficient execution of simulation tasks.
[0331] Below, in conjunction with Figure 7 When the subtask script is a post-processing task script, the process of determining the corresponding job scheduling script based on the circuit information is explained.
[0332] Figure 7 This is the fifth flowchart illustrating an automatic decomposition and dynamic scheduling method for quantum tasks within a quantum hyper-converged architecture, provided as an embodiment of this application. Based on the above embodiments, see also... Figure 6 The method includes:
[0333] S701. Based on the number of qubits, the value of the third basic memory is calculated and determined using the third memory prediction algorithm.
[0334] The third basic memory value can be calculated based on the number of qubits in the current task using a third memory prediction algorithm.
[0335] The third memory prediction algorithm can dynamically output an appropriate basic memory reference value based on the change in the number of qubits, ensuring that the memory allocation matches the qubit scale.
[0336] S702. The maximum value between the third basic memory value and the preset memory value is determined as the third memory requirement.
[0337] The third base memory value is compared with the system's preset memory value, and the larger of the two is taken as the third memory requirement for the post-processing stage.
[0338] The third memory requirement, Memory_3_GB, can be determined using the following formula:
[0339] Memory_3_GB = max(third base memory value, default memory value)
[0340] S703. Determine the number of third reference computing cores for the post-processing stage, and determine the number of associated computing cores based on the number of qubits.
[0341] The third baseline calculation core count can be a fixed base core value preset by the system to ensure the basic operating efficiency of post-processing tasks.
[0342] Based on the number of qubits in the current task, the number of associated computing cores adapted to the qubit scale can be determined through preset association rules.
[0343] For example, the number of cores for the third benchmark computation (denoted as base_cores) is fixed at 2;
[0344] Adjusting the number of cores based on the number of qubits: Determine the number of associated computation cores (denoted as cores_by_n) based on the number of qubits in the current task (denoted as n). The specific adaptation rules are as follows:
[0345] When the number of qubits n≤10, cores_by_n = 2;
[0346] When 10 < number of qubits n ≤ 20, cores_by_n = 4;
[0347] When the number of qubits n≤30, cores_by_n = 8;
[0348] When the number of qubits n > 30, cores_by_n = 16.
[0349] S704. Determine the third computing core requirement based on the maximum value between the third benchmark computing core number and the associated computing core number.
[0350] First, take the maximum value between the third baseline computing core number and the associated computing core number, then set an upper limit threshold of 32 for this maximum value. The final result is the third computing core requirement in the post-processing stage.
[0351] S705. Based on the requirements of the third computing core, the third memory requirements, and the execution instructions corresponding to the post-processing task script, generate the job scheduling script corresponding to the post-processing task script.
[0352] Based on the third computing core requirements, the third memory requirements, and the execution instructions corresponding to the post-processing task scripts, a job scheduling script adapted to the system scheduling is generated.
[0353] The core logic for script generation can be to configure the third computing core requirement and the third memory requirement as resource parameters into the scheduling script, while embedding the execution instructions of the post-processing task script to ensure that the scheduling system can reasonably allocate computing core and memory resources and start the post-processing task according to the configured resource parameters.
[0354] The implementation details of each step in this application embodiment can be found in the description of the corresponding steps or operations in the above method embodiments; repeated content will not be repeated.
[0355] This embodiment provides an automatic decomposition and dynamic scheduling method for quantum tasks under a quantum hyper-converged architecture. The method calculates a third base memory value based on the number of qubits using a third memory prediction algorithm. The maximum value between the third base memory value and a preset memory value is determined as the third memory requirement. A third baseline number of computing cores for the post-processing stage is determined, and the number of associated computing cores is determined based on the number of qubits. The maximum value between the third baseline number of computing cores and the number of associated computing cores is determined as the third computing core requirement. Based on the third computing core requirement, the third memory requirement, and the execution instructions corresponding to the post-processing task script, a job scheduling script corresponding to the post-processing task script is generated. This achieves precise adaptation and reasonable allocation of the number of cores and memory requirements in the post-processing stage, ensuring efficient and stable operation of post-processing tasks and rapid generation of adapted job scheduling scripts.
[0356] Figure 8 This is a schematic diagram of a device for automatic decomposition and dynamic scheduling of quantum tasks under a quantum hyper-convergence architecture, provided as an embodiment of this application. Please refer to... Figure 8 The automatic decomposition and dynamic scheduling device 800 for quantum tasks under the quantum hyperconverged architecture includes an acquisition module 801, a generation module 802, a determination module 803, and an execution module 804.
[0357] The acquisition module 801 is used to acquire the task script corresponding to the quantum task and parse the task script to obtain circuit information, including the number of qubits and the gate depth information.
[0358] The generation module 802 is used to generate multiple subtask scripts and subtask execution chains based on circuit information and task scripts. The multiple subtask scripts include compilation task scripts, simulation task scripts and post-processing task scripts.
[0359] The determination module 803 is used to determine the job scheduling script corresponding to any given subtask script based on circuit information.
[0360] The execution module 804 is used to associate and bind multiple job scheduling scripts according to the subtask execution chain, generate the target execution script, and submit the target execution script through a preset native interface.
[0361] Optionally, in the above-described apparatus, the generation module 802 is specifically used for:
[0362] Determine the flag functions corresponding to each of the multiple preset processing stages;
[0363] Based on the flag functions corresponding to the multiple preset processing stages, the task script is split multiple times to obtain multiple sub-task scripts and multiple intermediate data files.
[0364] The subtask execution chain is determined based on multiple intermediate data files.
[0365] Optionally, in the above apparatus, the multiple preset processing stages include a compilation stage, a simulation stage, and a post-processing stage, and the generation module 802 is specifically used for:
[0366] Based on the flag functions corresponding to the compilation stage, the task script is first split to obtain the compilation task script and intermediate compilation data.
[0367] Based on the intermediate compilation data and the flag functions corresponding to the simulation stage, the task script is split into two parts to obtain the simulation task script and simulation intermediate data.
[0368] Based on the simulated intermediate data and the flag functions corresponding to the post-processing stage, the task script is split into a third part to obtain the post-processing task script.
[0369] Among them, multiple intermediate data files include compilation intermediate data and simulation intermediate data.
[0370] Optionally, in the above-described apparatus, the generation module 802 is specifically used for:
[0371] Based on the flag functions corresponding to the compilation stage, extract the compilation task script corresponding to the compilation stage from the task script;
[0372] Based on the compilation task script, the code logic is executed to obtain the compiled circuit object;
[0373] Based on the compiled circuit object, perform serialized data persistence operations to obtain intermediate compilation data.
[0374] Optionally, in the above-described apparatus, the generation module 802 is specifically used for:
[0375] Based on the flag function corresponding to the simulation phase, extract the simulation task script corresponding to the simulation phase from the task script;
[0376] Based on the simulation task script and intermediate compilation data, determine the result object of the completed simulation task;
[0377] Based on the simulation task result object, perform serialization data persistence operation to obtain simulation intermediate data.
[0378] Optionally, in the above-described apparatus, the generation module 802 is specifically used for:
[0379] Based on the flag function corresponding to the post-processing stage, extract the post-processing task script corresponding to the post-processing stage from the task script;
[0380] Based on the post-processing task script and simulation intermediate data, determine the statistical results of quantum measurement;
[0381] Save the quantum measurement statistics to a local analysis report file.
[0382] Optionally, in the above-described apparatus, the subtask script is a compilation task script, and module 803 is specifically used for:
[0383] Based on the number of qubits and the gate depth information, the first number of computing cores and the second number of computing cores are calculated respectively according to the resource prediction algorithm.
[0384] The maximum value among the first number of computing cores, the second number of computing cores, and the first baseline number of computing cores is determined as the first computing core requirement.
[0385] Based on the number of qubits and the gate depth information, the first basic memory value is obtained by calculation using the first memory prediction algorithm.
[0386] The initial base memory value is buffered, expanded, and rounded up to determine the initial memory requirement.
[0387] Based on the first computing core requirements, the first memory requirements, and the execution instructions corresponding to the compilation task script, a job scheduling script corresponding to the compilation task script is generated.
[0388] Optionally, in the above-described apparatus, the subtask script is a simulated task script, and the determination module 803 is specifically used for:
[0389] Based on the number of qubits and the gate depth information, the second basic memory value is obtained by calculation using the second memory prediction algorithm.
[0390] Perform unit conversion and buffer expansion on the second base memory value to determine the second memory requirement;
[0391] Based on the number of qubits and the gate depth information, it is determined whether the simulation task script requires graphics processing unit support, the judgment result is obtained, and the graphics processing unit requirement is determined based on the judgment result and the second basic memory value.
[0392] The requirements for the second computing core are determined based on the graphics processing unit requirements, the number of qubits, and the gate depth information.
[0393] Based on the requirements of the graphics processing unit, the second computing core, the second memory, and the execution instructions corresponding to the simulation task script, a job scheduling script corresponding to the simulation task script is generated.
[0394] Optionally, in the above-described apparatus, the determining module 803 is specifically used for:
[0395] Determine if the graphics processing unit requirement is zero;
[0396] If so, determine the number of second benchmark computing cores based on the number of qubits, calculate the parallel efficiency based on the gate depth information, and determine the number of second computing cores required based on the number of second benchmark computing cores and the parallel efficiency.
[0397] If not, the maximum value between the preset baseline number of computing cores and the first preset value is taken as the second computing core requirement, and the first preset value is a preset multiple of the graphics processing unit requirement.
[0398] Optionally, in the above-described apparatus, the subtask script is a post-processing task script, and the determination module 803 is specifically used for:
[0399] The value of the third basic memory is calculated and determined based on the number of qubits using a third memory prediction algorithm.
[0400] The maximum value between the third basic memory value and the preset memory value is determined as the third memory requirement.
[0401] The number of third benchmark computation cores in the post-processing stage is determined, and the number of associated computation cores is determined based on the number of qubits.
[0402] The third computing core requirement is determined based on the maximum value between the third benchmark computing core number and the associated computing core number.
[0403] Based on the requirements of the third computing core, the third memory requirements, and the execution instructions corresponding to the post-processing task script, a job scheduling script corresponding to the post-processing task script is generated.
[0404] Optionally, in the above-described apparatus, the acquisition module 801 is specifically used for:
[0405] The task script is validated to obtain the validation results;
[0406] If the verification result is successful, the task script is loaded, and it is determined whether a circuit object exists in the task script.
[0407] If a circuit object exists in the task script, the task script will be parsed and processed to obtain the circuit information.
[0408] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Please refer to... Figure 9 The electronic device 900 may include: a memory 901, a processor 902, and a transceiver 903.
[0409] Memory 901 is used to store program instructions;
[0410] The processor 902 is used to execute the program instructions stored in the memory so that the electronic device 900 performs the above-described method.
[0411] Transceiver 903 may include a transmitter and / or a receiver. The transmitter may also be referred to as a transmitter, transmitter port, or transmitter interface, and the receiver may also be referred to as a receiver port, receiver interface, or similar descriptions. Exemplarily, memory 901, processor 902, and transceiver 903 are interconnected via bus 904.
[0412] This application also provides a computer program product that can be executed by a processor, and when the computer program product is executed, the above-described method can be implemented.
[0413] The automatic decomposition and dynamic scheduling device, electronic device, computer-readable storage medium, and computer program product of the quantum task under the quantum hyperconverged architecture of this application embodiment can execute the technical solution shown in the above embodiment of the automatic decomposition and dynamic scheduling method of quantum task under the quantum hyperconverged architecture. The implementation principle and beneficial effects are similar, and will not be repeated here.
[0414] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0415] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0416] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0417] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0418] When integrated units / modules are implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. Unless otherwise specified, the processor can be any suitable hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC, etc. Unless otherwise specified, the storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.
[0419] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0420] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0421] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0422] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for automatic decomposition and dynamic scheduling of quantum tasks under a quantum hyper-converged architecture, characterized in that, The method includes: Obtain the task script corresponding to the quantum task, and parse the task script to obtain circuit information, which includes the number of qubits and the gate depth information. Based on the circuit information and the task script, multiple sub-task scripts and sub-task execution chains are generated, including compilation task scripts, simulation task scripts and post-processing task scripts. For any given subtask script, determine the corresponding job scheduling script based on the circuit information; Based on the subtask execution chain, multiple job scheduling scripts are associated and bound to generate a target execution script, which is then submitted through a preset native interface.
2. The method according to claim 1, characterized in that, Based on the circuit information and the task script, multiple sub-task scripts and sub-task execution chains are generated, including: Determine the flag functions corresponding to each of the multiple preset processing stages; Based on the flag functions corresponding to the multiple preset processing stages, the task script is split multiple times to obtain multiple sub-task scripts and multiple intermediate data files. Based on the multiple intermediate data files, the subtask execution chain is determined.
3. The method according to claim 2, characterized in that, The multiple preset processing stages include a compilation stage, a simulation stage, and a post-processing stage. Based on the flag functions corresponding to each of the multiple preset processing stages, the task script is split multiple times to obtain multiple sub-task scripts and multiple intermediate data files, including: Based on the flag function corresponding to the compilation stage, the task script is first split to obtain the compilation task script and intermediate compilation data; Based on the intermediate compilation data and the flag function corresponding to the simulation stage, the task script is split in a second way to obtain the simulation task script and the simulation intermediate data. Based on the simulated intermediate data and the flag function corresponding to the post-processing stage, the task script is subjected to a third splitting process to obtain the post-processing task script. The plurality of intermediate data files include the compilation intermediate data and the simulation intermediate data.
4. The method according to claim 3, characterized in that, Based on the flag function corresponding to the compilation stage, the task script undergoes a first splitting process to obtain the compilation task script and intermediate compilation data, including: Based on the flag function corresponding to the compilation stage, extract the compilation task script corresponding to the compilation stage from the task script; According to the compilation task script, the code logic is executed to obtain the compiled circuit object; Based on the compiled circuit object, a serialized data persistence operation is performed to obtain intermediate compilation data.
5. The method according to claim 3, characterized in that, Based on the intermediate compilation data and the flag function corresponding to the simulation stage, the task script undergoes a second splitting process to obtain the simulation task script and simulation intermediate data, including: Based on the flag function corresponding to the simulation phase, extract the simulation task script corresponding to the simulation phase from the task script; Based on the simulation task script and the intermediate compilation data, determine the simulation task result object after compilation; Based on the simulated task result object, perform serialized data persistence operation to obtain simulated intermediate data.
6. The method according to claim 3, characterized in that, Based on the simulated intermediate data and the flag function corresponding to the post-processing stage, the task script undergoes a third splitting process to obtain the post-processing task script, including: Based on the flag function corresponding to the post-processing stage, extract the post-processing task script corresponding to the post-processing stage from the task script; Based on the post-processing task script and the simulation intermediate data, determine the quantum measurement statistics; Save the quantum measurement statistics to a local analysis report file.
7. The method according to any one of claims 1-6, characterized in that, The subtask script is a compilation task script. Based on the circuit information, the corresponding job scheduling script is determined, including: Based on the number of qubits and the gate depth information, the first number of computing cores and the second number of computing cores are calculated respectively according to the resource prediction algorithm. The maximum value among the first number of computing cores, the second number of computing cores, and the first baseline number of computing cores is determined as the first computing core requirement. Based on the number of qubits and the gate depth information, a first basic memory value is obtained by calculation using a first memory prediction algorithm. The first base memory value is buffered, expanded, and rounded up to determine the first memory requirement. Based on the first computing core requirement, the first memory requirement, and the execution instructions corresponding to the compilation task script, a job scheduling script corresponding to the compilation task script is generated.
8. The method according to any one of claims 1-6, characterized in that, The subtask script is a simulation task script. Based on the circuit information, the corresponding job scheduling script is determined, including: Based on the number of qubits and the gate depth information, the second basic memory value is obtained by calculation using the second memory prediction algorithm. Perform unit conversion and buffer expansion on the second base memory value to determine the second memory requirement; Based on the number of qubits and the gate depth information, it is determined whether the simulation task script requires graphics processing unit support, and the determination result is obtained. Based on the determination result and the second basic memory value, the graphics processing unit requirement is determined. The requirements for the second computing core are determined based on the graphics processing unit requirements, the number of qubits, and the gate depth information. Based on the graphics processing unit requirements, the second computing core requirements, the second memory requirements, and the execution instructions corresponding to the simulation task script, a job scheduling script corresponding to the simulation task script is generated.
9. The method according to claim 8, characterized in that, Based on the graphics processing unit requirements, the number of qubits, and the gate depth information, the requirements for the second computing core are determined, including: Determine whether the demand for the graphics processing unit is zero; If so, determine the second benchmark number of computing cores based on the number of qubits, calculate the parallel efficiency based on the gate depth information, and determine the second computing core requirement based on the second benchmark number of computing cores and the parallel efficiency; If not, the maximum value between the preset baseline number of computing cores and the first preset value shall be used as the second computing core requirement, where the first preset value is a preset multiple of the graphics processing unit requirement.
10. The method according to any one of claims 1-6, characterized in that, The subtask script is a post-processing task script. Based on the circuit information, the job scheduling script corresponding to the subtask script is determined, including: Based on the number of qubits, the third basic memory value is calculated and determined by the third memory prediction algorithm. The maximum value between the third basic memory value and the preset memory value is determined as the third memory requirement. The number of third benchmark computing cores in the post-processing stage is determined, and the number of associated computing cores is determined based on the number of qubits. The third computing core requirement is determined based on the maximum value between the third benchmark computing core number and the associated computing core number. Based on the third computing core requirements, the third memory requirements, and the execution instructions corresponding to the post-processing task script, a job scheduling script corresponding to the post-processing task script is generated.
11. The method according to any one of claims 1-6, characterized in that, The task script is parsed to obtain circuit information, including: The task script is verified to obtain the verification result; If the verification result is successful, the task script is loaded, and it is determined whether a circuit object exists in the task script. If the task script contains a circuit object, the task script is parsed to obtain the circuit information.
12. An automatic decomposition and dynamic scheduling device for quantum tasks under a quantum hyper-fusion architecture, characterized in that, The device includes: The acquisition module is used to acquire the task script corresponding to the quantum task and parse the task script to obtain circuit information, which includes the number of qubits and the gate depth information. The generation module is used to generate multiple subtask scripts and subtask execution chains based on the circuit information and the task script. The multiple subtask scripts include a compilation task script, a simulation task script, and a post-processing task script. The determination module is used to determine the job scheduling script corresponding to any given subtask script based on the circuit information. The execution module is used to associate and bind multiple job scheduling scripts according to the subtask execution chain, generate a target execution script, and submit the target execution script through a preset native interface.
13. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-11.
14. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-11.