Quantum program mapping mechanism for distributed quantum computing
Through quantum program feature analysis and initial mapping based on heat and weak connection, combined with mapping conversion taking into account remote operation overhead, the problem of excessive remote communication operations during quantum program mapping in distributed quantum computing is solved, and execution reliability and efficiency are improved.
Patent Information
- Application Number
- CN202411646742.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-18
AI Technical Summary
In a distributed quantum computing environment, remote communication operations need to be reduced during quantum program mapping to improve execution reliability and efficiency.
A quantum program mapping mechanism for distributed quantum computing is proposed, which reduces the number of remote operations through quantum program feature analysis, initial mapping based on heat and weak connection, and mapping conversion taking into account remote operation overhead.
It effectively reduces the number of remote communication operations during quantum program mapping, and improves the execution reliability and efficiency of quantum program.
Smart Images

Figure CN119623661A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum computing, and in particular to a quantum program mapping mechanism, and more particularly to a quantum program mapping mechanism for distributed quantum computing. Background Art
[0002] Quantum computing can be used to speed up the solution of difficult problems in classical computing, such as large integer prime factorization and large-scale disordered data search. However, to use quantum computing to solve practical problems, a large number of reliable qubits are needed. If quantum error correction technology is used to encode dozens of physical qubits into a 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 integrates only 1121 physical qubits.
[0003] Distributed quantum computing (DQC) is a feasible method to achieve large-scale quantum computing. In distributed quantum computing, multiple quantum processing units (QPUs) work together, and remote communication between QPUs is achieved with the help of remote EPR (Einstein-Podolsky-Rosen) pairs established by communicating qubits. Figure 1 The 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 remote node B, performs CNOT, and then uses Cat-disentagler to transmit the state back to node A. Remote communication operations have a higher error rate and take longer to execute than local communication operations occurring within the QPU. Therefore, remote operations will affect the execution reliability of quantum programs, and the remote operations required to execute quantum programs should be minimized.
[0004] Quantum program mapping is required to execute quantum programs on superconducting quantum computers. The physical qubits of a superconducting quantum computer are arranged in a grid, with connections only between adjacent physical qubits. These connections are used to execute two-qubit gate operations in quantum programs. 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 executed. At this time, a SWAP operation needs to be inserted to move one of the logical qubits to a position connected to the other qubit. The above process of inserting a SWAP operation in a quantum program and converting 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 are mainly divided into two categories. The first category is optimization methods. This type of method converts the quantum program mapping problem into an equivalent constrained optimization problem and uses a solver to solve it. This type of method has a high time complexity and can only map quantum programs with dozens of logical qubits at most. The second category is heuristic methods, which map quantum programs by greedy algorithms, designing heuristic cost functions, etc. This type of method has a relatively low time complexity and can handle larger-scale quantum programs, but it cannot guarantee that the mapping result is the 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. (2) Mapping transformation, that is, inserting SWAP operations in the quantum program so that all CNOT operations can be executed.
[0005] In the DQC environment, since the error rate of remote operations is high and the execution time is long, the number of remote operations and the number of EPR pair establishments should be reduced as much as possible during the quantum program mapping process to improve the execution reliability of the quantum program. Summary of the invention
[0006] To this end, the present invention 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 a DQC environment and improve the execution reliability of quantum programs. The present invention 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) Analysis of quantum program characteristics
[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 times the qubit interacts with other qubits, that is, the number of times the qubit is used in all two-qubit gate operations. Heat indicates how frequently a logical qubit interacts with other qubits. High-heat logical qubits have more frequent inter-qubit interactions. 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 characteristics of the quantum program. In a quantum program, the weak connectivity between multiple qubit sets is defined as 1 / the number of two-qubit gate operations that occur between qubit sets. This feature indicates the strength of the relationship between qubit sets. The higher the weak connectivity value, the less interaction there is between qubit sets, the weaker the connection, and the more suitable it is to be mapped to different QPUs. On the contrary, the lower the weak connectivity value, the more interaction there is between qubit sets. At this time, mapping each qubit set to a different QPU will result in more remote operations.
[0010] (II) Initial mapping based on heat and weak connection
[0011] Step 3. The present invention 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 low error rates for high-heat quantum bits. In the following two cases, the heat-based initial mapping mechanism is selected 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 with a higher heat than 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 hottest logical qubit. Get the hottest logical qubit and map it to the physical qubit with the lowest 1 / (qubit degree × average CNOT reliability) value. The average CNOT reliability refers to the average value of (1–CNOT error rate) of all CNOT operations that can be performed by the physical qubit. The selected physical qubit has a higher degree and average CNOT reliability. A high degree means that a high-calorie qubit can be mapped to adjacent positions with more logical qubits that interact with it, reducing the SWAP operations required for the mapping conversion process. A high average CNOT reliability means that when performing quantum gate operations on the connection of the physical qubit, the probability of errors is lower, which can improve the execution fidelity of the quantum program.
[0013] Step 3.2, map other unmapped logical qubits. When there are still logical qubits that have not been mapped, select the logical qubit that has interacted with the mapped logical qubit the most times for mapping. Select the physical qubit that can make the product of the shortest path reliability of the logical qubit and each other mapped logical qubit the highest, and map the logical qubit. The reliability of each shortest path is calculated as the product of the reliabilities of all two-qubit gate operations on the path. Repeat step 3.2 until all logical qubits are mapped.
[0014] Step 4. The second optional initial mapping mechanism is: an initial mapping mechanism based on weak connectivity. This mechanism selects the qubit set partitioning scheme with the highest weak connectivity and maps each qubit set to a QPU. The higher the weak connectivity, the less interaction between qubit sets, so mapping these qubit sets to different QPUs results in fewer remote operations. The mechanism specifically includes the following steps:
[0015] Step 4.1. Find the qubit set partitioning scheme with the highest weak connectivity. First, generate all qubit set partitioning schemes. In these partitioning schemes, the number of qubits in each qubit set does not exceed the number of qubits in the QPU. Calculate the weak connectivity value of each qubit set partitioning scheme and obtain the qubit set partitioning scheme with the highest weak connectivity.
[0016] Step 4.2: Map the logical qubits that involve the most remote operations to the vicinity of the communication qubits. In each qubit set, first map the logical qubits that involve the most remote operations. From all the physical qubits in the QPU that are connected to the communication qubit, select the physical qubit with the highest average CNOT reliability to map the logical qubit. Repeat step 4.2 until all qubits that are connected to the communication qubit are occupied.
[0017] Step 4.3, map other unmapped logical qubits. When there are still logical qubits that have not been mapped, select the logical qubit that has interacted with the mapped logical qubit the most times for mapping. Select the physical qubit that can make the product of the reliability of the interaction path between the logical qubit and each other mapped logical qubit the highest, and map the logical qubit. The reliability of each interaction path is calculated as the product of the reliabilities 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] 3. Mapping transformation considering remote operation overhead
[0019] Step 5: Mapping transformation 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. The edges in the DAG represent that two quantum gate operations share a logical qubit and there is a dependency relationship in the order of execution. The first-level gate operation refers to the set of all nodes in the DAG that have no predecessor nodes. The first-level gate operation is denoted as F.
[0021] Step 5.2: Execute all executable gate operations in the first-layer gate operations, and update the first-layer gate operations until only the two-qubit gate operations that cannot be executed due to the non-adjacent logical qubit mapping positions remain in the first-layer gate operations.
[0022] Step 5.3, select SWAP for mapping conversion. Determine the candidate SWAP set as: SWAP operations involving at least one logical qubit in the first-level 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-level gate operation may 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.
[0023]
[0024] Where F represents the first-level 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-level gate operation, and N defaults to the number of logical qubits in the quantum program. |F| and |E| represent the number of gate operations in the first-level 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 that the two-qubit gate operations in the first-level gate operation set cannot be executed, and secondly reduces the number of SWAP operations required to execute subsequent gate operations. NNC stands for the nearest neighbor cost (NNC). For a specific quantum gate operation set, its 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 one 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) The time it takes to construct a remote EPR pair is equivalent to 25 local two-qubit gate operations. If there are remote gate operations that use the same logical qubit in succession, 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 This is a schematic diagram of the Cat-Comm remote communication protocol;
[0026] Figure 2 A flowchart of a quantum program mapping mechanism for distributed quantum computing proposed by the present invention;
[0027] Figure 3 A schematic diagram of a quantum program mapping mechanism for distributed quantum computing proposed by the present invention;
[0028] Figure 4 Schematic diagram of the heat and weak connection of quantum programs;
[0029] Figure 5 for Figure 4 -The directed acyclic graph corresponding to the quantum circuit in (b);
[0030] Figure 6 Schematic diagram of candidate SWAP operations corresponding to the quantum gate operation g1. Specific implementation methods
[0032] 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.
[0033] 1. Operating environment. The present invention is based on the open source software development toolkit Qiskit to implement the quantum program mapping mechanism in the distributed quantum computing system. Diskit is used to simulate the distributed quantum computing environment.
[0034] 2. Specific steps. Figure 2 The flowchart of one embodiment of the present invention is shown in FIG. Figure 3 The present invention mainly includes the following steps:
[0035] Step 1: Analyze the thermal characteristics of quantum programs. Figure 4 - In the quantum program shown in (a), the number of CNOT operations between logical qubits q0, q1, q2 and other logical qubits are 5, 3, and 2, respectively, that is, the heats 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 can reduce remote operations.
[0036] Step 2: Analyze the weak connectivity characteristics of quantum programs. Figure 4 - In the quantum program shown in (b), there are three CNOT gate operations between logical qubits q0 and q1, while there is only one CNOT gate operation between q1 and q2. The weak connectivity between the qubit sets {q0, q1} and {q2} is 1 / the number of two-qubit gate operations that occur between the qubit sets, that is, 1 / 1=1. Compared with other logical qubit set partitioning methods, this partitioning scheme has the highest weak connectivity, which means that the correlation between the sets {q0, q1} and {q2} is the weakest.
[0037] Step 3: The first optional initial mapping mechanism is: a heat-based initial mapping mechanism. Specifically, it includes the following steps:
[0038] Step 3.1: Map the hottest logical qubit. Figure 4 - The quantum program shown in (b) first calculates the heat of each qubit. The heat of the logical qubit q0 is the highest, so q0 is mapped first.
[0039] Step 3.2, map other unmapped logical qubits. Map the remaining qubits in descending order of the number of interactions with the mapped logical qubits. Because logical qubit q1 has the most interactions with mapped q0, the second logical qubit to be mapped is q1, followed by q2.
[0040] Step 4: The second optional initial mapping mechanism is: an initial mapping mechanism based on weak connectivity. Specifically, it includes the following steps:
[0041] Step 4.1: Find the qubit set partitioning scheme with the highest weak connectivity. If the DQC contains only 2-qubit QPUs, then Figure 4 -(b) The quantum circuit shown requires cross-QPU mapping. The quantum program has the highest weakly connected qubit set partitioning scheme of {q0,q1}, {q2}.
[0042] Step 4.2: Map the logical qubits that involve 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 q0 and q1 are mapped to the vicinity of the communication qubits of the two QPUs respectively.
[0043] Step 4.3: Map other unmapped logical qubits. In the set {q0, q1}, q0 is unmapped and has the most interactions with the mapped q1, so map the logical qubit q0.
[0044] Step 5: Mapping transformation considering remote operation overhead. This mapping transformation mechanism can reduce the remote operations required for quantum program mapping execution in the following two cases. (1) If there are remote operations that continuously use the same logical qubit, these remote operations can share an EPR pair for execution. (2) If a logical qubit interacts 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:
[0045] Step 5.1: Construct a directed acyclic graph (DAG) for the quantum program. For example, Figure 5 Shown Figure 4 -The directed acyclic graph corresponding to the quantum circuit shown in (b).
[0046] Step 5.2: Execute all executable gate operations in the first-layer gate operations, and update the first-layer gate operations until only the two-qubit gate operations that cannot be executed due to the non-adjacent logical qubit mapping positions remain in the first-layer gate operations.
[0047] Step 5.3, select SWAP for mapping conversion. The candidate SWAP set is: SWAP operations involving at least one logical qubit in the first-level gate operation. For example, there is a quantum gate operation g1 in the first-level gate operation. g1 has two logical qubits q1 and q2. Figure 6 The red bold arrow shows the candidate SWAP set at this time, that is, 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 cost.
[0048] The present invention provides a quantum program mapping mechanism for distributed quantum computing, including: (1) quantum program feature analysis for obtaining the heat and weak connectivity features of quantum programs; (2) initial mapping based on heat and weak connectivity for mapping quantum programs with different quantum bit interaction features; (3) mapping conversion considering remote operation overhead, using an EPR pair to execute multiple continuous remote operations using the same logical quantum bit, and using cross-node SWAP operations to move frequently interacting logical quantum bits to the same node, so as to reduce remote communication operations with high error rates in distributed quantum computing and improve the execution reliability of quantum circuits.
[0049] This paper 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 a DQC environment and improve the execution reliability of quantum programs. The present invention 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:
[0050] (I) Analysis of quantum program characteristics
[0051] Step 1: Analyze the heat characteristics of the quantum program. In a quantum program, the heat of a logical qubit is the number of times the qubit interacts with other qubits, that is, the number of times the qubit is used in all two-qubit gate operations. Heat indicates how frequently a logical qubit interacts with other qubits. High-heat logical qubits have more frequent inter-qubit interactions. Mapping high-heat logical qubits and other logical qubits that interact with them to the same QPU can reduce remote operations.
[0052] Step 2: Analyze the weak connectivity characteristics of the quantum program. In a quantum program, the weak connectivity between multiple qubit sets is defined as 1 / the number of two-qubit gate operations that occur between qubit sets. This feature indicates the strength of the relationship between qubit sets. The higher the weak connectivity value, the less interaction there is between qubit sets, the weaker the connection, and the more suitable it is to be mapped to different QPUs. On the contrary, the lower the weak connectivity value, the more interaction there is between qubit sets. At this time, mapping each qubit set to a different QPU will result in more remote operations.
[0053] (II) Initial mapping based on heat and weak connection
[0054] Step 3. The present invention 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 low error rates for high-heat quantum bits. In the following two cases, the heat-based initial mapping mechanism is selected 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 with a higher heat than 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:
[0055] Step 3.1, map the hottest logical qubit. Get the hottest logical qubit and map it to the physical qubit with the lowest 1 / (qubit degree × average CNOT reliability) value. The average CNOT reliability refers to the average value of (1–CNOT error rate) of all CNOT operations that can be performed by the physical qubit. The selected physical qubit has a higher degree and average CNOT reliability. A high degree means that a high-calorie qubit can be mapped to adjacent positions with more logical qubits that interact with it, reducing the SWAP operations required for the mapping conversion process. A high average CNOT reliability means that when performing quantum gate operations on the connection of the physical qubit, the probability of errors is lower, which can improve the execution fidelity of the quantum program.
[0056] Step 3.2, map other unmapped logical qubits. When there are still logical qubits that have not been mapped, select the logical qubit that has interacted with the mapped logical qubit the most times for mapping. Select the physical qubit that can make the product of the shortest path reliability of the logical qubit and each other mapped logical qubit the highest, and map the logical qubit. The reliability of each shortest path is calculated as the product of the reliabilities of all two-qubit gate operations on the path. Repeat step 3.2 until all logical qubits are mapped.
[0057] Step 4. The second optional initial mapping mechanism is: an initial mapping mechanism based on weak connectivity. This mechanism selects the qubit set partitioning scheme with the highest weak connectivity and maps each qubit set to a QPU. The higher the weak connectivity, the less interaction between qubit sets, so mapping these qubit sets to different QPUs results in fewer remote operations. The mechanism specifically includes the following steps:
[0058] Step 4.1. Find the qubit set partitioning scheme with the highest weak connectivity. First, generate all qubit set partitioning schemes. In these partitioning schemes, the number of qubits in each qubit set does not exceed the number of qubits in the QPU. Calculate the weak connectivity value of each qubit set partitioning scheme and obtain the qubit set partitioning scheme with the highest weak connectivity.
[0059] Step 4.2: Map the logical qubits that involve the most remote operations to the vicinity of the communication qubits. In each qubit set, first map the logical qubits that involve the most remote operations. From all the physical qubits in the QPU that are connected to the communication qubit, select the physical qubit with the highest average CNOT reliability to map the logical qubit. Repeat step 4.2 until all qubits that are connected to the communication qubit are occupied.
[0060] Step 4.3, map other unmapped logical qubits. When there are still logical qubits that have not been mapped, select the logical qubit that has interacted with the mapped logical qubit the most times for mapping. Select the physical qubit that can make the product of the reliability of the interaction path between the logical qubit and each other mapped logical qubit the highest, and map the logical qubit. The reliability of each interaction path is calculated as the product of the reliabilities of all two-qubit gate operations on the shortest path between the two qubits. Repeat step 4.3 until all logical qubits are mapped.
[0061] 3. Mapping transformation considering remote operation overhead
[0062] Step 5: Mapping transformation considering remote operation overhead. This step includes:
[0063] 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. The edges in the DAG represent that two quantum gate operations share a logical qubit and there is a dependency relationship in the order of execution. The first-level gate operation refers to the set of all nodes in the DAG that have no predecessor nodes. The first-level gate operation is denoted as F.
[0064] Step 5.2: Execute all executable gate operations in the first-layer gate operations, and update the first-layer gate operations until only the two-qubit gate operations that cannot be executed due to the non-adjacent logical qubit mapping positions remain in the first-layer gate operations.
[0065] Step 5.3, select SWAP for mapping conversion. Determine the candidate SWAP set as: SWAP operations involving at least one logical qubit in the first-level 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-level gate operation may 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.
[0066]
[0067] Where F represents the first-level 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-level gate operation, and N defaults to the number of logical qubits in the quantum program. |F| and |E| represent the number of gate operations in the first-level 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 that the two-qubit gate operations in the first-level gate operation set cannot be executed, and secondly reduces the number of SWAP operations required to execute subsequent gate operations. NNC stands for the nearest neighbor cost (NNC). For a specific quantum gate operation set, its 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 one 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 ) The time it takes to construct a remote EPR pair is equivalent to 25 local two-qubit gate operations. If there are remote gate operations that use the same logical qubit in succession, 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.
[0068] 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: an initial mapping mechanism based on heat; Step 4, establishing the second optional initial mapping mechanism as: an initial mapping mechanism based on weak connectivity; Step 5, adopting a mapping conversion mechanism that takes remote operation overhead into consideration, by sharing EPR pairs between consecutive remote operations using the same logical qubit, and cross-node SWAP operations, reducing quantum program mapping, and performing remote communication operations.
[0069] In the quantum program in step 1, the heat of a logical qubit is the number of times the qubit interacts with other qubits, that is, the number of times the qubit is used in all two-qubit gate operations, and the heat indicates how frequently a logical qubit interacts with other qubits. In the quantum program in step 2, the weak connectivity between qubit sets is defined as 1 / the number of two-qubit gate operations occurring between qubit sets, and the weak connectivity feature indicates the strength of the correlation between qubit sets.
[0070] Step 3 includes the following steps: Step 3.1, mapping the hottest logical qubit: obtain the hottest logical qubit and map it to the physical qubit with the lowest 1 / (qubit degree × average CNOT reliability) value; 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 with the mapped logical qubit the most times for mapping; select the physical qubit that can make the product of the shortest path reliability of the logical qubit and each other mapped logical qubit the highest, and map the logical qubit; the reliability of each shortest path is calculated as the product of the reliabilities of all two-qubit gate operations on the path; Step 3.3, repeat step 3.2 until all logical qubits are mapped.
[0071] Step 4 includes the following steps: Step 4.1, find the qubit set partitioning scheme with the highest weak connectivity: first generate all qubit set partitioning schemes; in these partitioning schemes, the number of qubits in each qubit set does not exceed the number of qubits in the QPU; calculate the weak connectivity value of each qubit set partitioning scheme, and obtain the qubit set partitioning scheme with the highest weak connectivity; Step 4.2, map the logical qubits involving the most remote operations to the vicinity of the communication qubits: in each qubit set, first map the logical qubits 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 Map the logical qubit; step 4.3, repeat step 4.2 until all qubits connected to the communication qubit are occupied; step 4.4, map other unmapped logical qubits: when there are still logical qubits that have not been mapped, select the logical qubit that interacts with the mapped logical qubit the most times for mapping; select the physical qubit that can make the product of the reliability of the interaction path between the logical qubit and each other mapped logical qubit the highest, and map the logical qubit; the reliability of each interaction path is calculated as the product of the reliabilities 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.
[0072] Step 5 includes the following steps: 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 that two quantum gate operations share a logical qubit, and there is a dependency relationship in the order of execution; the first-level gate operation is denoted as F, and the first-level gate operation refers to the set of all nodes without predecessor nodes in the DAG; Step 5.2, execute all executable gate operations in the first-level gate operation, and update the first-level gate operation until only the double qubits that cannot be executed due to the non-adjacent mapping positions of the logical qubits remain in the first-level gate operation. gate operation; step 5.3, select SWAP for mapping conversion, and determine the candidate SWAP set as: SWAP operations involving at least one logical qubit in the first-level 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-level gate operation may be executed after the mapping position is updated; step 5.4, repeat steps 5.2 to 5.3 until all gate operations in the quantum program can be executed.
[0073] The mapping conversion mechanism in step 5 includes the design of the heuristic cost function as follows:
[0074]
[0075] 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 defaults to 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 that the two-qubit gate operations in the first-layer gate operation set cannot be executed, and secondly reduces the number of SWAP operations required to execute subsequent gate operations. NNC represents the nearest neighbor cost function. For a specific quantum gate operation set, its 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 use the same logical qubit continuously, these remote gate operations can share a remote EPR pair for execution.
[0076] A storage medium is used to store 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 following steps are involved: Step 1, based on the quantum program feature analysis, obtain the heat characteristics of the quantum program; Step 2, based on the quantum program feature analysis, obtain the weak connectivity feature of the quantum program; Step 3, establishing the first optional initial mapping mechanism as: a heat-based initial mapping mechanism; Step 4, establishing a second optional initial mapping mechanism: an initial mapping mechanism based on weak connectivity; In step 5, a mapping conversion mechanism that takes remote operation overhead into consideration is adopted to reduce quantum program mapping and perform remote communication operations by sharing EPR pairs between consecutive remote operations using the same logical qubit and performing cross-node SWAP operations.
2. A quantum program mapping mechanism for distributed quantum computing as claimed in claim 1, characterized in that: In the quantum program in step 1, the heat of a logical qubit is the number of times the qubit interacts with other qubits, that is, the number of times the qubit is used in all two-qubit gate operations. The heat indicates how frequently a logical qubit interacts with other qubits.
3. A quantum program mapping mechanism for distributed quantum computing as claimed in claim 1, characterized in that: In the quantum program in step 2, the weak connectivity between qubit sets is defined as 1 / the number of two-qubit gate operations occurring between qubit sets. The weak connectivity feature indicates the strength of the correlation between qubit sets.
4. A quantum program mapping mechanism for distributed quantum computing as claimed in claim 1, characterized in that: Step 3 includes the following steps: Step 3.1, mapping the hottest logical qubit: Get the hottest logical qubit and map it to the physical qubit with the lowest 1 / (qubit degree × average CNOT reliability) value; Step 3.2, mapping other unmapped logical qubits: when there are still logical qubits that have not been mapped, select the logical qubit that has interacted with the mapped logical qubit the most times for mapping; select the physical qubit that can make the product of the shortest path reliability of the logical qubit and each other mapped logical qubit the highest, and map the logical qubit; the reliability of each shortest path is calculated as the product of the reliabilities of all two-qubit gate operations on the path; Step 3.3, repeat step 3.2 until all logical qubits are mapped.
5. A quantum program mapping mechanism for distributed quantum computing as claimed in claim 1, characterized in that: Step 4 includes the following steps: Step 4.1, find the qubit set partitioning scheme with the highest weak connectivity: first generate all qubit set partitioning schemes; in these partitioning schemes, the number of qubits in each qubit set does not exceed the number of qubits in the QPU; calculate the weak connectivity value of each qubit set partitioning scheme, and obtain the qubit set partitioning scheme with the highest weak connectivity; Step 4.2, map the logical qubits that involve the most remote operations to the vicinity of the communication qubits: In each qubit set, first map the logical qubits that involve the most remote operations; from all the physical qubits in the QPU that are connected to the communication qubit, select the physical qubit with the highest average CNOT reliability to map 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 logical qubits that have not been mapped, select the logical qubit that has interacted with the mapped logical qubit the most times for mapping; select the physical qubit that can make the product of the reliability of the interaction path between the logical qubit and each other mapped logical qubit the highest, and map the logical qubit; the reliability of each interaction path is calculated as the product of the reliabilities 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.
6. A quantum program mapping mechanism for distributed quantum computing as claimed in claim 1, characterized in that: Step 5 includes the following steps: 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 that two quantum gate operations share a logical qubit, and there is a dependency relationship in the order of execution; the first-level gate operation is denoted as F, and the first-level gate operation refers to the set of all nodes in the DAG without predecessor nodes; Step 5.2, execute all executable gate operations in the first-layer gate operations, and update the first-layer gate operations until only the two-qubit gate operations that cannot be executed due to the non-adjacent logical qubit mapping positions remain in the first-layer gate operations; Step 5.3, select SWAP for mapping conversion, and determine the candidate SWAP set as: SWAP operations involving at least one logical qubit in the first-level 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-level gate operation may be executed after the mapping position is updated; Step 5.4, repeat steps 5.2 to 5.3 until all gate operations in the quantum program can be executed.
7. A quantum program mapping mechanism for distributed quantum computing as claimed in claim 1, characterized in that: 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 defaults to 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 that the two-qubit gate operations in the first-layer gate operation set cannot be executed, and secondly reduces the number of SWAP operations required to execute subsequent gate operations. NNC represents the nearest neighbor cost function. For a specific quantum gate operation set, its 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 use the same logical qubit continuously, these remote gate operations can share a remote EPR pair for execution.
8. A storage medium for storing a program for executing a quantum program mapping mechanism for distributed quantum computing as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
A circuit transformation method for quantum compilation
CN112085204A
Mapping logical qubits on a quantum circuit
CN113261017A
Quantum program final mapping determination method and device and quantum computer
CN115829047A
Mapping logical qubits on a quantum circuit
US10657304B1