Mapping management method and device, equipment, storage medium and computer program product

By generating entanglement relationship information and stability coefficients of quantum bit variables and optimizing quantum bit mapping management, the problem of quantum computing accuracy caused by differences in the reliability of physical quantum bit connections is solved, and the stability and efficiency of quantum computing are improved.

CN120764709AActive Publication Date: 2025-10-10CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511244882.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-02
Publication Date
2025-10-10
Estimated Expiration
2045-09-02

AI Technical Summary

Technical Problem

In existing technologies, differences in connection reliability between physical quantum bits make it difficult to ensure the accuracy of quantum computing tasks, and the connection is unstable, affecting the efficiency and accuracy of quantum computing.

Method used

By generating entanglement relationship information of quantum bit variables, combining the connection information and stability coefficient of physical quantum bits, determining the mapping relationship information, and calling the corresponding physical quantum bits to execute the quantum program according to the information, the mapping management of quantum bits is optimized.

Benefits of technology

It improves the stability and accuracy of quantum computing, reduces the number of SWAP gates that need to be inserted in the overall quantum computing process, and reduces the impact of differences in physical quantum bit connections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120764709A_ABST
    Figure CN120764709A_ABST
Patent Text Reader

Abstract

The invention discloses a mapping management method and device, equipment, a storage medium and a computer program product, and the method comprises the steps: generating quantum bit variable entanglement relation information based on a to-be-executed quantum program; obtaining connection information based on a connection relationship between physical quantum bits included in the quantum processor; calculating a quantum bit stability coefficient of each physical quantum bit in the connection information based on the average read error rate and the connection reliability parameter value of each physical quantum bit in the connection information; obtaining mapping relation information based on the connection information, the quantum bit stability coefficient of each physical quantum bit and quantum bit variable entanglement relation information; the corresponding physical quantum bits are called according to the mapping relation information, the quantum program to be executed is executed, mapping management of the quantum bits is achieved, the stability of the quantum calculation process is guaranteed, and the calculation efficiency and accuracy of quantum calculation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of quantum computing technology, and in particular to a mapping management method, apparatus, device, storage medium, and computer program product. Background Art

[0002] Qubit mapping is a fundamental and critical technology in quantum computing. The connectivity of physical qubits in a quantum processing unit (QPU) is often limited, and their interaction ranges vary. Qubit mapping involves not only the efficient allocation of physical qubits but also the scheduling and optimization of quantum gate operations. To adapt to varying QPU topologies and qubit coherence times, a variety of mapping algorithms and strategies have been developed, including heuristic methods, graph-based algorithms, and problem-specific mapping techniques. Each of these methods has its own advantages and can be used individually or in combination to meet the needs of diverse quantum computing models and applications.

[0003] However, under the current limitations of quantum technology, the reliability of connections between physical qubits faces great challenges and problems. The entangled state is very easily destroyed by environmental interference, resulting in unstable connections. Physical qubits may also exhibit different characteristics due to differences in manufacturing and design, making connection reliability difficult to guarantee, resulting in an imbalance between quantum computing efficiency and accuracy. Summary of the Invention

[0004] In order to solve the above technical problems, the present application hopes to provide a mapping management method, device, equipment, storage medium and computer program product, which solves the problem that the accuracy of quantum computing tasks is difficult to ensure due to the current neglect of the differences in connection reliability between physical quantum bits, and proposes a quantum bit mapping strategy that fully considers the actual characteristics of physical quantum bits to realize the mapping management of quantum bits, so as to ensure the stability of the quantum computing process and improve the efficiency and accuracy of quantum computing.

[0005] The technical solution of this application is achieved as follows: The present application provides a mapping management method, the method comprising: Generating qubit variable entanglement relationship information based on the quantum program to be executed; wherein the qubit variable entanglement relationship information is used to record program qubit variable pairs having a corresponding relationship between two-bit logic gates; Obtaining connection information based on a connection relationship between physical quantum bits included in the quantum processor; Calculating a qubit stability coefficient for each of the physical qubits in the connection information based on an average readout error rate and a connection reliability parameter value of each of the physical qubits in the connection information; wherein the qubit stability coefficient is used to represent the stability reliability of the corresponding physical qubit; Obtaining mapping relationship information based on the connection information, the qubit stability coefficient of each of the physical qubits, and the qubit variable entanglement relationship information; wherein the mapping relationship information is used to record the mapping relationship between the program qubits included in the quantum program to be executed and the corresponding physical qubits; The corresponding physical quantum bits are called according to the mapping relationship information to execute the quantum program to be executed.

[0006] In the above solution, generating entanglement relationship information of quantum bit variables based on the quantum program to be executed includes: Counting all program qubit variables included in the quantum program to be executed to obtain N first qubits, where N is an integer greater than or equal to 1; Counting program qubit variables in the quantum program to be executed that have a two-bit logic gate relationship with each first qubit to obtain m second qubits corresponding to each first qubit; where m is an integer greater than or equal to 0 and less than or equal to N-1; According to the execution sequence of the quantum program to be executed, the N first quantum bits and the corresponding m second quantum bits are sorted and stored respectively to obtain the entanglement relationship information of the quantum bit variables.

[0007] In the above solution, calculating the qubit stability coefficient of each physical qubit in the connection information based on the average readout error rate and the connection reliability parameter value of each physical qubit in the connection information includes: Determining a connection reliability parameter value between p connection bits in the connection information that have a connection relationship with each of the physical quantum bits; wherein p is an integer greater than or equal to 1; For each of the physical quantum bits, calculating a cumulative value of the corresponding p connection reliability parameter values ​​to obtain a first value; Calculating a first sum of the average readout error rate of each physical quantum bit and 1; Calculating the first coefficient power of the first sum value of each of the physical quantum bits to obtain a second value; The ratio of the first value to the second value of each physical quantum bit is calculated to obtain the quantum bit stability coefficient of the corresponding physical quantum bit.

[0008] In the above solution, the mapping relationship information is obtained based on the connection information, the quantum bit stability coefficient of each physical quantum bit, and the quantum bit variable entanglement relationship information, including: sorting the physical qubits included in the connection information, starting from the physical qubit with the largest qubit stability coefficient in the connection information, and sequentially determining the physical qubits that have a connection relationship and have the largest qubit stability coefficient to obtain physical qubit sorting information; Sorting the N first qubits in the qubit variable entanglement relationship information to obtain program qubit sorting information; Based on the program qubit sorting information and the physical qubit sorting information, the mapping relationship information including the mapping relationship between the N first qubits and the corresponding physical qubits is obtained.

[0009] In the above solution, the step of sorting the N first qubits in the qubit variable entanglement relationship information to obtain program qubit sorting information includes: Determining a first qubit having the most entanglement relationships from the qubit variable entanglement relationship information to obtain a third qubit; Determining a fourth qubit ranked first among the m second qubits corresponding to the third qubit; After sorting the fourth quantum bit to the third quantum bit, first sorting information is obtained; If a fifth qubit that is ranked first among the m second qubits corresponding to the fourth qubit and does not exist in the first sorting information is determined from the qubit variable entanglement relationship information, the fifth qubit is sorted to the fourth qubit in the first sorting information to obtain second sorting information; If a sixth qubit that is ranked first among the m second qubits corresponding to the fifth qubit and does not exist in the second sorting information is determined from the qubit variable entanglement relationship information, the sixth qubit is sorted to the fifth qubit in the second sorting information to obtain third sorting information; If the sixth qubit is not determined from the qubit variable entanglement relationship information, determine the seventh qubit that is the first qubit after the fifth qubit and does not exist in the second sorting information from the m second qubits of the fourth qubit; After sorting the seventh quantum bit to the fourth quantum bit in the second sorting information, fourth sorting information is obtained; If, from the quantum bit variable entanglement relationship information, it is determined that the eighth quantum bit is ranked first among the m second quantum bits corresponding to the seventh quantum bit and does not exist in the fourth sorting information, the eighth quantum bit is sorted to the seventh quantum bit in the fourth sorting information until the program quantum bit sorting information including the sorting of N first quantum bits is obtained.

[0010] In the above solution, calling the corresponding physical quantum bits according to the mapping relationship information to execute the quantum program to be executed includes: During execution of the quantum program to be executed, if a two-bit logic gate to be executed is executed, determining physical qubits corresponding to two program qubits corresponding to the two-bit logic gate to be executed from the mapping relationship information to obtain a first execution qubit and a second execution qubit; Determining a qubit connection relationship between the first execution qubit and the second execution qubit based on the connection information; If the quantum bit connection relationship is a direct connection, the first execution quantum bit and the second execution quantum bit are called to execute the two-bit logic gate to be executed.

[0011] In the above solution, the method further includes: If the qubit connection relationship is an indirect connection, determining a maximum number of two-bit logic gates that can be inserted based on the connection information, the first execution qubit, and the second execution qubit; Planning, based on the connection information, a plurality of reference routing paths connecting the first execution qubit and the second execution qubit; determining a target routing path from the plurality of reference routing paths based on the maximum number and the connection information; The to-be-executed two-bit logic gate is executed based on the target routing path.

[0012] In the above solution, if the qubit connection relationship is an indirect connection, determining the maximum number of two-bit logic gates allowed to be inserted based on the connection information, the first execution qubit, and the second execution qubit includes: If the qubit connection relationship is an indirect connection, determining a minimum number of hops between the first execution qubit and the second execution qubit from the multiple reference routing paths; Calculating an average value of connection reliability parameter values ​​of all physical quantum bits included in the plurality of reference routing paths; Counting minimum connection reliability parameter values ​​corresponding to the physical quantum bits in the multiple reference routing paths; Calculating a first ratio of the minimum connection reliability parameter value to the average value; calculating a first difference between 1 and the first ratio; The product of the first difference and the minimum number of hops is calculated to obtain the maximum number.

[0013] In the above solution, determining a target routing path from the plurality of reference routing paths based on the maximum number and the connection information includes: Determining, based on the connection information, a connection reliability parameter value of the physical quantum bits included in each of the reference routing paths; Calculating the product of all the connection reliability parameter values ​​included in each reference routing path to obtain a stability parameter value of each reference routing path; A reference routing path having a hop count less than or equal to the maximum hop count and a maximum stability parameter value is determined from the multiple reference routing paths to obtain the target routing path.

[0014] The present application provides a mapping management device, the device comprising: a generating unit, a first obtaining unit, a calculating unit, a second obtaining unit and an executing unit; wherein: The generating unit is configured to generate qubit variable entanglement relationship information based on the quantum program to be executed; wherein the qubit variable entanglement relationship information is used to record program qubit variable pairs having a corresponding relationship between two-bit logic gates; The first obtaining unit is configured to obtain connection information based on a connection relationship between physical qubits included in the quantum processor; The calculation unit is configured to calculate a qubit stability coefficient of each physical qubit in the connection information based on an average readout error rate and a connection reliability parameter value of each physical qubit in the connection information; wherein the qubit stability coefficient is used to represent the stability reliability of the corresponding physical qubit; The second obtaining unit is configured to obtain mapping relationship information based on the connection information, the qubit stability coefficient of each of the physical qubits, and the qubit variable entanglement relationship information; wherein the mapping relationship information is used to record the mapping relationship between the program qubits included in the quantum program to be executed and the corresponding physical qubits; The execution unit is used to call the corresponding physical quantum bits according to the mapping relationship information to execute the quantum program to be executed.

[0015] The present application provides an electronic device, the device comprising at least: a communication interface, a memory, a processor, and a communication bus; wherein: The memory is used to store executable information; The communication bus is configured to realize communication connection among the communication interface, the processor and the memory. The processor is configured to execute the mapping management program stored in the memory to realize the steps in the mapping management method according to any one of the preceding embodiments.

[0016] The application provides a storage medium, and the storage medium stores a mapping management program. The mapping management program, when executed, is configured to realize the steps in the mapping management method according to any one of the preceding embodiments.

[0017] The application provides a computer program product, and the computer program product comprises a computer program. The computer program, when executed by a processor, realizes the steps in the mapping management method according to any one of the preceding embodiments.

[0018] The mapping management method, device, equipment, storage medium and computer program product provided by the embodiments of the application realize the mapping relationship between the program qubit variable and the physical qubit by determining the qubit variable entanglement relationship information between the program qubit variables in the to-be-executed quantum program, the qubit stability coefficient of the physical qubit and the connection information composed of the connection relationship between the physical qubits, execute the to-be-executed quantum program according to the mapping relationship information after obtaining the mapping relationship information, solve the problem that the accuracy of the quantum computing task is difficult to guarantee due to the difference in the connection reliability between the physical qubits, propose a qubit mapping strategy, and fully consider the actual characteristics of the physical qubits to realize the mapping management of the qubits, so as to guarantee the stability of the quantum computing process and improve the computing efficiency and accuracy of the quantum computing. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 A flowchart of a mapping management method provided by the embodiments of the application is shown. Figure 2 A flowchart of an application embodiment of a mapping management method provided by the embodiments of the application is shown. Figure 3 A physical qubit connection topology diagram provided by the embodiments of the application is shown. Figure 4 A schematic diagram of a routing path provided in an embodiment of the present application; Figure 5 A schematic diagram of the structure of a mapping management device provided in an embodiment of the present application; Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.

[0021] The embodiment of the present application provides a mapping management method, referring to Figure 1 As shown, the method is applied to an electronic device, and the method includes the following steps: Step 101: Generate entanglement relationship information of quantum bit variables based on the quantum program to be executed.

[0022] Among them, the entanglement relationship information of quantum bit variables is used to record program quantum bit variable pairs with a corresponding relationship between two-bit logic gates.

[0023] In the embodiments of the present application, the electronic device is a device capable of running quantum programs, such as a quantum computer device or a quantum computer server. The quantum program to be executed is a running program stored in the electronic device for implementing a corresponding quantum computing task. The quantum program to be executed may be the quantum program that the electronic device is currently about to execute. In this case, after the electronic device determines that it has obtained the quantum program to be executed, it analyzes the program content of the quantum program to be executed, determines the program qubits included in the quantum program to be executed, and counts the program qubit variable pairs that have a corresponding two-bit logic gate relationship to obtain qubit variable entanglement relationship information.

[0024] In some application scenarios, the entanglement relationship information of quantum bit variables can be recorded and stored in the form of lists, databases, dictionaries, indexes, etc. This can facilitate the subsequent rapid search and application of the information content in the entanglement relationship information of quantum bit variables. The specific storage method can be determined by actual conditions and is not specifically limited here.

[0025] Step 102: Obtain connection information based on the connection relationship between the physical quantum bits included in the quantum processor.

[0026] In an embodiment of the present application, statistics are collected on the physical qubits included in a quantum processor in a terminal device to determine the connection relationships between the physical qubits included in the quantum processor, thereby obtaining connection information between the physical qubits included in the quantum processor. This connection information can be stored in the form of a graph, such as a relationship topology graph, a list, or a database, and the specific form can be determined by actual circumstances and is not specifically limited here.

[0027] Step 103: Calculate the quantum bit stability coefficient of each physical quantum bit in the connection information based on the average readout error rate of each physical quantum bit in the connection information and the connection reliability parameter value.

[0028] Among them, the quantum bit stability coefficient is used to indicate the stability and reliability of the corresponding physical quantum bit.

[0029] In an embodiment of the present application, the average readout error rate of each physical qubit in the connection information can be calculated based on statistics of the readout error rate of each physical qubit in actual application scenarios. Similarly, the connection reliability parameter value indicating the connection reliability between each physical qubit and other physical qubits can also be calculated based on statistics based on actual application scenarios. In this way, based on the connection relationship between the physical qubits in the connection information, the average readout error rate and connection reliability parameter value of each physical qubit are calculated using a preset calculation method to obtain a qubit stability coefficient for each physical qubit in the connection information. The qubit stability coefficient of each physical qubit is used to comprehensively identify the stability and reliability of the physical qubit.

[0030] Step 104: Obtain mapping relationship information based on the connection information, the quantum bit stability coefficient of each physical quantum bit, and the quantum bit variable entanglement relationship information.

[0031] The mapping relationship information is used to record the mapping relationship between the program quantum bits included in the quantum program to be executed and the corresponding physical quantum bits.

[0032] In an embodiment of the present application, a calling order of the physical quantum bits is determined according to the connection information including the connection relationship between the physical quantum bits and the quantum bit stability coefficient of each physical quantum bit. For example, a mapping relationship between the physical quantum bits and the program quantum bits in the quantum bit variable entanglement relationship information can be established by sorting first and then mapping, or by determining the calling order while mapping, so that when the quantum program to be executed is subsequently executed, the corresponding physical quantum bits can be called according to the mapping relationship to complete the operation and calculation process of the quantum program.

[0033] Step 105: Call the corresponding physical quantum bits according to the mapping relationship information and execute the quantum program to be executed.

[0034] In an embodiment of the present application, when executing a quantum program to be executed, if the program quantum bit in the quantum bit variable entanglement relationship information is executed, the corresponding physical quantum bit can be determined based on the mapping relationship information, and the corresponding physical quantum bit can be called to perform calculations, completing the calculation process of the quantum program to be executed and obtaining the final calculation result. In some application scenarios, after executing the quantum program to be executed and obtaining the calculation result, the calculation result can be stored and processed, or the calculation result can be output and processed according to the actual needs of the user, for example, the calculation structure can be output to the display area of ​​the electronic device, or the calculation result can be output to a display device that has a communication connection with the electronic device, such as a smart mobile terminal device, etc. The specific method can be determined by the actual situation and is not specifically limited here.

[0035] Based on the foregoing embodiment, in other embodiments of the present application, step 101 generates qubit variable entanglement relationship information based on the quantum program to be executed, which can be implemented by the following steps: Counting all program qubit variables included in the quantum program to be executed to obtain N first qubits, where N is an integer greater than or equal to 1; Counting the program qubit variables that have a two-bit logic gate relationship with each first qubit in the quantum program to be executed, and obtaining m second qubits corresponding to each first qubit; where m is an integer greater than or equal to 0 and less than or equal to N-1; According to the execution sequence of the quantum program to be executed, the N first quantum bits and the corresponding m second quantum bits are sorted and stored respectively to obtain the entanglement relationship information of the quantum bit variables.

[0036] In an embodiment of the present application, a statistical analysis of the program qubit variables of a quantum program to be executed is performed to determine all the program qubit variables included therein, thereby obtaining N first qubits. The two-bit logic gate operation relationship included in the quantum program to be executed is then determined, and then the qubits with a two-bit logic gate relationship corresponding to each first qubit in the N first qubits are counted to obtain m second qubits corresponding to each first qubit, where m is determined by the actual situation and may be 0, meaning that the corresponding first qubit does not have a two-bit logic gate relationship. The processes of counting the two-bit logic gate operation relationship in the quantum program to be executed and counting all the program qubit variables can be implemented simultaneously, or by first executing one of the processes and then executing the other statistical process. The specific process can be determined by the actual application scenario and is not specifically limited here.

[0037] Thus, after obtaining the m second qubits corresponding to each first qubit, the N first qubits and the m second qubits corresponding to each first qubit are stored to obtain the quantum bit variable entanglement relationship information. In the quantum bit variable entanglement relationship information, when the N first qubits are stored, the N first qubits can be stored in order according to the time sequence of the N first qubits in the quantum program to be executed, that is, the time sequence of the corresponding first qubits in the execution of the quantum program to be executed. Similarly, for the m second qubits corresponding to each first qubit, the m second qubits can also be stored in order according to the time sequence of the two-bit logic gate to which each second qubit and the corresponding first qubit are executed in the quantum program to be executed. In this way, the quantum bits can be related to the execution order of the actual quantum program during subsequent analysis, ensuring certain time characteristics.

[0038] Based on the foregoing embodiments, in other embodiments of the present application, step 103 calculates the quantum bit stability coefficient of each physical qubit in the connection information based on the average readout error rate of each physical qubit in the connection information and the connection reliability parameter value, which can be implemented by the following steps: determining the connection reliability parameter value between the p connection bits having a connection relationship with each physical qubit in the connection information; wherein p is an integer greater than or equal to 1; for each physical qubit, calculating the cumulative value of the corresponding p connection reliability parameter values to obtain a first value; calculating the first sum value of the average readout error rate of each physical qubit and 1; calculating the first coefficient power of the first sum value of each physical qubit to obtain a second value; calculating the ratio of the first value and the second value of each physical qubit to obtain the quantum bit stability coefficient of the corresponding physical qubit.

[0039] In the embodiments of the present application, the first coefficient a is an empirical value set according to a large number of experiments or according to actual application scenarios, mainly used to adjust the influence of the average readout error rate on the quantum bit stability coefficient. In actual application process, it can be adjusted according to actual needs, which is not limited here, and can be determined by actual situation.

[0040] This embodiment defines a method for calculating the quantum bit stability coefficient, specifically: from the connection information, the p connection bits that have a connection relationship with each physical quantum bit can be counted, where the connection relationship here is a direct connection relationship, and then the connection reliability parameter value between each physical quantum bit and each of the p connection bits is obtained to obtain the p connection reliability parameter values ​​corresponding to each physical quantum bit. For each physical quantum bit, the cumulative sum of the corresponding p connection reliability parameter values ​​is calculated to obtain a first value, and then the first sum value of each physical quantum bit is calculated = 1 + the corresponding average readout error rate, and finally the quantum bit stability coefficient of each physical quantum bit = first value / first sum value α = first value / (1 + corresponding average read error rate) α This is a calculation method for calculating the quantum bit stability coefficient provided in an embodiment of the present application. In other embodiments of the present application, other calculation methods can also be used to comprehensively calculate the two parameters of the average readout error rate and the connection reliability parameter value of each physical quantum bit to determine the quantum bit stability coefficient of the corresponding physical quantum bit.

[0041] Based on the foregoing embodiment, in other embodiments of the present application, step 104 obtains mapping relationship information based on the connection information, the qubit stability coefficient of each physical qubit, and the qubit variable entanglement relationship information, which can be implemented by the following steps: For the physical qubits included in the connection information, starting from the physical qubit with the largest qubit stability coefficient in the connection information, the physical qubits having a connection relationship and the largest qubit stability coefficient are sorted in order to obtain physical qubit sorting information; Sort the N first qubits in the entanglement relationship information of the qubit variables to obtain program qubit sorting information; Based on the program qubit sorting information and the physical qubit sorting information, mapping relationship information including mapping relationships between the N first qubits and corresponding physical qubits is obtained.

[0042] In the embodiment of the present application, an implementation method for determining the mapping relationship information is to use the method of sorting first and mapping later, that is, for the physical quantum bits included in the connection information, the physical quantum bits are sorted according to the size of the quantum bit stability coefficient calculated and the connection relationship, to obtain the physical quantum bit sorting information. For example, from the connection relationship, the physical quantum bit with the largest quantum bit stability coefficient is determined, and the sorting is first. Then, from the multiple physical quantum bits having a connection relationship with the physical quantum bit with the largest quantum bit stability coefficient, the physical quantum bit with the largest quantum bit stability coefficient is determined, and the sorting is second. Then, from the multiple physical quantum bits having a connection relationship with the physical quantum bit with the second sorting, the physical quantum bit with the largest quantum bit stability coefficient is determined, and the sorting is third. The above process is repeated until all the physical quantum bits in the connection information are sorted.

[0043] For the N first quantum bits included in the quantum bit variable entanglement relationship information, the first quantum bits are sorted according to a preset chain sorting manner to obtain the program quantum bit sorting information. Finally, according to the correspondence between the chain sorting manner and the size sorting manner, the program quantum bits in the program quantum bit sorting information and the first quantum bits in the physical quantum bit sorting information are one-to-one mapped to obtain the physical quantum bits corresponding to the program quantum bits. In this way, the mapping relationship information can be obtained.

[0044] The larger the quantum bit stability coefficient is, the stronger the connection reliability between the physical quantum bit and the corresponding connection bit is. When the program quantum bit with the first sorting in the program quantum bit sorting information is the quantum bit with the most entanglement relationship, the one-to-one mapping between the program quantum bit with the first sorting in the program quantum bit sorting information and the physical quantum bit with the largest quantum bit stability coefficient in the physical quantum bit sorting information can be performed, and the corresponding mapping relationship information can be obtained.

[0045] In one case, one implementation manner for determining the mapping relationship can also be to obtain a corresponding program quantum bit in sequence according to the chain sorting manner, and then to map and correspond the physical quantum bit with the largest quantum bit stability coefficient from the multiple physical quantum bits. The mapped and corresponding program quantum bits and physical quantum bits can be identified by using, for example, the identification information, and the bits not identified can be used for mapping when the subsequent selection is performed.

[0046] Based on the foregoing embodiment, in other embodiments of the present application, the step of sorting the N first quantum bits in the quantum bit variable entanglement relationship information to obtain the program quantum bit sorting information can be implemented by the following steps: From the entanglement relationship information of the quantum bit variables, determine the first quantum bit with the most entanglement relationship, and obtain the third quantum bit; Determine a fourth qubit ranked first among the m second qubits corresponding to the third qubit; After sorting the fourth quantum bit to the third quantum bit, first sorting information is obtained; If a fifth qubit that ranks first among the m second qubits corresponding to the fourth qubit and does not exist in the first sorting information is determined from the qubit variable entanglement relationship information, the second sorting information is obtained after sorting the fifth qubit to the fourth qubit in the first sorting information; If a sixth qubit that ranks first among the m second qubits corresponding to the fifth qubit and does not exist in the second sorting information is determined from the qubit variable entanglement relationship information, the sixth qubit is sorted to the fifth qubit in the second sorting information to obtain third sorting information; If the sixth qubit is not determined from the qubit variable entanglement relationship information, determine the seventh qubit that is the first one after the fifth qubit and does not exist in the second sorting information from the m second qubits of the fourth qubit; After sorting the seventh quantum bit to the fourth quantum bit in the second sorting information, fourth sorting information is obtained; If the eighth quantum bit is determined to be ranked first among the m second quantum bits corresponding to the seventh quantum bit and does not exist in the fourth sorting information from the quantum bit variable entanglement relationship information, the eighth quantum bit is sorted to the seventh quantum bit in the fourth sorting information until the program quantum bit sorting information including the sorting of N first quantum bits is obtained.

[0047] In an embodiment of the present application, it is assumed that the entanglement relationship information of quantum bit variables includes a0: [a1, a3], a1: [a0, a2], a2: [a1, a3, a5], a3: [a0, a2, a4], a4: [a3, a5], a5: [a2, a4], wherein a0, a1, ... a5 before the colon are program quantum bits determined in sequence according to the program execution time sequence in the quantum program to be executed, and the objects in the brackets [ ] are program quantum bits that have a two-bit logic gate relationship with the corresponding program quantum bits before [ ]. In this way, the above-mentioned quantum bit variable entanglement relationship information is sorted, and the obtained program quantum bit sorting information is: a2, a1, a0, a3, a4, a5. Among them, when sorting, if there are multiple first quantum bits with the most entanglement relationships, the first quantum bit with the highest ranking can be determined based on the execution time sequence of these multiple first quantum bits in the quantum program to be executed. For example, the entanglement relationship of a2 and a3 is the same, which is 3, and a2 is executed before a3 because a2 is the first sorting object in the program quantum bit sorting information.

[0048] Based on the foregoing embodiment, in other embodiments of the present application, step 105 calls the corresponding physical quantum bits according to the mapping relationship information to execute the quantum program to be executed, which can be achieved by the following steps: During execution of the quantum program to be executed, if a two-bit logic gate to be executed is executed, the physical qubits corresponding to the two program qubits corresponding to the two-bit logic gate to be executed are determined from the mapping relationship information to obtain a first execution qubit and a second execution qubit; Determining a qubit connection relationship between the first execution qubit and the second execution qubit based on the connection information; If the quantum bit connection relationship is a direct connection, the first execution quantum bit and the second execution quantum bit are called to execute the two-bit logic gate to be executed.

[0049] In the embodiments of the present application, the "two-bit logic gate to be executed" refers to the two-bit logic gate to be executed during the execution of the quantum program to be executed. During the execution of the quantum program to be executed, if the two-bit logic gate to be executed is executed, the electronic device determines the two program qubits corresponding to the two-bit logic gate to be executed, then determines the physical qubits corresponding to the two program qubits from the mapping relationship information to obtain the first execution qubit and the second execution qubit. Finally, based on the connection information, the qubit connection relationship between the first execution qubit and the second execution qubit is determined, that is, whether the first execution qubit and the second execution qubit have a direct connection. If the first execution qubit and the second execution qubit are directly connected, the electronic device directly calls the first execution qubit and the second execution qubit to complete the logical relationship of the two-bit logic gate to be executed.

[0050] Based on the foregoing embodiment, in other embodiments of the present application, the electronic device is further configured to perform the following steps: If the qubit connection relationship is an indirect connection, determining a maximum number of two-bit logic gates that can be inserted based on the connection information, the first execution qubit, and the second execution qubit; Planning, based on the connection information, a plurality of reference routing paths connecting the first execution qubit and the second execution qubit; determining a target routing path from a plurality of reference routing paths based on the maximum number and connection information; Based on the target routing path, a two-bit logic gate to be executed is executed.

[0051] In an embodiment of the present application, when it is determined that the quantum bit connection relationship is an indirect connection, that is, the first execution quantum bit and the second execution quantum bit are indirect connected, based on the connection information, the first execution connection bit and the second execution connection bit, the maximum number of two-bit logic gates allowed to be inserted between the first execution bit and the second execution connection bit is determined, and then from the connection information, multiple reference routing paths that can be used to establish connections between the first execution quantum bit and the second execution quantum bit are determined. There are usually at least two reference routing paths here, that is, in the connection information, there are usually two or more paths between the first execution quantum bit and the second execution quantum bit. The maximum number and the parameters between the first execution quantum bit and the second execution quantum bit in the connection information are analyzed, and a routing path is determined from the multiple reference routing paths to obtain the target routing path to execute the two-bit logic gate to be executed through the target routing path.

[0052] Based on the foregoing embodiment, in other embodiments of the present application, if the qubit connection relationship is an indirect connection, determining the maximum number of two-bit logic gates allowed to be inserted based on the connection information, the first execution qubit, and the second execution qubit can be achieved by the following steps: If the qubit connection relationship is an indirect connection, determining the minimum number of hops between the first execution qubit and the second execution qubit from multiple reference routing paths; Calculating an average value of connection reliability parameter values ​​of all physical quantum bits included in the plurality of reference routing paths; Counting minimum connection reliability parameter values ​​corresponding to physical quantum bits in multiple reference routing paths; Calculating a first ratio of a minimum connection reliability parameter value to an average value; calculating a first difference between 1 and the first ratio; The product of the first difference and the minimum number of hops is calculated to obtain the maximum number.

[0053] In an embodiment of the present application, when the qubit connection relationship is not a direct connection, the electronic device analyzes multiple reference routing paths, counts the number of hops between the first execution qubit and the second execution qubit in each reference routing path, and determines the minimum hop count from the multiple hop counts corresponding to the multiple reference routing paths. Then, based on the connection information, the connection reliability parameter value of the physical qubit included in each reference routing path is determined. Then, based on the connection reliability parameter value of the physical qubit included in each reference routing path, the average value corresponding to each reference routing path is calculated. At the same time, the connection reliability parameter values ​​included in the multiple reference routing paths are statistically analyzed to determine the minimum connection reliability parameter value with the smallest value. In this way, after calculating a first ratio of the minimum connection reliability parameter value to the average value, 1-the first ratio is calculated to obtain a first difference. Finally, the product of the first difference and the minimum hop count is calculated to obtain the maximum number. In some application scenarios, if the product of the first difference and the minimum hop count is a decimal, rounding or rounding up can be used to obtain the maximum number.

[0054] Based on the foregoing embodiment, in other embodiments of the present application, the step of determining a target routing path from multiple reference routing paths based on the maximum number and connection information can be implemented by the following steps: Determining a connection reliability parameter value of a physical quantum bit included in each reference routing path based on the connection information; Calculating the product of all connection reliability parameter values ​​included in each reference routing path to obtain a stability parameter value of each reference routing path; A reference routing path having a hop count less than or equal to a maximum hop count and a maximum stability parameter value is determined from multiple reference routing paths to obtain a target routing path.

[0055] In an embodiment of the present application, based on the connection information, the product of all connection reliability parameter values ​​included in each reference routing path is calculated to obtain a corresponding stability parameter value. From multiple reference routing paths, a reference routing path having a hop count less than or equal to the maximum hop count but having the largest stability parameter value is determined as the target routing path. In this way, although a two-bit logic gate (Swap gate) needs to be inserted between the first qubit to be executed and the second qubit to be executed when implementing the logic gate to be executed according to the target routing path, the stability and reliability of the route between the first qubit to be executed and the second qubit to be executed can still be guaranteed.

[0056] Based on the foregoing embodiment, the embodiment of the present application provides a mapping management method. First, the method constructs a list of two-bit gate entanglement relationships between program quantum bit variables by parsing the quantum program. At the same time, taking into account the average readout error rate of the physical quantum bit and the connection reliability with all other quantum bits connected, corresponding to the aforementioned connection reliability parameter value, the stability index of each physical quantum bit is calculated, corresponding to the aforementioned stability parameter value. The program quantum bit variables with a maximum of two-bit logic gate relationships are mapped to the physical quantum bit with the largest stability index. Subsequently, chain mapping is performed based on the entanglement relationship between the program quantum bit variables of the two-bit logic gate. While considering the connection reliability, the program quantum bit variables with entanglement relationships are preferentially mapped to directly connected physical quantum bit pairs. This method can minimize the number of SWAP gates that need to be inserted in the quantum computing process as a whole, thereby effectively reducing the impact of differences in physical quantum bit connections and ensuring that quantum bit mapping is both accurate and reliable. In addition, an evaluation mechanism based on connection reliability and a reliability routing selection method for SWAP gate insertion operations are introduced. This method sets a parameter for the maximum number of additional SWAP gates to be inserted, providing a SWAP gate number threshold for the final routing selection. This achieves the overall stability of quantum computing at the cost of adding a limited number of SWAP gates, ensuring that the physical bit selection and routing path planning are relatively balanced in terms of stability and routing cost during each quantum bit mapping process, thus achieving accurate and stable quantum computing. For example, with an electronic device as the server, the specific implementation process of a corresponding specific mapping management method can be referred to. Figure 2 As shown, the following steps are included: Step a11: Schedule and issue quantum tasks based on quantum program requirements and quantum resource status. When quantum hardware resources are available, select the quantum program P to be executed from the queue to be executed.

[0057] Step a12: parse the quantum program P, count the number of quantum bit variables used in the quantum program P as N and the quantum bit variable pairs corresponding to the two-bit logic gates, and generate a list of entanglement relationships of the program quantum bit variables.

[0058] The program qubit variable entanglement relationship list corresponds to the aforementioned qubit variable entanglement relationship information. For example, the program qubit variable entanglement relationship list can be recorded as: L=[q0:[……], q1:[……], ..., qN:[……]] Among them, the program quantum bit variable entanglement relationship list can be a dictionary structure, wherein the keyword Key value corresponds to N program quantum bit variables, namely q0, q1, ... qN, and the value Value corresponding to each Key value is a list structure, which is used to store all program quantum bit variables that have a two-bit logic gate relationship with the Key value. Among them, in the dictionary structure, the Key value and the Value value can be consistent in the order of the entanglement relationship of the quantum bits in the quantum program P, that is, they can be stored consistently in the order of execution time in the quantum program P.

[0059] Step a13: Count the physical quantum bit connection relationships in the QPU to obtain connection information.

[0060] The connection information may be a schematic diagram of the physical quantum bit connection topology, for example, see Figure 3 As shown. Figure 3 In the data structure, nodes represent physical qubits, and the values ​​within them represent the average readout error rate of the physical qubits. A larger value indicates a greater probability of error in the measurement result. Edges indicate a direct connection between corresponding physical qubit pairs. The values ​​adjacent to the edges represent the reliability of the qubit pair connection. A larger value indicates a more accurate result when executing a two-bit logic gate using the corresponding physical qubit pair. The average readout error rate and connection reliability of the physical qubits included in the connection information can be obtained through system calibration experiments on the server or through other methods. The specific method is determined by actual circumstances and is not specifically limited here.

[0061] Step a14: Based on the program qubit variable entanglement relationship list and connection information, the program qubits are chain-mapped to the physical qubits to obtain mapping relationship information.

[0062] Step a14 can be implemented by the following steps: Step a141: Calculate the quantum bit stability index of the physical quantum bit based on the connection information.

[0063] The Qubit Stability Index (QSI) corresponds to the aforementioned qubit stability coefficient. The corresponding process of calculating the fidelity index of each physical qubit based on the connection information, denoted as the qubit stability index, can be shown as follows: Step b11: define the node centrality (NC) of each physical quantum bit as the sum of the weights of the edges connected to it, i.e. , where NC i Represents a physical quantum bit i The node centrality of N ( i) represents the physical quantum bit i There are other sets of connected physical qubits, E ij Represents a physical quantum bit pair i and j The reliability of the connection between them.

[0064] Step b12: Based on NC i Calculate the QSI value of each physical quantum bit. The specific calculation formula is as follows: , where RER i Represents a physical quantum bit i The average read error rate, α is a non-negative influence factor constant, corresponding to the first coefficient mentioned above, used to adjust the average read error rate RER i The influence of the α value on the QSI value of the physical quantum bit can be determined by repeatedly executing the benchmark quantum circuit experiment, establishing a relationship diagram between the performance of the experimental results and the α value, and using the elbow method to determine the optimal α value. Introducing a nonlinear penalty mechanism into the denominator means that even if the average readout error rate is very low, the denominator will be slightly greater than 1, ensuring that even under ideal conditions, the physical qubit performance will be affected to some extent, and an increase in the average readout error rate will lead to a more significant decrease in the QSI value. This can more effectively capture the actual impact of the average readout error rate on qubit performance, because in actual quantum computing, an increase in the error rate usually leads to a rapid decline in performance.

[0065] Step b142: traverse the quantum bit entanglement relationship list, count the number of entanglement relationships corresponding to each program quantum bit variable in the quantum bit entanglement relationship list, and determine the program quantum bit variable with the most entanglement relationships.

[0066] Among them, the program quantum bit variable qi with the most entangled relationships can be a quantum bit entanglement relationship list, such as the Key value corresponding to the Value value with the largest length in the Value list in the aforementioned L.

[0067] Step b143: Determine the physical quantum bit with the largest quantum bit stability index.

[0068] For example, based on Figure 3 The physical quantum bit QSI value obtained by calculation, the physical quantum bit with the largest QSI value is confirmed as the most stable and reliable physical quantum bit Qi. Figure 3 The physical quantum bit connection topology diagram shown in the figure can be used to calculate the QSI values ​​of all physical quantum bits as follows: QSI0 of Q0 = , QSI1 of Q1= , QSI2 of Q2 = , QSI3 of Q3= , QSI4 of Q4= , QSI5 of Q5= .

[0069] Since α in the above calculation formula is a non-negative constant, among all the physical quantum bits in this example, Q2 has the largest QSI value and is confirmed as the most stable bit, and mapping begins.

[0070] Step b144: Starting from the program qubit variable with the most entanglement relationships in the qubit entanglement relationship list, determine the physical qubit with the largest qubit stability index in the connection information and map it until all N program qubits are mapped to corresponding physical qubits.

[0071] For example, this embodiment provides a mapping implementation method: Step c11: Map the program quantum bit variable qi to the physical quantum bit Qi, and mark them both as mapped.

[0072] Step c12: According to the physical quantum bit storage order in the Value list corresponding to Key qi in list L, take out the first program quantum bit variable qj that is not marked as mapped.

[0073] Step c13: Confirm the connection with the physical quantum bit Qi and the connection reliability E ij The largest physical quantum bit Qj, and maps qj onto Qj, and marks them both as mapped.

[0074] For example, Figure 3 As shown, among the three physical quantum bits connected to Q2, the connection stability E between Q3 and Q2 is 23 =0.9, which is greater than the reliability of the other two connections. Therefore, Q3 is selected as the next physical quantum bit to be mapped.

[0075] Step c14: According to the order of the Value list corresponding to the key qj in list L, take out the first program quantum bit variable qk that is not marked as mapped, and follow the same process to confirm the next physical quantum bit Qk to be mapped and perform mapping; and so on, until the mapping of all program quantum bit variables is completed.

[0076] It should be noted that during the chain mapping process, if all program qubit variables in the value list corresponding to the program qubit variable qk have been marked as mapped, the chain mapping process will be repeated to the value list corresponding to the previous key value qj, and the first program qubit variable in the value list corresponding to qj that is not marked as mapped will be taken out to perform the mapping. If all program qubit variables in the value list corresponding to the program qubit variable qj have also been marked as mapped, the chain mapping process will be repeated to the value list corresponding to the previous key value qi, and the search will be continued until an unmapped program qubit variable is found. Similarly, if all physical qubits connected to Qk have been mapped, the process will be repeated according to the same logic as for the program qubit variables until a new unmapped connection bit is found.

[0077] Step a15: Execute the quantum circuit in time sequence. When executing a two-bit logic gate, determine whether there is a direct connection between the physical quantum bit pairs to which the corresponding two program quantum bit variables are mapped. If there is a direct connection, execute step a16; otherwise, execute step a17.

[0078] Step a16: directly execute a two-bit logic gate.

[0079] Step a17: Plan a route and insert a SWAP gate to move the two mapped physical quantum bits to a mutually connected position.

[0080] Step a17 can be implemented by the following steps: Step a171: Determine the threshold value of the number of SWAP gates that need to be inserted into the route.

[0081] Among them, it is assumed that the minimum number of SWAP gates required to be inserted from the source quantum bit to the target quantum bit is Sshortest, such as Figure 3 As shown, a hierarchical movement method can be used to determine the Sshortest value, that is, first complete the quantum bit movement in one dimension, such as the horizontal axis, and then move in another dimension, such as the vertical axis, so that the number of movement steps in these two dimensions can be determined, which can also be called the number of hops, as the Sshortest value.

[0082] In order to ensure the overall stability of the quantum system execution process, considering the difference in the reliability of the connection between different pairs of physical quantum bits, and the fact that inserting a SWAP gate operation itself can also introduce instability factors, the number threshold of SWAP gates can be calculated using the following formula: Sthreshold=Sshortest+δ, where Sthreshold is the upper threshold of the number of SWAP gates that need to be inserted for the most stable routing. δ represents the maximum additional number of SWAP gates introduced by executing a more stable routing compared to the shortest routing, which can be calculated as follows: δ=(1-Emin / Eactual)*Sshortest, where Emin represents the minimum value of the connection reliability between different pairs of physical quantum bits, and Eactual represents the average value of the connection reliability between all pairs of physical quantum bits in the actual routing path. By calculating the ratio between Emin and Eactual, a practical and quantifiable measure of the maximum additional number of SWAP gates introduced by executing a more stable routing compared to the shortest routing is provided while maintaining the stability of the quantum circuit, optimizing the overall performance of the quantum circuit.

[0083] Step a172, calculate the stability of each routing path between the two physical quantum bits obtained by mapping.

[0084] where the stability of a routing path is the product of the stability of each connected physical quantum bit on the path, denoted as Rrout=∏(E ij ), where ∏ is the multiplication symbol.

[0085] Step a173, determine the routing path with the maximum stability and the number of SWAP gates that need to be inserted within the number threshold of SWAP gates as the most stable routing path.

[0086] where, based on the physical quantum bit connection topology graph, by modifying the objective function to maximize the stability of the routing and setting Sthreshold as the maximum hop count, for example, a changed Dijkstra algorithm variant can be used to obtain the most stable routing path that meets the SWAP threshold from multiple routing paths between two physical quantum bits.

[0087] For example, referring to Figure 4The figure shows two routing paths for moving from physical quantum node B0 to physical quantum node B3, provided by an embodiment of the present application. The stability corresponding to the real-line routing path is calculated to be 0.6×0.7=0.42, and the stability corresponding to the virtual-line routing path is calculated to be 0.8×0.9×0.8=0.576. Assuming that a SWAP gate is inserted into the real-line routing path without any SWAP gates, and a SWAP gate is inserted into the virtual-line routing path, and the corresponding SWAP gate number threshold is 2, since the virtual-line routing path has the highest stability and the number of SWAP gates required to be inserted is less than the SWAP gate number threshold of 2, it can be determined that the virtual-line routing path is the most certain routing path.

[0088] Step a174: Insert the SWAP gate according to the most stable routing path, and move the entangled program quantum bit variables to the two mapped physical quantum bit pairs to perform calculations.

[0089] Step a18: Continue to perform the calculation according to the quantum circuit timing. If the SWAP gate operation needs to be inserted again, repeat step a17 until the calculation of the quantum program P is completed.

[0090] In this way, under the multiple challenges faced by quantum systems, such as interference and limitations of the physical properties of quantum hardware, a stable and efficient quantum bit mapping strategy can be implemented to achieve the best balance between quantum computing stability and mapping costs. That is, based on the entanglement relationship of program quantum bits and the physical bit connection topology, and through a chain mapping method based on the entanglement relationship of two-bit logic gates, the two-bit gates in the program are preferentially mapped to directly connected physical quantum bit pairs, and the maximum number of additional SWAP gates introduced is defined to improve overall stability while limiting the overall SWAP number threshold of the route to achieve the insertion of as few SWAP gates as possible. It also improves the connection reliability of the two-bit logic gates. Ultimately, while ensuring the accuracy of quantum computing results, resource consumption is optimized, thereby promoting the practical application and development of quantum computing technology. The mapping management method provided in the embodiment of the present application generates qubit variable entanglement relationship information based on the quantum program to be executed, obtains connection information based on the connection relationship between the physical qubits included in the quantum processor, and then calculates the qubit stability coefficient of each physical qubit in the connection information based on the average readout error rate and connection reliability parameter value of each physical qubit in the connection information. Then, based on the connection information, the qubit stability coefficient of each physical qubit and the qubit variable entanglement relationship information, mapping relationship information is obtained. Finally, the corresponding physical qubit is called according to the mapping relationship information to execute the quantum program to be executed. In this way, by determining the connection information composed of the entanglement relationship information of the program quantum bit variables between the program quantum bit variables in the quantum program to be executed, the quantum bit stability coefficient of the physical quantum bits and the connection relationship between the physical quantum bits, the mapping relationship between the program quantum bit variables and the physical quantum bits is realized. After obtaining the mapping relationship information, the quantum program to be executed is executed according to the mapping relationship information, which solves the current problem that the accuracy of quantum computing tasks is difficult to ensure due to ignoring the difference in connection reliability between physical quantum bits. A quantum bit mapping strategy is proposed, which fully considers the actual characteristics of physical quantum bits to realize the mapping management of quantum bits, so as to ensure the stability of the quantum computing process and improve the efficiency and accuracy of quantum computing.

[0091] Based on the above embodiments, the embodiments of the present application provide a mapping management device, which can be applied to Figure 1 In the mapping management method provided in the corresponding embodiment, refer to Figure 5 As shown, the mapping management device 2 may include: a generating unit 21, a first obtaining unit 22, a calculating unit 23, a second obtaining unit 24 and an executing unit 25; wherein: A generating unit 21 is configured to generate qubit variable entanglement relationship information based on the quantum program to be executed; wherein the qubit variable entanglement relationship information is used to record program qubit variable pairs having a corresponding relationship between two-bit logic gates; A first obtaining unit 22 is configured to obtain connection information based on a connection relationship between physical qubits included in the quantum processor; a calculation unit 23 for calculating a qubit stability coefficient for each physical qubit in the connection information based on an average readout error rate of each physical qubit in the connection information and a connection reliability parameter value; wherein the qubit stability coefficient is used to indicate the stability reliability of the corresponding physical qubit; A second obtaining unit 24 is configured to obtain mapping relationship information based on the connection information, the qubit stability coefficient of each physical qubit, and the qubit variable entanglement relationship information; wherein the mapping relationship information is used to record the mapping relationship between the program qubits included in the quantum program to be executed and the corresponding physical qubits; The execution unit 25 is used to call the corresponding physical quantum bits according to the mapping relationship information and execute the quantum program to be executed.

[0092] In other embodiments of the present application, the generating unit is specifically configured to implement the following steps: Counting all program qubit variables included in the quantum program to be executed to obtain N first qubits, where N is an integer greater than or equal to 1; Counting the program qubit variables that have a two-bit logic gate relationship with each first qubit in the quantum program to be executed, and obtaining m second qubits corresponding to each first qubit; where m is an integer greater than or equal to 0 and less than or equal to N-1; According to the execution sequence of the quantum program to be executed, the N first quantum bits and the corresponding m second quantum bits are sorted and stored respectively to obtain the entanglement relationship information of the quantum bit variables.

[0093] In other embodiments of the present application, the computing unit is specifically configured to implement the following steps: Determining a connection reliability parameter value between p connection bits in the connection information that have a connection relationship with each physical quantum bit; wherein p is an integer greater than or equal to 1; For each physical quantum bit, calculating the cumulative value of the corresponding p connection reliability parameter values ​​to obtain a first value; Calculate the first sum of the average readout error rate of each physical quantum bit and 1; Calculate the first coefficient power of the first sum value of each physical quantum bit to obtain a second value; The ratio of the first value to the second value of each physical quantum bit is calculated to obtain the quantum bit stability coefficient of the corresponding physical quantum bit.

[0094] In other embodiments of the present application, the second obtaining unit is specifically configured to implement the following steps: For the physical qubits included in the connection information, starting from the physical qubit with the largest qubit stability coefficient in the connection information, the physical qubits having a connection relationship and the largest qubit stability coefficient are sorted in order to obtain physical qubit sorting information; Sort the N first qubits in the entanglement relationship information of the qubit variables to obtain program qubit sorting information; Based on the program qubit sorting information and the physical qubit sorting information, mapping relationship information including mapping relationships between the N first qubits and corresponding physical qubits is obtained.

[0095] In other embodiments of the present application, when the second obtaining unit executes the step of sorting the N first qubits in the qubit variable entanglement relationship information to obtain the program qubit sorting information, the following steps can be performed: From the entanglement relationship information of the quantum bit variables, determine the first quantum bit with the most entanglement relationship, and obtain the third quantum bit; Determine a fourth qubit ranked first among the m second qubits corresponding to the third qubit; After sorting the fourth quantum bit to the third quantum bit, first sorting information is obtained; If a fifth qubit that ranks first among the m second qubits corresponding to the fourth qubit and does not exist in the first sorting information is determined from the qubit variable entanglement relationship information, the second sorting information is obtained after sorting the fifth qubit to the fourth qubit in the first sorting information; If a sixth qubit that ranks first among the m second qubits corresponding to the fifth qubit and does not exist in the second sorting information is determined from the qubit variable entanglement relationship information, the sixth qubit is sorted to the fifth qubit in the second sorting information to obtain third sorting information; If the sixth qubit is not determined from the qubit variable entanglement relationship information, determine the seventh qubit that is the first one after the fifth qubit and does not exist in the second sorting information from the m second qubits of the fourth qubit; After sorting the seventh quantum bit to the fourth quantum bit in the second sorting information, fourth sorting information is obtained; If the eighth quantum bit is determined to be ranked first among the m second quantum bits corresponding to the seventh quantum bit and does not exist in the fourth sorting information from the quantum bit variable entanglement relationship information, the eighth quantum bit is sorted to the seventh quantum bit in the fourth sorting information until the program quantum bit sorting information including the sorting of N first quantum bits is obtained.

[0096] In other embodiments of the present application, the execution unit is specifically configured to implement the following steps: During execution of the quantum program to be executed, if a two-bit logic gate to be executed is executed, the physical qubits corresponding to the two program qubits corresponding to the two-bit logic gate to be executed are determined from the mapping relationship information to obtain a first execution qubit and a second execution qubit; Determining a qubit connection relationship between the first execution qubit and the second execution qubit based on the connection information; If the quantum bit connection relationship is a direct connection, the first execution quantum bit and the second execution quantum bit are called to execute the two-bit logic gate to be executed.

[0097] In other embodiments of the present application, the execution unit is further configured to implement the following steps: If the qubit connection relationship is an indirect connection, determining a maximum number of two-bit logic gates that can be inserted based on the connection information, the first execution qubit, and the second execution qubit; Planning, based on the connection information, a plurality of reference routing paths connecting the first execution qubit and the second execution qubit; determining a target routing path from a plurality of reference routing paths based on the maximum number and connection information; Based on the target routing path, a two-bit logic gate to be executed is executed.

[0098] In other embodiments of the present application, when the execution unit performs the step of determining the maximum number of two-bit logic gates allowed to be inserted based on the connection information, the first execution qubit, and the second execution qubit if the qubit connection relationship is an indirect connection, the step can be implemented by the following steps: If the qubit connection relationship is an indirect connection, determining the minimum number of hops between the first execution qubit and the second execution qubit from multiple reference routing paths; Calculating an average value of connection reliability parameter values ​​of all physical quantum bits included in the plurality of reference routing paths; Counting the minimum connection reliability parameter values ​​corresponding to the physical quantum bits in multiple reference routing paths; Calculating a first ratio of a minimum connection reliability parameter value to an average value; calculating a first difference between 1 and the first ratio; The product of the first difference and the minimum number of hops is calculated to obtain the maximum number.

[0099] In other embodiments of the present application, when the execution unit performs the step of determining the target routing path from multiple reference routing paths based on the maximum number and connection information, it can be implemented by the following steps: Determining a connection reliability parameter value of a physical quantum bit included in each reference routing path based on the connection information; Calculating the product of all connection reliability parameter values ​​included in each reference routing path to obtain a stability parameter value of each reference routing path; A reference routing path having a hop count less than or equal to a maximum hop count and a maximum stability parameter value is determined from multiple reference routing paths to obtain a target routing path.

[0100] It should be noted that the process of information interaction between units and modules in this embodiment can refer to the description in other embodiments, which will not be repeated here.

[0101] The mapping management device provided in the embodiment of the application generates quantum bit variable entanglement relationship information based on the to-be-executed quantum program, obtains connection information based on the connection relationship between the physical quantum bits included in the quantum processor, calculates the quantum bit stability coefficient of each physical quantum bit in the connection information based on the average readout error rate and the connection reliability parameter value of each physical quantum bit in the connection information, further obtains mapping relationship information based on the connection information, the quantum bit stability coefficient of each physical quantum bit, and the quantum bit variable entanglement relationship information, and finally calls the corresponding physical quantum bit according to the mapping relationship information to execute the to-be-executed quantum program. In this way, the mapping relationship between the program quantum bit variables and the physical quantum bits is realized by determining the quantum bit variable entanglement relationship information between the program quantum bit variables in the to-be-executed quantum program, the quantum bit stability coefficient of the physical quantum bits, and the connection information composed of the connection relationship between the physical quantum bits. After obtaining the mapping relationship information, the to-be-executed quantum program is executed according to the mapping relationship information, solving the problem that the accuracy of the quantum computing task is difficult to guarantee due to the neglect of the connection reliability difference between the physical quantum bits, and proposing a quantum bit mapping strategy. The actual characteristics of the physical quantum bits are fully considered to realize the mapping management of the quantum bits, so as to guarantee the stability of the quantum computing process and improve the computing efficiency and accuracy of the quantum computing.

[0102] Based on the foregoing embodiments, an embodiment of the application provides an electronic device, which can be applied to Figure 1 The mapping management method provided in the corresponding embodiment is described with reference to Figure 6 As shown in the figure, the electronic device 3 can include a communication interface 31, a memory 32, a processor 33, and a communication bus 34; wherein: The memory 32 is configured to store executable information. The communication bus 34 is configured to realize the communication connection between the communication interface 31, the processor 33, and the memory 32. The processor 33 is configured to execute the mapping management program stored in the memory 32, and realize the processes as described in Figure 1 The implementation process of the mapping management method provided in the corresponding embodiment is not repeated here.

[0103] Based on the foregoing embodiments, an embodiment of the application provides a computer-readable storage medium, referred to as a storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to realize the processes as described in Figure 1 The implementation process of the mapping management method provided in the corresponding embodiment is not repeated here.

[0104] Based on the aforementioned embodiments, an embodiment of the present application further provides a computer program product, including a computer program, which can be executed by the processor 33 of the electronic device 3 to complete any of the aforementioned method steps.

[0105] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage) containing computer-usable program code.

[0106] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0107] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0109] The above description is merely a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application.

Claims

1. A mapping management method, characterized in that: The method comprises: Generating qubit variable entanglement relationship information based on the quantum program to be executed; wherein the qubit variable entanglement relationship information is used to record program qubit variable pairs having a corresponding relationship between two-bit logic gates; Obtaining connection information based on a connection relationship between physical quantum bits included in the quantum processor; Calculating a qubit stability coefficient for each of the physical qubits in the connection information based on an average readout error rate and a connection reliability parameter value of each of the physical qubits in the connection information; wherein the qubit stability coefficient is used to represent the stability reliability of the corresponding physical qubit; Obtaining mapping relationship information based on the connection information, the qubit stability coefficient of each of the physical qubits, and the qubit variable entanglement relationship information; wherein the mapping relationship information is used to record the mapping relationship between the program qubits included in the quantum program to be executed and the corresponding physical qubits; The corresponding physical quantum bits are called according to the mapping relationship information to execute the quantum program to be executed.

2. The method according to claim 1, characterized in that The generating of qubit variable entanglement relationship information based on the quantum program to be executed includes: Counting all program qubit variables included in the quantum program to be executed to obtain N first qubits, where N is an integer greater than or equal to 1; Counting program qubit variables in the quantum program to be executed that have a two-bit logic gate relationship with each first qubit to obtain m second qubits corresponding to each first qubit; where m is an integer greater than or equal to 0 and less than or equal to N-1; According to the execution sequence of the quantum program to be executed, the N first quantum bits and the corresponding m second quantum bits are sorted and stored respectively to obtain the entanglement relationship information of the quantum bit variables.

3. The method according to claim 1, characterized in that The calculating, based on the average readout error rate and the connection reliability parameter value of each physical qubit in the connection information, a qubit stability coefficient of each physical qubit in the connection information includes: Determining a connection reliability parameter value between p connection bits in the connection information that have a connection relationship with each of the physical quantum bits; wherein p is an integer greater than or equal to 1; For each of the physical quantum bits, calculating a cumulative value of the corresponding p connection reliability parameter values ​​to obtain a first value; Calculating a first sum of the average readout error rate of each physical quantum bit and 1; Calculating the first coefficient power of the first sum value of each of the physical quantum bits to obtain a second value; The ratio of the first value to the second value of each physical quantum bit is calculated to obtain the quantum bit stability coefficient of the corresponding physical quantum bit.

4. The method according to claim 2, characterized in that The obtaining of mapping relationship information based on the connection information, the quantum bit stability coefficient of each of the physical quantum bits, and the quantum bit variable entanglement relationship information includes: sorting the physical qubits included in the connection information, starting from the physical qubit with the largest qubit stability coefficient in the connection information, and sequentially determining the physical qubits that have a connection relationship and have the largest qubit stability coefficient to obtain physical qubit sorting information; Sorting the N first qubits in the qubit variable entanglement relationship information to obtain program qubit sorting information; Based on the program qubit sorting information and the physical qubit sorting information, the mapping relationship information including the mapping relationship between the N first qubits and the corresponding physical qubits is obtained.

5. The method according to claim 4, characterized in that Sorting the N first qubits in the qubit variable entanglement relationship information to obtain program qubit sorting information includes: Determining a first qubit having the most entanglement relationships from the qubit variable entanglement relationship information to obtain a third qubit; Determining a fourth qubit ranked first among the m second qubits corresponding to the third qubit; After sorting the fourth quantum bit to the third quantum bit, first sorting information is obtained; If a fifth qubit that is ranked first among the m second qubits corresponding to the fourth qubit and does not exist in the first sorting information is determined from the qubit variable entanglement relationship information, the fifth qubit is sorted to the fourth qubit in the first sorting information to obtain second sorting information; If a sixth qubit that is ranked first among the m second qubits corresponding to the fifth qubit and does not exist in the second sorting information is determined from the qubit variable entanglement relationship information, the sixth qubit is sorted to the fifth qubit in the second sorting information to obtain third sorting information; If the sixth qubit is not determined from the qubit variable entanglement relationship information, determine the seventh qubit that is the first qubit after the fifth qubit and does not exist in the second sorting information from the m second qubits of the fourth qubit; After sorting the seventh quantum bit to the fourth quantum bit in the second sorting information, fourth sorting information is obtained; If, from the quantum bit variable entanglement relationship information, it is determined that the eighth quantum bit is ranked first among the m second quantum bits corresponding to the seventh quantum bit and does not exist in the fourth sorting information, the eighth quantum bit is sorted to the seventh quantum bit in the fourth sorting information until the program quantum bit sorting information including the sorting of N first quantum bits is obtained.

6. The method according to claim 1, characterized in that The calling of corresponding physical quantum bits according to the mapping relationship information to execute the quantum program to be executed includes: During execution of the quantum program to be executed, if a two-bit logic gate to be executed is executed, determining physical qubits corresponding to two program qubits corresponding to the two-bit logic gate to be executed from the mapping relationship information to obtain a first execution qubit and a second execution qubit; Determining a qubit connection relationship between the first execution qubit and the second execution qubit based on the connection information; If the quantum bit connection relationship is a direct connection, the first execution quantum bit and the second execution quantum bit are called to execute the two-bit logic gate to be executed.

7. The method according to claim 6, characterized in that The method further comprises: If the qubit connection relationship is an indirect connection, determining a maximum number of two-bit logic gates that can be inserted based on the connection information, the first execution qubit, and the second execution qubit; Planning, based on the connection information, a plurality of reference routing paths connecting the first execution qubit and the second execution qubit; determining a target routing path from the plurality of reference routing paths based on the maximum number and the connection information; The to-be-executed two-bit logic gate is executed based on the target routing path.

8. The method according to claim 7, characterized in that If the qubit connection relationship is an indirect connection, determining a maximum number of two-bit logic gates allowed to be inserted based on the connection information, the first execution qubit, and the second execution qubit includes: If the qubit connection relationship is an indirect connection, determining a minimum number of hops between the first execution qubit and the second execution qubit from the multiple reference routing paths; Calculating an average value of connection reliability parameter values ​​of all physical quantum bits included in the plurality of reference routing paths; Counting minimum connection reliability parameter values ​​corresponding to the physical quantum bits in the multiple reference routing paths; Calculating a first ratio of the minimum connection reliability parameter value to the average value; calculating a first difference between 1 and the first ratio; The product of the first difference and the minimum number of hops is calculated to obtain the maximum number.

9. The method according to claim 7, characterized in that The determining of a target routing path from the plurality of reference routing paths based on the maximum number and the connection information includes: Determining, based on the connection information, a connection reliability parameter value of the physical quantum bits included in each of the reference routing paths; Calculating the product of all the connection reliability parameter values ​​included in each reference routing path to obtain a stability parameter value of each reference routing path; A reference routing path having a hop count less than or equal to the maximum hop count and a maximum stability parameter value is determined from the multiple reference routing paths to obtain the target routing path.

10. A mapping management device, characterized in that: The device comprises: a generating unit, a first obtaining unit, a calculating unit, a second obtaining unit and an executing unit; wherein: The generating unit is configured to generate qubit variable entanglement relationship information based on the quantum program to be executed; wherein the qubit variable entanglement relationship information is used to record program qubit variable pairs having a corresponding relationship between two-bit logic gates; The first obtaining unit is configured to obtain connection information based on a connection relationship between physical qubits included in the quantum processor; The calculation unit is configured to calculate a qubit stability coefficient of each physical qubit in the connection information based on an average readout error rate and a connection reliability parameter value of each physical qubit in the connection information; wherein the qubit stability coefficient is used to represent the stability reliability of the corresponding physical qubit; The second obtaining unit is configured to obtain mapping relationship information based on the connection information, the qubit stability coefficient of each of the physical qubits, and the qubit variable entanglement relationship information; wherein the mapping relationship information is used to record the mapping relationship between the program qubits included in the quantum program to be executed and the corresponding physical qubits; The execution unit is used to call the corresponding physical quantum bits according to the mapping relationship information to execute the quantum program to be executed.

11. An electronic device, characterized in that: The device comprises at least: a communication interface, a memory, a processor and a communication bus; wherein: The memory is used to store executable information; The communication bus is used to realize the communication connection between the communication interface, the processor and the memory; The processor is configured to execute the mapping management program stored in the memory to implement the steps of the mapping management method according to any one of claims 1 to 9.

12. A storage medium, characterized in that: The storage medium stores a mapping management program, which is used to implement the steps of the mapping management method according to any one of claims 1 to 9 when executed.

13. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the steps of the mapping management method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and device for constructing quantum program to be mapped and quantum computer

    CN115907024A

  • Quantum program mapping relation determination method and device, medium and electronic device

    CN115983392A

  • Crosstalk-aware quantum program compiling framework system

    CN119721281A

  • Trivalent lattice scheme to identify flag qubit outcomes

    US20210125094A1

  • Method for executing quantum program and method for compiling quantum program

    US20240354074A1