Performance analysis method for quantum operating system and related device
By generating performance information for the quantum operating system, the problem of lack of performance monitoring in existing technologies is solved, enabling efficient optimization of the quantum operating system and improved resource utilization.
Patent Information
- Application Number
- CN202411023472.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2026-02-06
AI Technical Summary
The lack of effective monitoring and analysis methods for the performance of quantum operating systems in existing technologies leads to a significant waste of time during the optimization process.
A performance analysis method is provided, which generates performance information by obtaining quantum resource consumption information and processing time information of multiple quantum computing tasks processed by a quantum operating system within a predefined time period. This information indicates the system performance, including the utilization rate of quantum logic gates and qubits, and filters out abnormal or time-consuming tasks to optimize resource allocation and processing stages.
It provides intuitive indicators of the performance of the quantum operating system, helping users to optimize efficiently and improving the processing efficiency and resource utilization of quantum computing tasks.
Smart Images

Figure CN121480753A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of quantum computer operating system, and particularly relates to a performance analysis method for a quantum operating system and a related device. BACKGROUND
[0002] A quantum operating system is an operating system designed specifically for quantum computers. Unlike traditional operating systems, a quantum operating system is responsible for managing and optimizing the hardware resources of a quantum computer, such as qubits, quantum gates, and other quantum devices. It can also provide programming interfaces and development environments to allow users to write and run quantum algorithms.
[0003] That is, as the core of the quantum computing ecosystem, the quantum operating system is responsible for managing and scheduling quantum computing resources while supporting parallel processing of tasks, making it particularly important in the entire computing process.
[0004] Therefore, it is particularly important to monitor the performance of the quantum operating system. SUMMARY
[0005] The embodiments of the present application provide a performance analysis method for a quantum operating system and a related device, which can generate performance information indicating the performance of the quantum operating system according to the process of the quantum operating system processing quantum computing tasks, thereby helping to design targeted optimization schemes using the indication of the performance information in the process of optimizing the quantum operating system, thereby improving optimization efficiency.
[0006] The first aspect of the embodiments of the present application provides a performance analysis method for a quantum operating system, which acquires a plurality of quantum computing tasks processed by the quantum operating system within a predefined time period; generates performance information indicating the processing performance of the quantum operating system based at least on the consumption information and processing duration information of quantum resources corresponding to each quantum computing task in the plurality of quantum computing tasks; wherein the quantum resources include at least one of the following: quantum logic gates, qubits.
[0007] Optionally, the quantum operating system includes a plurality of quantum chips, and the method of generating performance information indicating the processing performance of the quantum operating system based at least on the consumption information and processing duration information of quantum resources corresponding to each quantum computing task in the plurality of quantum computing tasks further includes determining the qubit utilization rate information and the quantum logic gate utilization rate information corresponding to each quantum chip; and generating the performance information based on the qubit utilization rate information corresponding to each quantum chip, the quantum logic gate utilization rate information corresponding to each quantum chip, the consumption information of quantum resources corresponding to each quantum computing task, and the processing duration information.
[0008] Optionally, the determining the quantum bit utilization information and the quantum logic gate utilization information corresponding to each quantum chip comprises: for any quantum chip, the following steps are performed to determine the quantum bit utilization information and the quantum logic gate utilization information corresponding to the quantum chip: generating a first calculation parameter according to the total number of logic gates of the quantum chip and a predefined time period, and generating a second calculation parameter according to the number of quantum logic gates corresponding to each quantum computing task running on the quantum chip and the time length of each quantum computing task running on the quantum chip; determining the quantum logic gate utilization information according to the first calculation parameter and the second calculation parameter;
[0009] and generating a third calculation parameter according to the total number of bits of the quantum chip and a predefined time period, and generating a fourth calculation parameter according to the number of quantum bits corresponding to each quantum computing task running on the quantum chip and the time length of each quantum computing task running on the quantum chip; determining the quantum bit utilization information according to the third calculation parameter and the fourth calculation parameter.
[0010] Optionally, the process of the quantum operation system in processing the quantum computing task includes a plurality of processing stages, and the processing time length information includes the processing time length of each processing stage in the plurality of processing stages; wherein the plurality of processing stages at least include: task analysis, task scheduling, task resource allocation, task compilation, and chip processing.
[0011] Optionally, the generating the performance information indicating the processing performance of the quantum operation system based on at least the quantum resource consumption information and the processing time length information corresponding to each quantum computing task in the plurality of quantum computing tasks comprises: determining average time length information according to the processing time length information of each quantum computing task in the plurality of quantum computing tasks; determining average consumption information according to the quantum resource consumption information of each quantum computing task in the plurality of quantum computing tasks; and generating the performance information based on the average time length information, the average consumption information, the quantum resource consumption information and the processing time length information corresponding to each quantum computing task.
[0012] Optionally, the generating the performance information based on the average time length information, the average consumption information, the quantum resource consumption information and the processing time length information corresponding to each quantum computing task comprises: screening a first type of computing task based on the quantum resource consumption information corresponding to each quantum computing task and the average consumption information, wherein the quantum resource consumption corresponding to the first type of computing task is greater than the average resource consumption; screening a second type of computing task based on the processing time length information corresponding to each quantum computing task and the average time length information, wherein the processing time length corresponding to the second type of computing task is greater than the average time length; and generating the performance information based on the screened first type of computing task and the second type of computing task.
[0013] Optionally, the performance information is generated based on the first type of computing task and the second type of computing task, including: in the case that the plurality of quantum computing tasks includes an abnormal computing task, the performance information is generated based on the quantum resource consumption information and the processing time information corresponding to the abnormal computing task; wherein the abnormal computing task belongs to both the first type of computing task and the second type of computing task; in the case that the plurality of quantum computing tasks does not include an abnormal computing task, the performance information is generated based on the quantum resource consumption information and the processing time information corresponding to the first type of computing task, and the quantum resource consumption information and the processing time information corresponding to the second type of computing task.
[0014] The second aspect of the embodiment of the present application provides a performance analysis device for a quantum operation system, including: an acquisition unit configured to acquire a plurality of quantum computing tasks processed by the quantum operation system within a predefined time period;
[0015] a generation unit configured to generate performance information for indicating the processing performance of the quantum operation system based on at least the quantum resource consumption information and the processing time information corresponding to each quantum computing task in the plurality of quantum computing tasks;
[0016] The quantum resource at least includes one of:
[0017] a quantum logic gate and a quantum bit.
[0018] The third aspect of the embodiment of the present application provides an electronic device, including: a processor and a memory;
[0019] The processor and the memory are connected, wherein the memory is configured to store a computer program, and the processor is configured to call the computer program to execute the method in the first aspect of the embodiment of the present application.
[0020] The fourth aspect of the embodiment of the present application provides a computer readable storage medium, the computer readable storage medium stores a computer program, the computer program includes program instructions, and the program instructions are executed by the processor to execute the method in the first aspect of the embodiment of the present application.
[0021] The performance analysis method for a quantum operation system and the related device provided in the application can generate performance information indicating the processing performance of the quantum operation system according to the quantum resource consumption information and the processing time length information of each quantum computing task in the plurality of quantum computing tasks, so that the performance information can indicate the quantum resource consumption and the processing time length of each quantum computing task in the plurality of quantum computing tasks processed by the quantum operation system, and thus the performance information can indicate the performance overhead and the processing efficiency of the quantum operation system when processing the plurality of quantum computing tasks, so that the quantum operation system can be optimized efficiently with the performance information. BRIEF DESCRIPTION OF DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0023] Figure 1 An example system block diagram for performing the performance analysis method for a quantum operation system provided in an embodiment of the present application is shown;
[0024] Figure 2 A flowchart of the performance analysis method for a quantum operation system provided in an embodiment of the present application is shown;
[0025] Figure 3 A process diagram of each processing stage of a quantum operation system provided in an embodiment of the present application is shown;
[0026] Figure 4 A structure diagram of the performance analysis device for a quantum operation system provided in an embodiment of the present application is shown;
[0027] Figure 5 A structure diagram of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0028] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0029] A classical computer uses transistors to encode information in binary data, such as bits, where each bit can represent a value of 1 or 0. These 1s and 0s act as switches that drive the functionality of a classical computer. If there are n bits of data, there are 2n possible classical states, and one state is represented at a time.
[0030] A quantum computer uses quantum processors that operate on data represented by quantum bits, also known as qubits. A qubit can represent a classical binary state of “0,” “1,” or a superposition of “0” and “1.” Because of the ability to represent a superposition of “0” and “1,” a qubit can represent both “0” and “1” states at the same time. For example, if there are n bits of data, 2n quantum states can be represented at the same time. Optionally, qubits in a superposition can be correlated to each other, referred to as entanglement, where the state of one qubit (whether it is 1 or 0 or both) can depend on the state of the other qubit, and more information can be encoded within two entangled qubits. Based on the principles of superposition and entanglement, qubits can enable a quantum computer to perform functions that can be relatively complex and time-consuming for a classical computer. n
[0031] Reference is made to Figure 1 , which shows an example system block diagram of a method for performance analysis of a quantum operating system, according to an embodiment of the present application. System 100 can be a hybrid computing system that includes one or more quantum computers, quantum systems, and / or classical computers in combination. As shown in the example, Figure 1 System 100 can include quantum system 110 and classical computer 120, in one implementation. Quantum system 110 and classical computer 120 can be configured to communicate via one or more of a wired connection and / or a wireless connection (e.g., a wireless network), in one implementation. Quantum system 110 can include a quantum chip set composed of one or more quantum chips that include various hardware components for processing data encoded in qubits. The quantum chip set can be a quantum computing core surrounded by infrastructure to protect the quantum chips from electromagnetic noise sources, mechanical vibration sources, thermal sources, and other sources of noise that can degrade the performance of the quantum chips. Classical computer 120 can be electronically integrated with quantum system 110 via any suitable wired and / or wireless electronic connection.
[0032] In Figure 1 the example shown, quantum system 110 can be any suitable set of components that can perform quantum operations on a physical system. Quantum operations, for example, can be quantum gate operations that manipulate the quantum state of qubits to evolve and / or entangle. In Figure 1 In the example embodiment shown, quantum system 110 can include a control- measurement unit 111, an interface 112, and a quantum chip 113. In some embodiments, all or portions of each of control-measurement unit 111, interface 112, and quantum chip 113 can be located in a cryogenic environment to assist in performing quantum operations. Quantum chip 113 can be any hardware capable of processing information using quantum states. This hardware can include a plurality of qubits and devices that couple or entangle the qubits in order to process information using quantum states. Qubits can include, but are not limited to, charge qubits, flux qubits, phase qubits, spin qubits, and ion qubits. The quantum chip can include a set of quantum logic gates configured to perform quantum logic operations on qubits stored in a quantum register. The quantum gates can include one or more single-qubit gates, two-qubit gates, and / or other multi-qubit gates.
[0033] Control-measurement unit 111 can be any combination of digital computing devices capable of performing quantum computations (e.g., executing quantum circuits) in conjunction with interface 112. The digital computing devices can include digital processors and memory for storing and executing quantum instructions using interface 112. The digital computing devices can also include a communication protocol device for receiving instructions and sending results of executed quantum computations to a classical computer. Additionally, the digital computing devices can also include a communication interface with interface 112. In one embodiment, control-measurement unit 111 can be configured to receive classical instructions (e.g., from classical computer 120) and convert the classical instructions into control-measurement instructions for interface 112. The control-measurement instructions provided by control-measurement unit 111 to interface 112 can be, for example, digital signals that indicate which of the quantum gates need to act on the qubits to perform a particular function. Interface 112 can be configured to convert these digital signals into analog signals (e.g., analog pulses of microwave pulses) that can be used to apply quantum gates on the qubits to manipulate the interactions between the qubits.
[0034] Interface 112 can be a classical-quantum interface including a combination of devices capable of receiving instructions from control machine 111 and converting the instructions into a device for implementing quantum operations. In one embodiment, interface 112 can transform instructions from control machine 111 into drive signals that can drive or manipulate qubits, and / or act quantum gates on qubits. Additionally, interface 112 can be configured to convert signals received from quantum chip 113 into digital signals that can be processed and transmitted by control machine 111. Devices included in interface 112 can include, but are not limited to, digital-to-analog converters, analog-to-digital converters, waveform generators, attenuators, amplifiers, optical fibers, lasers, and filters. Interface 112 can further include circuit components configured to measure a plurality of qubits after a quantum gate has acted on the qubits, where the measurement can produce a result represented in classical bits. Each measurement performed by interface 112 can be read out to a device connected to quantum system 110, such as classical computer 120. Multiple measurement results provided by interface 112 can represent probabilistic results.
[0035] Classical computer 120 can include hardware components such as processors and storage devices (e.g., including memory devices and classical registers) for processing data encoded in classical bits. In one embodiment, classical computer 120 can be configured to provide various control signals, instructions, and data encoded in classical bits to quantum system 110. Optionally, quantum states measured by quantum system 110 can be read out by classical computer 120, and classical computer 120 can store the measured quantum states as classical bits in classical registers. In one embodiment, classical computer 120 can be any suitable combination of computer-executable hardware and / or computer-executable software capable of executing preparation module 121 to perform quantum computations using data stored in data storage module 122 as part of a build and compute. Data storage module 122 can be a repository for data to be analyzed using quantum computing algorithms, as well as results of that analysis. Preparation module 121 can be a program or module capable of preparing classical data from data storage module 122 as part of a quantum circuit implementation. Preparation module 121 can be instantiated as part of a larger algorithm, such as a function call of an application programming interface (API), or by parsing a hybrid classical-quantum computation into quantum and classical computing aspects. For example, preparation module 121 can generate instructions for creating a quantum circuit using quantum gates. In embodiments, such instructions can be stored by control machine 111, and components of interface 112 can be instantiated to execute such that quantum operations of the quantum gates can be performed on quantum chip 113.
[0036] The classical computer 120 can be a laptop computer, a desktop computer, a vehicle integrated computer, a smart mobile device, a tablet device, and / or any other suitable classical computing device. Additionally or alternatively, the classical computer 120 can also operate as part of a cloud computing service model, such as software as a service (SaaS), platform as a service (PaaS), or infrastructure as a service (IaaS). The classical computer 120 can also be located in a cloud computing deployment model, such as a private cloud, community cloud, public cloud, or hybrid cloud.
[0037] As can be known from the description of the background art, the quantum operating system is an operating system specially designed for quantum computers; it can be responsible for managing quantum hardware resources, scheduling the execution of quantum programs, and optimizing the running of quantum algorithms. Specifically:
[0038] The quantum operating system needs to effectively allocate and manage quantum bit resources to achieve multi-task parallel processing. The fragility and instability of quantum hardware require quantum chips to be calibrated regularly to ensure the accuracy of the calculation results. The automated calibration function is a key feature that the quantum operating system needs to have to reduce manual intervention and time consumption. The performance of the quantum computer not only depends on the hardware, but also needs the close cooperation of software and hardware. As middleware, the quantum operating system needs to optimize the execution of quantum algorithms and reduce the decoherence error caused by the delay of the control processor.
[0039] It can be seen that the quantum computer operating system is directly related to the performance of the quantum computer, so optimizing the quantum computer operating system is beneficial to better improve the overall performance of the quantum computer. When optimizing the quantum computer operating system, it is usually necessary to know the performance overhead of the quantum computer operating system when processing tasks, and to optimize according to the performance overhead. In related technologies, there is no performance statistics and analysis scheme for the quantum computer operating system, so that a lot of time is usually wasted in the process of optimizing the quantum operating system.
[0040] Please refer to Figure 2 , which shows the flowchart of the performance analysis method for the quantum operating system provided by an embodiment of the present application. The method can be applied in a computer device, and the computer device mentioned above refers to an electronic device with data calculation and processing capability, such as the execution subject of each step can be a quantum computer or a classical computer (which can be reasonably selected according to actual conditions) as shown in the figure. The method can include the following steps: Figure 1
[0041] Step 201: Obtain a plurality of quantum computing tasks processed by the quantum operating system in a predefined time period;
[0042] Step 202: generating performance information for indicating processing performance of the quantum operation system based on at least the consumption information and the processing time length information of the quantum resource corresponding to each quantum computing task in the plurality of quantum computing tasks;
[0043] Here, the quantum resource at least includes one of the following: a quantum logic gate, a quantum bit.
[0044] As an example, the specific time length of the predefined time period can be limited according to actual conditions, for example, it can be 1 hour.
[0045] It should be understood that in the process of processing the quantum computing task by the quantum operation system, each stage of the quantum computing task will be monitored to determine the processing time length consumed by the quantum computing task at each stage. The processing time length information can include the processing time length information of each stage and the total processing time length information required for processing the quantum computing task, that is, the processing time length information can reflect the processing time or processing efficiency of the quantum operation system for the quantum computing task.
[0046] As an example, the consumption information of the quantum resource can indicate the quantum logic gate and quantum bit information required by the quantum operation system when processing the quantum computing task.
[0047] And in combination with the consumption information and the processing time length information of the quantum resource, the use of quantum resources and the processing time of the quantum operation system when processing each quantum computing task can be reflected, and in combination with the two, the performance of the quantum operation system can be more directly reflected.
[0048] For example, the performance information can indicate that a certain quantum computing task consumes more time but does not use more quantum bits, and the performance information can also indicate that a certain quantum computing task uses more logic gates, causing the quantum computing task to consume more time.
[0049] That is, the performance information can indicate the performance change and performance overhead of the quantum operation system when processing a plurality of quantum computing tasks in a predefined time period, thereby helping users to optimize the quantum operation system through the performance information.
[0050] It can be understood that the performance information can indicate the performance overhead of the quantum operation system when processing the quantum computing task, for example, the performance information can include but is not limited to indicating quantum bit utilization rate, quantum logic gate consumption, quantum chip utilization rate, task throughput, task response time, compilation efficiency, etc.
[0051] It can be seen that in the present disclosure, after a plurality of quantum computing tasks processed by the quantum operation system in a predefined time period are acquired, performance information indicating the processing performance of the quantum operation system can be generated according to the quantum resource consumption information and the processing time length information of each quantum computing task in the plurality of quantum computing tasks. In this way, the performance information can indicate the quantum resource consumption and the processing time length of each quantum computing task in the plurality of quantum computing tasks processed by the quantum operation system, so that the performance information can indicate the performance overhead and the processing efficiency of the quantum operation system when processing the plurality of quantum computing tasks, and the optimization of the quantum operation system can be efficiently performed with the performance information.
[0052] Optionally, the performance information indicates which quantum logic gates and quantum bits are consumed by a specific quantum computing task, and can indicate the processing time length of the quantum computing task, and the quantum resource consumption information and the processing time length information of the plurality of quantum computing tasks can be compared to determine a quantum computing task with a longer processing time. In this way, it can be analyzed through the performance information that the quantum operation system may have a low processing efficiency when processing a certain type of quantum computing task, which is beneficial to targeted optimization of the quantum operation system.
[0053] In some embodiments, the quantum operation system can include a plurality of quantum chips, and step 202 (generating performance information indicating the processing performance of the quantum operation system based at least on the quantum resource consumption information and the processing time length information of each quantum computing task in the plurality of quantum computing tasks) can specifically include:
[0054] determining quantum bit utilization rate information and quantum logic gate utilization rate information corresponding to each quantum chip;
[0055] generating the performance information based on the quantum bit utilization rate information corresponding to each quantum chip, the quantum logic gate utilization rate information corresponding to each quantum chip, the quantum resource consumption information of each quantum computing task, and the processing time length information.
[0056] As an example, the quantum bit utilization rate information and the quantum logic gate utilization rate information of the quantum chip can reflect whether there is spare processing capacity of the quantum chip in the process of processing the quantum computing task. In the process of generating the performance information, the quantum bit utilization rate information and the quantum logic gate utilization rate information corresponding to each quantum chip are considered. In this way, the performance overhead and the performance remaining of each quantum chip can be better reflected.
[0057] As an example, the quantum operation system can include a plurality of quantum chips, and the performance information can indicate performance overheads of the quantum chips, so that the chip allocation in the subsequent processing of the quantum computing task can also be dynamically adjusted according to the performance overheads of the quantum chips.
[0058] For example, the quantum operation system can include three quantum chips, quantum chip A, quantum chip B and quantum chip C, and the performance information indicates that the performance overhead of quantum chip A is usually large, and the performance overhead of quantum chip B and quantum chip C is usually small. Based on the indication of the performance information, quantum chip A can be optimized to have better performance, and more quantum computing tasks can be completed on quantum chip B and quantum chip C in the resource allocation process to ensure the completion efficiency of the quantum computing task.
[0059] In some embodiments, the above-mentioned determination of the quantum bit utilization rate information and the quantum logic gate utilization rate information corresponding to each quantum chip can specifically include:
[0060] For any quantum chip, the following steps can be performed to determine the quantum bit utilization rate information and the quantum logic gate utilization rate information corresponding to the quantum chip:
[0061] According to the total number of logic gates of the quantum chip and the predefined time period, a first calculation parameter is generated, and according to the number of quantum logic gates corresponding to each quantum computing task running on the quantum chip and the time length of each quantum computing task running on the quantum chip, a second calculation parameter is generated; according to the first calculation parameter and the second calculation parameter, the quantum logic gate utilization rate information is determined;
[0062] And according to the total number of bits of the quantum chip and the predefined time period, a third calculation parameter is generated, and according to the number of quantum bits corresponding to each quantum computing task running on the quantum chip and the time length of each quantum computing task running on the quantum chip, a fourth calculation parameter is generated; according to the third calculation parameter and the fourth calculation parameter, the quantum bit utilization rate information is determined.
[0063] As an example, in the process of determining the quantum logic gate utilization rate information, the first calculation parameter can be used as the denominator, and the second calculation parameter can be used as the numerator, then the ratio of the second calculation parameter to the first calculation parameter can be used as the quantum logic gate utilization rate, and similarly, the ratio of the fourth calculation parameter to the fourth calculation parameter can be used as the quantum bit utilization rate.
[0064] For the convenience of understanding the specific computing idea, the specific determination process of the quantum logic gate utilization information and the quantum bit utilization information can be understood in combination with the following formula. The calculation formula of the quantum logic gate utilization information QGate Util and the quantum bit utilization information Qubit Util can be as follows:
[0065]
[0066]
[0067] Wherein, NumQ can represent the total number of quantum bits on the currently executed chip, T represents the total observation time of the utilization rate (which can be understood as a predefined time), N is the total number of tasks executed on the chip within the observation time period, NumQ(i) represents the number of quantum bits used by the i th task, NumG can represent the total number of quantum logic gates on the currently executed chip, NumG(i) represents the number of quantum operation gates related to the chip by the i th task, and Time(i) represents the time consumed by the second task in executing the chip.
[0068] That is, the quantum logic gate utilization information and the quantum bit utilization information can reflect the quantum resource overhead on the quantum chip within the predefined time, thereby helping the user to perform targeted optimization on the quantum chip.
[0069] In some embodiments, the quantum operation system in the process of processing the quantum computing task includes a plurality of processing stages, and the processing time information includes the processing time of each processing stage in the plurality of processing stages; wherein the plurality of processing stages can at least include: task analysis, task scheduling, task resource allocation, task compilation, and chip processing.
[0070] Here, when the task is submitted to the quantum computing operation system, the original quantum circuit is usually provided, and the circuit needs to be processed by the resource scheduling and compilation of the quantum computing operation system to obtain the command that can be directly executed by the quantum chip.
[0071] As an example, the quantum bit and quantum gate statistics in the quantum resource are located after the compilation to form the execution command, the physical quantum bit set qubits used by the task is obtained by traversing the command set; according to the obtained qubits and the chip quantum bit topology structure, the quantum operation gate set of the quantum bit on the chip is obtained by traversing all the quantum bits; finally, according to the statistical task execution time, the quantum resource utilization rate of the quantum computing operation system can be obtained according to the above calculation formula for the quantum logic gate utilization information and the quantum bit utilization information.
[0072] As an example, task analysis is the process of determining the types of tasks a quantum computer needs to perform and the requirements, which can assess the number of qubits needed, the complexity of the task, and the expected runtime.
[0073] Task scheduling: Task scheduling can determine the order and timing of task execution, and can optimize the order of quantum gate operations to reduce errors and improve efficiency.
[0074] Task resource allocation: This involves allocating necessary quantum resources, such as qubits and quantum gates, to a specific task. The physical limitations of the quantum system and the capabilities of current quantum hardware must be considered during task allocation.
[0075] Task compilation: Task compilation is the process of converting high-level quantum algorithms into low-level instructions that can be executed on quantum hardware. It involves the design and optimization of quantum circuits to ensure the algorithm runs efficiently on a practical quantum computer. During task compilation, the specific quantum resources required (quantum chips, qubits, and quantum logic gates for running the quantum computing task) can be determined.
[0076] Chip processing refers to the execution of compiled quantum algorithms on a quantum chip. Specifically, this includes the initialization of qubits, the execution of quantum gates, and the final measurement process. In other words, chip processing can be understood as the actual processing stage of a quantum computing task.
[0077] It is evident that the computation process for quantum computing tasks involves multiple stages. The processing time information that generates performance information can include the processing time of each stage. This allows us to identify which processing stages may have anomalies based on the performance information, and thus optimize each stage accordingly.
[0078] Of course, the specific optimization process for each processing stage can be limited according to the actual situation, but the actual optimization process for each stage is not limited here.
[0079] To better understand the processing procedure, you can combine... Figure 3 To explain, Figure 3 This can be understood as a schematic diagram of the quantum operating system disclosed herein for processing quantum computing tasks, by... Figure 3 It is evident that the quantum operating system can perform task analysis, task scheduling, task resource allocation, task compilation, and chip processing for quantum computing tasks. During the task compilation process, quantum resource data can be acquired and quantum resource utilization can be calculated. Throughout the entire process, time monitoring can be performed, thereby determining the processing time of each processing stage.
[0080] In some embodiments, step 202 (generating performance information indicating processing performance of the quantum operation system based at least on the quantum resource consumption information and the processing time length information corresponding to each quantum computing task in the plurality of quantum computing tasks) can specifically include:
[0081] determining average time length information according to the processing time length information of each quantum computing task in the plurality of quantum computing tasks;
[0082] determining average consumption information according to the quantum resource consumption information of each quantum computing task in the plurality of quantum computing tasks;
[0083] generating the performance information based on the average time length information, the average consumption information, the quantum resource consumption information and the processing time length information corresponding to each quantum computing task.
[0084] As an example, the average time length information and the average consumption information can reflect the average level of time and resources when the quantum operation system processes the quantum computing tasks.
[0085] In this way, based on the average time length information, the average consumption information, the quantum resource consumption information and the processing time length information corresponding to each quantum computing task, it can be determined which quantum computing tasks consume more time and which quantum computing tasks consume more resources. Thus, according to the performance information, it can be indicated which quantum computing tasks may consume more time or quantum resources, and the optimization of the computing process for such quantum computing tasks can be targeted.
[0086] In some embodiments, the above-mentioned generating the performance information based on the average time length information, the average consumption information, the quantum resource consumption information and the processing time length information corresponding to each quantum computing task can specifically include:
[0087] screening out first type computing tasks based on the quantum resource consumption information corresponding to each quantum computing task and the average consumption information, wherein the quantum resource consumption corresponding to the first type computing tasks is greater than the average resource consumption;
[0088] screening out second type computing tasks based on the processing time length information corresponding to each quantum computing task and the average time length information, wherein the processing time length corresponding to the second type computing tasks is greater than the average time length;
[0089] generating the performance information based on the screened first type computing tasks and the second type computing tasks.
[0090] As an example, the first type of computing task can be understood as a quantum computing task that requires more quantum resources, and the second type of computing task can be understood as a quantum computing task that requires more time. Based on the screened first type of computing task and the second type of computing task, the performance information is generated. In this way, the performance information can indicate the specific performance consumption of the first type of computing task and the second type of computing task, facilitating targeted optimization of the quantum operation system.
[0091] For example, the first type of computing task indicates that more quantum resources are required, so the task compilation process can be optimized based on the first type of computing task to reduce the quantum resources required during the processing of the quantum computing task. The second type of computing task indicates that a longer time is required, so the processing time of each processing stage can be determined to determine which processing stage has a longer processing time, and optimization can be performed for that processing stage.
[0092] In some embodiments, the above-mentioned generation of the performance information based on the screened first type of computing task and the second type of computing task includes:
[0093] In the case where the plurality of quantum computing tasks include an abnormal computing task, the performance information is generated based on the quantum resource consumption information and the processing time information corresponding to the abnormal computing task; wherein the abnormal computing task belongs to both the first type of computing task and the second type of computing task.
[0094] In the case where the plurality of quantum computing tasks do not include an abnormal computing task, the performance information is generated based on the quantum resource consumption information and the processing time information corresponding to the first type of computing task, and the quantum resource consumption information and the processing time information corresponding to the second type of computing task.
[0095] As an example, in the case where the plurality of quantum computing tasks include an abnormal computing task, the performance information is generated based on the quantum resource consumption information and the processing time information corresponding to the abnormal computing task. In this way, the performance information can indicate a quantum computing task that requires both more quantum resources and more time, so that the quantum operation system can be updated and optimized according to the characteristics of this type of task.
[0096] That is, the method of the present disclosure generates performance information by analyzing the performance of the quantum operation system during the processing of the quantum computing task, so that the user can determine which processing stages need to be updated according to the indication of the performance information, and which quantum chips have additional performance during the processing. In other words, the generated performance information of the present disclosure can indicate the optimization direction of the quantum operation system for the user, so that the optimization of the quantum operation system can be more efficient.
[0097] Figure 4 A structure diagram of the performance analysis device 400 for a quantum operation system is shown. The performance analysis device 400 for a quantum operation system is applied to a quantum computer, and corresponds to the performance analysis method for a quantum operation system disclosed in the above embodiments, and can be used to realize the implementation details of the performance analysis method for a quantum operation system. The device 400 includes:
[0098] The acquisition unit 401 is configured to acquire a plurality of quantum computing tasks processed by the quantum operation system in a predefined time period.
[0099] The generation unit 402 is configured to generate performance information for indicating the processing performance of the quantum operation system based on at least the consumption information and the processing time length information of the quantum resources corresponding to each quantum computing task in the plurality of quantum computing tasks. The quantum resources at least include one of:
[0100] Quantum logic gates and quantum bits.
[0101] In some embodiments, the quantum operation system includes a plurality of quantum chips.
[0102] The generation unit 402 is specifically further configured to determine the quantum bit utilization rate information and the quantum logic gate utilization rate information corresponding to each quantum chip.
[0103] The performance information is generated based on the quantum bit utilization rate information corresponding to each quantum chip, the quantum logic gate utilization rate information corresponding to each quantum chip, the quantum resource consumption information corresponding to each quantum computing task, and the processing time length information.
[0104] In some embodiments, the generation unit 402 is specifically further configured to determine the quantum bit utilization rate information and the quantum logic gate utilization rate information corresponding to any quantum chip by performing the following steps: generating a first calculation parameter according to the total number of logic gates of the quantum chip and the predefined time period, and generating a second calculation parameter according to the number of quantum logic gates corresponding to each quantum computing task running on the quantum chip and the time length of each quantum computing task running on the quantum chip.
[0105] The quantum logic gate utilization rate information is determined according to the first calculation parameter and the second calculation parameter.
[0106] And,
[0107] generate a third calculation parameter according to the total number of bits of the quantum chip and the predefined time period, and generate a fourth calculation parameter according to the number of quantum bits corresponding to each quantum computing task running on the quantum chip and the time length of each quantum computing task running on the quantum chip;
[0108] determine quantum bit utilization rate information according to the third calculation parameter and the fourth calculation parameter.
[0109] In some embodiments, the quantum operation system processes the quantum computing tasks in a plurality of processing stages, and the processing time length information includes a processing time length of each processing stage in the plurality of processing stages.
[0110] The plurality of processing stages at least include:
[0111] task analysis, task scheduling, task resource allocation, task compilation, and chip processing.
[0112] In some embodiments, the generation unit 402 is specifically further configured to determine average time length information according to the processing time length information of each quantum computing task in the plurality of quantum computing tasks.
[0113] determine average consumption information according to the quantum resource consumption information of each quantum computing task in the plurality of quantum computing tasks.
[0114] generate the performance information based on the average time length information, the average consumption information, the quantum resource consumption information corresponding to each quantum computing task, and the processing time length information corresponding to each quantum computing task.
[0115] In some embodiments, the generation unit 402 is specifically further configured to filter out first-type computing tasks based on the quantum resource consumption information corresponding to each quantum computing task and the average consumption information, where the quantum resource consumption corresponding to the first-type computing tasks is greater than the average resource consumption.
[0116] filter out second-type computing tasks based on the processing time length information corresponding to each quantum computing task and the average time length information, where the processing time length corresponding to the second-type computing tasks is greater than the average time length.
[0117] generate the performance information based on the filtered first-type computing tasks and second-type computing tasks.
[0118] In some embodiments, the generation unit 402 is specifically further configured to generate the performance information based on the quantum resource consumption information and the processing time length information corresponding to an abnormal computing task in the plurality of quantum computing tasks, where the abnormal computing task belongs to both the first-type computing tasks and the second-type computing tasks.
[0119] In a case where the exception computing task is not included in the plurality of quantum computing tasks, the performance information is generated based on the quantum resource consumption information and the processing time length information corresponding to the first type of computing task, and the quantum resource consumption information and the processing time length information corresponding to the second type of computing task.
[0120] Figure 5 A structure diagram of a computer device provided by an embodiment of the present application is shown, which includes a memory and a processor. The memory stores a computer program, and the processor implements the function of the computer system of the performance analysis method for the quantum operating system in any of the above embodiments when executing the computer program.
[0121] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program. The computer program is executed by a computer to make the computer execute the function of the computer system of the performance analysis method for the quantum operating system in any of the above embodiments.
[0122] The embodiment of the present application further provides a computer program product containing instructions. The instructions are executed by a computer to make the computer execute the function of the computer system of the performance analysis method for the quantum operating system in any of the above embodiments.
[0123] It can be understood that the specific examples in the present application are only to help those skilled in the art better understand the embodiments of the present application, and not to limit the scope of the present application.
[0124] It can be understood that in various embodiments of the present application, the size of the serial number of each process does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0125] It can be understood that the various embodiments described in the present application can be implemented alone or in combination, and the embodiments of the present application do not limit this.
[0126] Unless otherwise specified, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art of the present application. The terms used in the present application are only for the purpose of describing the specific embodiments and are not intended to limit the scope of the present application. The term "and / or" used in the present application includes any and all combinations of one or more related listed terms. The singular forms "a", "an" and "the" used in the embodiments of the present application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise.
[0127] It can be understood that the processor of the embodiments of the present application can be an integrated circuit chip with processing capability. In the implementation process, each step of the method embodiments described above can be completed by integrated logic circuits in hardware or instructions in software form in the processor. The processor described above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and combines the hardware to complete the steps of the above method.
[0128] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read only memory (ROM), a programmable read only memory (PROM), an erasable programmable read only memory (EPROM), an electrically erasable programmable read only memory (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM). It should be noted that the memory of the system and method described herein is intended to include but not limited to these and any other suitable type of memory.
[0129] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0130] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, and will not be described here.
[0131] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection between the performance analysis of the quantum operation system and the discussion can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0132] The units described as separate components can or can not be physically separate, and the components of the performance analysis of the quantum operation system as a unit can or can not be physical units, that is, can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment scheme.
[0133] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit.
[0134] If the function is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical scheme of the present application or the part of the prior art or the part of the technical scheme which essentially contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.
[0135] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A performance analysis method for quantum operating systems, characterized in that, include: Obtain multiple quantum computing tasks processed by the quantum operating system within a predefined time period; Based at least on the quantum resource consumption information and processing time information corresponding to each of the plurality of quantum computing tasks, performance information for indicating the processing performance of the quantum operating system is generated; The quantum resources include at least one of the following: Quantum logic gates, qubits.
2. The method according to claim 1, characterized in that, The quantum operating system includes: multiple quantum chips; The method further includes generating performance information to indicate the processing performance of the quantum operating system, based at least on quantum resource consumption information and processing time information corresponding to each of the plurality of quantum computing tasks. Determine the qubit utilization information and quantum logic gate utilization information for each quantum chip; The performance information is generated based on the qubit utilization information, the quantum logic gate utilization information, the quantum resource consumption information, and the processing time information for each quantum computing task.
3. The method according to claim 2, characterized in that, The determination of the qubit utilization information and quantum logic gate utilization information corresponding to each quantum chip includes: For any quantum chip, the following steps are performed to determine the qubit utilization information and quantum logic gate utilization information corresponding to the quantum chip: Based on the total number of logic gates of the quantum chip and a predefined time period, a first calculation parameter is generated; and based on the number of quantum logic gates corresponding to each quantum computing task running on the quantum chip and the duration of each quantum computing task running on the quantum chip, a second calculation parameter is generated. Based on the first calculation parameter and the second calculation parameter, determine the quantum logic gate utilization information; as well as, A third calculation parameter is generated based on the total number of qubits in the quantum chip and a predefined time period. A fourth calculation parameter is generated based on the number of qubits corresponding to each quantum computing task running on the quantum chip and the duration of each quantum computing task running on the quantum chip. The qubit utilization information is determined based on the third and fourth calculation parameters.
4. The method according to claim 1, characterized in that, The quantum operating system includes multiple processing stages in the process of handling the quantum computing task, and the processing time information includes the processing time of each of the multiple processing stages. The plurality of processing stages include at least: Task analysis, task scheduling, task resource allocation, task compilation, and chip processing.
5. The method according to claim 1, characterized in that, The generation of performance information to indicate the processing performance of the quantum operating system is based at least on the quantum resource consumption information and processing time information corresponding to each of the plurality of quantum computing tasks, including: Based on the processing time information of each quantum computing task in the plurality of quantum computing tasks, the average processing time information is determined; Based on the quantum resource consumption information of each of the multiple quantum computing tasks, determine the average consumption information; The performance information is generated based on the average duration information, the average consumption information, the quantum resource consumption information and processing time information corresponding to each quantum computing task.
6. The method according to claim 5, characterized in that, The generation of performance information based on the average duration information, the average resource consumption information, the quantum resource consumption information and processing time information corresponding to each quantum computing task includes: Based on the quantum resource consumption information and the average consumption information corresponding to each quantum computing task, a first type of computing task is selected, wherein the quantum resource consumption of the first type of computing task is greater than the average resource consumption. Based on the processing time information and the average time information corresponding to each quantum computing task, a second type of computing task is selected, wherein the processing time of the second type of computing task is greater than the average time. The performance information is generated based on the selected first and second types of computing tasks.
7. The method according to claim 6, characterized in that, The generation of performance information based on the selected first and second types of computing tasks includes: In the case where the plurality of quantum computing tasks include anomaly computing tasks, the performance information is generated based on the quantum resource consumption information and processing time information corresponding to the anomaly computing task; wherein, the anomaly computing task belongs to both the first type of computing task and the second type of computing task; In the absence of abnormal computing tasks among the multiple quantum computing tasks, the performance information is generated based on the quantum resource consumption information and processing time information corresponding to the first type of computing task and the quantum resource consumption information and processing time information corresponding to the second type of computing task.
8. A performance analysis device for quantum operating systems, characterized in that, include: The acquisition unit is used to acquire multiple quantum computing tasks processed by the quantum operating system within a predefined time period; The generation unit is used to generate performance information that indicates the processing performance of the quantum operating system, based at least on the consumption information and processing time information of the quantum resources corresponding to each of the plurality of quantum computing tasks. The quantum resources include at least one of the following: Quantum logic gates, qubits.
9. An electronic device, characterized in that, include: Processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to invoke the computer program to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, perform the method as described in any one of claims 1-7.
