CN-121998120-A - Mixed computing task processing method and device and related equipment
Abstract
The application provides a mixed computing task processing method, a device and related equipment, and relates to the technical field of quantum computing, wherein the method comprises the steps of grouping the Brix items of target molecules based on the easy relation among Brix operator strings to obtain at least two measurement item groups; the method comprises the steps of grouping and packaging each measurement item into a quantum measurement task, constructing a directed acyclic graph DAG based on iterative logic of a variable component eigenvalue VQE algorithm, acquiring the quantum measurement task of the next iteration round based on the DAG in the process of carrying out the classical calculation task, and compiling a corresponding quantum circuit. And pipeline operation of quantum and classical tasks is realized, and the utilization rate of quantum and classical computing resources is improved. The method can be applied to the chemical calculation scenes such as drug discovery, material design and the like.
Inventors
- ZHANG ENWAN
Assignees
- 中国移动通信集团安徽有限公司
- 中国移动通信集团有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260109
Claims (10)
- 1. A method of hybrid computing task processing, the method comprising: Grouping the Brix items of the target molecule based on the reciprocal relation among the Brix operator strings to obtain at least two measurement item groups, wherein each measurement item group comprises at least one Brix item, and when a plurality of Brix items are included in the measurement item groups, the pair of the Brix items of any two Brix items in the same measurement item group is zero, and the Brix items of the target molecule are determined according to the Hamiltonian amount of the target molecule; Packaging each measurement item group into a quantum measurement task, wherein the quantum measurement task is used for determining expected values of all Brix items in the corresponding group; Based on iterative logic of a variable component sub-intrinsic solver (VQE) algorithm, constructing a Directed Acyclic Graph (DAG), wherein the DAG is used for defining a dependency relationship between a classical computing task and a quantum measurement task, the classical computing task is used for determining a total energy expected value and updating parameters according to results of each group of quantum measurement tasks, and the parameters are used for determining states of quantum bits; And in the process of carrying out the classical calculation task, acquiring a quantum measurement task of the next iteration round based on the DAG, and compiling a corresponding quantum circuit.
- 2. The method of claim 1, wherein grouping the bubble terms of the target molecule based on the facile relationships between the bubble operator strings, obtaining at least two groupings of measurement terms, comprises: Respectively analyzing Hamiltonian quantities corresponding to single or multiple target molecules, and grouping according to the reciprocal relation among Brilliant strings in all Brilliant items of each Hamiltonian quantity to obtain multiple initial measurement item groups corresponding to the target molecules respectively; when a plurality of target molecules exist, carrying out joint analysis on a plurality of initial measurement item groups corresponding to the target molecules respectively, combining groups containing the Brix items corresponding to the identical Brix operator strings in the initial measurement item groups of different target molecules into a common measurement item group, and determining groups of unique Brix items in the initial measurement item groups of each target molecule as independent measurement item groups; said packaging each of said measurement items into a quantum measurement task, comprising: And packaging the public measurement items into a first quantum measurement task in a grouping way, packaging the independent measurement items into a second quantum measurement task in a grouping way, and multiplexing the measurement results of the first quantum measurement task into the classical calculation task.
- 3. The method according to claim 2, wherein the analyzing the hamiltonian amounts corresponding to the single or the plurality of target molecules respectively, and grouping the hamiltonian amounts according to the reciprocal relationship between the brix strings in all the brix terms of each hamiltonian amount, to obtain a plurality of initial measurement term groups corresponding to the target molecules respectively, includes: Disassembling the Hamiltonian amount of each target molecule into a linear combination form of a plurality of Brix terms, wherein each Brix term consists of a Brix operator string and a corresponding real coefficient; Traversing all the Brix items obtained by disassembly, calculating a parapsiloside between Brix operator strings corresponding to any two Brix items, and determining the Brix items corresponding to the two Brix operator strings with zero parapsiloside as the Brix items which are exchangeable with each other; establishing edge connection between nodes corresponding to the mutually exchangeable Brix items by taking each Brix item as a node to obtain a Brix item relation diagram; And coloring the Brix item relation graph by adopting a graph coloring algorithm, and distributing at least one Brix item corresponding to nodes with the same color to the same group to obtain a plurality of initial measurement item groups corresponding to first target molecules, wherein the first target molecules are any one of the target molecules.
- 4. The method of claim 1, wherein the constructing the directed acyclic graph DAG based on the iterative logic of the variable component sub-eigensolver VQE algorithm comprises: Determining a workflow comprising multiple rounds of iteration and a dependency relationship among tasks according to a VQE algorithm flow, wherein the workflow is used for indicating that the objective of the quantum measurement task is to measure an expected value under a given parameterized quantum state, the objective of the classical calculation task is to summarize the results of the quantum measurement task of the current iteration round so as to calculate a total energy expected value and update parameters, and the dependency relationship is used for indicating that the classical calculation task of the current round depends on the completed results of all quantum measurement tasks of the previous round, and the execution of the quantum measurement task of the next round depends on the updated parameters of the classical calculation task of the current round; and constructing a DAG by taking the quantum measurement task and the classical calculation task as nodes and taking the dependency relationship as a directed edge, so that the DAG maps the workflow.
- 5. The method of claim 1, wherein, in performing the classical computing task, obtaining a quantum measurement task for a next iteration round based on the DAG and compiling a corresponding quantum wire, comprises: while carrying out classical calculation tasks of the current iteration round, analyzing and determining all quantum measurement tasks to be executed and corresponding dependency relations in the next iteration round based on the DAG to obtain a quantum measurement task set of the next iteration round; Precompilation is carried out on a quantum circuit corresponding to each quantum measurement task in the quantum measurement task set of the next iteration round in a time consumption window of the classical calculation task of the current iteration round, a target quantum circuit is determined, and the target quantum circuit is used for executing the corresponding quantum measurement task under a given parameterized quantum state; And associating the target quantum circuit with a corresponding quantum measurement task in the quantum measurement task set of the next iteration round, submitting the target quantum circuit to a task waiting queue, wherein the task waiting queue is used for temporarily storing the target quantum circuit and the associated quantum measurement task, and directly scheduling and executing the quantum measurement task of the next iteration round after the classical calculation task of the current iteration round is completed.
- 6. The method according to any one of claims 1 to 5, further comprising: periodically acquiring a calibration report of quantum hardware, wherein the calibration report comprises at least one of fidelity, coherence time and read-out error rate of physical quantum bits, and the quantum hardware is used for executing the quantum measurement task; performing performance analysis on the calibration report to obtain an analysis result, wherein the analysis result is used for indicating the real-time performance of physical quantum bits planned to be used in the quantum hardware; under the condition that the real-time performance of a first physical qubit is lower than a preset threshold value, remapping a logic qubit originally mapped to the first physical qubit to a second physical qubit, wherein the first physical qubit is a physical qubit which is planned to be used in the quantum hardware, and the second physical qubit is a physical qubit which is in the quantum hardware and is except the first physical qubit and meets the requirements of quantum circuit connectivity.
- 7. A hybrid computing task processing device, the device comprising: A grouping module, configured to group the parcels of the target molecule based on the facile relation between the brix strings, to obtain at least two measurement item groups, where each measurement item group includes at least one brix item, and when the measurement item group includes a plurality of brix items, the facile of any two brix items located in the same measurement item group is zero, and the brix items of the target molecule are determined according to the hamiltonian amount of the target molecule; the packaging module is used for packaging each measurement item group into a quantum measurement task, and the quantum measurement task is used for determining expected values of all the Brix items in the corresponding group; the construction module is used for constructing a directed acyclic graph DAG based on iterative logic of a variable component intrinsic solver VQE algorithm, wherein the DAG is used for defining the dependency relationship between a classical calculation task and a quantum measurement task, the classical calculation task is used for determining a total energy expected value and updating parameters according to the results of each group of quantum measurement tasks, and the parameters are used for determining the state of quantum bits; And the first acquisition module is used for acquiring a quantum measurement task of the next iteration round based on the DAG in the process of carrying out the classical calculation task, and compiling a corresponding quantum circuit.
- 8. An electronic device comprising a processor, a memory and a program stored on the memory and executable on the processor, the program when executed by the processor implementing the method of any one of claims 1 to 6.
- 9. A computer readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, implements the method according to any of claims 1 to 6.
- 10. A computer program product comprising computer instructions which, when executed by a processor, implement the method of any one of claims 1 to 6.
Description
Mixed computing task processing method and device and related equipment Technical Field The present application relates to the field of quantum computing technologies, and in particular, to a method and apparatus for processing a hybrid computing task, and related devices. Background In existing Quantum-classical Hybrid computing (Hybrid Quantum-CLASSICAL COMPUTATION), for example, variable component Quantum eigensolver ((Variational Quantum Eigensolver, VQE) algorithms are widely used in the Quantum chemistry field to solve for the ground state energy of the molecular hamiltonian. However, in the prior art, quantum tasks and classical tasks are in strict serial waiting relation, so that the utilization ratio of Quantum and classical computing resources is low, and the flow delay is high. Disclosure of Invention The embodiment of the application provides a method, a device and related equipment for processing a hybrid computing task, which are used for improving the utilization rate of quantum and classical computing resources. In a first aspect, an embodiment of the present application provides a method for processing a hybrid computing task, where the method includes: Grouping the Brix items of the target molecule based on the reciprocal relation among the Brix operator strings to obtain at least two measurement item groups, wherein each measurement item group comprises at least one Brix item, and when a plurality of Brix items are included in the measurement item groups, the pair of the Brix items of any two Brix items in the same measurement item group is zero, and the Brix items of the target molecule are determined according to the Hamiltonian amount of the target molecule; Packaging each measurement item group into a quantum measurement task, wherein the quantum measurement task is used for determining expected values of all Brix items in the corresponding group; Based on iterative logic of a variable component sub-intrinsic solver (VQE) algorithm, constructing a Directed Acyclic Graph (DAG), wherein the DAG is used for defining a dependency relationship between a classical computing task and a quantum measurement task, the classical computing task is used for determining a total energy expected value and updating parameters according to results of each group of quantum measurement tasks, and the parameters are used for determining states of quantum bits; And in the process of carrying out the classical calculation task, acquiring a quantum measurement task of the next iteration round based on the DAG, and compiling a corresponding quantum circuit. Optionally, the grouping of the brix terms of the target molecule based on the easy relationship between brix operator strings, obtaining at least two groupings of measurement terms, includes: Respectively analyzing Hamiltonian quantities corresponding to single or multiple target molecules, and grouping according to the reciprocal relation among Brilliant strings in all Brilliant items of each Hamiltonian quantity to obtain multiple initial measurement item groups corresponding to the target molecules respectively; when a plurality of target molecules exist, carrying out joint analysis on a plurality of initial measurement item groups corresponding to the target molecules respectively, combining groups containing the Brix items corresponding to the identical Brix operator strings in the initial measurement item groups of different target molecules into a common measurement item group, and determining groups of unique Brix items in the initial measurement item groups of each target molecule as independent measurement item groups; said packaging each of said measurement items into a quantum measurement task, comprising: And packaging the public measurement items into a first quantum measurement task in a grouping way, packaging the independent measurement items into a second quantum measurement task in a grouping way, and multiplexing the measurement results of the first quantum measurement task into the classical calculation task. Optionally, the analyzing the hamiltonian amounts corresponding to the single or multiple target molecules respectively, and grouping according to the reciprocal relationship between the brix strings in all the brix terms of each hamiltonian amount, to obtain multiple initial measurement term groups corresponding to each target molecule respectively, including: Disassembling the Hamiltonian amount of each target molecule into a linear combination form of a plurality of Brix terms, wherein each Brix term consists of a Brix operator string and a corresponding real coefficient; Traversing all the Brix items obtained by disassembly, calculating a parapsiloside between Brix operator strings corresponding to any two Brix items, and determining the Brix items corresponding to the two Brix operator strings with zero parapsiloside as the Brix items which are exchangeable with each other; establishing edge connection between nodes correspo