Quantum program parallel processing method and operating system for superconducting quantum computers

Optimizing quantum program mapping through community discovery algorithms and cross-program SWAP operations, combined with the task scheduler to select the optimal combination of concurrent quantum programs, solves the problems of low resource utilization and reduced reliability in the existing technology, and improves the throughput of quantum computers. and reliability.

CN115238899BActive Publication Date: 2024-10-29BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210465623.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2024-10-29
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

Existing quantum operating systems have problems with low resource utilization and reduced reliability in concurrent quantum program mapping and scheduling strategies, and lack of efficient quantum program scheduling strategies, resulting in the inability to effectively increase quantum computer throughput.

Method used

A community discovery algorithm is used for the initial division of qubits, a hierarchical tree is constructed to optimize the physical qubit allocation of quantum programs, and cross-program SWAP operations are introduced to reduce mapping conversion costs. At the same time, a task scheduler for concurrent quantum programs is designed to select the optimal concurrency. Quantum program composition to maximize execution reliability and throughput.

Benefits of technology

It improves the resource utilization and execution reliability of quantum computers, achieves a trade-off between throughput and reliability, avoids resource waste and mapping conversion overhead, and improves the overall performance of quantum computers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115238899B_ABST
    Figure CN115238899B_ABST
Patent Text Reader

Abstract

The present invention proposes a quantum program parallel processing method and operating system for superconducting quantum computers, including: a quantum bit partitioning strategy assisted by a community discovery algorithm; a mapping conversion strategy that introduces cross-program SWAP operations; and a task scheduler for selecting the optimal concurrent quantum program combination. The quantum operating system solves the problems of resource waste, high SWAP cost, low resource utilization, and mutual interference between concurrent quantum programs in related technologies, and improves the reliability of quantum program execution and the throughput of quantum computers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of quantum computing, in particular to a superconducting quantum operating system, and more particularly to a quantum program parallel processing method and operating system for a superconducting quantum computer. Background Art

[0002] Quantum computing has shown strong acceleration capabilities for specific computing tasks and can be used to accelerate the solution of difficult problems in classical computing, such as database search, machine learning, chemical reaction simulation, etc. Quantum computers are devices that implement quantum computing. Qubits are the basic computing units in quantum computers. Quantum gate operations are used to manipulate the state of qubits. Quantum programs composed of sequences of quantum gate operations can complete specific quantum computing tasks.

[0003] The technology stack of quantum computing can be abstracted into the following levels from bottom to top: underlying physical implementation technology, quantum error correction technology, quantum computer architecture, quantum operating system, high-level language, and quantum algorithm, which are introduced below.

[0004] Based on the underlying physical implementation technology of qubits, quantum computers can be divided into superconducting quantum computers, ion trap quantum computers, optical quantum computers, etc. Superconducting quantum computers are the most common type. Common superconducting quantum computers have transmon qubits based on Josephson junctions and quantum gate operations implemented using microwaves. The qubits of a superconducting quantum computer are arranged in an approximate grid shape on a two-dimensional plane, with connections only between two adjacent physical qubits. Quantum gate operations involving two qubits can only be performed on two adjacent qubits that are connected to each other. Figure 1 The physical qubit topology of IBM's superconducting quantum computer ibmq_melbourne is shown. Each circle in the figure represents a qubit, and the bidirectional arrows between the circles represent the connections between the qubits.

[0005] Quantum error correction technology was proposed to solve the problem of unreliable operations in quantum computers. The state of qubits in quantum computers is unstable, and the connections between qubits are fragile and susceptible to interference. Therefore, the following types of errors are likely to occur in quantum programs running on quantum computers: (1) Retention errors caused by short qubit state retention time. Retention errors mainly affect the depth of quantum programs that can be executed on quantum computers. The deeper the depth of the quantum program, the longer the execution time, and the lower the execution reliability. (2) Operational errors caused by error-prone quantum gate operations. Operational errors mainly affect the complexity of quantum programs that can be executed on quantum computers. The more operations a quantum program contains, the greater the probability of error. (3) Readout errors caused by measurement operations. After the execution of a quantum program, a measurement operation needs to be performed to obtain the program running results. The measurement operation is unreliable and may read out the wrong state. Quantum error correction coding can encode dozens of physical qubits into a fault-tolerant qubit, but its cost is too high to be implemented on today's quantum computers, which only have dozens to hundreds of qubits.

[0006] Quantum computer architecture involves quantum bits and quantum gate operations. A quantum bit is the basic computing unit in a quantum computer. The state of a single quantum bit can be represented as a linear combination of two quantum ground states |0> and |1>, namely: |ψ>=α|0>+β|1>. Among them, α and β are complex numbers and satisfy |α| 2 +|β| 2 =1. α and β are the probability amplitudes corresponding to the two quantum ground states |0> and |1> respectively. When the qubit state is measured by the readout operation, the probability that the measurement result is 0 is |α| 2 , the probability of being 1 is |β| 2 . Quantum gate operations include single-qubit gate operations involving only one logical qubit and multi-qubit gate operations involving multiple qubits. Gate operations such as X, Y, and Z belong to single-qubit gate operations, which can manipulate the state of a single qubit; the Control-NOT (CNOT) gate is a common two-qubit gate operation, which can flip the state of the target bit according to the state of the control bit. Any multi-qubit gate operation involving more than two logical qubits can be decomposed into a combination of single-qubit gate operations and two-qubit gate operations.

[0007] Quantum algorithms are used to solve specific problems, such as Grover's algorithm for solving search problems and Shor's algorithm for prime factorization of large integers. A quantum program is an instance of a specific quantum algorithm. High-level languages ​​are tools for describing quantum programs. Quantum programs consist of sequences of quantum gate operations, which can be represented by quantum circuits. Figure 2The figure shows the quantum circuit and the corresponding directed acyclic graph (DAG) after the Toffoli gate involving three logical qubits is decomposed into a sequence of single and double qubit gate operations. The three horizontal lines q0, q1, and q2 represent three logical qubits respectively. Each square on the horizontal line represents a single qubit gate operation. The vertical line connecting two horizontal lines represents a CNOT gate operation, where the logical qubit corresponding to the solid dot above represents the control qubit of the CNOT operation, and the vertical line connecting two horizontal lines represents a CNOT gate operation. The symbol represents the target qubit of the CNOT operation. In the DAG, each node corresponds to a quantum gate operation, and the lines between the nodes represent the sequential dependency of the execution of quantum gate operations.

[0008] The quantum operating system is located between the quantum computer architecture and the high-level language, and plays a connecting role. The quantum operating system can build a task queue for the quantum program to be executed, perform reasonable task scheduling, select a single quantum program or a combination of concurrent quantum programs for quantum program mapping, and execute it on the quantum computer. The quantum operating system involves many specific issues such as multi-qubit gate operation decomposition, pre / post optimization of quantum program mapping, quantum program mapping, quantum program debugging and assertion, concurrent quantum program mapping, and quantum program mapping task scheduling. Among them, "quantum program mapping" refers to the process of converting a quantum program written in a high-level language into a sequence of gate operations that can be directly executed on a quantum computer. It is generally assumed that the multi-qubit gate operations in the quantum program have been decomposed into a combination of single and double qubit gate operations, and no pre / post mapping optimization is required. Quantum program mapping only needs to consider inserting appropriate SWAP operations in the quantum circuit (a SWAP operation consists of three CNOT gate operations, which are used to exchange the mapping positions of two logical qubits) to meet the mapping position constraints of all CNOT operations. The mapping process follows the following constraints: (1) Each logical qubit in the quantum program needs to be mapped to a physical qubit in the quantum computer, and the physical qubit cannot be mapped to other logical qubits. (2) Quantum gate operations are performed sequentially according to the sequence of quantum gate operations. A quantum gate operation can only be performed if there is no unexecuted predecessor quantum gate operation on the logical qubit involved in the quantum gate operation. (3) A two-qubit gate operation can only be performed if the physical qubits to which the two logical qubits involved in the quantum gate operation are mapped are interconnected. When a two-qubit quantum gate operation cannot be performed, a SWAP operation can be inserted into the quantum circuit to change the mapping position of the logical qubit so that the logical qubit involved is located on two interconnected physical qubits. The general steps of mapping are: (1) Initial mapping, i.e., determining the initial mapping of each logical qubit to the physical qubit. (2) Mapping conversion, i.e., inserting a SWAP operation into the quantum circuit so that all CNOT operations can be performed.

[0009] At present, the academic and industrial circles have not yet formed a clear and systematic prototype of quantum operating system. IBM has released quantum computing cloud service. Users can access the cloud service through the interface to obtain the quantum computer qubit topology structure and the error rate calibration data of each device; they can submit quantum computing tasks and obtain the execution results. In the context of the gradual rise of quantum computing cloud services, the design of quantum operating system has also encountered new requirements and challenges. The existing technology has problems in the following aspects:

[0010] (1) The quantum program mapping strategy in the existing quantum operating system only supports mapping a single quantum program. The unallocated quantum bits will be idle, resulting in low resource utilization. The existing quantum program mapping strategies are mainly divided into two categories: one is the optimization method based on mathematical problem solvers, and the other is the heuristic method. However, they only consider how to map a single quantum program, and do not consider the resource allocation and mapping of concurrent quantum program combinations. The representative work of the optimization method based on mathematical problem solvers is OLSQ proposed by Bochen Tan et al. This work transforms the quantum program mapping problem into a Satisfiability Modulo Theories Optimization (SMT) problem and uses the Z3 SMT solver to solve it. The representative work of the heuristic method is SABRE proposed by Gushu Li et al. This work determines the initial mapping through the reverse traversal technique; by accurately modeling the quantum program mapping problem, it reduces the heuristic search space of SWAP, provides more efficient SWAP operations, and brings exponential acceleration to the quantum program mapping algorithm. Therefore, it is necessary to use a concurrent mechanism to simultaneously map multiple concurrent quantum programs to improve the resource utilization and throughput of quantum computers. However, the mapping of concurrent quantum programs also brings about a significant reduction in reliability. Due to insufficient robust resources, crosstalk between concurrent quantum programs, and additional mapping overhead caused by the limited heuristic search space, the execution reliability of concurrent quantum programs will be slightly lower than that of individual executions.

[0011] (2) There is no efficient quantum program scheduling strategy in the existing quantum operating system. With the rise of quantum computing cloud services, the number of access requests to cloud services is increasing. However, there is no efficient quantum program scheduling strategy, and the throughput of quantum computers cannot be effectively improved, which prolongs the service waiting time. Currently, there is no scheduling strategy for concurrent quantum programs that optimizes both throughput and reliability. In the prior art proposed by Poulami Das, a quantum bit region partitioning algorithm is introduced that can support the simultaneous mapping of two concurrent quantum programs. However, the combination of concurrent quantum programs is manually specified, and the optimal program combination cannot be selected according to the rules. This may cause waste of resources in quantum computers and result in higher mapping conversion overhead. There is still room for further improvement. Summary of the invention

[0012] The technical problem to be solved by the present invention is to design a quantum operating system for superconducting quantum computers, which introduces a concurrent quantum program mapping mechanism to improve the quantum computer throughput and resource utilization while ensuring the reliability of quantum program execution.

[0013] The existing technology can support the simultaneous mapping of two quantum programs, but there are the following problems: (1) The initial quantum bit partitioning strategy in the existing technology does not take into account the distribution of global robust resources, which may cause large-scale quantum bit collections to be split into smaller quantum bit collection fragments, which are insufficient to map any quantum program, resulting in resource waste. (2) This strategy maps and transforms each quantum program separately in sequence, and the quantum program mapped later can only use unoccupied physical quantum bits. This may lead to a reduction in the heuristic search space, resulting in higher mapping and transformation overhead, and requiring more SWAP operations. (3) The combination of concurrent quantum programs is artificially specified or randomly selected, which may result in low resource utilization and mutual interference between concurrent quantum programs.

[0014] In order to solve the problems existing in the above-mentioned prior art, the present invention proposes a quantum program parallel processing method for a superconducting quantum computer, which includes:

[0015] Step 1: obtaining multiple quantum programs to be executed concurrently, the quantum bit topology structure of the quantum computer, and error rate calibration data, hierarchically clustering the quantum bits of the quantum computer according to the tightness of the physical connection of the quantum bits in the quantum computer and the robustness of the resources, constructing a hierarchical tree, allocating a set of physical quantum bits to the quantum program according to the hierarchical tree, and mapping the logical quantum bits of each quantum program to the allocated set of physical quantum bits, thereby obtaining an initial mapping from logical quantum bits to physical quantum bits;

[0016] Step 2: According to the sequence relationship of the double quantum gate operations of the quantum program, a directed acyclic graph is constructed for each quantum program. Each node in the directed acyclic graph represents a double quantum bit gate operation in the quantum program. The nodes without predecessor nodes in the directed acyclic graph are selected as the first-level gate operation set. Based on the current mapping of logical quantum bits to physical quantum bits, the executable gate operations that meet the logical quantum bit mapping position constraints in the first-level gate operation set are found and removed to construct a candidate SWAP set to calculate the heuristic cost value of each SWAP operation. The SWAP operation with the smallest heuristic cost value is selected and inserted into the quantum program. The current mapping is mapped and transformed to obtain a final quantum circuit corresponding to each quantum program.

[0017] Step 3: The quantum computer executes the final quantum circuit to obtain execution results corresponding to each quantum program.

[0018] The quantum program parallel processing method for superconducting quantum computers, wherein step 3 comprises:

[0019] Step 31, when there is a quantum program that has not been executed in the quantum program scheduling task queue to be executed, construct a current task set as an empty list, and add the first quantum program in the quantum program scheduling task queue to the current task set;

[0020] Step 32: from the quantum program scheduling task queue, select multiple quantum programs other than the first quantum program as candidate concurrent quantum programs according to the queue order, and sort the candidate concurrent quantum programs from large to small according to the matching degree value between each candidate concurrent quantum program and the first quantum program;

[0021] Step 33, check in turn whether the reliability loss caused by placing the tasks of the candidate concurrent quantum program in the current task set exceeds the threshold; if the reliability loss does not exceed the threshold and the number of elements in the current task set is less than the specified maximum number of concurrent quantum programs, then retain the candidate quantum program in the current task set, otherwise remove it from the current task set;

[0022] Step 34: submit the tasks in the current task set to the quantum computer for execution, and remove the tasks in the current task set from the task queue of the quantum program to be executed.

[0023] In the quantum program parallel processing method for superconducting quantum computers, the process of constructing a hierarchical tree in step 1 specifically includes:

[0024] In the hierarchical tree node list, a leaf node in the hierarchical tree is constructed for each qubit, and the node stores the number of the corresponding qubit. Each node in the hierarchical tree node list represents a community. Two nodes in the hierarchical tree node list that make the reward function value the largest are selected for merging. The merging process is: construct a new node, the qubits contained in it are the union of the qubits contained in the two nodes to be merged; set the nodes to be merged as the left and right child nodes of the new node respectively; remove the nodes to be merged from the hierarchical tree node list and add the new node to the hierarchical tree node list;

[0025] The reward function is the benefit of merging two communities, and is expressed as follows:

[0026] F=Q merged -Q origin +ωEV

[0027] Among them, Q represents the modularity of a community division scheme, Q = Σ i (e ii -a i 2 ), where e ii represents the proportion of qubit connections in community i to all qubit connections in the quantum computer in this partition, a i represents the ratio of all qubit connections involving nodes in community i to all qubit connections in the quantum computer, Q merged and Q origin Represent the modularity of the original division and the division after merging the two communities, E represents the average reliability of the CNOT operation on the qubit connection between the two communities to be merged, V represents the average reliability of the measurement operation on the qubit connecting the two communities to be merged, and ω is a weight parameter;

[0028] Repeat the merging process until the final hierarchical tree node list contains only one node, and the hierarchical tree construction is completed.

[0029] The quantum program parallel processing method for superconducting quantum computers, wherein the heuristic cost function is:

[0030]

[0031] Among them, SWAP j refers to the jth SWAP operation in the candidate SWAP set, F i Represents the i-th quantum program P i The first-level gate operation set of all quantum programs, F represents the first-level gate operation set of all quantum programs, and g represents a quantum gate operation in the first-level gate operation set; H(SWAP j ) indicates that a specific SWAP operation is performedj The nearest neighbor cost after is calculated as the sum of the cost in the first-level gate operation set and the cost in the extended gate operation set of the quantum program;

[0032] The extended gate operation set refers to a set of n two-qubit quantum gate operations selected in the quantum program according to the logical execution order of quantum gate operations, excluding the first-level gate operations. The default value of n is the number of logical qubits contained in the quantum program. The cost of each gate operation set is calculated as the average SWAP path length of all CNOT operations contained in the set; the SWAP path length of a CNOT operation is the shortest path length between the qubits to which the two logical qubits involved in the CNOT operation are mapped in the undirected graph formed by the topological structure of the quantum computer;

[0033] gain(g) is the gain brought by the cross-program SWAP operation for mapping conversion compared with the previous mapping conversion strategy for the CNOT gate operation g:

[0034] gain(g)=D[σ(g.q1)][σ(g.q2)]-D i '[σ(g.q1)][σ(g.q2)]

[0035] Where D represents the shortest path matrix of quantum bits in the quantum computer, and each element in the matrix represents the shortest path length between any two physical quantum bits on the quantum computer; for each quantum program P i , define D i ' is the unoccupied physical qubit and P i The shortest path matrix between the physical qubits mapped to; g.q1 and g.q2 represent the two logical qubits involved in the CNOT gate operation g, and the physical qubit mapped to the logical qubit q is defined as σ(q); I(SWAP j ,g) indicates the indicator function, indicating SWAP j Is the operation on the shortest SWAP path of the CNOT gate operation g? j When on the shortest path, the indicator function I(SWAP j ,g)=1, otherwise the indicator function I(SWAP j ,g)=0.

[0036] The present invention also proposes a quantum operating system for a superconducting quantum computer, which includes:

[0037] An initial mapping module is used to obtain multiple quantum programs to be executed concurrently, the quantum bit topology structure of the quantum computer, and error rate calibration data, so as to hierarchically cluster the quantum bits of the quantum computer according to the tightness of the physical connection of the quantum bits in the quantum computer and the robustness of the resources, and construct a hierarchical tree. According to the hierarchical tree, a set of physical quantum bits is allocated to the quantum program, and the logical quantum bits of each quantum program are mapped to the allocated set of physical quantum bits to obtain an initial mapping from logical quantum bits to physical quantum bits.

[0038] A mapping conversion module is used to construct a directed acyclic graph for each quantum program according to the sequence relationship of the dual quantum gate operations of the quantum program. Each node in the directed acyclic graph represents a dual quantum bit gate operation in the quantum program. The nodes without predecessor nodes in the directed acyclic graph are selected as the first-level gate operation set. Based on the current mapping of logical quantum bits to physical quantum bits, the executable gate operations that meet the logical quantum bit mapping position constraints in the first-level gate operation set are found and removed to construct a candidate SWAP set to calculate the heuristic cost value of each SWAP operation. The SWAP operation with the smallest heuristic cost value is selected and inserted into the quantum program, and the current mapping is mapped and converted to obtain a final quantum circuit corresponding to each quantum program.

[0039] The execution module is used to enable the quantum computer to execute the final quantum circuit to obtain the execution results corresponding to each quantum program.

[0040] The quantum operating system for superconducting quantum computers, wherein the execution module is used to, when there is a quantum program in the quantum program scheduling task queue to be executed that has not been executed, construct a current task set as an empty list, and add the first quantum program in the quantum program scheduling task queue to the current task set;

[0041] From the quantum program scheduling task queue, multiple quantum programs other than the first quantum program are selected as candidate concurrent quantum programs according to the queue order, and the candidate concurrent quantum programs are sorted from large to small according to the matching degree value between the candidate concurrent quantum programs and the first quantum program;

[0042] Check in sequence whether the reliability loss caused by placing the tasks of the candidate concurrent quantum program in the current task set exceeds the threshold. If the reliability loss does not exceed the threshold and the number of elements in the current task set is less than the maximum number of concurrent quantum programs specified, then keep the candidate quantum program in the current task set, otherwise remove it from the current task set;

[0043] Submit the tasks in the current task set to the quantum computer for execution, and remove the tasks in the current task set from the task queue of the quantum program to be executed.

[0044] In the quantum operating system for superconducting quantum computers, the process of constructing a hierarchical tree in the initial mapping module specifically includes:

[0045] In the hierarchical tree node list, a leaf node in the hierarchical tree is constructed for each qubit, and the node stores the number of the corresponding qubit. Each node in the hierarchical tree node list represents a community. Two nodes in the hierarchical tree node list that make the reward function value the largest are selected for merging. The merging process is: construct a new node, the qubits contained in it are the union of the qubits contained in the two nodes to be merged; set the nodes to be merged as the left and right child nodes of the new node respectively; remove the nodes to be merged from the hierarchical tree node list and add the new node to the hierarchical tree node list;

[0046] The reward function is the benefit of merging two communities, and is expressed as follows:

[0047] F=Q merged -Q origin +ωEV

[0048] Among them, Q represents the modularity of a community division scheme, Q = Σ i (e ii -a i 2 ), where e ii represents the proportion of qubit connections in community i to all qubit connections in the quantum computer in this partition, a i represents the ratio of all qubit connections involving nodes in community i to all qubit connections in the quantum computer, Q merged and Q origin Represent the modularity of the original division and the division after merging the two communities, E represents the average reliability of the CNOT operation on the qubit connection between the two communities to be merged, V represents the average reliability of the measurement operation on the qubit connecting the two communities to be merged, and ω is a weight parameter;

[0049] Repeat the merging process until the final hierarchical tree node list contains only one node, and the hierarchical tree construction is completed.

[0050] The quantum operating system for superconducting quantum computers, wherein the heuristic cost function is:

[0051]

[0052] Among them, SWAP j refers to the jth SWAP operation in the candidate SWAP set, F i Represents the i-th quantum program P iThe first-level gate operation set of all quantum programs, F represents the first-level gate operation set of all quantum programs, and g represents a quantum gate operation in the first-level gate operation set; H(SWAP j ) indicates that a specific SWAP operation is performed j The nearest neighbor cost after is the sum of the cost in the first-level gate operation set and the cost in the extended gate operation set of the quantum program;

[0053] The extended gate operation set refers to a set of n two-qubit quantum gate operations selected in the quantum program according to the logical execution order of quantum gate operations, excluding the first-level gate operations. The default value of n is the number of logical qubits contained in the quantum program. The cost of each gate operation set is calculated as the average SWAP path length of all CNOT operations contained in the set; the SWAP path length of a CNOT operation is the shortest path length between the qubits to which the two logical qubits involved in the CNOT operation are mapped in the undirected graph formed by the topological structure of the quantum computer;

[0054] gain(g) is the gain brought by the cross-program SWAP operation for mapping conversion compared with the previous mapping conversion strategy for the CNOT gate operation g:

[0055] gain(g)=D[σ(g.q1)][σ(g.q2)]-D i '[σ(g.q1)][σ(g.q2)]

[0056] Where D represents the shortest path matrix of quantum bits in the quantum computer, and each element in the matrix represents the shortest path length between any two physical quantum bits on the quantum computer; for each quantum program P i , define D i ' is the unoccupied physical qubit and P i The shortest path matrix between the physical qubits mapped to; g.q1 and g.q2 represent the two logical qubits involved in the CNOT gate operation g, and the physical qubit mapped to the logical qubit q is defined as σ(q); I(SWAP j ,g) indicates the indicator function, indicating SWAP j Is the operation on the shortest SWAP path of the CNOT gate operation g? j When on the shortest path, the indicator function I(SWAP j ,g)=1, otherwise the indicator function I(SWAP j ,g)=0.

[0057] The present invention also proposes a storage medium for storing a program for executing any one of the quantum program parallel processing methods for superconducting quantum computers.

[0058] The present invention also proposes a client for use in any of the above-mentioned quantum operating systems for superconducting quantum computers.

[0059] It can be seen from the above scheme that the advantages of the present invention are:

[0060] The present invention designs a new quantum operating system for the concurrent quantum program mapping problem, and proposes improvements in the quantum program mapping strategy (including the initial mapping strategy and the mapping conversion strategy) and the quantum program task scheduling strategy. In the quantum program mapping strategy, a community discovery algorithm is used to assist the initial division of quantum bits between concurrent quantum programs, which can reduce the mutual interference between the two programs and reduce the subsequent mapping costs; robust resources can be fully utilized and fairly distributed among multiple concurrent quantum programs; the problem of low resource utilization in previous work can be avoided; a mapping conversion strategy that introduces cross-program SWAP operations is adopted to reduce the cost of quantum program mapping conversion, reduce the required SWAP operations, and indirectly improve the execution reliability of quantum programs. In the concurrent quantum program task scheduler, the flux and reliability of the quantum computer are maximized, and a trade-off between flux and reliability is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 This is the physical qubit topology diagram of IBM's superconducting quantum computer ibmq_melbourne;

[0062] Figure 2 The quantum circuit and the corresponding directed acyclic graph after the Toffoli gate of the logical qubit is decomposed into a sequence of single and double qubit gate operations;

[0063] Figure 3 Schematic diagram of the relationship between the excitation function parameter ω and the number of redundant qubits in an embodiment of the present invention;

[0064] Figure 4 A diagram of quantum bit partitioning and mapping strategy for one embodiment of the present invention;

[0065] Figure 5 This is a mapping conversion strategy diagram of an embodiment of the present invention. DETAILED DESCRIPTION

[0066] When the inventors were conducting research on quantum operating systems that support concurrent quantum program mapping, they found that the resource utilization and program execution reliability in the prior art need to be further improved, and randomly selected concurrent quantum program combinations may lead to performance degradation. The low resource utilization is caused by the imperfect initial quantum bit division method in the prior art; the low program execution reliability is caused by the high cost of the imperfect mapping conversion strategy; the concurrent quantum program combination can only be randomly selected because there is no perfect concurrent quantum program scheduling strategy yet. The inventors found that the problem of low resource utilization can be solved by using a community discovery algorithm to perform initial quantum bit division; improving program execution reliability can be solved by introducing cross-program SWAP operations to reduce mapping conversion costs; solving the problem of improper selection of concurrent quantum program combinations can be solved by designing a task scheduler for concurrent quantum programs.

[0067] The present invention designs a quantum operating system for superconducting quantum computers, which includes a new quantum program mapping strategy and quantum program scheduler designed for concurrent quantum programs. The new quantum program mapping strategy is improved based on the previous single quantum program mapping strategy, taking into account the concurrent quantum program mapping problem; a new quantum program scheduler is designed to select the optimal concurrent quantum program combination.

[0068] The present invention provides a quantum operating system for superconducting quantum computers, and relates to a concurrent quantum program mapping method and a task scheduler for concurrent quantum programs. The concurrent quantum program mapping method adopts a community discovery algorithm to assist in quantum bit partitioning, and determines the set of physical quantum bits occupied by the initial mapping of each quantum program according to the requirements of the quantum program for resource robustness and the distribution of robust resources in the quantum computer, thereby improving execution reliability and avoiding resource waste; introducing cross-program SWAP operations, and performing mapping conversion on all quantum programs at the same time, thereby reducing the number of SWAP operations required to be inserted for mapping conversion. The quantum program task scheduler selects the optimal concurrent quantum program combination based on the estimated reliability, maximizes the execution reliability of the concurrent quantum program, improves the flux and resource utilization of the quantum computer, and achieves a trade-off between flux and resource utilization.

[0069] To achieve the above technical effects, the present invention includes the following key technical points:

[0070] Key point 1: The quantum bit partitioning strategy assisted by the community discovery algorithm. It includes: (1) hierarchical clustering of quantum bits based on the tightness of the physical connection of quantum bits and the robustness of their resources, and the construction of a hierarchical tree. (2) The method for determining the value of ω in the reward function used in the hierarchical tree clustering. (3) Dividing the quantum bit set for concurrent quantum programs based on the hierarchical tree. Technical effect: The use of the community discovery algorithm can preferentially merge robust and tightly connected quantum bits into communities, which helps to find a robust resource set in a quantum computer, achieve fair division of resources in a quantum computer, and improve the execution reliability of concurrent quantum programs.

[0071] Key point 2, introduces the mapping conversion strategy of cross-program SWAP operations. It includes: (1) constructing an equivalent directed acyclic graph (DAG) for each quantum program that can reflect the order of quantum gate operations. (2) Determine the heuristic search space of SWAP operations as: SWAP operations related only to logical qubits involved in key gate operations. (3) Heuristic cost function design. Technical effect: It can reduce the number of SWAPs required for the mapping conversion process of concurrent quantum programs and complete the mapping conversion at a lower cost. It reduces the complexity of the quantum program after mapping, reduces the number of gate operations that need to be executed, and indirectly improves the execution reliability of the quantum program.

[0072] Key point 3, task scheduler for concurrent quantum programs. Includes: (1) current task set construction. (2) selection of candidate concurrent quantum program sets and sorting by matching value with the first quantum program. (3) selection of concurrent quantum program combinations based on estimated reliability thresholds. Technical effect: the optimal concurrent quantum program combination can be selected to maximize the quantum computer throughput and reliability, achieving a trade-off between throughput and reliability.

[0073] In order to make the above features and effects of the present invention more clearly understood, embodiments are given below and described in detail with reference to the accompanying drawings.

[0074] 1. Operating environment. The present invention is based on the open source software development toolkit Qiskit to implement a quantum program mapping framework. Select a concurrent quantum program locally, use the interface provided by Qiskit to obtain information such as the quantum bit topology structure and error rate calibration data of the IBM superconducting quantum computer, use the locally constructed quantum program mapping framework to map, submit the mapped quantum program to the IBM quantum computing cloud service through Qiskit for execution, and use Qiskit to obtain the quantum program execution result after the execution is completed.

[0075] 2. Specific steps.

[0076] Step 1, using the community discovery algorithm to implement quantum bit partitioning, this step includes:

[0077] Step 11, obtain the quantum computer qubit topology structure and the error rate calibration data of each component of the quantum computer. According to one embodiment of the present invention, an IBM quantum computer is specified by name using the interface provided by the software development kit Qiskit provided by IBM to obtain its configuration information. The configuration information records the quantum computer's qubit physical topology structure and the error rate calibration data of each component. The error rate calibration data specifically includes: the error rate of performing a single qubit gate operation on each qubit, the error rate of performing a CNOT gate operation on a link between two qubits, and the error rate of performing a measurement operation on each qubit.

[0078] Step 12, hierarchical clustering of qubits is performed to construct a hierarchical tree. First, in the hierarchical tree node list, a leaf node in the hierarchical tree is constructed for each qubit, and the node stores the number of the corresponding qubit. Each node in the hierarchical tree node list represents a community. Thereafter, two nodes in the hierarchical tree node list that can maximize the reward function value are selected for merging. The merging process is: construct a new node, in which the qubits contained in it are the union of the qubits contained in the two nodes to be merged; set the nodes to be merged as the left and right child nodes of the new node respectively; remove the nodes to be merged from the hierarchical tree node list and add the new node to the hierarchical tree node list. The reward function is defined as the benefit brought by merging two communities, which can help prioritize the merging of tightly connected and robust qubit sets. Robustness refers to the error rate of performing quantum gate operations on the qubit and the connection between qubits containing the qubit. The lower the error rate, the more robust the qubit. The reward function is expressed as follows:

[0079] F=Q merged -Q origin +ωEV

[0080] Where Q represents the modularity of a community partitioning scheme (i.e., Q = Σi(eii-ai2), where e ii represents the ratio of the number of edges in the network that are linked from nodes in community i to nodes in community i, that is, the ratio of the number of edges that connect nodes within community i to the total number of edges, Σ i For each community i, (e ii -a i 2 ) performs a sum operation, a i It represents the ratio of all qubit connections involving nodes in community i to all qubit connections in the quantum computer. The higher the value of Q, the more appropriate a community division scheme is. merged and Q originRepresent the modularity of the original partition and the partition after merging the two communities. E represents the average reliability of the CNOT operation on the qubit connection between the two communities to be merged (reliability is 1-operation error rate), and V represents the average reliability of the measurement operation on the qubit connecting the two communities to be merged. Repeat the merging process until the final hierarchical tree node list contains only one node, and the hierarchical tree is constructed. The hierarchical tree has the following characteristics: each leaf node in the hierarchical tree contains a qubit in the quantum computer; the qubit contained in each intermediate node in the hierarchical tree is the union of its two child nodes; the qubit contained in each node in the hierarchical tree is a set of qubits that can be used for the initial mapping of the quantum program; during the merging process, qubit sets that are tightly connected and robust are preferentially merged. ω is a weight parameter. For a specific quantum computer, the weight relationship between the physical topology and the error rate can be adjusted by changing the value of ω. The value of ω is selected using the elbow principle. The maximum number of redundant qubits of a node in the hierarchical tree is defined as: the difference between the number of qubits contained in the node and the maximum number of qubits contained in its left and right child nodes minus 1. The value of ω is changed between 0 and 2.5 with a step size of 0.05. Under each value of ω, a hierarchical tree is constructed and the average number of redundant qubits in the hierarchical tree is counted to obtain the change curve of the average number of redundant qubits and the value of ω. According to the elbow principle, the elbow solution is selected as the value of ω.

[0081] Figure 3 The figure shows a selection strategy of the reward function parameter ω in step 12 based on the elbow principle according to an embodiment of the present invention. The present invention collects error rate calibration data of the quantum computer ibmq_melbourne for 21 consecutive days. For each day's error rate calibration data, the value of ω is changed from 0 to 2.5 in steps of 0.05, a hierarchical tree is constructed, and the average number of redundant qubits is counted. Figure 3 The statistical results are shown in Figure 1, where darker points indicate that more results overlap on the node. According to the elbow principle, the value of ω at the elbow point on the average curve is taken as the value of ω for the quantum computer ibmq_melbourne, which is 0.95. This ω value is only applicable to the quantum computer ibmq_melbourne. For other quantum computers, the value of ω needs to be selected by re-experimenting according to step 12.

[0082] Step 13, divide the qubit set for the concurrent quantum program according to the hierarchical tree. Define the CNOT density of a quantum program as the ratio of the number of CNOT gates contained in the quantum program to the number of logical qubits of the quantum program. Divide the qubits for the concurrent quantum program in descending order of the CNOT density of the concurrent quantum program. Among them, the CNOT density is the ratio of the number of CNOT gate operations contained in the quantum program to the number of qubits contained in the quantum program, that is:

[0083] density(P)=P.n_CNOT / P.n_qubits

[0084] The process of qubit partitioning for a quantum program is as follows: construct a candidate community set for the quantum program; search the hierarchical tree from bottom to top starting from each leaf node of the hierarchical tree; if a node is found that contains enough qubits to map the quantum program, stop searching and add it to the candidate community set; when all leaf nodes have been searched, select the community with the lowest average CNOT operation error rate from the candidate community set and assign it to the quantum program. The average CNOT operation error rate of a community is calculated as the arithmetic mean of the error rates of CNOT operations performed on the qubit connections contained in the community. After the allocation, the qubits contained in the node are removed from other nodes in the hierarchical tree for subsequent allocation. To ensure that the qubits allocated to a qubit program are continuous, it is necessary to check the connectivity of the sibling nodes of the allocated node with other nodes in the hierarchical tree. If the sibling nodes of the allocated node do not have paths to other nodes in the hierarchical tree, it means that after removing the allocated node, the qubits in the quantum computer are divided into two independent parts. The quantum bits contained in the sibling node need to be removed from its ancestor node, and the pointer from the sibling node to its ancestor node needs to be removed, so that the node cannot be traversed to its ancestor node when traversing the hierarchical tree from bottom to top.

[0085] Step 14: Map the logical qubits of each program to the assigned qubit set. The qubit mapping is performed using the Greatest Weighted Edge First strategy implemented in the Qiskit software development kit.

[0086] Figure 4 The quantum bit partitioning and mapping strategy according to an embodiment of the present invention is shown. First, the mapping strategy uses the Qiskit software development toolkit to obtain the quantum bit topology structure and component error rate data of a specific quantum computer from the interface provided by IBM. Subsequently, the mapping strategy hierarchically clusters the quantum bits based on this information and constructs a hierarchical tree. After the hierarchical tree is constructed, the hierarchical tree is divided according to the concurrent quantum program. Finally, the strategy provided by Qiskit is used to map the logical quantum bits in the program to the allocated physical quantum bits.

[0087] Step 2, introducing the mapping transformation of the cross-program SWAP operation, includes:

[0088] Step 21, construct a directed acyclic graph (DAG) containing only its two-qubit gate operations for each quantum program. Because single-qubit gate operations can always be executed and are not constrained by the logical qubit mapping position, there is no need to introduce SWAP, so only two-qubit gate operations are considered in the DAG. A node in the DAG represents a two-qubit gate operation in the quantum program. The DAG can reflect the dependency of the execution order of quantum gate operations in each quantum program. In the DAG, if the previous node points to the next node, it means that the two quantum gate operations involve the same logical qubit and have a dependency on the execution order. In the DAG, the first-level gate operation set refers to the set of nodes without predecessor nodes, which are the quantum gate operations that can be logically executed at present. The first-level gate operation set corresponds to the first-level gate operations in the quantum circuit.

[0089] Step 22, determine the heuristic search space for SWAP operations. If there are executable gate operations that satisfy the logical qubit mapping position constraints in the first-level gate operation set, remove them from the DAG and update the first-level gate operation set. When all CNOT operations in the first-level gate operation set cannot be executed, SWAP needs to be inserted. The candidate SWAP set (heuristic search space) is determined as: the SWAP operations between the logical qubits involved in the key gate operations and other logical qubits that are interconnected at their mapping positions. The key gate operation refers to the set of subsequent gate operations on the second layer of the quantum circuit in the first-level gate operation set when only the two-qubit gate operation is considered. Prioritizing key gate operations can help quickly update the first-level gate operation set, provide more efficient SWAP operations, and reduce the depth of the quantum circuit after mapping.

[0090] Step 23, according to the heuristic cost function, select the optimal SWAP operation from the candidate SWAP set and insert it into the quantum circuit. The heuristic cost function is designed as:

[0091]

[0092] Among them, SWAP j refers to the jth SWAP operation in the candidate SWAP set, F i Denotes the i-th quantum program P i The first-level gate operation set of H(SWAP) is the first-level gate operation set of all quantum programs, and g represents a quantum gate operation in the first-level gate operation set. j ) indicates that SWAP is executed jThe nearest neighbor cost (NNC) after the calculation is used to estimate the SWAP cost consumed by the subsequent mapping conversion. The calculation method is: the sum of the cost in the first-level gate operation set of the quantum program and the cost in the extended gate operation set. The extended gate operation set refers to the set of n two-qubit quantum gate operations selected in the quantum program according to the logical execution order of the quantum gate operation, excluding the first-level gate operation. The default value of n is the number of logical qubits contained in the quantum program. The cost of each gate operation set is calculated as the average SWAP path length of all CNOT operations contained in the set. The SWAP path length of one CNOT operation is: in the undirected graph formed by the topological structure of the quantum computer, the shortest path length between the qubits to which the two logical qubits involved in the CNOT operation are mapped. gain(g) is the benefit brought by the use of cross-program SWAP operations for mapping conversion compared with the previous mapping conversion strategy for CNOT gate operation g. The calculation method is:

[0093] gain(g)=D[σ(g.q1)][σ(g.q2)]-D i '[σ(g.q1)][σ(g.q2)]

[0094] Where D represents the shortest path matrix of qubits in a quantum computer, and each element in the matrix represents the shortest path length between any two physical qubits on a quantum computer. i , define D i ' is the unoccupied physical qubit and P i The shortest path matrix between the physical qubits mapped to. g.q1 and g.q2 represent the two logical qubits involved in the CNOT gate operation g, and the physical qubit mapped to the logical qubit q is defined as σ(q). And I(SWAP j ,g) indicates the indicator function, indicating SWAP j Is it on the shortest SWAP path of CNOT gate operation g? j When on the shortest path, the indicator function I(SWAP j ,g)=1, otherwise the indicator function I(SWAP j ,g)=0. According to the heuristic function, the SWAP operation with the smallest heuristic cost function is selected and inserted into the quantum circuit. At this time, the mapping relationship of the quantum bit changes, and steps 22 and 23 are re-executed until the quantum program mapping conversion is completed.

[0095] Figure 5The mapping conversion strategy according to an embodiment of the present invention is shown in three parts. The first part shows the quantum program P1. The quantum circuit corresponding to the quantum program P1 can be divided into 4 layers (i.e., l1-l4), and the gate operations in the same layer can be executed simultaneously. l1 is the first-layer gate operation set of the quantum program (denoted as F), which represents the set of nodes without predecessor nodes in the DAG of P1. The key gate operation CG represents the set of gate operations in F that have successor nodes on the second layer (l2). For example, in F, g1 has a successor node g3 in l2, while g2 has no successor. Therefore, g1 belongs to the key gate operation, but g2 does not. If the key gate operation g1 is executed and removed from the DAG, g3 can be executed and the first-layer gate operation F can also be updated. In contrast, prioritizing g2 will not help update the first-layer gate operation F. The second part shows the key gate operations in DAG1 corresponding to the quantum program P1 and DAG2 corresponding to another quantum program, which are g1 and g6 respectively. The third part shows the SWAP operation involving logical qubits in the key gate operation. The key gate operation g1 involves two logical qubits q a and q b ; The key gate operation g6 involves two logical qubits q c and q d The figure shows the mapping positions of the logical qubits involved in the key gate operations. The SWAP operations between these logical qubits and the logical qubits that are interconnected at the mapping positions are added to the candidate SWAP set. Finally, the optimal SWAP is selected through the heuristic cost function and inserted into the quantum program.

[0096] Step 3, task scheduling for concurrent quantum programs, includes:

[0097] Step 31, construct the current task set. When there are still quantum programs that have not been executed in the quantum program scheduling task queue to be executed, the current task set is constructed as an empty list. The first quantum program in the task queue is added to the current task set. Among them, a quantum program scheduling task queue is set in the quantum operating system. When the quantum operating system receives quantum computing requests from the cloud service, it will store these requests in the queue.

[0098] Step 32, select a set of candidate concurrent quantum programs and sort them according to the matching value with the first quantum program. Construct a set of candidate concurrent quantum programs as an empty list, and set the maximum length of the candidate concurrent quantum program set to N (the default value is 10). From the queue of quantum program scheduling tasks to be executed, select N quantum programs other than the first quantum program in the queue order. The selected quantum program must meet the following conditions: the number of quantum bits contained in the selected quantum program should be less than the difference between the number of quantum bits in the quantum computer and the number of quantum bits contained in the first quantum program. Sort the quantum program from large to small according to the matching value with the first task. After sorting, the quantum program with the higher order is more likely to be selected to be executed concurrently with the first program.

[0099] Program P i The matching degree with the first program P0 is calculated as follows, and the higher the value, the higher the matching degree between the two programs:

[0100]

[0101] Among them, S(x) represents the Sigmoid function, that is The value range of x in [0, +∞] can be mapped to [0.5, 1]. That is, when the difference between the depths of the two quantum programs is smaller, the function value is closer to 0.5, that is, the function value is doubled; when the difference between the depths of the two quantum programs is larger, the function value is closer to 1, that is, the function value remains unchanged. i .n_qubits refers to the program P i The number of qubits involved, quantum programs with fewer qubits take up fewer resources and can help protect reliability under conditions where robust resources are limited.

[0102] Step 33, check in turn whether the estimated reliability loss caused by placing the tasks in the candidate concurrent quantum program set in the current task set exceeds the threshold. If the estimated reliability loss does not exceed the threshold and the number of elements in the current task set is less than the preset maximum number of concurrent quantum programs, the quantum program can be retained in the current task set, otherwise it will be removed from the current task set. The estimated reliability (Estimated Probability of a Successful Trial, EPST) is calculated as follows:

[0103] EPST=r 2q |CNOTS| r 1q |1q gates| r ro |qubits|

[0104] where r 2q 、r 1qand r ro Represent the average reliability of CNOT, single-qubit gate operation and readout operation on the assigned physical qubits, respectively. |CNOTs|, |1q gates| and |qubits| represent the number of CNOT gates, single-qubit gates and logical qubits of the quantum program, respectively. A higher EPST indicates that the quantum program is mapped to an area with more robust resources and that the execution fidelity of the program is higher during actual execution. When calculating the estimated reliability loss, Sep_EPST and Co_EPST need to be calculated separately for each quantum program. Sep_EPST refers to the maximum EPST that can be achieved when a quantum program is mapped alone. Sep_EPST can be obtained by executing step 13 to perform quantum bit division on a quantum computer for a single quantum program. Co_EPST represents the EPST when the quantum program is mapped concurrently with other quantum programs. Step 13 can be executed to perform quantum bit division for the combination of concurrent quantum programs and obtain Co_EPST. EPST loss is calculated as follows:

[0105] EPST_violation=1-(Co_EPST / Sep_EPST)

[0106] Step 34, submit the tasks in the current task set to the quantum computer for execution, and remove these tasks from the queue of quantum program scheduling tasks to be executed. When the queue of quantum program scheduling tasks to be executed is not empty, execution starts again from step 31.

[0107] The following is a system embodiment corresponding to the above method embodiment. This embodiment can be implemented in conjunction with the above embodiment. The relevant technical details mentioned in the above embodiment are still valid in this embodiment. In order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the above embodiment.

[0108] The present invention also proposes a quantum operating system for a superconducting quantum computer, which includes:

[0109] An initial mapping module is used to obtain multiple quantum programs to be executed concurrently, the quantum bit topology structure of the quantum computer, and error rate calibration data, so as to hierarchically cluster the quantum bits of the quantum computer according to the tightness of the physical connection of the quantum bits in the quantum computer and the robustness of the resources, and construct a hierarchical tree. According to the hierarchical tree, a set of physical quantum bits is allocated to the quantum program, and the logical quantum bits of each quantum program are mapped to the allocated set of physical quantum bits to obtain an initial mapping from logical quantum bits to physical quantum bits.

[0110] A mapping conversion module is used to construct a directed acyclic graph for each quantum program according to the sequence relationship of the dual quantum gate operations of the quantum program, wherein each node in the directed acyclic graph represents a dual quantum bit gate operation in the quantum program, and select nodes without predecessor nodes in the directed acyclic graph as the first-level gate operation set, and based on the current mapping of logical quantum bits to physical quantum bits, find and remove executable gate operations in the first-level gate operation set that meet the logical quantum bit mapping position constraints, and construct a candidate SWAP set to calculate the heuristic cost value of each SWAP operation, select the SWAP operation with the smallest heuristic cost value to insert into the quantum program, perform mapping conversion on the current mapping, and obtain a final quantum circuit corresponding to each quantum program; wherein the quantum program represents a quantum circuit with a specific function, and the quantum circuit after the merger of multiple quantum programs has no specific function, but is just a merger of multiple circuits.

[0111] The execution module is used to enable the quantum computer to execute the final quantum circuit to obtain the execution results corresponding to each quantum program.

[0112] The quantum operating system for superconducting quantum computers, wherein the execution module is used to, when there is a quantum program in the quantum program scheduling task queue to be executed that has not been executed, construct a current task set as an empty list, and add the first quantum program in the quantum program scheduling task queue to the current task set;

[0113] From the quantum program scheduling task queue, multiple quantum programs other than the first quantum program are selected as candidate concurrent quantum programs according to the queue order, and the candidate concurrent quantum programs are sorted from large to small according to the matching degree value between the candidate concurrent quantum programs and the first quantum program;

[0114] Check in sequence whether the reliability loss caused by placing the tasks of the candidate concurrent quantum program in the current task set exceeds the threshold. If the reliability loss does not exceed the threshold and the number of elements in the current task set is less than the maximum number of concurrent quantum programs specified, then keep the candidate quantum program in the current task set, otherwise remove it from the current task set;

[0115] Submit the tasks in the current task set to the quantum computer for execution, and remove the tasks in the current task set from the task queue of the quantum program to be executed.

[0116] In the quantum operating system for superconducting quantum computers, the process of constructing a hierarchical tree in the initial mapping module specifically includes:

[0117] In the hierarchical tree node list, a leaf node in the hierarchical tree is constructed for each qubit, and the node stores the number of the corresponding qubit. Each node in the hierarchical tree node list represents a community. Two nodes in the hierarchical tree node list that make the reward function value the largest are selected for merging. The merging process is: construct a new node, the qubits contained in it are the union of the qubits contained in the two nodes to be merged; set the nodes to be merged as the left and right child nodes of the new node respectively; remove the nodes to be merged from the hierarchical tree node list and add the new node to the hierarchical tree node list;

[0118] The reward function is the benefit of merging two communities, and is expressed as follows:

[0119] F=Q merged -Q origin +ωEV

[0120] Among them, Q represents the modularity of a community division scheme, Q = Σ i (e ii -a i 2 ), where e ii represents the proportion of qubit connections in community i to all qubit connections in the quantum computer in this partition, a i represents the ratio of all qubit connections involving nodes in community i to all qubit connections in the quantum computer, Q merged and Q origin Represent the modularity of the original division and the division after merging the two communities, E represents the average reliability of the CNOT operation on the qubit connection between the two communities to be merged, V represents the average reliability of the measurement operation on the qubit connecting the two communities to be merged, and ω is a weight parameter;

[0121] Repeat the merging process until the final hierarchical tree node list contains only one node, and the hierarchical tree construction is completed.

[0122] The quantum operating system for superconducting quantum computers, wherein the heuristic cost function is:

[0123]

[0124] Among them, SWAP j refers to the jth SWAP operation in the candidate SWAP set, F i Denotes the i-th quantum program P i The first-level gate operation set of all quantum programs, F represents the first-level gate operation set of all quantum programs, and g represents a quantum gate operation in the first-level gate operation set; H(SWAP j ) indicates that a specific SWAP operation is performed jThe nearest neighbor cost after is the sum of the cost in the first-level gate operation set and the cost in the extended gate operation set of the quantum program;

[0125] The extended gate operation set refers to a set of n two-qubit quantum gate operations selected in the quantum program according to the logical execution order of quantum gate operations, excluding the first-level gate operations. The default value of n is the number of logical qubits contained in the quantum program. The cost of each gate operation set is calculated as the average SWAP path length of all CNOT operations contained in the set; the SWAP path length of a CNOT operation is the shortest path length between the qubits to which the two logical qubits involved in the CNOT operation are mapped in the undirected graph formed by the topological structure of the quantum computer;

[0126] gain(g) is the gain brought by the cross-program SWAP operation for mapping conversion compared with the previous mapping conversion strategy for the CNOT gate operation g:

[0127] gain(g)=D[σ(g.q1)][σ(g.q2)]-D i '[σ(g.q1)][σ(g.q2)]

[0128] Where D represents the shortest path matrix of quantum bits in the quantum computer, and each element in the matrix represents the shortest path length between any two physical quantum bits on the quantum computer; for each quantum program P i , define D i ' is the unoccupied physical qubit and P i The shortest path matrix between the physical qubits mapped to; g.q1 and g.q2 represent the two logical qubits involved in the CNOT gate operation g, and the physical qubit mapped to the logical qubit q is defined as σ(q); I(SWAP j ,g) indicates the indicator function, indicating SWAP j Is the operation on the shortest SWAP path of the CNOT gate operation g? j When on the shortest path, the indicator function I(SWAP j ,g)=1, otherwise the indicator function I(SWAP j ,g)=0.

[0129] The present invention also proposes a storage medium for storing a program for executing any one of the quantum program parallel processing methods for superconducting quantum computers.

[0130] The present invention also proposes a client for use in any of the above-mentioned quantum operating systems for superconducting quantum computers.

Claims

1. A quantum program parallel processing method for superconducting quantum computers, characterized in that: include: Step 1: obtaining multiple quantum programs to be executed concurrently, the quantum bit topology structure of the quantum computer, and error rate calibration data, hierarchically clustering the quantum bits of the quantum computer according to the tightness of the physical connection of the quantum bits in the quantum computer and the robustness of the resources, constructing a hierarchical tree, allocating a set of physical quantum bits to the quantum program according to the hierarchical tree, and mapping the logical quantum bits of each quantum program to the allocated set of physical quantum bits, thereby obtaining an initial mapping from logical quantum bits to physical quantum bits; Step 2: According to the sequence relationship of the double quantum gate operations of the quantum program, a directed acyclic graph is constructed for each quantum program. Each node in the directed acyclic graph represents a double quantum bit gate operation in the quantum program. The nodes without predecessor nodes in the directed acyclic graph are selected as the first-level gate operation set. Based on the current mapping of logical quantum bits to physical quantum bits, the executable gate operations that meet the logical quantum bit mapping position constraints in the first-level gate operation set are found and removed to construct a candidate SWAP set to calculate the heuristic cost value of each SWAP operation. The SWAP operation with the smallest heuristic cost value is selected and inserted into the quantum program. The current mapping is mapped and transformed to obtain a final quantum circuit corresponding to each quantum program. Step 3: When there are multiple quantum programs in the quantum program scheduling task queue to be executed, select a set of concurrent quantum programs in the order of the matching degree with the first quantum program; calculate the matching degree value of each candidate concurrent quantum program with the first quantum program, and sort the candidate concurrent quantum programs in descending order according to the matching degree value; detect each candidate concurrent quantum program in turn whether it can be added to the current task set; use steps 1 and 2 to obtain the final quantum circuit corresponding to the quantum circuit in the current task set, and submit it to the quantum computer for execution; The matching value is expressed as follows: Where fitness(P i ,P0) is P i The matching value with P0, P i is a quantum program, P0 is the first quantum program, and S(x) represents the Sigmoid function, that is, The value range of x in [0, +∞] can be mapped to [0.5, 1]. That is, when the difference between the depths of the two quantum programs is smaller, the function value is closer to 0.5, that is, the function value is doubled; when the difference between the depths of the two quantum programs is larger, the function value is closer to 1, that is, the function value remains unchanged, P i .n_qubits refers to program P i The number of qubits involved, quantum programs with fewer qubits take up fewer resources and can help protect reliability under conditions where robust resources are limited.

2. The quantum program parallel processing method for superconducting quantum computers according to claim 1, characterized in that: This step 3 includes: Step 31, when there is a quantum program that has not been executed in the quantum program scheduling task queue to be executed, construct a current task set as an empty list, and add the first quantum program in the quantum program scheduling task queue to the current task set; Step 32: From the quantum program scheduling task queue, select N quantum programs other than the first quantum program as candidate concurrent quantum programs in the order of the queue, where N is 10 by default, calculate the matching value between each candidate concurrent quantum program and the first quantum program, and sort the candidate concurrent quantum programs in descending order according to the matching value; Step 33, check in turn whether the reliability loss caused by placing the tasks of the candidate concurrent quantum program in the current task set exceeds the threshold. If the reliability loss does not exceed the threshold and the number of elements in the current task set is less than the specified maximum number of concurrent quantum programs, then keep the candidate concurrent quantum program in the current task set, otherwise remove it from the current task set until all candidate concurrent quantum programs are checked or the number of quantum programs in the current task set reaches M, where M is 3 by default; Step 34: submit the tasks in the current task set to the quantum computer for execution, and remove the tasks in the current task set from the task queue of the quantum program to be executed.

3. A quantum operating system for superconducting quantum computers, characterized in that: include: An initial mapping module is used to obtain multiple quantum programs to be executed concurrently, the quantum bit topology structure of the quantum computer, and error rate calibration data, so as to hierarchically cluster the quantum bits of the quantum computer according to the tightness of the physical connection of the quantum bits in the quantum computer and the robustness of the resources, and construct a hierarchical tree. According to the hierarchical tree, a set of physical quantum bits is allocated to the quantum program, and the logical quantum bits of each quantum program are mapped to the allocated set of physical quantum bits to obtain an initial mapping from logical quantum bits to physical quantum bits. A mapping conversion module is used to construct a directed acyclic graph for each quantum program according to the sequence relationship of the dual quantum gate operations of the quantum program. Each node in the directed acyclic graph represents a dual quantum bit gate operation in the quantum program. The nodes without predecessor nodes in the directed acyclic graph are selected as the first-level gate operation set. Based on the current mapping of logical quantum bits to physical quantum bits, the executable gate operations that meet the logical quantum bit mapping position constraints in the first-level gate operation set are found and removed to construct a candidate SWAP set to calculate the heuristic cost value of each SWAP operation. The SWAP operation with the smallest heuristic cost value is selected and inserted into the quantum program, and the current mapping is mapped and converted to obtain a final quantum circuit corresponding to each quantum program. An execution module is used to select a quantum program combination for concurrent execution, add the first quantum program in the task queue of the quantum program to be executed to the current task set, select N quantum programs other than the first quantum program from the task queue as candidate concurrent quantum programs, calculate the matching value between each candidate concurrent quantum program and the first quantum program, sort the candidate concurrent quantum programs from large to small according to the matching value, and sequentially check whether each candidate concurrent quantum program will cause a reliability loss exceeding a threshold after being added to the current task set. If not, the candidate concurrent quantum program is retained in the current task set, otherwise the candidate concurrent quantum program is removed from the current task set until all candidate concurrent quantum programs are checked or the number of quantum programs in the current task set reaches M, where M is 3 by default, and finally submit the quantum circuit to the quantum computer to obtain the execution results corresponding to each quantum program; The execution module is used to construct a current task set as an empty list when there is a quantum program that has not been executed in the quantum program scheduling task queue to be executed, and add the first quantum program in the quantum program scheduling task queue to the current task set; From the quantum program scheduling task queue, multiple quantum programs other than the first quantum program are selected as candidate concurrent quantum programs according to the queue order, and the candidate concurrent quantum programs are sorted from large to small according to the matching degree value between the candidate concurrent quantum programs and the first quantum program; The quantum program P i The matching value with the first quantum program P0 is expressed as follows: Among them, S(x) represents the Sigmoid function, that is The value range of x in [0, +∞] can be mapped to [0.5, 1]. That is, when the difference between the depths of the two quantum programs is smaller, the function value is closer to 0.5, that is, the function value is doubled; when the difference between the depths of the two quantum programs is larger, the function value is closer to 1, that is, the function value remains unchanged, P i .n_qubits refers to program P i The number of qubits involved: Quantum programs with fewer qubits take up fewer resources and can help preserve reliability under conditions where robust resources are limited. Check in sequence whether the reliability loss caused by placing the tasks of the candidate concurrent quantum program in the current task set exceeds the threshold. If the reliability loss does not exceed the threshold and the number of elements in the current task set is less than the specified maximum number of concurrent quantum programs, then keep the candidate concurrent quantum program in the current task set, otherwise remove it from the current task set; Submit the tasks in the current task set to the quantum computer for execution, and remove the tasks in the current task set from the task queue of the quantum program to be executed.

4. A storage medium for storing a program for executing a quantum program parallel processing method for a superconducting quantum computer as claimed in any one of claims 1 to 2.

5. A client, used for the quantum operating system for a superconducting quantum computer as claimed in claim 3.