A quantum circuit execution method and device and a quantum computer
By using a community-based detection-assisted partitioning algorithm to divide the quantum chip into blocks and selecting high-fidelity quantum bit blocks, the computational deviation problem caused by the instability of quantum bit quality is solved, thereby improving the performance and resource utilization of quantum computing tasks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
- Filing Date
- 2024-11-26
- Publication Date
- 2026-06-02
AI Technical Summary
At present, the quantum bits of the NISQ quantum computer are of unstable quality and are susceptible to external interference, resulting in poor fidelity of quantum circuit calculations and a large deviation between the execution results and the actual situation.
A community detection-assisted partitioning algorithm is used to divide the qubits on the target quantum chip into blocks, select high-fidelity qubit blocks, and perform quantum computing tasks on these blocks through a quantum circuit execution device.
It improves the computational fidelity of quantum circuits, enhances the performance of quantum computing tasks, increases the utilization of quantum chip computing resources and the mapping search space, and supports the parallel execution of multiple tasks.
Smart Images

Figure CN122133837A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of quantum computer technology, and in particular to a quantum circuit execution method, apparatus, and quantum computer. Background Technology
[0002] The emergence of quantum cloud services has made it easy for users to access quantum computers, but it has also brought new challenges. Due to the non-negligible noise of NISQ (Noisy Intermediate-Scale Quantum) computers, currently only small programs with fewer than 20 qubits can be run on quantum computers to ensure high-quality results. In the NISQ stage, the quality of each qubit on the quantum chip is unstable, making it highly susceptible to external interference and state drift. When performing quantum computing tasks, qubits with poor quality have poor computational fidelity, and the results of the quantum circuits deviate significantly from reality, resulting in poor performance of quantum computing tasks. Summary of the Invention
[0003] This invention provides a quantum circuit execution method and apparatus to solve the problem in the prior art that when low-quality qubits perform quantum computing tasks, the computational fidelity of quantum circuits is poor and the results of quantum circuit operation deviate significantly from the actual situation.
[0004] This specification provides an embodiment of a quantum circuit execution method, including:
[0005] To obtain the number of qubits used in the quantum computing task and the fidelity between connected qubits on the target quantum chip;
[0006] Based on the community detection-assisted partitioning algorithm, the number of qubits, and the fidelity, the qubits on the target quantum chip are divided into blocks to obtain several qubit blocks;
[0007] Calculate the sum of fidelity between connected qubits on each qubit block, and determine the target qubit block based on the state of each qubit on the target quantum chip and the sum;
[0008] The corresponding quantum computing task is executed on the quantum circuit formed by the qubits in the target qubit block, and the result of the quantum computing task execution is obtained.
[0009] Optionally, determining the target qubit block based on the state of each qubit on the target quantum chip and the sum value includes:
[0010] From a number of qubit blocks, select the qubit block containing any qubit in the occupied state, and denote it as the qubit block set;
[0011] The target qubit block is obtained by identifying the qubit block with the highest sum value in the set of qubit blocks.
[0012] Optionally, determining the qubit block with the highest sum value in the set of qubit blocks to obtain the target qubit block includes:
[0013] Based on the sum, determine the number of qubit blocks with the highest sum in the set of qubit blocks;
[0014] When there are at least two qubit blocks with the highest sum, the target qubit block is determined from among the multiple qubit blocks with the highest sum according to the edge-first strategy.
[0015] Optionally, determining the target qubit block among the multiple qubit blocks with the highest sum value according to the edge-first strategy includes:
[0016] The positions of the multiple qubit blocks with the highest sums on the topology diagram corresponding to the quantum chip are detected, and the qubit blocks at the edge positions are selected as target qubit blocks.
[0017] Optionally, before executing the quantum circuit formed by the qubits on the target qubit block, the method further includes:
[0018] The occupancy status is marked for each qubit in the target qubit block.
[0019] Optionally, the method further includes:
[0020] When there are at least two quantum computing tasks and each quantum computing task uses a different target qubit block, multiple quantum computing tasks are executed in parallel.
[0021] Optionally, the parallel execution of multiple quantum computing tasks includes:
[0022] When the distance between the target qubit blocks used by each quantum computing task on the topology diagram of the quantum chip is greater than a preset distance, multiple quantum computing tasks are executed in parallel.
[0023] This specification also provides an embodiment of a quantum circuit execution device, comprising:
[0024] The information acquisition module is used to acquire the number of qubits used in the quantum computing task and the fidelity between connected qubits on the target quantum chip;
[0025] A qubit block partitioning module is used to partition each qubit on the target quantum chip into blocks according to the community detection-assisted partitioning algorithm, the number of qubits, and the fidelity, to obtain several qubit blocks;
[0026] The target qubit block determination module is used to calculate the sum of fidelity between connected qubits on each qubit block, and to determine the target qubit block based on the state of each qubit on the target quantum chip and the sum.
[0027] The quantum circuit execution module is used to execute the quantum computing task on the quantum circuit formed by the qubits in the target qubit block and obtain the execution result of the quantum computing task.
[0028] A quantum control system is characterized by performing quantum computing tasks using a quantum circuit execution method, or by including a quantum circuit execution device.
[0029] A quantum computer, including a quantum control system.
[0030] A readable storage medium having a computer program stored thereon, which, when executed by a processor, enables the implementation of the methods described above.
[0031] Its beneficial effects are as follows: This application divides each qubit on the target quantum chip into blocks by using a community detection-assisted partitioning algorithm to obtain several qubit blocks; and obtains the target qubit block through further screening. The community detection-assisted partitioning algorithm effectively avoids qubit blocks with poor quality, ensuring that each qubit in the target qubit block has high quality, effectively improving the fidelity of quantum circuit computation, and thus improving the performance of quantum computing tasks. Attached Figure Description
[0032] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0033] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0034] Figure 1 A flowchart of a quantum circuit execution method provided in the embodiments of this specification;
[0035] Figure 2 A schematic diagram of a qubit block in the target quantum chip provided in the embodiments of this specification;
[0036] Figure 3 This is a schematic diagram of a quantum circuit execution device provided in the embodiments of this specification;
[0037] Figure 4 This is a schematic diagram of a computer-readable medium provided for embodiments of this specification. Detailed Implementation
[0038] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0039] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0040] It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps described in these embodiments do not limit the scope of the invention.
[0041] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the invention or its application or use.
[0042] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0043] In all the examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0044] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0045] Reference Figure 1 This specification provides a schematic diagram of a quantum circuit execution method, comprising: S101: obtaining the number of qubits used in the quantum computing task and the fidelity between connected qubits on the target quantum chip; S102: dividing the qubits on the target quantum chip into blocks according to the community detection-assisted partitioning algorithm, the number of qubits, and the fidelity, to obtain several qubit blocks; S103: calculating the sum of the fidelities between connected qubits on each qubit block, and determining the target qubit block according to the state of each qubit on the target quantum chip and the sum; S104: executing the corresponding quantum computing task on the quantum circuit formed by the qubits in the target qubit block, and obtaining the execution result of the quantum computing task.
[0046] In one optional embodiment, before executing a quantum circuit, it is necessary to determine the number of qubits used in the quantum computing task and the fidelity between connected qubits on the target quantum chip. Then, a community-assisted partitioning algorithm is used to divide the qubits on the target quantum chip into blocks based on the number of qubits and the fidelity, resulting in several qubit blocks. Because the community-assisted partitioning algorithm is used, the connectivity between qubits in these blocks is better, and the stability is higher, thereby improving the efficiency and reliability of the quantum algorithm when executing the quantum circuit. Afterwards, since the fidelity affects the execution effect of the quantum circuit formed by the qubits, it is necessary to select qubit blocks with good overall fidelity from the several qubit blocks. The sum of the fidelities between connected qubits in each qubit block is calculated using the obtained fidelity between connected qubits on the target quantum chip, and the target qubit block is determined by combining this with the state of each qubit on the target quantum chip. Figure 2 As shown, taking a quantum computing task using four qubits as an example, assuming that the sum of fidelity among the connected qubits in qubit block Q1 is the highest, and that qubits 30, 31, 36, and 37 in qubit block Q1 are all unoccupied, then qubit block Q1 is selected as the target qubit block. Finally, the corresponding quantum computing task is executed on the quantum circuit formed by qubits 30, 31, 36, and 37 in the target qubit block Q1, and the result of the quantum computing task is obtained, thus completing the quantum computing task. By employing the community detection-assisted partitioning algorithm, lower-quality qubit blocks are effectively avoided, ensuring that each qubit in the target qubit block has high quality, effectively improving the fidelity of quantum circuit computation, and thus improving the execution effect of the quantum computing task. Furthermore, partitioning the qubits effectively reduces the mapping search space, improves mapping efficiency, and rationally plans the computational resources of the qubits on the target quantum chip, effectively improving the utilization rate of quantum chip computational resources.
[0047] Optionally, determining the target qubit block based on the state of each qubit on the target quantum chip and the sum value includes: selecting from a plurality of qubit blocks the qubit block containing qubits whose state is occupied, denoted as the qubit block set; and determining the qubit block with the highest sum value in the qubit block set to obtain the target qubit block.
[0048] In one optional embodiment, the state of each qubit on the target quantum chip is first detected to obtain the state of each qubit. Then, a set of qubit blocks is selected from several qubit blocks to contain qubits that are not in an occupied state. Each qubit block in the selected set is available for performing quantum computing tasks. To further improve the performance of quantum computing tasks, the qubit blocks in the set need to be further selected. The sum of the fidelity of the connected qubits on the qubit block is used as a reference for selection. The qubit block with the highest sum of fidelity of the connected qubits on the qubit block is selected and selected as the target qubit block. This effectively improves the fidelity of quantum circuit computing and thus improves the performance of quantum computing tasks.
[0049] Optionally, determining the qubit block with the highest sum value in the qubit block set to obtain the target qubit block includes: determining the number of qubit blocks with the highest sum value in the qubit block set based on the sum value; when there are at least two qubit blocks with the highest sum value, determining the target qubit block among the multiple qubit blocks with the highest sum value according to an edge-first strategy.
[0050] In one alternative embodiment, since there may be multiple qubit blocks with the highest sum value in the qubit block set, such as Figure 2 As shown, taking a quantum computing task using 4 qubits as an example, qubit block Q2, composed of qubits 19, 20, 25, and 26, and qubit block Q1, composed of qubits 30, 31, 36, and 37, are the qubit blocks with the highest sum values in the qubit block set, and their sum values are equal. In order to find a more suitable qubit block from qubit blocks Q1 and Q2, it is necessary to determine the target qubit block from qubit blocks Q1 and Q2 according to the edge-first strategy. The edge-first strategy is to detect the position of the multiple qubit blocks with the highest sum values on the topology diagram corresponding to the quantum chip, and take the qubit block at the edge position as the target qubit block. Through the edge-first strategy, qubit block Q1 can be found to be at the edge position, and qubit block Q1 is more suitable as the target qubit block. This ensures the connectivity of the remaining qubit blocks, so as to cope with the scenario of multiple qubits performing quantum computing tasks in the future, to provide better qubit planning for the execution of other quantum computing tasks, to facilitate the parallel execution of more quantum computing tasks, and to improve the execution efficiency of quantum computing tasks.
[0051] Optionally, before executing the quantum circuit formed by the qubits on the target qubit block, the method further includes: marking the occupancy status of each qubit on the target qubit block.
[0052] In one optional embodiment, in order to avoid conflicts in the use of qubits during subsequent qubit resource allocation, which would prevent the execution of quantum computing tasks in parallel, each qubit on the target qubit block is marked with an occupied state. The qubits to be allocated and used are marked as occupied, which is conducive to the parallel execution of more quantum computing tasks and improves the execution efficiency of quantum computing tasks.
[0053] Optionally, the method further includes: when there are at least two quantum computing tasks and the target qubit blocks used by each quantum computing task are different, executing multiple quantum computing tasks in parallel.
[0054] In one alternative embodiment, since different quantum computing tasks use different numbers of qubits, for a quantum chip composed of multiple qubits, when two or more quantum computing tasks use different target qubit blocks, the working areas of each qubit block do not interfere with each other. Therefore, different target qubit blocks can be executed in parallel on the target quantum chip, thereby achieving the effect of executing multiple quantum computing tasks in parallel, realizing parallel compilation of multiple quantum circuits, and effectively improving the overall quantum computing efficiency.
[0055] Optionally, the parallel execution of multiple quantum computing tasks includes: executing multiple quantum computing tasks in parallel when the distance between the target qubit blocks used by each quantum computing task on the topological structure diagram corresponding to the quantum chip is greater than a preset distance.
[0056] In one optional embodiment, since the crosstalk between two qubits that are close together is greater, it can affect the execution result of the quantum computing task, causing a significant deviation in the result. Therefore, to avoid the problem of significant crosstalk, it is necessary to limit the distance between the target qubit blocks used by multiple quantum computing tasks to be run in parallel. That is, when the distance between the positions of the target qubit blocks used by each quantum computing task on the topology diagram of the quantum chip is greater than a preset distance, multiple quantum computing tasks are executed in parallel; when the distance between the positions of the target qubit blocks used by each quantum computing task on the topology diagram of the quantum chip is less than the preset distance, the quantum computing tasks are executed sequentially according to the order of task reception, so as to ensure the execution effect of multiple quantum computing tasks. The preset distance can be derived and set based on the crosstalk value existing under the interaction of each qubit in the target quantum chip. The distance between the positions of the target qubit blocks on the topology diagram of the quantum chip can be the distance from the center point of one qubit block to the center point of another qubit block, or it can be the distance between the two nearest qubits between two qubit blocks, which is not limited here.
[0057] This application divides the qubits on the target quantum chip into blocks using a community detection-assisted partitioning algorithm, resulting in several qubit blocks. The target qubit block is then obtained through further screening. The community detection-assisted partitioning algorithm effectively avoids qubit blocks with poor quality, ensuring that each qubit in the target qubit block has high quality, thus improving the fidelity of quantum circuit computation and enhancing the performance of quantum computing tasks.
[0058] Reference Figure 3 This specification also provides a quantum circuit execution device, comprising:
[0059] Information acquisition module 201 is used to acquire the number of qubits used in the quantum computing task and the fidelity between connected qubits on the target quantum chip;
[0060] The qubit block partitioning module 202 is used to partition each qubit on the target quantum chip into blocks according to the community detection-assisted partitioning algorithm, the number of qubits, and the fidelity, to obtain several qubit blocks;
[0061] The target qubit block determination module 203 is used to calculate the sum of the fidelity between connected qubits on each qubit block, and to determine the target qubit block based on the state of each qubit on the target quantum chip and the sum.
[0062] The quantum circuit execution module 204 is used to execute the quantum computing task on the quantum circuit formed by the qubits in the target qubit block and obtain the execution result of the quantum computing task.
[0063] Optionally, the target qubit block determination module 203 includes:
[0064] The first screening unit is used to screen out the qubit blocks from a number of qubit blocks where there are no qubits in the occupied state, denoted as the qubit block set;
[0065] The second screening unit is used to determine the qubit block with the highest sum value in the set of qubit blocks, thereby obtaining the target qubit block.
[0066] Optionally, the second filtering unit includes:
[0067] A qubit block quantity determination subunit is used to determine the number of qubit blocks with the highest sum value in the qubit block set based on the sum value.
[0068] The target qubit block determination sub-unit is used to determine the target qubit block among the multiple qubit blocks with the highest sum value according to the edge priority strategy when there are at least two qubit blocks with the highest sum value.
[0069] Optionally, the target qubit block determining sub-unit includes:
[0070] The detection subunit is used to detect the positions of the multiple qubit blocks with the highest sum values on the topology diagram corresponding to the quantum chip, and to select the qubit blocks at the edge positions as the target qubit blocks.
[0071] Optionally, the device further includes:
[0072] The state marking module is used to mark the occupancy status of each qubit on the target qubit block.
[0073] Optionally, the device further includes a parallel execution module for executing multiple quantum computing tasks in parallel when there are at least two quantum computing tasks and each quantum computing task uses a different target qubit block.
[0074] Optionally, the parallel execution submodule includes:
[0075] When the distance between the target qubit blocks used by each quantum computing task on the topology diagram of the quantum chip is greater than a preset distance, multiple quantum computing tasks are executed in parallel.
[0076] Regarding the apparatus in the above embodiments, the process of performing each step has been described in detail in the embodiments of the method, and will not be elaborated here.
[0077] A quantum control system, characterized in that it performs quantum computing tasks using the quantum circuit execution method, or includes a quantum circuit execution device.
[0078] A quantum computer, and the quantum control system thereof.
[0079] A readable storage medium having a computer program stored thereon, which, when executed by a processor, enables the implementation of the methods described above.
[0080] Reference Figure 4 This is a schematic diagram of a computer-readable medium provided for embodiments of this specification.
[0081] accomplish Figure 1 The computer instructions of the method shown can be stored on one or more computer-readable media. A computer-readable medium can be a readable signal medium or a readable storage medium. A readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0082] The computer-readable storage medium may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution device, apparatus, or apparatus. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0083] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0084] In summary, this invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that in practice, general-purpose data processing devices such as microprocessors or digital signal processors (DSPs) can be used to implement some or all of the functions of some or all of the components according to the embodiments of the invention. The invention can also be implemented as a device or apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such programs implementing the invention can be stored on a computer-readable medium or can take the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0085] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the present invention is not inherently related to any specific computer, virtual device, or electronic device, and various general-purpose devices can also implement the present invention. The above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0086] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0087] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A quantum circuit execution method, characterized in that, include: To obtain the number of qubits used in the quantum computing task and the fidelity between connected qubits on the target quantum chip; Based on the community detection-assisted partitioning algorithm, the number of qubits, and the fidelity, the qubits on the target quantum chip are divided into blocks to obtain several qubit blocks; Calculate the sum of fidelity between connected qubits on each qubit block, and determine the target qubit block based on the state of each qubit on the target quantum chip and the sum; The corresponding quantum computing task is executed on the quantum circuit formed by the qubits in the target qubit block, and the result of the quantum computing task execution is obtained.
2. The method as described in claim 1, characterized in that, Determining the target qubit block based on the state of each qubit on the target quantum chip and the sum value includes: From a number of qubit blocks, select the qubit block containing any qubit in the occupied state, and denote it as the qubit block set; The target qubit block is obtained by identifying the qubit block with the highest sum value in the set of qubit blocks.
3. The method as described in claim 2, characterized in that, The step of determining the qubit block with the highest sum value in the set of qubit blocks to obtain the target qubit block includes: Based on the sum, determine the number of qubit blocks with the highest sum in the set of qubit blocks; When there are at least two qubit blocks with the highest sum, the target qubit block is determined from among the multiple qubit blocks with the highest sum according to the edge-first strategy.
4. The method as described in claim 3, characterized in that, The step of determining the target qubit block from the multiple qubit blocks with the highest sum value according to the edge-first strategy includes: The positions of the multiple qubit blocks with the highest sums on the topology diagram corresponding to the quantum chip are detected, and the qubit blocks at the edge positions are selected as target qubit blocks.
5. The method as described in claim 1, characterized in that, Before executing the quantum circuit formed by the qubits on the target qubit block, the method further includes: The occupancy status is marked for each qubit in the target qubit block.
6. The method as described in claim 1, characterized in that, The method further includes: When there are at least two quantum computing tasks and each quantum computing task uses a different target qubit block, multiple quantum computing tasks are executed in parallel.
7. The method as described in claim 6, characterized in that, The parallel execution of multiple quantum computing tasks includes: When the distance between the target qubit blocks used by each quantum computing task on the topology diagram of the quantum chip is greater than a preset distance, multiple quantum computing tasks are executed in parallel.
8. A quantum circuit execution device, characterized in that... ,include: The information acquisition module is used to acquire the number of qubits used in the quantum computing task and the fidelity between connected qubits on the target quantum chip; A qubit block partitioning module is used to partition each qubit on the target quantum chip into blocks according to the community detection-assisted partitioning algorithm, the number of qubits, and the fidelity, to obtain several qubit blocks; The target qubit block determination module is used to calculate the sum of fidelity between connected qubits on each qubit block, and to determine the target qubit block based on the state of each qubit on the target quantum chip and the sum. The quantum circuit execution module is used to execute the quantum computing task on the quantum circuit formed by the qubits in the target qubit block and obtain the execution result of the quantum computing task.
9. A quantum control system, characterized in that, The quantum computing task is executed using the quantum circuit execution method as described in any one of claims 1-7, or includes the quantum circuit execution device as described in claim 8.
10. A quantum computer, characterized in that, Including the quantum control system as described in claim 9.
11. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it can implement the quantum circuit execution method as described in any one of claims 1 to 7.