Quantum bit mapping algorithm based on dynamic adaptive blocking and subgraph isomorphism

The qubit mapping algorithm based on the concept of dynamic adaptive blocking and subgraph co-conception solves the local optimal problem in large-scale quantum circuit mapping problems, reduces the number of SWAP operations, and improves the execution efficiency and quality of quantum algorithms.

CN118396133BActive Publication Date: 2024-10-22NANJING TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410806021.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-10-22
Estimated Expiration
2044-06-21

AI Technical Summary

Technical Problem

Existing qubit mapping algorithms are ineffective when dealing with large-scale quantum circuits. In particular, the ABRE algorithm can easily cause the circuit to fall into a local optimum, making it difficult to effectively solve the mapping problem of large-scale quantum circuits.

Method used

A qubit mapping algorithm based on dynamic adaptive blocking and subgraph isomorphism is used to achieve efficient quantum circuit mapping through maximum subgraph isomorphic subsequence division, initial mapping, dynamic adaptive blocking and SWAP distance constraints. Specific steps include dividing the logical quantum circuit into maximal subgraph isomorphic subcircuits, using SABER inversion technology to generate initial mapping, and reducing SWAP operations through DAC routing methods.

Benefits of technology

It significantly reduces the number of required SWAP operations and improves the execution efficiency and quality of quantum algorithms on actual devices. It is especially suitable for high-connectivity quantum devices and reduces noise and error rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118396133B_ABST
    Figure CN118396133B_ABST
Patent Text Reader

Abstract

The present invention provides a quantum bit mapping algorithm based on dynamic adaptive block and subgraph isomorphism, using SABRE inversion technology to obtain the subgraph isomorphism mapping #imgabs1# corresponding to #imgabs0#, using #imgabs2# as the initial current mapping #imgabs3#, and executing the DAC routing method for #imgabs4# in a loop; using #imgabs5# as the initial current mapping, and executing the DAC routing method for the reverse #imgabs7# of #imgabs6# in a loop; according to each block of the circuit division and the corresponding subgraph isomorphism mapping and the SWAP sequence between blocks, the output is equivalent to the input logic circuit and can directly execute the physical quantum circuit on the NISQ device. Compared with the SABRE algorithm, the present invention significantly reduces the number of SWAPs, has stronger applicability and higher operating efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of quantum computing technology, and in particular relates to a quantum bit mapping algorithm based on dynamic adaptive blocking and subgraph isomorphism. Background Art

[0002] With the development of quantum computing technology, achieving efficient execution of quantum algorithms on actual devices has become an important research direction in this field. However, existing quantum devices often have connection limitations, and it is necessary to map the quantum bits in the logical quantum circuit to the physical quantum bits through quantum bit mapping. This mapping problem is called the quantum bit mapping problem. The goal of the quantum bit mapping problem is to map the quantum bits in the logical quantum circuit to the physical quantum bits. and the architecture diagram of the NISQ device , by inserting a SWAP gate, output a physical circuit , making and Equivalent while satisfying The restrictions of the graph, i.e. It can be executed directly on NISQ devices, and the goal is to minimize the number of inserted SWAPs for the final output physical circuit.

[0003] The qubit mapping problem is divided into two parts: determining the initial mapping and inserting the SWAP gate.

[0004] (1) Determination of the initial mapping: For a logic circuit, we first need to map its logical qubits and physical qubits. An initial mapping is an injection, that is, for any logical bit , if and only if ; (2) Insertion of SWAP gate: During the execution of the algorithm, for the current bit mapping and the gates to be executed ,if , that is, the gate cannot be executed under the current mapping, then we need to insert the appropriate SWAP gate (sequence) to change the current mapping so that the changed mapping satisfy By inserting appropriate SWAPs into the circuit, we can eventually get a physical circuit that can be executed in a given quantum computer.

[0005] Currently, commonly used quantum bit mapping algorithms include SABRE, but these algorithms are less effective when processing large-scale quantum circuits; the method adopted by the ABRE algorithm when processing large-scale quantum circuits is a heuristic method. During the processing process, it first executes all executable gates as much as possible. When encountering gates that cannot be executed, it executes the current optimal SWAP by calculating the cost of inserting different SWAP gates. The problem with this method is that each time only one SWAP is selected for execution based on the impact on the subsequent gates. This approach can easily cause the circuit to fall into local optimality. Therefore, how to effectively solve the mapping problem of large-scale quantum circuits has become a research hotspot in this field. Summary of the Invention

[0006] The purpose of this application is to provide a quantum bit mapping algorithm based on dynamic adaptive blocking and subgraph isomorphism. The algorithm achieves efficient quantum circuit mapping through the ideas of maximum subgraph isomorphism subsequence partitioning, initial mapping, dynamic adaptive blocking and SWAP distance constraints, thereby improving the execution efficiency of quantum algorithms on actual devices.

[0007] To achieve the above objectives, the present application provides a quantum bit mapping algorithm based on dynamic adaptive blocking and subgraph isomorphism, comprising the following steps:

[0008] S1: Divide the logic quantum circuit into three parts: and ;

[0009] in, is the maximal subgraph isomorphic subcircuit, yes The subcircuit composed of all previous quantum gates, yes The subcircuit composed of all subsequent quantum gates;

[0010] S2: obtained using SABRE inversion technique Corresponding subgraph isomorphism mapping , and let the is the initial mapping of the circuit;

[0011] S3: Initial current mapping ,right The DAC (Dynamic Adaptive Blocking) routing method is executed cyclically to find the appropriate subgraph isomorphic blocks and corresponding subgraph isomorphic mappings, record the required SWAP operation information, and move the partitioned quantum gates from Delete, update , in the current mapping Perform SWAP operation and update ,until is empty;

[0012] S4: is the initial current mapping, Reverse Execute the DAC routing method in a loop, the specific process is the same as step S3;

[0013] S5: Based on the isomorphic mapping of each block of the circuit and the subgraph corresponding to each block, as well as the SWAP sequence between blocks, the output is a physical quantum circuit that is equivalent to the input logical logic circuit and can be directly executed on the NISQ device.

[0014] Preferably, S1 further includes:

[0015] Maximum subgraph isomorphic subcircuit The method for determining is:

[0016] S1a: It is necessary to determine the front_layer of the current DAG (dependent directed acyclic graph) and check the gates in the front_layer one by one;

[0017] S2a: Add to the current subcircuit and check whether the subgraph isomorphism condition is met;

[0018] If the subgraph isomorphism condition is met, execute S3a: remove the gate, update front_layer and continue;

[0019] If the subgraph isomorphism condition is not met, stop;

[0020] S4a: Output from traversal The door arrive , find the The largest subgraph isomorphic block is started from the gate, and then the largest block is selected from the largest subgraph isomorphic block started from each gate.

[0021] Preferably, S1 further includes:

[0022] The algorithm for finding the largest subgraph isomorphic subcircuit is:

[0023] S1b: Initialize gates_list and gates_list_num to empty lists;

[0024] S2b: Traverse the list of logical quantum circuit gates Each door ;

[0025] S3b: Get gates_list and gates_list_num, find the index max index corresponding to the maximum value in gates_list_num, and Divided into 、 、 Three parts.

[0026] Preferably, S2b further includes:

[0027] S2b.1: Get from arrive The DAG and front_layer corresponding to this series of quantum gates;

[0028] S2b.2: Initialize current_gate to empty;

[0029] S2b.3: If front_layer is not empty, perform the following steps:

[0030] S2b.3.1: Initialize execute_gate_list to empty;

[0031] S2b.3.2: Traverse each gate in front_layer :

[0032] S2b.3.2.1: Add to current_gate;

[0033] S2b.3.2.2: If If the subgraphs of Add to execute_gate_list, Remove from front_layer and jump out of the loop;

[0034] S2b.3.2.3: Otherwise, Remove from current_gate;

[0035] S2b.3.3: If execute_gate_list is not empty, update front_layer;

[0036] S2b.3.4: Otherwise, exit the loop;

[0037] S2b.4: Add current_gate to gates_list and record the number of current_gate to gates_list_num.

[0038] Preferably, S2 further includes:

[0039] Generate initial mapping The method is:

[0040] S1c: Execute logical quantum circuits using the reverse-order traversal technique of the SABRE algorithm Three times, generating the initial mapping of the entire circuit and the final mapping ;

[0041] S2c: According to and Size, select or , and find the closest The subgraph isomorphism mapping of isomorphism is used as the initial mapping of our circuit .

[0042] Preferably, S2c further includes:

[0043] If | |≥| |, then select distance Recent The subgraph isomorphism mapping of ;

[0044] If | |<| |, then select distance Recent The subgraph isomorphism mapping of .

[0045] Preferably, S3 further includes:

[0046] The DAC routing method includes the following steps:

[0047] S1d: Order ;

[0048] S2d: When If not empty, perform the following steps:

[0049] S2d.1: Initialize current_gate (the list of gates currently under consideration) to an empty set;

[0050] S2d.2: For Each gate in the front_layer of the corresponding DAG graph , perform the following steps:

[0051] S2d.2.1: Check if current_gate exists , if it exists, then Add to current_gate, from Remove , update front_layer and return S2d.2; if it does not exist, Add to current_gate and execute S2d.2.2;

[0052] S2d.2.2: Use iterative depth-first search algorithm to check and Whether the SWAP distance constraint is met, if so, then Remove , update front_layer;

[0053] S2d.3: When all gates in front_layer have been checked, current_gate is the current partition. Record current_gate and the mapping determined by the iterative depth-first search algorithm in S2d.2.2. , and update .

[0054] Preferably, the iterative depth-first search algorithm comprises the following steps:

[0055] S1e: ;

[0056] S2e: Call the DFS method (input ) to try to find arrive SWAP sequence, SWAP times no more than ;

[0057] S3e: If the DFS method finds the SWAP sequence, then return the sequence; if the DFS method does not find the SWAP sequence, then let Enter S2, if , it returns None directly.

[0058] Preferably, the DFS method comprises the following steps:

[0059] S1f: Calculate the total distance of all input doors;

[0060] S2f: If all current gates are executable, return True and an empty sequence;

[0061] S3f: If the search depth is 0, return False and an empty sequence;

[0062] S4f: Yes For each edge in , perform the following operations:

[0063] S4f.1: If the edge is mapped to the current If there is an association, the mapping is updated according to the SWAP operation corresponding to the edge And recursively call the DFS method (input the new mapping , , add the new SWAP sequence after the above SWAP operation);

[0064] S4f.2: If DFS returns True, directly return True and the SWAP sequence output by DFS;

[0065] S5f: All edges have been searched, and False and an empty sequence are returned.

[0066] Preferably, S4 further includes: The list of quantum gates in the reverse order is obtained according to the execution order .

[0067] The technical solution provided by this application can achieve the following beneficial effects:

[0068] The quantum bit mapping algorithm proposed in this invention is based on the ideas of dynamic adaptive blocking and subgraph isomorphism. By utilizing the properties of subgraph isomorphism, each divided subcircuit can be executed directly without SWAP. The SWAP distance between subcircuits is used as a restriction, so that the number of SWAPs used to connect two subcircuits will not be too large, thereby significantly reducing the number of required SWAP operations. When processing large-scale quantum circuits, this algorithm has better results than the effective quantum bit mapping algorithm SABRE, and is particularly suitable for highly connected quantum devices. It helps to reduce noise and error rates, thereby improving the execution efficiency and quality of quantum algorithms. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0070] Figure 1 This is a workflow diagram provided by an embodiment of the present invention;

[0071] Figure 2 This is the architecture diagram of the NISQ device provided by the embodiment of the present invention Example image; Figure 2 (a) is the connection topology of IBM Tokyo. Figure 2 (b) is the connection topology of IBM Guadalupe;

[0072] Figure 3 is a schematic diagram of a quantum gate interaction diagram provided by an embodiment of the present invention;

[0073] Figure 4 is a flowchart of a DAC routing sub-process provided by an embodiment of the present invention; DETAILED DESCRIPTION

[0074] The following describes embodiments of the present invention in detail, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and are not to be construed as limiting the present invention.

[0075] In the description of this specification, the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0076] To address the mapping problem of logical quantum circuits to NISQ devices, this example proposes a quantum bit mapping algorithm based on dynamic adaptive blocking and subgraph isomorphism. This example decomposes the logical quantum circuit into subcircuits with maximal subgraph isomorphism, finds a suitable initial mapping for the subcircuit, and then uses the DAC (dynamic adaptive blocking) routing method to process the remaining logical quantum circuits. Through these steps, the algorithm can find a mapping scheme that satisfies the connection constraints of the NISQ device and reduces the number of SWAP gates that need to be inserted during the mapping process.

[0077] Specifically, this example divides the logic quantum circuit by subgraph isomorphism, determines the optimal initial mapping, and then gradually processes the remaining logic quantum circuits until the entire logic quantum circuit is mapped to the target quantum device. The technical solutions adopted are:

[0078] refer to Figure 1 , S1: Divide the logic quantum circuit into three parts: and ;in, is the maximal subgraph isomorphic subcircuit, yes The subcircuit composed of all previous quantum gates, yes The subcircuit composed of all subsequent quantum gates.

[0079] In step S1, the logic quantum circuit gate list is traversed using the algorithm for finding the largest subgraph isomorphic subcircuit , determine the largest subgraph isomorphic subcircuit . Maximum subgraph isomorphic subcircuit The method for determining is:

[0080] S1a: You need to determine the front_layer of the current DAG (Dependency Directed Acyclic Graph) and examine each gate in the front_layer. It's important to note that a DAG, representing the dependency graph of a quantum circuit, is a directed acyclic graph built based on the dependencies between quantum gates. It represents the execution order of each quantum gate in the quantum circuit. Nodes in the DAG represent quantum gates, and edges represent the dependencies between quantum gates. Using the DAG, you can analyze the execution order of the quantum circuit and identify which quantum gates can be executed in parallel and which must be executed sequentially.

[0081] It should be noted that for a quantum circuit, if we shift all quantum operations as far to the left as possible, we can group the quantum operations in the same column after the left shift into one layer. The front_layer is the first layer, which refers to the set of quantum gates in the dependency graph DAG that can be executed immediately without waiting for other gates to complete.

[0082] S2a: Add to the current subcircuit and check whether the subgraph isomorphism condition is met;

[0083] If the subgraph isomorphism condition is met, execute S3a: remove the gate, update front_layer and continue;

[0084] If the subgraph isomorphism condition is not met, the process stops. It should be noted that for a quantum circuit, if all quantum operations are shifted as far to the left as possible, the quantum operations in the same column after the left shift can be grouped into one layer. The front_layer is the first layer, which refers to the set of quantum gates in the dependency graph DAG that can be executed immediately without waiting for other gates to complete.

[0085] S4a: Output from traversal The door arrive , find the The largest subgraph isomorphic block is started from the gate, and then the largest block is selected from the largest subgraph isomorphic block started from each gate.

[0086] Furthermore, the algorithm for finding the largest subgraph isomorphic subcircuit used in step S1 is as follows:

[0087] S1b: Initialize gates_list and gates_list_num to empty lists;

[0088] S2b: Traverse the list of logical quantum circuit gates Each door , perform the following steps:

[0089] S2b.1: Get from arrive The DAG and front_layer corresponding to this series of quantum gates;

[0090] S2b.2: Initialize current_gate to empty;

[0091] S2b.3: If front_layer is not empty, perform the following steps:

[0092] S2b.3.1: Initialize execute_gate_list to empty;

[0093] S2b.3.2: Traverse each gate in front_layer :

[0094] S2b.3.2.1: Add to current_gate;

[0095] S2b.3.2.2: If If the subgraphs of Add to execute_gate_list, Remove from front_layer and jump out of the loop;

[0096] S2b.3.2.3: Otherwise, Remove from current_gate;

[0097] S2b.3.3: If execute_gate_list is not empty, update front_layer;

[0098] S2b.3.4: Otherwise, exit the loop;

[0099] S2b.4: Add current_gate to gates_list and record the number of current_gate to gates_list_num;

[0100] S3b: Finally get gates_list and gates_list_num, find the index max index corresponding to the maximum value in gates_list_num, and Divided into 、 、 Three parts. Among them, is the largest subgraph isomorphic part found by the algorithm.

[0101] S2: obtained using SABRE inversion technique Corresponding subgraph isomorphism mapping , and let the is the initial mapping of the circuit.

[0102] It should be noted that when running a quantum program in a quantum computer, it is necessary to map the quantum bits in the logical quantum circuit to the physical quantum bits. This process is called quantum bit mapping. Represents a quantum bit mapping, which represents the physical quantum bit corresponding to the logical quantum bit under the mapping, for example, Figure 1 The initial state of the qubit mapping shown is Map to 、 Map to 、 Map to ,Right now In addition, a certain quantum bit mapping can be changed by introducing a swap operation SWAP in the physical quantum circuit. 、 , by introducing , we can get a new quantum bit mapping that satisfies 、 .

[0103] Furthermore, the initial mapping is generated The method is:

[0104] S1c: Execute logical quantum circuits using the reverse-order traversal technique of the SABRE algorithm Three times, generating the initial mapping of the entire circuit and the final mapping ;

[0105] S2c: According to and Size, select or , and find the closest The subgraph isomorphism mapping of isomorphism is used as the initial mapping of our circuit .

[0106] It is understandable that if The size is greater than or equal to The size of | |≥| |, then select distance Recent The subgraph isomorphism mapping of ;like The size is smaller than The size of | |<| |, then select distance Recent The subgraph isomorphism mapping of .

[0107] It is understandable that Generate appropriate subgraph isomorphism mapping , making ,like Figure 2 Shown is the architecture diagram of the NISQ device , such as the connection topology of IBM Tokyo and IBM Guadalupe. The qubit mapping algorithm needs to take these connection constraints into account.

[0108] It should be noted that the use of Represents the NISQ device architecture diagram, where is a collection of physical quantum bits, is the set of edges between two qubits that can interact. In some NISQ devices, the connectivity between physical qubits is restricted, specifically that two-qubit quantum operations can only be performed between specific physical qubit pairs. This restriction can be represented by an architecture diagram. For example, Figure 2 This is the architecture diagram of the NISQ device IBM Tokyo 20.

[0109] If there exists an injective mapping , so that the graph Each edge in In another figure There is an edge in each , then the graph is formed It's a picture The subgraphs of .

[0110] For a given quantum circuit, assume that the set of quantum gates of the circuit is , we use To represent the interaction graph of the quantum circuit, where each node represents a set of quantum gates The logical qubits used in the middle gate. If There is a quantum gate that acts on a pair of logical qubits, then there is an edge connecting the corresponding nodes in the interaction graph. For example, there are two quantum gates that act on a pair of logical qubits. and With another pair of logical qubits and , then for the set of these two quantum gates, the corresponding interaction diagram is as follows Figure 3 shown.

[0111] S3: Initial current mapping ,right The DAC (Dynamic Adaptive Blocking) routing method is executed cyclically to find the appropriate subgraph isomorphic blocks and corresponding subgraph isomorphic mappings, record the required SWAP operation information, and move the partitioned quantum gates from Delete, update , in the current mapping Perform SWAP operation and update ,until Empty.

[0112] It should be noted that the SWAP distance mentioned in the present invention includes the distance between two mappings or the distance between a mapping and an interaction graph. For two mappings , their SWAP distance Indicates that the SWAP operation is used to map Transform to The minimum number of SWAPs required; for a mapping , a set of quantum gates Interaction diagram of And the input NISQ device architecture diagram , assuming yes The subgraphs of are isomorphic, and is the set of all mappings that are isomorphic to the subgraph, then for and , their SWAP distance:

[0113] = ,Right now To the collection The SWAP distance of the mapping with the closest SWAP distance.

[0114] Specifically, the input of the DAC routing method is a circuit gate list and the initial mapping , the output is The partitioning and required SWAP sequence refer to Figure 4 , the method is as follows:

[0115] S1d: Order ;

[0116] S2d: When If not empty, perform the following steps:

[0117] S2d.1: Initialize current_gate (the list of gates currently under consideration) to an empty set;

[0118] S2d.2: For Each gate in the front_layer of the corresponding DAG graph , perform the following steps:

[0119] S2d.2.1: Check if current_gate exists , if it exists, then Add to current_gate, from Remove , update front_layer and return S2d.2; if it does not exist, Add to current_gate and execute S2d.2.2;

[0120] S2d.2.2: Use iterative depth-first search algorithm to check and Whether the SWAP distance constraint is met, if so, then Remove , update front_layer;

[0121] S2d.3: When all gates in front_layer have been checked, current_gate is the current partition. Record current_gate and the mapping determined by the iterative depth-first search algorithm in S2d.2.2. , and update .

[0122] The output of the iterative depth-first search method used in step S2d.2.2 of the above algorithm can be described as follows: if the SWAP distance constraint is satisfied, the corresponding SWAP sequence is returned, thus obtaining the appropriate mapping ; If not satisfied, the returned SWAP sequence is empty. The input of this method is the previous mapping , current gate list current_gate, architecture diagram Upper limit of distance from SWAP , its main steps are as follows:

[0123] S1e: ;

[0124] S2e: Call the DFS method (input ) to try to find arrive SWAP sequence, SWAP times no more than ;

[0125] S3e: If the DFS method finds the SWAP sequence, then return the sequence; if the DFS method does not find the SWAP sequence, then let Enter S2, if , it returns None directly.

[0126] Furthermore, the DFS method inputs the search depth , Current Mapping , Current Door List , the current SWAP sequence (the default is an empty sequence in the initial case) and the architecture diagram , by iterating the depth-first search, trying to find the current mapping within the given search depth To make IG(G) executable SWAP sequence, so as to check whether the SWAP distance constraint can be satisfied, the main steps are as follows:

[0127] S1f: Calculate the total distance of all input doors;

[0128] S2f: If all current gates are executable, return True and an empty sequence;

[0129] S3f: If the search depth is 0, return False and an empty sequence;

[0130] S4f: Yes For each edge in , perform the following operations:

[0131] S4f.1: If the edge is mapped to the current If there is an association, the mapping is updated according to the SWAP operation corresponding to the edge And recursively call the DFS method (input the new mapping , , add the new SWAP sequence after the above SWAP operation);

[0132] S4f.2: If DFS returns True, directly return True and the SWAP sequence output by DFS;

[0133] S5f: All edges have been searched, and False and an empty sequence are returned.

[0134] S4: is the initial current mapping, Reverse The DAC routing method is executed cyclically, and the specific process is the same as step S3.

[0135] Specifically, express The reverse of The list of quantum gates in the reverse order is obtained according to the execution order .

[0136] S5: Based on the isomorphic mapping of each block of the circuit and the subgraph corresponding to each block, as well as the SWAP sequence between blocks, the output is a physical quantum circuit that is equivalent to the input logical logic circuit and can be directly executed on the NISQ device.

[0137] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A quantum bit mapping algorithm based on dynamic adaptive blocking and subgraph isomorphism, characterized in that: The following steps are involved: S1: Divide the logic quantum circuit into three parts: and ; in, is the maximal subgraph isomorphic subcircuit, yes The subcircuit composed of all previous quantum gates, yes The subcircuit composed of all subsequent quantum gates; S2: obtained using SABRE inversion technique The corresponding subgraph isomorphism mapping , and let the is the initial mapping of the circuit; S3: Initial current mapping ,right The DAC dynamic adaptive block routing method is executed cyclically to find the appropriate subgraph isomorphic blocks and corresponding subgraph isomorphic mappings, record the required SWAP operation information, and convert the already divided quantum gates from Delete, update , in the current mapping Perform SWAP operation and update ,until is empty; S4: is the initial current mapping, The reverse DAC routing method is executed cyclically, and the specific process is the same as step S3; S5: Based on each block of the circuit division and the subgraph isomorphism mapping corresponding to each block and the SWAP sequence between blocks, a physical quantum circuit that is equivalent to the input logic circuit and can be directly executed on the NISQ device is output.

2. The quantum bit mapping algorithm according to claim 1, characterized in that: S1 also includes: Maximum subgraph isomorphic subcircuit The method to determine is: S1a: It is necessary to determine the directed acyclic graph that the current DAG depends on front_layer , and check them one by one front_layer The door in S2a: Add to the current subcircuit and check whether the subgraph isomorphism condition is satisfied; If the subgraph isomorphism condition is met, execute S3a: remove the gate and update front_layer And continue; If the subgraph isomorphism condition is not met, stop; S4a: Output from traversal The door arrive , find the The largest subgraph isomorphic block at the beginning is selected, and then the largest block is selected from the largest subgraph isomorphic block at the beginning of each gate.

3. The quantum bit mapping algorithm according to claim 2, characterized in that: S1 also includes: The algorithm for finding the largest subgraph isomorphic subcircuit is: S1b: Initialize gates_list and gates_list_num to empty lists; S2b: Traverse the list of logic quantum circuit gates Each door ; S3b: Get gates_list and gates_list_num, find the index max index corresponding to the maximum value in gates_list_num, and Divide into , , Three parts.

4. The quantum bit mapping algorithm according to claim 3, characterized in that: S2b also includes: S2b.1: Get from arrive The DAG and front_layer corresponding to this series of quantum gates; S2b.2: Initialize current_gate to empty; S2b.3: If front_layer is not empty, perform the following steps: S2b.3.1: Initialize execute_gate_list to be empty; S2b.3.2: Traverse each door in front_layer : S2b.3.2.1: Add to current_gate; S2b.3.2.2: If If the subgraphs of Add to execute_gate_list, Remove from front_layer and exit the loop; S2b.3.2.3: Otherwise, Remove from current_gate; S2b.3.3: If execute_gate_list is not empty, update front_layer; S2b.3.4: Otherwise, exit the loop; S2b.4: Add current_gate to gates_list and record the number of current_gate to gates_list_num.

5. The quantum bit mapping algorithm according to claim 1, characterized in that: S2 also includes: Generate initial mapping The method is: S1c: Execute logical quantum circuits using the reverse traversal technique of the SABRE algorithm Three times, generating the initial mapping of the entire circuit and the final mapping ; S2c: According to and Size, choose or , and find the closest The subgraph isomorphism mapping of isomorphism is used as the initial mapping of the circuit .

6. The quantum bit mapping algorithm according to claim 5, characterized in that: Step S2c also includes: If | |≥| |, then select the distance Recent The subgraph isomorphism mapping of ; If | |<| |, then select the distance Recent The subgraph isomorphism mapping of .

7. The quantum bit mapping algorithm according to claim 1, characterized in that: Step S3 also includes: The DAC routing method includes the following steps: S1d: Order ; S2d: When When not empty, perform the following steps: S2d.1: Initialize the gate list currently being considered by current_gate to an empty set; S2d.2: For Each gate in the front_layer of the corresponding DAG graph , perform the following steps: S2d.2.1: Check if current_gate exists , if it exists, then Add to current_gate, from Remove , update front_layer and return S2d.2; if it does not exist, Add to current_gate and execute S2d.2.2; S2d.2.2: Use iterative depth-first search algorithm to check and Does it satisfy the SWAP distance constraint? If so, Remove , update front_layer; S2d.3: When all gates in front_layer have been checked, current_gate is the current partition, and the mapping determined by the iterative depth-first search algorithm in S2d.2.2 is recorded. , and update .

8. The quantum bit mapping algorithm according to claim 7, characterized in that: The iterative depth-first search algorithm comprises the following steps: S1e: ; S2e: Call the DFS method and input Let's try to find arrive SWAP sequence, SWAP times no more than ; S3e: If the DFS method finds the SWAP sequence, then return the sequence; if the DFS method does not find the SWAP sequence, then let Enter S2, if , it returns None directly.

9. The quantum bit mapping algorithm according to claim 8, characterized in that: The DFS method includes the following steps: S1f: Calculate the total distance of all input doors; S2f: If all current gates are executable, return True and an empty sequence; S3f: If the search depth is 0, return False and an empty sequence; S4f: Yes For each edge in , perform the following operations: S4f.1: If the edge is mapped to the current If there is an association, the mapping is updated according to the SWAP operation corresponding to the edge And recursively call the DFS method, specifically input the new mapping , , add the new SWAP sequence after the above SWAP operation; S4f.2: If DFS returns True, directly return True and the SWAP sequence output by DFS; S5f: All edges have been searched, and False and an empty sequence are returned.

10. The quantum bit mapping algorithm according to claim 1, characterized in that: S4 also includes: The list of quantum gates in the sequence is reversed according to the execution order to obtain .