Mapping management method, apparatus, device, storage medium, and computer program product
By generating entanglement information of quantum bit variables and calculating stability coefficients, the mapping relationship information is determined, which solves the problem of the reliability difference of physical quantum bit connections in quantum computing and improves the stability and accuracy of quantum computing.
Patent Information
- Application Number
- CN202511244882.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-09-02
AI Technical Summary
In existing technologies, the reliability differences in the connections between physical qubits make it difficult to guarantee the accuracy of quantum computing tasks, and the unstable connections affect computational efficiency and accuracy.
By generating entanglement information of quantum bit variables, calculating the stability coefficient of physical quantum bits, determining the mapping relationship information based on this, and calling the corresponding physical quantum bits to execute quantum programs, the stability and accuracy of the quantum computing process are ensured.
It improves the computational efficiency and accuracy of quantum computing and solves the problem of difficulty in guaranteeing task accuracy caused by the difference in the reliability of physical qubit connections.
Smart Images

Figure CN120764709B_ABST
Abstract
Description
Technical Field
[0001] This 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 Technology
[0002] Qubit mapping is a fundamental and crucial technology in quantum computing. The connectivity of physical qubits in a quantum processing unit (QPU) is typically limited, and the range of interactions varies. Qubit mapping involves not only the efficient allocation of physical qubits but also the scheduling and optimization of quantum gate operations. To adapt to different QPU topological characteristics and qubit coherence times, various mapping algorithms and strategies have been developed, such as heuristic methods, graph-based algorithms, and problem-specific mapping techniques. These methods each have their advantages and can be used individually or in combination to meet the needs of different quantum computing models and applications.
[0003] However, under the current limitations of quantum technology, the reliability of connections between physical qubits faces significant challenges and problems. Entangled states are very susceptible to environmental disturbances and can be destroyed, leading to unstable connections. Furthermore, physical qubits may exhibit different characteristics due to differences in manufacturing and design, making it difficult to guarantee connection reliability and resulting in an imbalance between efficiency and accuracy in quantum computing. Summary of the Invention
[0004] To address the aforementioned technical problems, this application aims to provide a mapping management method, apparatus, device, storage medium, and computer program product. This addresses the issue that neglecting the reliability differences in connections between physical qubits currently makes it difficult to guarantee the accuracy of quantum computing tasks. The application proposes a qubit mapping strategy that fully considers the actual characteristics of physical qubits to achieve mapping management of qubits, thereby ensuring the stability of the quantum computing process and improving the efficiency and accuracy of quantum computing.
[0005] The technical solution of this application is implemented as follows:
[0006] This application provides a mapping management method, the method comprising:
[0007] Based on the quantum program to be executed, entanglement information of qubit variables is generated; wherein, the entanglement information of qubit variables is used to record program qubit variable pairs with a two-bit logic gate correspondence.
[0008] Connection information is obtained based on the connection relationships between the physical qubits included in the quantum processor;
[0009] Based on the average readout error rate and connection reliability parameter value of each physical qubit in the connection information, the qubit stability coefficient of each physical qubit in the connection information is calculated; wherein, the qubit stability coefficient is used to represent the stability and reliability of the corresponding physical qubit;
[0010] Based on the connection information, the qubit stability coefficient of each physical qubit, and the entanglement relationship information of the qubit variables, mapping relationship information is obtained; 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;
[0011] The corresponding physical qubits are invoked according to the mapping information to execute the quantum program to be executed.
[0012] In the above scheme, generating entanglement information of qubit variables based on the quantum program to be executed includes:
[0013] By counting all the program qubit variables included in the quantum program to be executed, N first qubits are obtained; where N is an integer greater than or equal to 1.
[0014] The program qubit variables in the quantum program to be executed that have a two-bit logic gate relationship with each first qubit are counted 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.
[0015] According to the execution sequence of the quantum program to be executed, the N first qubits and the corresponding m second qubits are sorted and stored to obtain the entanglement relationship information of the qubit variables.
[0016] In the above scheme, calculating 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 includes:
[0017] Determine the connection reliability parameter value between p connection bits that have a connection relationship with each physical quantum bit in the connection information; where p is an integer greater than or equal to 1;
[0018] For each physical qubit, the cumulative value of the corresponding p connection reliability parameter values is calculated to obtain the first value;
[0019] Calculate the first sum of the average readout error rate for each physical qubit and 1;
[0020] Calculate the first coefficient power of the first sum value for each of the physical qubits to obtain the second value;
[0021] The ratio of the first value to the second value of each physical qubit is calculated to obtain the qubit stability coefficient of the corresponding physical qubit.
[0022] In the above scheme, obtaining the mapping relationship information based on the connection information, the qubit stability coefficient of each physical qubit, and the entanglement relationship information of the qubit variables includes:
[0023] 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 with the largest qubit stability coefficient that have connection relationships are sorted in order to obtain the physical qubit sorting information;
[0024] The N first qubits in the entanglement relationship information of the qubit variables are sorted to obtain the program qubit sorting information;
[0025] Based on the programmed qubit sorting information and the physical qubit sorting information, the mapping relationship information, which includes the mapping relationship between the N first qubits and their corresponding physical qubits, is obtained.
[0026] In the above scheme, the step of sorting the N first qubits in the entanglement relationship information of the qubit variables to obtain the program qubit sorting information includes:
[0027] From the entanglement relationship information of the quantum bit variables, the first quantum bit with the most entanglement is determined, and the third quantum bit is obtained;
[0028] Determine the fourth qubit that is ranked first among the m second qubits corresponding to the third qubit;
[0029] After sorting the fourth qubit to the third qubit, the first sorting information is obtained;
[0030] If, from the entanglement relationship information of the qubit variables, a fifth qubit that is ranked first among the m second qubits corresponding to the fourth qubit and does not exist in the first ranking information is determined, and the fifth qubit is ranked to the fourth qubit in the first ranking information, then the second ranking information is obtained;
[0031] If, from the entanglement relationship information of the qubit variables, the sixth qubit, which is ranked first among the m second qubits corresponding to the fifth qubit and does not exist in the second ranking information, is determined, and the sixth qubit is ranked to the fifth qubit in the second ranking information, then the third ranking information is obtained;
[0032] If the sixth qubit is not determined from the entanglement relationship information of the qubit variables, determine the first seventh qubit after the fifth qubit from the m second qubits of the fourth qubit, which is not present in the second sorting information;
[0033] After sorting the seventh qubit to the fourth qubit in the second sorting information, the fourth sorting information is obtained;
[0034] If, from the entanglement relationship information of the qubit variables, the eighth qubit, which is ranked first among the m second qubits corresponding to the seventh qubit and does not exist in the fourth ranking information, is determined, and the eighth qubit is ranked to the seventh qubit in the fourth ranking information, the program qubit ranking information including the ranking of N first qubits is obtained.
[0035] In the above scheme, the step of calling the corresponding physical qubit according to the mapping relationship information to execute the quantum program to be executed includes:
[0036] During the execution of the quantum program to be executed, if the two-bit logic gate to be executed is reached, the physical qubits corresponding to the two program qubits of the two-bit logic gate to be executed are determined from the mapping relationship information to obtain the first execution qubit and the second execution qubit.
[0037] Based on the connection information, the qubit connection relationship between the first execution qubit and the second execution qubit is determined;
[0038] If the quantum bit connection is a direct connection, the first execution quantum bit and the second execution quantum bit are invoked to execute the two-bit logic gate to be executed.
[0039] The method in the above scheme further includes:
[0040] If the quantum bit connection is not a direct connection, based on the connection information, the first execution quantum bit and the second execution quantum bit, determine the maximum number of two-bit logic gates that can be inserted;
[0041] Based on the connection information, multiple reference routing paths are planned to connect the first execution quantum bit and the second execution quantum bit.
[0042] Based on the maximum number and the connection information, a target routing path is determined from the plurality of reference routing paths;
[0043] Based on the target routing path, execute the two-bit logic gate to be executed.
[0044] In the above scheme, if the quantum bit connection relationship is not a direct connection, determining the maximum number of allowed two-bit logic gates based on the connection information, the first execution quantum bit, and the second execution quantum bit includes:
[0045] If the quantum bit connection is not a direct connection, determine the minimum number of hops between the first execution quantum bit and the second execution quantum bit from the multiple reference routing paths;
[0046] Calculate the average value of the connection reliability parameter of all physical qubits included in the multiple reference routing paths;
[0047] Calculate the minimum connection reliability parameter value corresponding to the physical qubits in the multiple reference routing paths;
[0048] Calculate a first ratio between the minimum connection reliability parameter value and the average value;
[0049] Calculate the first difference between 1 and the first ratio;
[0050] The product of the first difference and the minimum number of jumps is calculated to obtain the maximum number.
[0051] In the above scheme, determining the target routing path from the multiple reference routing paths based on the maximum number and the connection information includes:
[0052] Based on the connection information, determine the connection reliability parameter value of the physical qubits included in each of the reference routing paths;
[0053] Calculate the product of all the connection reliability parameter values included in each of the reference routing paths to obtain the stability parameter value of each of the reference routing paths;
[0054] The target routing path is obtained by determining the reference routing path from the multiple reference routing paths whose hop count is less than or equal to the maximum hop count and whose stability parameter value is the largest.
[0055] This application provides a mapping management device, the device comprising: a generation unit, a first obtaining unit, a calculation unit, a second obtaining unit, and an execution unit; wherein:
[0056] The generation unit is used to generate entanglement information of qubit variables based on the quantum program to be executed; wherein, the entanglement information of qubit variables is used to record pairs of program qubit variables with a two-bit logic gate correspondence.
[0057] The first obtaining unit is used to obtain connection information based on the connection relationship between the physical qubits included in the quantum processor;
[0058] The computing unit is used to calculate 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; wherein, the qubit stability coefficient is used to represent the stability and reliability of the corresponding physical qubit;
[0059] The second obtaining unit is used to obtain mapping relationship information based on the connection information, the qubit stability coefficient of each physical qubit, and the entanglement relationship information of the qubit variables; 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;
[0060] The execution unit is used to call the corresponding physical qubits according to the mapping relationship information to execute the quantum program to be executed.
[0061] This application provides an electronic device, which includes at least: a communication interface, a memory, a processor, and a communication bus; wherein:
[0062] The memory is used to store executable information;
[0063] The communication bus is used to realize the communication connection between the communication interface, the processor and the memory;
[0064] The processor is configured to execute the mapping management program stored in the memory, and implement the steps in the mapping management method as described in any of the preceding claims.
[0065] This application provides a storage medium storing a mapping management program, which, when executed, implements the steps of the mapping management method as described in any of the preceding claims.
[0066] This application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the mapping management method as described in any of the preceding claims.
[0067] This application provides a mapping management method, apparatus, device, storage medium, and computer program product. Based on the quantum program to be executed, entanglement relationship information of qubit variables is generated. After obtaining connection information based on the connection relationships between the physical qubits included in the quantum processor, the average readout error rate and connection reliability parameter value of each physical qubit in the connection information are used to calculate the qubit stability coefficient of each physical qubit in the connection information. Then, based on the connection information, the qubit stability coefficient of each physical qubit, and the entanglement relationship information of the qubit variables, 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 entanglement information between program qubit variables in the quantum program to be executed, the qubit stability coefficient of the physical qubits, and the connection information formed by the connection relationships between the physical qubits, the mapping relationship between program qubit variables and physical qubits is realized. After obtaining the mapping relationship information, the quantum program to be executed is executed according to the mapping relationship information. This solves the problem that the accuracy of quantum computing tasks is difficult to guarantee due to the current neglect of the reliability differences between physical qubits. A qubit mapping strategy is proposed, which fully considers the actual characteristics of physical qubits to realize the mapping management of qubits, so as to ensure the stability of the quantum computing process and improve the efficiency and accuracy of quantum computing. Attached Figure Description
[0068] Figure 1 A flowchart illustrating a mapping management method provided in an embodiment of this application;
[0069] Figure 2 This application provides a schematic diagram illustrating the implementation process of a mapping management method.
[0070] Figure 3 A schematic diagram of a physical quantum connection topology provided in an embodiment of this application;
[0071] Figure 4 A schematic diagram of a routing path provided in an embodiment of this application;
[0072] Figure 5 This is a schematic diagram of the structure of a mapping management device provided in an embodiment of this application;
[0073] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0074] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0075] Embodiments of this application provide 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:
[0076] Step 101: Based on the quantum program to be executed, generate entanglement relationship information of qubit variables.
[0077] Among them, the entanglement relationship information of the qubit variables is used to record the program qubit variable pairs with a two-bit logic gate correspondence.
[0078] In this embodiment, 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 about to execute. At this time, after the electronic device determines that it has obtained the quantum program to be executed, it performs program content analysis on 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 with a two-bit logic gate correspondence to obtain the entanglement relationship information of the qubit variables.
[0079] In some application scenarios, the entanglement relationship information of qubit variables can be recorded and stored using methods such as lists, databases, dictionaries, and indexes. This facilitates the quick retrieval and application of information in the entanglement relationship information of qubit variables. The specific storage method can be determined according to the actual situation, and no specific limitation is made here.
[0080] Step 102: Obtain connection information based on the connection relationships between the physical qubits included in the quantum processor.
[0081] In this embodiment, the physical qubits included in the quantum processor of the terminal device are statistically analyzed to determine the connection relationships between the physical qubits included in the quantum processor, thereby obtaining the connection information between the physical qubits included in the quantum processor. The connection information can be stored in the form of a diagram, such as a relational topology diagram, a list, or a database, depending on the actual situation, and is not specifically limited here.
[0082] Step 103: Based on the average readout error rate and connection reliability parameter value of each physical qubit in the connection information, calculate the qubit stability coefficient of each physical qubit in the connection information.
[0083] The quantum bit stability coefficient is used to represent the stability and reliability of the corresponding physical quantum bit.
[0084] In this embodiment, the average readout error rate of each physical qubit in the connection information can be calculated in advance after statistical analysis of the readout error rate of each physical qubit in actual applications. Similarly, the connection reliability parameter value of the connection reliability between each physical qubit and other physical qubits can also be calculated in advance based on actual application conditions. Thus, based on the connection relationship between 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 the qubit stability coefficient of 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.
[0085] Step 104: Based on the connection information, the qubit stability coefficient of each physical qubit, and the entanglement relationship information of the qubit variables, obtain the mapping relationship information.
[0086] The mapping information is used to record the mapping relationship between the program qubits included in the quantum program to be executed and their corresponding physical qubits.
[0087] In this embodiment of the application, a calling order of physical qubits is determined according to the connection information including the connection relationship between physical qubits and the qubit stability coefficient of each physical qubit. For example, a method of sorting first and then mapping, or determining the calling order while mapping, can be used to establish a mapping relationship between physical qubits and program qubits in the entanglement relationship information of qubit variables. This way, when executing the quantum program to be executed, the corresponding physical qubits can be called according to the mapping relationship to complete the running and calculation process of the quantum program.
[0088] Step 105: Call the corresponding physical qubit according to the mapping relationship information and execute the quantum program to be executed.
[0089] In this embodiment, when executing the quantum program, if the program qubit in the entanglement relationship information of the qubit variables is reached, the corresponding physical qubit can be determined according to the mapping relationship information, and the corresponding physical qubit can be called to perform calculations, completing the calculation process of the quantum program and obtaining the final calculation result. In some application scenarios, after obtaining the calculation result from executing the quantum program, the calculation result can be stored or output according to the user's actual needs. For example, the calculation structure can be output to the display area of an electronic device, or the calculation result can be output to a display device with a communication connection to the electronic device, such as a smart mobile terminal device. The specific choice depends on the actual situation and is not specifically limited here.
[0090] Based on the foregoing embodiments, in other embodiments of this application, step 101, which generates entanglement information of qubit variables based on the quantum program to be executed, can be implemented by the following steps:
[0091] By counting all the program qubit variables included in the quantum program to be executed, N first qubits are obtained; where N is an integer greater than or equal to 1.
[0092] The program qubit variables in the quantum program to be executed that have a two-bit logic gate relationship with each first qubit are counted 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.
[0093] According to the execution sequence of the quantum program to be executed, the N first qubits and the corresponding m second qubits are sorted and stored to obtain the entanglement relationship information of the qubit variables.
[0094] In this embodiment, statistical analysis of the program qubit variables of the quantum program to be executed is performed to determine all program qubit variables, resulting in N first qubits. Then, the two-bit logic gate operations in the quantum program to be executed are determined. Next, the qubits with two-bit logic gate operations corresponding to each of the N first qubits are statistically analyzed to obtain m second qubits corresponding to each first qubit. Here, m is determined by the actual situation; m may be 0, meaning that the corresponding first qubit does not have a two-bit logic gate operation. The process of statistically analyzing the two-bit logic gate operations and the statistical analysis of all program qubit variables can be performed simultaneously, or one process can be performed first, followed by the other statistical process. The specific implementation depends on the actual application scenario and is not specifically limited here.
[0095] 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 entanglement information of the qubit variables. Specifically, the N first qubits can be stored in order of execution within the quantum program to be executed; that is, they can be stored according to the chronological order in which the corresponding first qubit is reached during the execution of the quantum program. Similarly, the m second qubits corresponding to each first qubit can be stored in order of the chronological order in which the two logic gates of each second qubit and its corresponding first qubit are reached during the execution of the quantum program. This ensures that the execution order of the qubits and the actual quantum program is relevant during subsequent analysis, guaranteeing certain time characteristics.
[0096] Based on the foregoing embodiments, in other embodiments of this application, step 103, which 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, can be implemented by the following steps:
[0097] Determine the connection reliability parameter value between p connection bits that have a connection relationship with each physical quantum bit in the connection information; where p is an integer greater than or equal to 1;
[0098] For each physical qubit, calculate the sum of the corresponding p connection reliability parameter values to obtain the first value;
[0099] Calculate the first sum of the average readout error rate for each physical qubit and 1;
[0100] Calculate the first coefficient power of the first sum of each physical qubit to obtain the second value;
[0101] The ratio of the first value to the second value of each physical qubit is calculated to obtain the qubit stability coefficient of the corresponding physical qubit.
[0102] In the embodiments of this application, the first coefficient α is an empirical value set based on a large number of experiments or actual application scenarios. It is mainly used to adjust the influence of the average readout error rate on the stability coefficient of the qubit. In actual application, it can be adjusted according to actual needs. No specific limitation is made here. It can be determined by the actual situation.
[0103] This embodiment defines a method for calculating the stability coefficient of a qubit. Specifically, from the connection information, p connected bits that are connected to each physical qubit can be identified. These connections are direct connections. Then, the connection reliability parameter value between each physical qubit and each of the p connected bits is obtained, resulting in p connection reliability parameter values for each physical qubit. For each physical qubit, the sum of the p connection reliability parameter values is calculated to obtain a first value. Then, the first sum value for each physical qubit is calculated as 1 + the corresponding average readout error rate. Finally, the qubit stability coefficient for each physical qubit is calculated as: first value / first sum value. α = First value / (1 + corresponding average read error rate) α This is a method for calculating the stability coefficient of a qubit provided in an embodiment of this application. In other embodiments of this application, other calculation methods may also be used to comprehensively calculate the average readout error rate and the connection reliability parameter value of each physical qubit to determine the qubit stability coefficient of the corresponding physical qubit.
[0104] Based on the foregoing embodiments, in other embodiments of this application, step 104, which obtains mapping relationship information based on connection information, the qubit stability coefficient of each physical qubit, and the entanglement relationship information of qubit variables, can be implemented by the following steps:
[0105] 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 with the largest qubit stability coefficient that have connection relationships are sorted in order to obtain the physical qubit sorting information;
[0106] Sorting the N first qubits in the entanglement relationship information of the qubit variables yields the program qubit sorting information;
[0107] Based on the program qubit ordering information and the physical qubit ordering information, mapping information is obtained, including the mapping relationship between the N first qubits and their corresponding physical qubits.
[0108] In this embodiment, one method for determining mapping relationship information is to use a sorting-then-mapping approach. Specifically, for the physical qubits included in the connection information, they are sorted according to the calculated qubit stability coefficients and their connection relationships to obtain physical qubit sorting information. For example, from the connection relationships, the physical qubit with the largest stability coefficient is determined and sorted first. Then, from the multiple physical qubits connected to the physical qubit with the largest stability coefficient, the physical qubit with the largest stability coefficient is determined and sorted second. Then, from the multiple physical qubits connected to the second-ranked physical qubit, the physical qubit with the largest stability coefficient is determined and sorted third, and so on, until all physical qubits in the connection information have been sorted.
[0109] For the N first qubits included in the entanglement relationship information of the qubit variables, they are sorted according to a preset chain sorting method to obtain the program qubit sorting information. Finally, according to the correspondence between the chain sorting method and the size sorting method, the program qubits in the program qubit sorting information are mapped one-to-one with the first qubits in the physical qubit sorting information to obtain the physical qubits corresponding to the program qubits. In this way, the mapping relationship information can be obtained.
[0110] A larger qubit stability coefficient indicates a stronger connection reliability between the physical qubit and its corresponding connection bit. When the first-ranked program qubit in the program qubit ranking information is the qubit with the most entanglement, we can start from the physical qubit with the largest qubit stability coefficient in the physical qubit ranking information and perform a one-to-one mapping with the first-ranked program qubit in the program qubit ranking information to obtain the corresponding mapping relationship information.
[0111] In one scenario, determining the mapping relationship can also be achieved by sequentially obtaining a corresponding program qubit in a chain-like order, and then determining the physical qubit with the largest stability coefficient from multiple physical qubits for mapping. The mapped program qubit and physical qubit can be identified using, for example, mapped identification information. When making subsequent selections, the unidentified bits can be used for mapping.
[0112] Based on the foregoing embodiments, in other embodiments of this application, the step of sorting the N first qubits in the entanglement relationship information of the qubit variables to obtain the program qubit sorting information can be achieved through the following steps:
[0113] From the entanglement information of the qubit variables, determine the first qubit with the most entanglement, and obtain the third qubit;
[0114] Determine the fourth qubit that is the first in order among the m second qubits corresponding to the third qubit;
[0115] After sorting the fourth qubit to the third qubit, the first sorting information is obtained;
[0116] If, from the entanglement relationship information of the qubit variables, the fifth qubit, which is ranked first among the m second qubits corresponding to the fourth qubit and does not exist in the first ranking information, is determined, and the fifth qubit is ranked to the fourth qubit in the first ranking information, the second ranking information is obtained;
[0117] If, from the entanglement relationship information of the qubit variables, the sixth qubit, which is ranked first among the m second qubits corresponding to the fifth qubit and does not exist in the second ranking information, is determined, and the sixth qubit is ranked to the fifth qubit in the second ranking information, then the third ranking information is obtained;
[0118] If the sixth qubit is not determined from the entanglement relationship information of the qubit variables, determine the first seventh qubit after the fifth qubit from the m second qubits of the fourth qubit, which is not present in the second sorting information;
[0119] After sorting the seventh qubit to the fourth qubit in the second sorting information, the fourth sorting information is obtained;
[0120] If, from the entanglement relationship information of the qubit variables, the eighth qubit, which is ranked first among the m second qubits corresponding to the seventh qubit and does not exist in the fourth ranking information, is determined, and the eighth qubit is ranked up to the seventh qubit in the fourth ranking information, the program qubit ranking information including the ranking of the N first qubits is obtained.
[0121] In this embodiment, it is assumed that the entanglement information of the quantum bit variables includes a0: [a1, a3], a1: [a0, a2], a2: [a1, a3, a5], a3: [a0, a2, a4], a4: [a3, a5], a5: [a2, a4], where a0, a1, ... a5 before the colon are program quantum bits determined sequentially according to the program execution time order in the quantum program to be executed, and the objects in brackets [ ] are program quantum bits that have a two-bit logic gate relationship with the program quantum bits corresponding to the program quantum bits before [ ]. Thus, sorting the above entanglement information of the quantum bit variables, the program quantum bit sorting information is: a2, a1, a0, a3, a4, a5. When there are multiple first qubits with the most entanglement during sorting, the first qubit with the highest entanglement can be determined based on the execution time order of these multiple first qubits in the quantum program to be executed. For example, a2 and a3 have the same entanglement of 3, and a2 is executed before a3, so a2 is taken as the first sorting object in the program qubit sorting information.
[0122] Based on the foregoing embodiments, in other embodiments of this application, step 105, which calls the corresponding physical qubit according to the mapping relationship information to execute the quantum program, can be implemented through the following steps:
[0123] During the execution of the quantum program to be executed, if the execution reaches the two-bit logic gate to be executed, the physical qubits corresponding to the two program qubits of the two-bit logic gate to be executed are determined from the mapping relationship information, and the first execution qubit and the second execution qubit are obtained.
[0124] Based on the connection information, the qubit connection relationship between the first execution qubit and the second execution qubit is determined;
[0125] If the quantum bit connection is direct, the first and second execution quantum bits are invoked to execute the two-bit logic gate to be executed.
[0126] In this embodiment, 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. During the execution of the quantum program, if the two-bit logic gate is reached, the electronic device determines the two program qubits corresponding to the gate, then determines the physical qubits corresponding to these two program qubits from the mapping information, obtaining the first execution qubit and the second execution qubit. Finally, based on the connection information, the device determines the qubit connection relationship between the first and second execution qubits, i.e., whether the first and second execution qubits are directly connected. If the first and second execution qubits are directly connected, the electronic device directly calls the first and second execution qubits to complete the logical relationship of the two-bit logic gate.
[0127] Based on the foregoing embodiments, in other embodiments of this application, the electronic device is further configured to perform the following steps:
[0128] If the quantum bit connection is not direct, the maximum number of two-bit logic gates that can be inserted is determined based on the connection information, the first execution quantum bit, and the second execution quantum bit.
[0129] Based on the connection information, multiple reference routing paths are planned to connect the first execution qubit and the second execution qubit.
[0130] Based on the maximum number and connection information, the target routing path is determined from multiple reference routing paths;
[0131] Based on the target routing path, execute the two-bit logic gate to be executed.
[0132] In this embodiment, when the quantum bit connection relationship is determined to be indirect, i.e., the first execution quantum bit and the second execution quantum bit are not directly connected, the maximum number of two-bit logic gates that can be inserted between the first execution quantum bit and the second execution quantum bit is determined based on the connection information, the first execution connection bit and the second execution connection bit. Then, multiple reference routing paths that can establish a connection between the first execution quantum bit and the second execution quantum bit are determined from the connection information. There are usually at least two reference routing paths here. That is, there are usually two or more paths between the first execution quantum bit and the second execution quantum bit in the connection information. 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, so as to execute the two-bit logic gate to be executed through the target routing path.
[0133] Based on the foregoing embodiments, in other embodiments of this application, if the quantum bit connection relationship is not directly connected, determining the maximum number of allowed two-bit logic gates based on the connection information, the first execution quantum bit, and the second execution quantum bit can be achieved through the following steps:
[0134] If the quantum bit connection is not direct, determine the minimum number of hops between the first execution quantum bit and the second execution quantum bit from multiple reference routing paths;
[0135] Calculate the average value of the connection reliability parameter for all physical qubits included in multiple reference routing paths;
[0136] Statistically determine the minimum connection reliability parameter value corresponding to the physical qubits in multiple reference routing paths;
[0137] Calculate the first ratio of the minimum connection reliability parameter value to the average value;
[0138] Calculate the first difference between 1 and the first ratio;
[0139] Calculate the product of the first difference and the minimum number of jumps to get the maximum number.
[0140] In this embodiment, when the quantum bit connection is not direct, the electronic device analyzes multiple reference routing paths, counts the number of hops between the first and second execution quantum bits in each reference routing path, and determines the minimum number of hops from the multiple hop counts corresponding to these multiple reference routing paths. Then, based on the connection information, the connection reliability parameter value of the physical quantum bits included in each reference routing path is determined. Then, based on the connection reliability parameter value of the physical quantum bits included in each reference routing path, the average value corresponding to each reference routing path is calculated. Simultaneously, statistical analysis is performed on the connection reliability parameter values included in multiple reference routing paths to determine the minimum connection reliability parameter value. Then, after calculating the first ratio of the determined minimum connection reliability parameter value to the average value, 1 - the first ratio is calculated to obtain the first difference. Finally, the product of the first difference and the minimum number of hops is calculated to obtain the maximum number. In some application scenarios, if the product of the first difference and the minimum number of hops is a decimal, it can be rounded up or rounded up to obtain the maximum number.
[0141] Based on the foregoing embodiments, in other embodiments of this application, the step of determining the target routing path from multiple reference routing paths based on the maximum number and connection information can be achieved through the following steps:
[0142] Based on the connectivity information, determine the connectivity reliability parameter value of the physical qubits included in each reference routing path;
[0143] Calculate the product of all connection reliability parameter values included in each reference routing path to obtain the stability parameter value of each reference routing path;
[0144] The target route is obtained by identifying the reference route with the largest stability parameter value that has a hop count less than or equal to the maximum hop count from multiple reference routes.
[0145] In this embodiment, based on the connection information, the product of all connection reliability parameter values included in each reference routing path is calculated to obtain the corresponding stability parameter value. From multiple reference routing paths, the reference routing path with a hop count less than or equal to the maximum hop count, but with the largest stability parameter value, is determined as the target routing path. In this way, even though two-bit logic gates (Swap gates) need to be inserted between the first and second qubits to be executed when implementing the logic gates to be executed according to the target routing path, the stability and reliability of the route between the first and second qubits to be executed can still be guaranteed.
[0146] Based on the foregoing embodiments, this application provides a mapping management method. First, the method constructs a list of two-qubit gate entanglement relationships between program qubit variables by parsing the quantum program. Simultaneously, considering the average readout error rate of the physical qubits and the connection reliability with all connected qubits, a stability index is calculated for each physical qubit, corresponding to the aforementioned connection reliability parameter value. The program qubit variable with the most two-qubit logic gate relationships is mapped to the physical qubit with the largest stability index. Subsequently, a chain mapping is performed based on the entanglement relationships between the program qubit variables with two-qubit logic gates. While considering connection reliability, program qubit variables with entanglement relationships are preferentially mapped to directly connected physical qubit pairs. This method can minimize the overall number of SWAP gates that need to be inserted during quantum computing, thereby effectively reducing the impact of differences in physical qubit connections and ensuring that qubit mapping is both accurate and reliable. Furthermore, a connection reliability-based evaluation mechanism and a reliability routing 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 threshold for the final routing selection. This achieves overall stability of quantum computing at the cost of adding a limited number of SWAP gates, ensuring a relatively balanced physical bit selection and routing path planning in each qubit mapping process, thus achieving accurate and stable quantum computing. For example, using an electronic device as the server, the specific implementation process of a corresponding mapping management method can be found in [reference needed]. Figure 2 As shown, it includes the following steps:
[0147] Step a11: Schedule and distribute quantum tasks according to quantum program requirements and quantum resource status. When quantum hardware resources are available, select the quantum program P to be executed from the queue of tasks to be executed.
[0148] Step a12: Analyze the quantum program P, count the number of qubit variables used in the quantum program P as N, and the qubit variable pairs corresponding to two-bit logic gates, and generate a list of entanglement relationships of program qubit variables.
[0149] The program qubit variable entanglement list corresponds to the aforementioned qubit variable entanglement information. For example, the program qubit variable entanglement list can be denoted as:
[0150] L=[q0:[……],
[0151] q1:[……],
[0152] ……,
[0153] qN:[……]]
[0154] The list of entanglement relationships for program qubit variables can be a dictionary structure. Each key value corresponds to N program qubit variables, i.e., q0, q1, ..., qN. Each key value corresponds to a value in a list structure, which stores all program qubit variables that have a two-bit logic gate relationship with the key value. In the dictionary structure, both the key and value values can be stored in the same order as the entanglement relationships of the qubits in the quantum program P, i.e., in the same order as the execution time in the quantum program P.
[0155] Step a13: Statistically analyze the physical qubit connections in the QPU to obtain connection information.
[0156] The connection information can be a schematic diagram of the physical quantum bit connection topology; for example, refer to... Figure 3 As shown. In Figure 3 In this diagram, nodes represent physical qubits, and the values within the nodes represent the average readout error rate (ARR) of the physical qubits. Higher ARR values indicate a greater probability of error during measurement. Edges represent direct connections between corresponding pairs of physical qubits, and the values adjacent to the edges represent the connection reliability of the qubit pair. Higher values indicate more accurate results when executing a two-bit logic gate using the corresponding qubit pair. The ARR and connection reliability information included in the connection information can be obtained through server system calibration experiments or other methods, depending on the specific circumstances; no specific limitations are imposed here.
[0157] Step a14: Based on the list of entanglement relationships and connection information of the program qubit variables, the program qubits are mapped to the physical qubits in a chain to obtain the mapping relationship information.
[0158] Step a14 can be implemented by the following steps:
[0159] Step a141: Calculate the qubit stability index of the physical qubit based on the connection information.
[0160] The Qubit Stability Index (QSI) corresponds to the aforementioned qubit stability coefficient. A corresponding method for calculating the fidelity index of each physical qubit based on connectivity information, denoted as the Qubit Stability Index, can be described as follows:
[0161] Step b11: Define the node centrality (NC) of each physical qubit as the sum of the weights of the edges connected to it, i.e. In the formula, NC i Represents physical qubits i The node centrality, N ( i ) represents the physical quantum bit i There exists a connected set of other physical qubits, E ij Represents physical quantum bit pairs i and j The reliability of the connection between them.
[0162] Step b12, based on NC i The QSI value for each physical qubit is calculated using the following formula: In the formula, RER i Represents physical qubits i The average readout error rate, α, is a non-negative constant factor corresponding to the first coefficient mentioned above, used to adjust the average readout error rate RER. i The degree of influence of α on the QSI value of a physical qubit can be determined by performing multiple benchmark quantum circuit experiments, establishing a relationship between the experimental results and the α value, and using the elbow method to confirm the optimal α value. The above QSI definition is based on... Introducing a nonlinear penalty mechanism into the denominator means that even if the average readout error rate is very low, the denominator will still be slightly greater than 1. This ensures that even under ideal conditions, the performance of physical qubits will be affected to some extent, and that an increase in the average readout error rate will lead to a more significant decrease in the QSI value. In this way, the actual impact of the average readout error rate on qubit performance can be captured more effectively, because in practical quantum computing, an increase in the error rate usually leads to a rapid decline in performance.
[0163] Step b142: Traverse the list of entanglement relationships of qubits, count the number of entanglement relationships corresponding to each program qubit variable in the list of entanglement relationships, and determine the program qubit variable with the most entanglement relationships.
[0164] Among them, the program qubit variable qi with the most entangled relationships can be the key value corresponding to the longest value value in the value list of entangled qubits, such as the value value in the aforementioned L.
[0165] Step b143: Determine the physical qubit with the largest stability index.
[0166] For example, based on Figure 3 The calculated QSI value of the physical qubit is used to identify the physical qubit with the largest QSI value, which is then considered the most stable and reliable physical qubit, Qi. For example... Figure 3 The diagram showing the physical qubit connection topology allows us to calculate the QSI values of all physical qubits as follows: QSI0 of Q0 = Q1's QSI1= Q2's QSI2 = Q3's QSI3 = Q4's QSI4 = Q5's QSI5 = .
[0167] Since α in the aforementioned calculation formula is a non-negative constant, Q2 has the largest QSI value among all physical qubits in this example, and will be identified as the most stable qubit to begin the mapping process.
[0168] Step b144: Starting from the program qubit variable with the most entangled relationships in the qubit entanglement relationship list, determine the physical qubit with the largest stability index in the connection information and map it until the corresponding physical qubit is obtained for all N program qubits.
[0169] For example, this embodiment provides a mapping implementation method:
[0170] Step c11: Map the program qubit variable qi to the physical qubit Qi, and mark them as mapped.
[0171] Step c12: According to the physical qubit storage order in the Value list corresponding to Key qi in list L, retrieve the first program qubit variable qj that has not been marked as mapped.
[0172] Step c13: Confirm the connection with the physical quantum bit Qi and the connection reliability E. ijFind the largest physical qubit Qj, map qj onto Qj, and mark them all as mapped.
[0173] For example, such as Figure 3 As shown, among the three physical qubits 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 preferred as the next physical qubit to be mapped.
[0174] Step c14: According to the list of Values corresponding to key qj in list L, take out the first program qubit variable qk that is not marked as mapped, and follow the same process to confirm the next physical qubit Qk to be mapped and perform the mapping; and so on, until the mapping of all program qubit variables is completed.
[0175] It should be noted that in the above chain mapping process, if all program qubit variables in the value list corresponding to the program qubit variable qk have been marked as mapped, then the chain mapping proceeds back to the value list corresponding to the previous key value qj, and the first unmarked program qubit variable after qk in the value list corresponding to qj is retrieved and mapped. If all program qubit variables in the value list corresponding to the program qubit variable qj have also been marked as mapped, then the chain mapping continues back to the value list corresponding to the previous key value qi, until an unmapped program qubit variable is found. Similarly, if all physical qubits connected to Qk have been mapped, the same backtracking logic is followed for the program qubit variables until a new unmapped connection bit is found.
[0176] Step a15: Execute the quantum circuit according to the timing sequence. When the two-bit logic gate is executed, 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.
[0177] Step a16: Directly execute the two-bit logic gate.
[0178] Step a17: Plan the route by inserting a SWAP gate to move the two mapped physical qubits to a mutually connected position.
[0179] Step a17 can be achieved by the following steps:
[0180] Step a171: Determine the threshold number of SWAP gates that need to be inserted into the route.
[0181] Here, we assume that the minimum number of SWAP gates required to route from the source qubit to the target qubit 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 movement of the qubit in one dimension, such as the horizontal axis, and then move it in another dimension, such as the vertical axis. The number of movement steps in these two dimensions, also known as the number of jumps, can be used to determine the Sshortest value.
[0182] To ensure the overall stability of the quantum system's execution process, considering the differences in connection reliability between different physical qubit pairs and the potential instability introduced by inserting SWAP gates, the SWAP gate number threshold can be calculated using the following formula: Sthreshold = Sshortest + δ, where Sthreshold is the upper limit threshold for the number of SWAPs required for the most stable route. δ represents the maximum additional number of SWAPs introduced by executing a more stable route compared to the shortest route, and its value can be calculated as follows: δ = (1 - Emin / Eactual) * Sshortest, where Emin represents the minimum connection reliability between different physical qubit pairs, and Eactual represents the average connection reliability between all physical qubit pairs on the actual routing path. By calculating the ratio between Emin and Eactual, an applicable and quantifiable metric is provided for the maximum additional number of SWAP gates introduced by executing a more stable route compared to the shortest route, while maintaining the stability of the quantum circuit, thus optimizing the overall performance of the quantum circuit.
[0183] Step a172: Calculate the stability of the routing path between the two physical qubits obtained by each mapping.
[0184] The stability of a routing path is the product of the stability of the physical qubits connected along the path, denoted as Rrout = ∏(E ij ), where ∏ is the multiplication symbol.
[0185] Step a173: Determine the most stable route path as the one with the highest stability and the number of SWAP gates that need to be inserted is within the SWAP gate number threshold.
[0186] Among them, based on the physical quantum bit connection topology, the objective function is modified to maximize the stability of the route, and the threshold is set to the maximum number of hops. For example, a modified Dijkstra algorithm variant can be used to obtain the most stable route path that meets the SWAP threshold from multiple routing paths between two physical quantum bits.
[0187] For example, refer to Figure 4The diagram shows two routing paths provided in this embodiment of the application for moving from physical quantum node B0 to physical quantum node B3. The stability of the real routing path is calculated to be 0.6 × 0.7 = 0.42, and the stability of the virtual routing path is calculated to be 0.8 × 0.9 × 0.8 = 0.576. Assuming that a SWAP gate is wirelessly inserted into the real routing path, while a SWAP gate needs to be inserted into the virtual routing path, and the corresponding SWAP gate number threshold is 2, since the virtual routing path has the highest stability and the number of SWAP gates it needs to insert is less than the SWAP gate number threshold of 2, the virtual routing path can be determined as the most stable routing path.
[0188] Step a174: Following the most stable routing path, insert the SWAP gate to move the entangled program qubit variables to the two physical qubit pairs obtained by mapping and perform the calculation.
[0189] Step a18: Continue the calculation according to the quantum circuit timing. If a SWAP gate operation is required again, repeat step a17 until the calculation of the quantum program P is completed.
[0190] Thus, given the multiple challenges faced by quantum systems, such as interference and limitations imposed by the physical characteristics of quantum hardware, achieving a stable and efficient qubit mapping strategy can achieve the optimal balance between quantum computing stability and mapping cost. This strategy involves using a chain-like mapping method based on the entanglement relationships of program qubits and the physical bit connection topology. This method prioritizes mapping two-bit gates in the program to directly connected physical qubit pairs, while defining a maximum additional number of swap gates to improve overall stability and limit the overall swap gate insertion threshold. Furthermore, it improves the reliability of two-bit gate connections. Ultimately, this ensures the accuracy of quantum computing results while optimizing resource consumption, thereby promoting the practical application and development of quantum computing technology.
[0191] The mapping management method provided in this application generates entanglement relationship information of qubit variables based on the quantum program to be executed. After obtaining connection information based on the connection relationship between the physical qubits included in the quantum processor, the method 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 entanglement relationship information of the qubit variables, the method obtains mapping relationship information. Finally, the method calls the corresponding physical qubit according to the mapping relationship information to execute the quantum program to be executed. In this way, by determining the entanglement information between program qubit variables in the quantum program to be executed, the qubit stability coefficient of the physical qubits, and the connection information formed by the connection relationships between the physical qubits, the mapping relationship between program qubit variables and physical qubits is realized. After obtaining the mapping relationship information, the quantum program to be executed is executed according to the mapping relationship information. This solves the problem that the accuracy of quantum computing tasks is difficult to guarantee due to the current neglect of the reliability differences between physical qubits. A qubit mapping strategy is proposed, which fully considers the actual characteristics of physical qubits to realize the mapping management of qubits, so as to ensure the stability of the quantum computing process and improve the efficiency and accuracy of quantum computing.
[0192] Based on the foregoing embodiments, embodiments of this 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 generation unit 21, a first obtaining unit 22, a calculation unit 23, a second obtaining unit 24, and an execution unit 25; wherein:
[0193] The generation unit 21 is used to generate entanglement relationship information of qubit variables based on the quantum program to be executed; wherein, the entanglement relationship information of qubit variables is used to record program qubit variable pairs with a two-bit logic gate correspondence relationship;
[0194] The first obtaining unit 22 is used to obtain connection information based on the connection relationship between the physical qubits included in the quantum processor;
[0195] The calculation unit 23 is used to calculate 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; wherein, the qubit stability coefficient is used to represent the stability and reliability of the corresponding physical qubit.
[0196] The second obtaining unit 24 is used to obtain mapping relationship information based on connection information, the qubit stability coefficient of each physical qubit and the entanglement relationship information of qubit variables; 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;
[0197] The execution unit 25 is used to call the corresponding physical qubit according to the mapping relationship information and execute the quantum program to be executed.
[0198] In other embodiments of this application, the generation unit is specifically used to implement the following steps:
[0199] By counting all the program qubit variables included in the quantum program to be executed, N first qubits are obtained; where N is an integer greater than or equal to 1.
[0200] The program qubit variables in the quantum program to be executed that have a two-bit logic gate relationship with each first qubit are counted 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.
[0201] According to the execution sequence of the quantum program to be executed, the N first qubits and the corresponding m second qubits are sorted and stored to obtain the entanglement relationship information of the qubit variables.
[0202] In other embodiments of this application, the computing unit is specifically used to implement the following steps:
[0203] Determine the connection reliability parameter value between p connection bits that have a connection relationship with each physical quantum bit in the connection information; where p is an integer greater than or equal to 1;
[0204] For each physical qubit, calculate the sum of the corresponding p connection reliability parameter values to obtain the first value;
[0205] Calculate the first sum of the average readout error rate for each physical qubit and 1;
[0206] Calculate the first coefficient power of the first sum of each physical qubit to obtain the second value;
[0207] The ratio of the first value to the second value of each physical qubit is calculated to obtain the qubit stability coefficient of the corresponding physical qubit.
[0208] In other embodiments of this application, the second obtaining unit is specifically used to implement the following steps:
[0209] 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 with the largest qubit stability coefficient that have connection relationships are sorted in order to obtain the physical qubit sorting information;
[0210] Sorting the N first qubits in the entanglement relationship information of the qubit variables yields the program qubit sorting information;
[0211] Based on the program qubit ordering information and the physical qubit ordering information, mapping information is obtained, including the mapping relationship between the N first qubits and their corresponding physical qubits.
[0212] In other embodiments of this application, when the second obtaining unit performs the step of sorting the N first qubits in the entanglement relationship information of the qubit variables to obtain the program qubit sorting information, it can be achieved through the following steps:
[0213] From the entanglement information of the qubit variables, determine the first qubit with the most entanglement, and obtain the third qubit;
[0214] Determine the fourth qubit that is the first in order among the m second qubits corresponding to the third qubit;
[0215] After sorting the fourth qubit to the third qubit, the first sorting information is obtained;
[0216] If, from the entanglement relationship information of the qubit variables, the fifth qubit, which is ranked first among the m second qubits corresponding to the fourth qubit and does not exist in the first ranking information, is determined, and the fifth qubit is ranked to the fourth qubit in the first ranking information, the second ranking information is obtained;
[0217] If, from the entanglement relationship information of the qubit variables, the sixth qubit, which is ranked first among the m second qubits corresponding to the fifth qubit and does not exist in the second ranking information, is determined, and the sixth qubit is ranked to the fifth qubit in the second ranking information, then the third ranking information is obtained;
[0218] If the sixth qubit is not determined from the entanglement relationship information of the qubit variables, determine the first seventh qubit after the fifth qubit from the m second qubits of the fourth qubit, which is not present in the second sorting information;
[0219] After sorting the seventh qubit to the fourth qubit in the second sorting information, the fourth sorting information is obtained;
[0220] If, from the entanglement relationship information of the qubit variables, the eighth qubit, which is ranked first among the m second qubits corresponding to the seventh qubit and does not exist in the fourth ranking information, is determined, and the eighth qubit is ranked up to the seventh qubit in the fourth ranking information, the program qubit ranking information including the ranking of the N first qubits is obtained.
[0221] In other embodiments of this application, the execution unit is specifically used to implement the following steps:
[0222] During the execution of the quantum program to be executed, if the execution reaches the two-bit logic gate to be executed, the physical qubits corresponding to the two program qubits of the two-bit logic gate to be executed are determined from the mapping relationship information, and the first execution qubit and the second execution qubit are obtained.
[0223] Based on the connection information, the qubit connection relationship between the first execution qubit and the second execution qubit is determined;
[0224] If the quantum bit connection is direct, the first and second execution quantum bits are invoked to execute the two-bit logic gate to be executed.
[0225] In other embodiments of this application, the execution unit is further configured to perform the following steps:
[0226] If the quantum bit connection is not direct, the maximum number of two-bit logic gates that can be inserted is determined based on the connection information, the first execution quantum bit, and the second execution quantum bit.
[0227] Based on the connection information, multiple reference routing paths are planned to connect the first execution qubit and the second execution qubit.
[0228] Based on the maximum number and connection information, the target routing path is determined from multiple reference routing paths;
[0229] Based on the target routing path, execute the two-bit logic gate to be executed.
[0230] In other embodiments of this application, when the execution unit performs the step of determining the maximum number of allowed two-bit logic gates based on the connection information, the first execution qubit, and the second execution qubit, if the qubit connection relationship is not direct, the following steps can be used:
[0231] If the quantum bit connection is not direct, determine the minimum number of hops between the first execution quantum bit and the second execution quantum bit from multiple reference routing paths;
[0232] Calculate the average value of the connection reliability parameter for all physical qubits included in multiple reference routing paths;
[0233] Statistically determine the minimum connection reliability parameter value corresponding to the physical qubits in multiple reference routing paths;
[0234] Calculate the first ratio of the minimum connection reliability parameter value to the average value;
[0235] Calculate the first difference between 1 and the first ratio;
[0236] Calculate the product of the first difference and the minimum number of jumps to get the maximum number.
[0237] In other embodiments of this application, when the execution unit determines the target routing path from multiple reference routing paths based on the maximum number and connection information, it can be achieved through the following steps:
[0238] Based on the connectivity information, determine the connectivity reliability parameter value of the physical qubits included in each reference routing path;
[0239] Calculate the product of all connection reliability parameter values included in each reference routing path to obtain the stability parameter value of each reference routing path;
[0240] The target route is obtained by identifying the reference route with the largest stability parameter value that has a hop count less than or equal to the maximum hop count from multiple reference routes.
[0241] It should be noted that the process of information interaction between units and modules in this embodiment can be referred to the description in other embodiments, and will not be repeated here.
[0242] The mapping management device provided in this application generates entanglement relationship information of qubit variables based on the quantum program to be executed. After obtaining connection information based on the connection relationship between the physical qubits included in the quantum processor, it 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 entanglement relationship information of the qubit variables, it obtains mapping relationship information. Finally, it calls the corresponding physical qubit according to the mapping relationship information to execute the quantum program to be executed. In this way, by determining the entanglement information between program qubit variables in the quantum program to be executed, the qubit stability coefficient of the physical qubits, and the connection information formed by the connection relationships between the physical qubits, the mapping relationship between program qubit variables and physical qubits is realized. After obtaining the mapping relationship information, the quantum program to be executed is executed according to the mapping relationship information. This solves the problem that the accuracy of quantum computing tasks is difficult to guarantee due to the current neglect of the reliability differences between physical qubits. A qubit mapping strategy is proposed, which fully considers the actual characteristics of physical qubits to realize the mapping management of qubits, so as to ensure the stability of the quantum computing process and improve the efficiency and accuracy of quantum computing.
[0243] Based on the foregoing embodiments, embodiments of this application provide an electronic device that can be applied to... Figure 1 In the mapping management method provided in the corresponding embodiment, refer to Figure 6 As shown, the electronic device 3 may include: a communication interface 31, a memory 32, a processor 33, and a communication bus 34; wherein:
[0244] Memory 32 is used to store executable information;
[0245] The communication bus 34 is used to realize the communication connection between the communication interface 31, the processor 33 and the memory 32;
[0246] Processor 33 is used to execute the mapping management program stored in memory 32, to implement, for example... Figure 1 The implementation process of the mapping management method provided in the corresponding embodiment will not be described in detail here.
[0247] Based on the foregoing embodiments, embodiments of this application provide a computer-readable storage medium, simply referred to as a storage medium, which stores one or more programs that can be executed by one or more processors to implement the reference. Figure 1 The implementation process of the mapping management method provided in the corresponding embodiment will not be described in detail here.
[0248] Based on the foregoing embodiments, this application also provides a computer program product, including a computer program that can be executed by the processor 33 of the electronic device 3 to complete any of the foregoing method steps.
[0249] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0250] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0251] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0252] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0253] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.
Claims
1. A mapping management method, characterized in that, The method includes: Based on the quantum program to be executed, entanglement information of qubit variables is generated; wherein, the entanglement information of qubit variables is used to record program qubit variable pairs with a two-bit logic gate correspondence. Connection information is obtained based on the connection relationships between the physical qubits included in the quantum processor; Based on the average readout error rate and connection reliability parameter value of each physical qubit in the connection information, the qubit stability coefficient of each physical qubit in the connection information is calculated; wherein, the qubit stability coefficient is used to represent the stability and reliability of the corresponding physical qubit; Based on the connection information, the qubit stability coefficient of each physical qubit, and the entanglement relationship information of the qubit variables, mapping relationship information is obtained; 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 qubits are invoked according to the mapping information to execute the quantum program to be executed.
2. The method according to claim 1, characterized in that, The generation of entanglement information of qubit variables based on the quantum program to be executed includes: By counting all the program qubit variables included in the quantum program to be executed, N first qubits are obtained; where N is an integer greater than or equal to 1. The program qubit variables in the quantum program to be executed that have a two-bit logic gate relationship with each first qubit are counted 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 qubits and the corresponding m second qubits are sorted and stored to obtain the entanglement relationship information of the qubit variables.
3. The method according to claim 1, characterized in that, The calculation of the qubit stability coefficient for 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, includes: Determine the connection reliability parameter value between p connection bits that have a connection relationship with each physical quantum bit in the connection information; where p is an integer greater than or equal to 1; For each physical qubit, the sum of the corresponding p connection reliability parameter values is calculated to obtain the first value; Calculate the first sum of the average readout error rate for each physical qubit and 1; Calculate the first coefficient power of the first sum value for each of the physical qubits to obtain the second value; The ratio of the first value to the second value of each physical qubit is calculated to obtain the qubit stability coefficient of the corresponding physical qubit.
4. The method according to claim 2, characterized in that, The mapping relationship information obtained based on the connection information, the qubit stability coefficient of each physical qubit, and the entanglement relationship information of the qubit variables includes: 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 with the largest qubit stability coefficient that have connection relationships are sorted in order to obtain the physical qubit sorting information; The N first qubits in the entanglement relationship information of the qubit variables are sorted to obtain the program qubit sorting information; Based on the programmed qubit sorting information and the physical qubit sorting information, the mapping relationship information, which includes the mapping relationship between the N first qubits and their corresponding physical qubits, is obtained.
5. The method according to claim 4, characterized in that, The process of sorting the N first qubits in the entanglement relationship information of the qubit variables to obtain the program qubit sorting information includes: From the entanglement relationship information of the quantum bit variables, the first quantum bit with the most entanglement is determined, and the third quantum bit is obtained; Determine the fourth qubit that is ranked first among the m second qubits corresponding to the third qubit; After sorting the fourth qubit to the third qubit, the first sorting information is obtained; If, from the entanglement relationship information of the qubit variables, a fifth qubit that is ranked first among the m second qubits corresponding to the fourth qubit and does not exist in the first ranking information is determined, and the fifth qubit is ranked to the fourth qubit in the first ranking information, then the second ranking information is obtained; If, from the entanglement relationship information of the qubit variables, the sixth qubit, which is ranked first among the m second qubits corresponding to the fifth qubit and does not exist in the second ranking information, is determined, and the sixth qubit is ranked to the fifth qubit in the second ranking information, then the third ranking information is obtained; If the sixth qubit is not determined from the entanglement relationship information of the qubit variables, determine the first seventh qubit after the fifth qubit from the m second qubits of the fourth qubit, which is not present in the second sorting information; After sorting the seventh qubit to the fourth qubit in the second sorting information, the fourth sorting information is obtained; If, from the entanglement relationship information of the qubit variables, the eighth qubit, which is ranked first among the m second qubits corresponding to the seventh qubit and does not exist in the fourth ranking information, is determined, and the eighth qubit is ranked to the seventh qubit in the fourth ranking information, the program qubit ranking information including the ranking of N first qubits is obtained.
6. The method according to claim 1, characterized in that, The step of calling the corresponding physical qubit according to the mapping relationship information to execute the quantum program to be executed includes: During the execution of the quantum program to be executed, if the two-bit logic gate to be executed is reached, the physical qubits corresponding to the two program qubits of the two-bit logic gate to be executed are determined from the mapping relationship information to obtain the first execution qubit and the second execution qubit. Based on the connection information, the qubit connection relationship between the first execution qubit and the second execution qubit is determined; If the quantum bit connection is a direct connection, the first execution quantum bit and the second execution quantum bit are invoked to execute the two-bit logic gate to be executed.
7. The method according to claim 6, characterized in that, The method further includes: If the quantum bit connection is not a direct connection, based on the connection information, the first execution quantum bit and the second execution quantum bit, determine the maximum number of two-bit logic gates that can be inserted; Based on the connection information, multiple reference routing paths are planned to connect the first execution quantum bit and the second execution quantum bit. Based on the maximum number and the connection information, a target routing path is determined from the plurality of reference routing paths; Based on the target routing path, execute the two-bit logic gate to be executed.
8. The method according to claim 7, characterized in that, If the quantum bit connection is not a direct connection, based on the connection information, the first execution quantum bit, and the second execution quantum bit, the maximum number of allowed two-bit logic gates to be inserted is determined, including: If the quantum bit connection is not a direct connection, determine the minimum number of hops between the first execution quantum bit and the second execution quantum bit from the multiple reference routing paths; Calculate the average value of the connection reliability parameter of all physical qubits included in the multiple reference routing paths; Calculate the minimum connection reliability parameter value corresponding to the physical qubits in the multiple reference routing paths; Calculate a first ratio between the minimum connection reliability parameter value and the average value; Calculate the first difference between 1 and the first ratio; The product of the first difference and the minimum number of jumps is calculated to obtain the maximum number.
9. The method according to claim 7, characterized in that, The step of determining the target routing path from the plurality of reference routing paths based on the maximum number and the connection information includes: Based on the connection information, determine the connection reliability parameter value of the physical qubits included in each of the reference routing paths; Calculate the product of all the connection reliability parameter values included in each of the reference routing paths to obtain the stability parameter value of each of the reference routing paths; The target routing path is obtained by determining the reference routing path from the multiple reference routing paths whose hop count is less than or equal to the maximum hop count and whose stability parameter value is the largest.
10. A mapping management device, characterized in that, The device includes: a generation unit, a first obtaining unit, a calculation unit, a second obtaining unit, and an execution unit; wherein: The generation unit is used to generate entanglement information of qubit variables based on the quantum program to be executed; wherein, the entanglement information of qubit variables is used to record pairs of program qubit variables with a two-bit logic gate correspondence. The first obtaining unit is used to obtain connection information based on the connection relationship between the physical qubits included in the quantum processor; The computing unit is used to calculate 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; wherein, the qubit stability coefficient is used to represent the stability and reliability of the corresponding physical qubit; The second obtaining unit is used to obtain mapping relationship information based on the connection information, the qubit stability coefficient of each physical qubit, and the entanglement relationship information of the qubit variables; 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 qubits according to the mapping relationship information to execute the quantum program to be executed.
11. An electronic device, characterized in that, The device includes 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, and implement the steps in the mapping management method as described in any one of claims 1 to 9.
12. A storage medium, characterized in that, The storage medium stores a mapping management program, which, when executed, implements the steps of the mapping management method as described in any one of claims 1 to 9.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the mapping management method as described in 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