A quantum program mapping mechanism for distributed quantum computing
By analyzing quantum program characteristics and optimizing mappings, and using an initial mapping mechanism based on heat and weak connectivity, combined with EPR for sharing and SWAP operations, the problem of high error rate in remote operations in distributed quantum computing is solved, thereby improving the reliability and efficiency of quantum program execution.
Patent Information
- Application Number
- CN202411646742.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-11-18
AI Technical Summary
In distributed quantum computing, remote operations have high error rates and are time-consuming, affecting the reliability of quantum program execution. Existing subroutine mapping techniques are difficult to effectively reduce the number of remote operations and the number of EPR pair establishments.
Based on the initial mapping mechanism of heat and weak connectivity, the system prioritizes mapping sets of high-heat logical qubits and weak-connectivity logical qubits to the same QPU through quantum program feature analysis. It also reduces remote communication by sharing EPR pairs and cross-node SWAP operations, and constructs a directed acyclic graph to optimize the mapping transformation.
This reduces the number of remote communication operations in distributed quantum computing, improving the reliability and efficiency of quantum program execution.
Smart Images

Figure CN119623661B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of quantum computing, in particular to a quantum program mapping mechanism, and more particularly to a quantum program mapping mechanism for distributed quantum computing. BACKGROUND
[0002] Quantum computing can be used to accelerate the solution of intractable problems in classical computing, such as large integer factorization, large amount of unordered data search, etc. However, to solve practical problems using quantum computing, a large number of reliable qubits are required. If quantum error correction technology is used to encode tens of physical qubits into one fault-tolerant logical qubit, the number of physical qubits required will reach hundreds of thousands or even millions. However, the number of qubits integrated in today's quantum computers is limited, and the largest superconducting quantum chip currently integrated only 1121 physical qubits.
[0003] Distributed quantum computing (DQC) is a feasible method to realize large-scale quantum computing. In distributed quantum computing, multiple quantum chips (quantum processing units, QPU) work cooperatively to realize remote communication between QPUs by means of remote EPR (Einstein-Podolsky-Rosen) pairs established by communication qubits. Figure 1 Cat-Comm remote communication protocol commonly used when performing remote communication operations is shown. In the figure, q0 and q0' are communication qubits, and q1 and q1' are data qubits. If a remote CNOT operation needs to be performed between q1 and q1', Cat-Comm uses Cat-entangler to transmit the state of the control qubit q1 in node A to the remote node B, performs CNOT, and then uses Cat-disentagler to transmit the state back to node A. Remote communication operations have higher error rates and longer execution times than local communication operations occurring within QPUs. Therefore, remote operations will affect the reliability of quantum program execution, and should be minimized as much as possible to reduce the remote operations required to execute quantum programs.
[0004] Executing a quantum program on a superconducting quantum computer requires quantum program mapping. The physical qubits of a superconducting quantum computer are arranged in a grid, and connections exist only between adjacent physical qubits. These connections are used to perform two-qubit gate operations in a quantum program. If the two logical qubits of a two-qubit gate operation are mapped on two unconnected physical qubits, the two-qubit gate operation cannot be performed. A SWAP operation needs to be inserted to move one of the logical qubits to a position connected to the other. The process of inserting SWAP operations in a quantum program to convert the quantum program into a sequence of quantum gate operations that can be directly executed on a quantum computer is called quantum program mapping. Quantum program mapping techniques can be mainly divided into two categories. The first category is the optimization method. This category of methods converts the quantum program mapping problem into an equivalent constrained optimization problem and solves it using a solver. This category of methods has a high time complexity and can only map quantum programs with tens of logical qubits at most. The second category is the heuristic method, which maps quantum programs through greedy algorithms, design of heuristic cost functions, and the like. This category of methods has a relatively low time complexity and can handle larger-scale quantum programs, but cannot guarantee that the mapping result is an optimal solution. The general steps of heuristic quantum program mapping are: (1) initial mapping, that is, determining the physical qubit to which each logical qubit is mapped; and (2) mapping conversion, that is, inserting SWAP operations in the quantum program to make all CNOT operations executable.
[0005] In the DQC environment, because the error rate of remote operations is high and the execution time is long, the number of remote operations and the number of EPR pairs established should be reduced as much as possible during quantum program mapping to improve the execution reliability of the quantum program. SUMMARY
[0006] To this end, the present application proposes a quantum program mapping mechanism for distributed quantum computing, which is used to reduce the remote communication operations required for mapping and executing quantum programs in the DQC environment and improve the execution reliability of the quantum program. The present application consists of three parts: (1) quantum program feature analysis, (2) initial mapping based on heat and weak connectivity, and (3) mapping conversion considering remote operation overhead. The specific contents of each part are as follows:
[0007] (I) Quantum program feature analysis
[0008] Step 1, analyze the heat characteristics of the quantum program. In a quantum program, the heat of a logical qubit is the number of interactions between the qubit and other qubits, that is, the number of times the qubit is used in all two-qubit gate operations. Heat represents the frequency of interaction between a logical qubit and other qubits. A high-heat logical qubit has more frequent qubit interaction operations. Mapping high-heat logical qubits and other logical qubits that interact with them to the same QPU can reduce remote operations.
[0009] Step 2, analyze the weak connectivity feature of the quantum program. In the quantum program, the weak connectivity between multiple sets of qubits is defined as 1 / the number of two-qubit gate operations occurring between the sets of qubits. This feature represents the strength of the relationship between the sets of qubits. The higher the weak connectivity value, the less interaction between the sets of qubits, the weaker the connection, and the more suitable for being mapped to different QPUs. Conversely, the lower the weak connectivity value, the more interaction between the sets of qubits, and mapping each set of qubits to a different QPU will result in more remote operations.
[0010] (B) Initial mapping based on heat and weak connectivity
[0011] Step 3, the present application has two optional initial mapping mechanisms. The first optional initial mapping mechanism is: heat-based initial mapping mechanism. This mechanism preferentially maps high-heat logical qubits, and then maps other logical qubits that interact with them. The advantage of this mechanism is that it can map high-heat logical qubits and other logical qubits that interact with them to the same QPU, thereby reducing remote operations. In addition, this mechanism can also provide robust physical qubits with lower error rates for high-heat qubits. In the following two cases, the heat-based initial mapping mechanism is used to map the quantum program.(1) If the number of qubits of the quantum program is less than the number of qubits of the QPU, the quantum program does not need to be mapped across QPUs, and the heat-based initial mapping mechanism is used.(2) If the number of qubits of the quantum program is greater than the number of qubits of the QPU, and there is a qubit whose heat is higher than that of all other qubits, the heat-based initial mapping mechanism is used. Otherwise, the weak connectivity-based initial mapping mechanism in step 4 is used to map the quantum program. The heat-based initial mapping mechanism specifically includes the following steps:
[0012] Step 3.1, map the logical qubit with the highest heat. Get the logical qubit with the highest heat and map it to the physical qubit with the lowest value of 1 / (qubit degree x average CNOT reliability). Where average CNOT reliability refers to the average value of (1-CNOT error rate) for all CNOT operations that can be performed on the physical qubit. The selected physical qubit has a high degree and an average CNOT reliability. A high degree means that the high-heat qubit can be mapped to adjacent positions with more logical qubits that interact with it, reducing the number of SWAP operations required during the mapping conversion process. A high average CNOT reliability means that the probability of an error occurring when performing a quantum gate operation on the connection of the physical qubit is lower, which can improve the execution fidelity of the quantum program.
[0013] Step 3.2, mapping other unmapped logical qubits. When there are still logical qubits unmapped, select the logical qubit that interacts with the most mapped logical qubits for mapping. Select the physical qubit that can make the product of the reliability of the shortest path between this logical qubit and every mapped logical qubit the highest, and map this logical qubit. The reliability of each shortest path is calculated as the product of the reliability of all two-qubit gate operations on this path. Repeat step 3.2 until all logical qubits are mapped.
[0014] Step 4, the second optional initial mapping mechanism is the initial mapping mechanism based on weak connectivity. This mechanism selects the highest weak connectivity of the quantum bit set division scheme, and maps each quantum bit set to a QPU. The higher the weak connectivity, the fewer the interactions between the quantum bit sets, so the fewer the remote operations caused by mapping these quantum bit sets to different QPUs. This mechanism specifically includes the following steps:
[0015] Step 4.1, find the quantum bit set division scheme with the highest weak connectivity. First, generate all quantum bit set division schemes. In these division schemes, the number of qubits in each quantum bit set does not exceed the number of qubits of the QPU. Calculate the weak connectivity value of each quantum bit set division scheme, and obtain the quantum bit set division scheme with the highest weak connectivity.
[0016] Step 4.2, map the logical qubits involving the most remote operations around the communication qubits. In each quantum bit set, first map the logical qubit involving the most remote operations. From all the physical qubits in the QPU that are connected to the communication qubits, select the physical qubit with the highest average CNOT reliability for mapping this logical qubit. Repeat step 4.2 until all quantum bits connected to the communication qubits are occupied.
[0017] Step 4.3, map other unmapped logical qubits. When there are still logical qubits unmapped, select the logical qubit that interacts with the most mapped logical qubits for mapping. Select the physical qubit that can make the product of the reliability of the interaction path between this logical qubit and every mapped logical qubit the highest, and map this logical qubit. The reliability of each interaction path is calculated as the product of the reliability of all two-qubit gate operations on the shortest path between the two qubits. Repeat step 4.3 until all logical qubits are mapped.
[0018] (Three) mapping conversion considering remote operation overhead
[0019] Step 5, mapping conversion considering remote operation overhead. This step includes:
[0020] Step 5.1, construct a Directed Acyclic Graph (DAG) for the quantum program. The nodes in the DAG represent the quantum gate operations in the quantum program, and the edges in the DAG represent the dependency relationship between two quantum gate operations that share a logical qubit. The first-layer gate operations refer to the set of all nodes in the DAG that have no predecessors. The first-layer gate operations are denoted as F.
[0021] Step 5.2, execute all executable gate operations in the first-layer gate operations, update the first-layer gate operations, and repeat until only the two-qubit gate operations that cannot be executed due to the non-adjacent mapping positions of the logical qubits remain in the first-layer gate operations.
[0022] Step 5.3, select SWAP for mapping transformation. Determine the candidate SWAP set as the SWAP operations involving at least one logical qubit in the first-layer gate operations. For each candidate SWAP operation, calculate its heuristic cost function value, and execute the SWAP operation with the lowest cost. After the execution of the SWAP operation, update the mapping positions of the logical qubits, and some two-qubit gate operations in the first-layer gate operations may become executable after the update of the mapping positions. Repeat steps 5.2 and 5.3 until all gate operations in the quantum program are executable. The design of the heuristic cost function is as follows.
[0023]
[0024] where F represents the set of first-layer gate operations, and E represents the set of extended gate operations. The set of extended gate operations is the N two-qubit gate operations after the first-layer gate operations, and N is set to the number of logical qubits in the quantum program by default. |F| and |E| represent the number of gate operations in the set of first-layer gate operations and the set of extended gate operations, respectively. 0.5 is the weight parameter of the NNC value of the set of extended gate operations, representing that this mapping transformation mechanism first solves the problem of the unexecutable two-qubit gate operations in the set of first-layer gate operations, and then reduces the number of SWAP operations required for the execution of subsequent gate operations. NNC represents the nearest neighbor cost (NNC). For a specific set of quantum gate operations, the NNC is calculated as the sum of two parts: (1) the minimum number of CNOT operations required to move each logical qubit in the set to an adjacent position. For example, if a SWAP is required to move two logical qubits to adjacent positions, the minimum number of CNOT operations required is 3, because a SWAP operation can be decomposed into three CNOTs. (2) the remote operation overhead. For example, using the Cat-Comm remote communication protocol (e.g. Figure 1Constructing a remote EPR pair takes the equivalent of 25 local two-qubit gate operations. If there are consecutive remote gate operations using the same logical qubit, these gate operations can share a single remote EPR pair for execution, in which case the overhead for all remote operations is 25. Otherwise, each remote operation incurs a remote communication overhead of 25. Attached Figure Description
[0025] Figure 1 This is a schematic diagram of the Cat-Comm remote communication protocol;
[0026] Figure 2 This is a flowchart of a quantum program mapping mechanism for distributed quantum computing proposed in this invention.
[0027] Figure 3 This is a schematic diagram of a quantum program mapping mechanism for distributed quantum computing proposed in this invention;
[0028] Figure 4 A schematic diagram illustrating the hotness and weak connectivity of quantum programs;
[0029] Figure 5 for Figure 4 -(b) shows the directed acyclic graph corresponding to the quantum circuit;
[0030] Figure 6 This is a schematic diagram of the candidate SWAP operation corresponding to quantum gate operation g1. Specific implementation methods
[0031] To make the above features and effects of the present invention clearer and easier to understand, specific embodiments are described below, and detailed descriptions are provided in conjunction with the accompanying drawings.
[0032] 1. Operating Environment. This invention is based on the open-source software development kit Qiskit to implement a quantum program mapping mechanism in a distributed quantum computing system. Diskit is used to simulate the distributed quantum computing environment.
[0033] 2. Specific steps. Figure 2 This is a flowchart of one embodiment of the present invention. Figure 3 This is a schematic diagram of the key processes of the present invention. The present invention mainly includes the following steps:
[0034] Step 1: Analyze the heat characteristics of quantum programs. Figure 4 In the quantum program shown in -(a), the CNOT operands between logical qubits q0, q1, and q2 and other logical qubits are 5, 3, and 2, respectively, meaning the heat values of q0, q1, and q2 are 5, 3, and 2, respectively. Mapping high-heat qubits and other logical qubits that interact with them to the same QPU reduces remote operations.
[0035] Step 2, analyze the weak connectivity feature of the quantum program. In Figure 4 In the quantum program shown in (b), there are 3 CNOT gate operations between logical qubits q0 and q1, and only 1 CNOT gate operation between q1 and q2. The weak connectivity between the qubit set {q0, q1} and {q2} is 1 / the number of two-qubit gate operations occurring between the qubit sets, i.e., 1 / 1 = 1. Compared with other logical qubit set partitioning schemes, this partitioning scheme has the highest weak connectivity, representing the weakest correlation between the sets {q0, q1} and {q2}.
[0036] Step 3, the first optional initial mapping mechanism is a heat-based initial mapping mechanism. Specifically, it includes the following steps:
[0037] Step 3.1, map the logical qubit with the highest heat. If you want to map Figure 4 In the quantum program shown in (b), first calculate the heat of each qubit. The heat of logical qubit q0 is the highest, so q0 is mapped first.
[0038] Step 3.2, map other unmapped logical qubits. In order of decreasing interaction frequency with mapped logical qubits, map the remaining qubits in order. Because logical qubit q1 interacts most frequently with the mapped q0, the second logical qubit to be mapped is q1, followed by q2.
[0039] Step 4, the second optional initial mapping mechanism is a weak connectivity-based initial mapping mechanism. Specifically, it includes the following steps:
[0040] Step 4.1, find the qubit set partitioning scheme with the highest weak connectivity. If the DQC contains only QPUs with 2 qubits, Figure 4 The quantum circuit shown in (b) needs to be mapped across QPUs. The qubit set partitioning scheme with the highest weak connectivity for this quantum program is {q0, q1}, {q2}.
[0041] Step 4.2, map the logical qubit that involves the most remote operations to the vicinity of the communication qubits. In the set {q0, q1}, q1 involves the most remote operations; in the set {q2}, q2 involves the most remote operations, so map q0 and q1 to the vicinity of the communication qubits of the two QPUs.
[0042] Step 4.3, map other unmapped logical qubits. In the set {q0, q1}, q0 is not mapped and interacts most frequently with the mapped q1, so map the logical qubit q0.
[0043] Step 5, mapping conversion considering remote operation overhead. The mapping conversion mechanism can reduce the remote operations required for quantum program mapping execution in the following two cases. (1) If there are remote operations that use the same logical qubit continuously, these remote operations can share an EPR pair for execution. (2) If a logical qubit has interactions with multiple logical qubits on a remote node, a remote SWAP operation can be used to move the logical qubit to the remote node to reduce remote operations. The specific steps are as follows:
[0044] Step 5.1, construct a directed acyclic graph (DAG) for the quantum program. For example, Figure 5 shows Figure 4 the quantum circuit corresponding to the directed acyclic graph shown in (b).
[0045] Step 5.2, execute all executable gate operations in the first layer of gate operations, update the first layer of gate operations, until only double-qubit gate operations that cannot be executed due to the non-adjacent mapping positions of logical qubits remain in the first layer of gate operations.
[0046] Step 5.3, select SWAP for mapping conversion. The candidate SWAP set is: SWAP operations involving at least one logical qubit in the first layer of gate operations. For example, there is a quantum gate operation g1 in the first layer of gate operations. g1 has two logical qubits q1 and q2. Figure 6 The candidate SWAP set at this time is shown in red bold arrows, i.e. all SWAP operations involving q1 and q2. For each candidate SWAP operation, calculate its heuristic cost function value, and execute the SWAP operation with the lowest execution cost.
[0047] The present application provides a quantum program mapping mechanism for distributed quantum computing, comprising: (1) quantum program feature analysis, for obtaining the heat and weak connectivity characteristics of the quantum program; (2) initial mapping based on heat and weak connectivity, for mapping quantum programs with different quantum qubit interaction characteristics; (3) mapping conversion considering remote operation overhead, using an EPR pair to execute multiple continuous remote operations using the same logical qubit, and using a cross-node SWAP operation to move frequently interacting logical qubits to the same node, for reducing the high error rate of remote communication operations in distributed quantum computing and improving the execution reliability of quantum circuits.
[0048] The present application provides a quantum program mapping mechanism for distributed quantum computing, for reducing the remote communication operations required for mapping and executing quantum programs in a DQC environment and improving the execution reliability of quantum programs. The present application consists of three parts: (1) quantum program feature analysis, (2) initial mapping based on heat and weak connectivity, and (3) mapping conversion considering remote operation overhead. The specific contents of each part are as follows:
[0049] (I) Quantum program feature analysis
[0050] Step 1, analyze the heat feature of the quantum program. In the quantum program, the heat of a logical qubit is the number of times that the qubit interacts with other qubits, i.e., the number of times that the qubit is used in all two-qubit gate operations. The heat represents the frequency of interaction between a logical qubit and other qubits. A high-heat logical qubit has more frequent inter-qubit interaction operations. Mapping high-heat logical qubits and other logical qubits that interact with them to the same QPU can reduce remote operations.
[0051] Step 2, analyze the weak connectivity feature of the quantum program. In the quantum program, the weak connectivity between multiple qubit sets is defined as 1 / the number of two-qubit gate operations that occur between the qubit sets. This feature represents the strength of the relationship between qubit sets. The higher the weak connectivity value, the fewer the interactions between qubit sets, and the weaker the connection, making it more suitable for being mapped to different QPUs. Conversely, the lower the weak connectivity value, the more interactions between qubit sets, and mapping each qubit set to a different QPU will result in more remote operations.
[0052] (II) Initial mapping based on heat and weak connectivity
[0053] Step 3, the present application has two optional initial mapping mechanisms. The first optional initial mapping mechanism is a heat-based initial mapping mechanism. This mechanism preferentially maps high-heat logical qubits, and then maps other logical qubits that interact with them. The advantage of this mechanism is that it can map high-heat logical qubits and other logical qubits that interact with them to the same QPU, thereby reducing remote operations. In addition, this mechanism can also provide robust physical qubits with lower error rates for high-heat qubits. In the following two cases, the heat-based initial mapping mechanism is used to map the quantum program.(1) If the number of qubits of the quantum program is less than the number of qubits of the QPU, the quantum program does not need to be mapped across QPUs, and the heat-based initial mapping mechanism is used.(2) If the number of qubits of the quantum program is greater than the number of qubits of the QPU, and there is a qubit whose heat is higher than that of all other qubits, the heat-based initial mapping mechanism is used. Otherwise, the weak connectivity-based initial mapping mechanism in step 4 is used to map the quantum program. The heat-based initial mapping mechanism specifically includes the following steps:
[0054] Step 3.1, mapping the logical qubit with the highest heat. Obtain the logical qubit with the highest heat, and map it to the physical qubit with the lowest value of 1 / (qubit degree x average CNOT reliability). The average CNOT reliability refers to the average value of (1-CNOT error rate) of all CNOT operations that can be performed on the physical qubit. The selected physical qubit has a higher degree and average CNOT reliability. A higher degree means that the high-heat qubit can be mapped to an adjacent position with more logical qubits interacting with it, reducing the number of SWAP operations required in the mapping conversion process. A higher average CNOT reliability means that the probability of an error occurring when performing quantum gate operations on the connections of the physical qubit is lower, which can improve the execution fidelity of the quantum program.
[0055] Step 3.2, mapping other unmapped logical qubits. When there are still logical qubits that have not been mapped, select the logical qubit that interacts most frequently with the mapped logical qubits for mapping. Select the physical qubit that maximizes the product of the shortest path reliability of the logical qubit with each mapped logical qubit, and map the logical qubit. The reliability of each shortest path is calculated as the product of the reliability of all two-qubit gate operations on the path. Repeat step 3.2 until all logical qubits are mapped.
[0056] Step 4, the second optional initial mapping mechanism is the weakly connected degree-based initial mapping mechanism. This mechanism selects the highest weakly connected degree qubit set division scheme, and maps each qubit set to a QPU. The higher the weakly connected degree, the fewer interactions between qubit sets, so mapping these qubit sets to different QPUs results in fewer remote operations. This mechanism specifically includes the following steps:
[0057] Step 4.1, find the highest weakly connected degree qubit set division scheme. First, generate all qubit set division schemes. In these division schemes, the number of qubits in each qubit set does not exceed the number of qubits in a QPU. Calculate the weakly connected degree value of each qubit set division scheme, and obtain the highest weakly connected degree qubit set division scheme.
[0058] Step 4.2, map the logical qubit with the most remote operations to the communication qubit. In each qubit set, first map the logical qubit with the most remote operations. From all physical qubits in the QPU that have connections with the communication qubit, select the physical qubit with the highest average CNOT reliability for mapping the logical qubit. Repeat step 4.2 until all qubits connected to the communication qubit are occupied.
[0059] Step 4.3, mapping other unmapped logical qubits. When there are still unmapped logical qubits, select the logical qubit that interacts with the most mapped logical qubits for mapping. Select the physical qubit that can make the product of the interaction path reliability of the logical qubit with every mapped logical qubit the highest, and map the logical qubit. The reliability of each interaction path is calculated as the product of the reliability of all two-qubit gate operations on the shortest path between the two qubits. Repeat step 4.3 until all logical qubits are mapped.
[0060] (III) Mapping conversion considering remote operation overhead
[0061] Step 5, mapping conversion considering remote operation overhead. This step includes:
[0062] Step 5.1, constructing a directed acyclic graph (DAG) for the quantum program. The nodes in the DAG represent the quantum gate operations in the quantum program, and the edges in the DAG represent that two quantum gate operations share a logical qubit and there is a dependency relationship between the execution order. The first layer gate operation refers to the set of all nodes in the DAG without predecessor nodes, and the first layer gate operation is denoted as F.
[0063] Step 5.2, executing all executable gate operations in the first layer gate operation, updating the first layer gate operation, until only the two-qubit gate operations that cannot be executed due to the non-adjacent mapping positions of the logical qubits remain in the first layer gate operation.
[0064] Step 5.3, selecting SWAP for mapping conversion. Determine the candidate SWAP set as: the SWAP operations involving at least one logical qubit in the first layer gate operation. For each candidate SWAP operation, calculate the heuristic cost function value, and execute the SWAP operation with the lowest cost. After the SWAP operation is executed, the mapping position of the logical qubit is updated, and some two-qubit gate operations in the first layer gate operation can be executed after the mapping position is updated. Repeat steps 5.2 and 5.3 until all gate operations in the quantum program can be executed. The design of the heuristic cost function is as follows.
[0065]
[0066] where F represents the first layer gate operation set, and E represents the extended gate operation set. The extended gate operation set is the N two-qubit gate operations after the first layer gate operation, and N is the logical qubit number of the quantum program by default. |F| and |E| represent the number of gate operations in the first layer gate operation set and the extended gate operation set, respectively. 0.5 is the weight parameter of the NNC value of the extended gate operation set, which represents that the mapping conversion mechanism first solves the problem that the two-qubit gate operation in the first layer gate operation set cannot be executed, and then reduces the number of SWAP operations required to execute the subsequent gate operations. NNC represents the nearest neighbor cost (NNC). For a specific quantum gate operation set, the NNC is calculated as the sum of two parts: (1) the minimum number of CNOT operations required to move the logical qubits in each CNOT operation in the set to adjacent positions. For example, if a SWAP is required to move two logical qubits to adjacent positions, the minimum number of CNOT operations required is 3, because a SWAP operation can be decomposed into three CNOTs. (2) Remote operation overhead. For example, using the Cat-Comm remote communication protocol (such as Figure 1 ) to construct a remote EPR pair takes time equivalent to 25 local two-qubit gate operations. If there are remote gate operations that use the same logical qubit consecutively, these gate operations can share a remote EPR pair for execution, and the overhead of all remote operations is 25. Otherwise, each remote operation will incur a remote communication overhead of 25.
[0067] A quantum program mapping mechanism for distributed quantum computing includes the following steps: Step 1, based on quantum program feature analysis, obtaining the heat feature of the quantum program; Step 2, based on quantum program feature analysis, obtaining the weak connectivity feature of the quantum program; Step 3, establishing the first optional initial mapping mechanism as: heat-based initial mapping mechanism; Step 4, establishing the second optional initial mapping mechanism as: weak connectivity-based initial mapping mechanism; Step 5, using a mapping conversion mechanism that considers remote operation overhead, reducing quantum program mapping by sharing EPR pairs between consecutive remote operations that use the same logical qubit, and performing cross-node SWAP operations, and performing remote communication operations.
[0068] In the quantum program of step 1, the heat of a logical qubit is the number of interactions of the qubit with other qubits, i.e. the number of times the qubit is used in all two-qubit gate operations, and the heat represents the frequency of interaction of a logical qubit with other qubits. In the quantum program of step 2, the weak connectivity between the qubit set is defined as 1 / the number of two-qubit gate operations occurring between the qubit set, and the weak connectivity feature represents the strength of the relationship between the qubit set.
[0069] Step 3 includes the following steps: Step 3.1, mapping the logical qubit with the highest heat: obtaining the logical qubit with the highest heat, and mapping it to the physical qubit with the lowest value of 1 / (qubit degree x average CNOT reliability); Step 3.2, mapping other logical qubits that have not been mapped: when there are still logical qubits that have not been mapped, selecting the logical qubit that interacts most frequently with the mapped logical qubit for mapping; selecting the physical qubit that can make the product of the shortest path reliability of the logical qubit with each mapped logical qubit the highest, and mapping the logical qubit; the reliability of each shortest path is calculated as the product of the reliability of all two-qubit gate operations on the path; Step 3.3, repeating Step 3.2 until all logical qubits are mapped.
[0070] Step 4 includes the following steps: Step 4.1, finding the partition scheme of the highest weakly connected qubit set: first, generating all partition schemes of the qubit set; in these partition schemes, the number of qubits in each qubit set does not exceed the number of qubits of the QPU; calculating the weakly connected degree value of each qubit set partition scheme, and obtaining the partition scheme of the highest weakly connected qubit set; Step 4.2, mapping the logical qubit involving the most remote operations to the surrounding of the communication qubit: in each qubit set, first map the logical qubit involving the most remote operations; from all physical qubits connected to the communication qubit in the QPU, select the physical qubit with the highest average CNOT reliability for mapping the logical qubit; Step 4.3, repeating Step 4.2 until all qubits connected to the communication qubit are occupied; Step 4.4, mapping other logical qubits that have not been mapped: when there are still logical qubits that have not been mapped, selecting the logical qubit that interacts most frequently with the mapped logical qubit for mapping; selecting the physical qubit that can make the interaction path reliability product of the logical qubit with each mapped logical qubit the highest, and mapping the logical qubit; the reliability of each interaction path is calculated as the product of the reliability of all two-qubit gate operations on the shortest path between the two qubits; Step 4.5, repeating Step 4.4 until all logical qubits are mapped.
[0071] The step 5 includes the following steps: step 5.1, constructing a directed acyclic graph (DAG) for the quantum program: the nodes in the DAG represent quantum gate operations in the quantum program, and the edges in the DAG represent that two quantum gate operations share a logical qubit and there is a dependency relationship of execution order; the first layer gate operation is recorded as F, and the first layer gate operation refers to a set of all nodes in the DAG without predecessors; step 5.2, executing all executable gate operations in the first layer gate operation, updating the first layer gate operation, until only the two-qubit gate operations that cannot be executed due to non-adjacent mapping positions of logical qubits remain in the first layer gate operation; step 5.3, selecting a SWAP for mapping conversion, determining a candidate SWAP set as: the SWAP operation involving at least one logical qubit in the first layer gate operation; for each candidate SWAP operation, calculating the heuristic cost function value thereof, and executing the SWAP operation with the lowest cost; after the SWAP operation is executed, the mapping positions of the logical qubits are updated, and some two-qubit gate operations in the first layer gate operation can be executed after the mapping positions are updated; step 5.4, repeating steps 5.2 to 5.3 until all gate operations in the quantum program are executable.
[0072] The mapping conversion mechanism in step 5 includes the design of the heuristic cost function as follows:
[0073]
[0074] where F represents the first layer gate operation set, E represents the extended gate operation set, H is the heuristic cost function, the extended gate operation set is the N two-qubit gate operations after the first layer gate operation, N is by default the number of logical qubits of the quantum program, |F| and |E| represent the number of gate operations in the first layer gate operation set and the extended gate operation set respectively, 0.5 is the weight parameter of the NNC value of the extended gate operation set, represents that the mapping conversion mechanism first solves the problem of the unexecutable two-qubit gate operations in the first layer gate operation set, and secondly reduces the number of SWAP operations required for executing subsequent gate operations, NNC represents the nearest neighbor cost function, and for a specific quantum gate operation set, the NNC is calculated as the sum of two parts: (1) the minimum number of CNOT operations required to move the logical qubits in each CNOT operation in the set to adjacent positions; (2) the remote operation overhead; if there are remote gate operations that continuously use the same logical qubit, these remote gate operations can share a remote EPR pair for execution.
[0075] A storage medium for storing a program for executing the quantum program mapping mechanism for distributed quantum computing.
Claims
1. A quantum program mapping mechanism for distributed quantum computing, characterized in that, The method comprises the following steps: Step 1, obtaining the heat characteristics of the quantum program based on quantum program feature analysis; Step 2, obtaining the weak connection degree characteristics of the quantum program based on quantum program feature analysis; Step 3, establishing the first optional initial mapping mechanism as a heat-based initial mapping mechanism; Step 4, establishing the second optional initial mapping mechanism as a weak connection degree-based initial mapping mechanism; Step 5, using a mapping conversion mechanism considering remote operation overhead, reducing quantum program mapping and performing remote communication operations by sharing EPR pairs between consecutive remote operations using the same logical qubit and cross-node SWAP operations; In the quantum program in step 1, the heat of a logical qubit is the number of interactions of the qubit with other qubits, that is, the number of times the qubit is used in all two-qubit gate operations, and the heat represents the frequency of interaction of a logical qubit with other qubits; In the quantum program in step 2, the weak connection degree between the qubit set is defined as 1 / the number of two-qubit gate operations occurring between the qubit set, and the weak connection degree characteristics represent the strength of the association between the qubit set; Step 3 comprises the following steps: Step 3.1, mapping the logical qubit with the highest heat: obtaining the logical qubit with the highest heat and mapping it to the physical qubit with the lowest value of 1 / (qubit degree x average CNOT reliability); Step 3.2, mapping other unmapped logical qubits: when there are still unmapped logical qubits, select the logical qubit that interacts most with the mapped logical qubit for mapping; select the physical qubit that can make the product of the shortest path reliability of the logical qubit with each mapped logical qubit the highest, and map the logical qubit; the reliability of each shortest path is calculated as the product of the reliability of all two-qubit gate operations on the path; Step 3.3, repeat step 3.2 until all logical qubits are mapped; The average CNOT reliability refers to the average value of (1-CNOT error rate) of all CNOT operations performed by the physical qubit.
2. The quantum program mapping mechanism for distributed quantum computing of claim 1, wherein, Step 4 comprises the following steps: Step 4.1, finding the highest weak connection degree qubit set division scheme: first, generate all qubit set division schemes; in these division schemes, the number of qubits in each qubit set does not exceed the number of qubits of the QPU; calculate the weak connection degree value of each qubit set division scheme to obtain the highest weak connection degree qubit set division scheme; Step 4.2, mapping the logical qubit involving the most remote operations to the communication qubit: in each qubit set, first map the logical qubit involving the most remote operations; from all physical qubits connected to the communication qubit in the QPU, select the physical qubit with the highest average CNOT reliability for mapping the logical qubit; Step 4.3, repeat step 4.2 until all qubits connected to the communication qubit are occupied; Step 4.4, mapping other unmapped logical qubits: when there are still unmapped logical qubits, select the logical qubit that interacts with the mapped logical qubits most frequently for mapping; select the physical qubit that can make the interaction path reliability product of the logical qubit and each mapped logical qubit the highest, and map the logical qubit; the reliability of each interaction path is calculated as the product of the reliability of all two-qubit gate operations on the shortest path between the two qubits; Step 4.5, repeat step 4.4 until all logical qubits are mapped.
3. The quantum program mapping mechanism for distributed quantum computing of claim 1, wherein, Step 5 includes the following steps: Step 5.1, constructing a directed acyclic graph (DAG) for the quantum program: the nodes in the DAG represent the quantum gate operations in the quantum program, and the edges in the DAG represent that two quantum gate operations share a logical qubit and have a dependency relationship in execution order; the first layer gate operation is recorded as F, which refers to the set of all nodes in the DAG that have no predecessor nodes; Step 5.2, execute all executable gate operations in the first layer gate operation, update the first layer gate operation, until only the two-qubit gate operations that cannot be executed due to non-adjacent mapping positions of logical qubits remain in the first layer gate operation; Step 5.3, select SWAP for mapping conversion, determine the candidate SWAP set as: the SWAP operations involving at least one logical qubit in the first layer gate operation; for each candidate SWAP operation, calculate its heuristic cost function value, and execute the SWAP operation with the lowest cost; after the SWAP operation is executed, the mapping position of the logical qubit is updated, and some two-qubit gate operations in the first layer gate operation may be executable after the mapping position is updated; Step 5.4, repeat steps 5.2 to 5.3 until all gate operations in the quantum program are executable.
4. The quantum program mapping mechanism for distributed quantum computing of claim 1, wherein, The mapping conversion mechanism in step 5 includes the design of the heuristic cost function as follows: where F represents the first layer gate operation set, E represents the extended gate operation set, H is the heuristic cost function, the extended gate operation set is the N two-qubit gate operations after the first layer gate operation, N is by default the number of logical qubits of the quantum program, |F| and |E| represent the number of gate operations in the first layer gate operation set and the extended gate operation set respectively, 0.5 is the weight parameter of the NNC value of the extended gate operation set, which means that the mapping conversion mechanism first solves the problem of the unexecutable two-qubit gate operations in the first layer gate operation set, and then reduces the number of SWAP operations required for executing subsequent gate operations, NNC represents the nearest neighbor cost function, which is calculated as the sum of two parts for a specific set of quantum gate operations: (1) the minimum number of CNOT operations required to move the logical qubits in each CNOT operation to adjacent positions; (2) the remote operation overhead; if there are remote gate operations that use the same logical qubit continuously, these remote gate operations can share a remote EPR pair for execution.
5. A storage medium for storing a program for executing a quantum program mapping mechanism for distributed quantum computing according to any one of claims 1 to 4.
Citation Information
Patent Citations
Quantum program final mapping determination method and device and quantum computer
CN115829047A
Mapping logical qubits on a quantum circuit
US10657304B1