Quantum circuit initialization method, device, equipment, storage medium and program product
By selecting the qubit with the highest movement frequency and assigning the initial coordinates of the shortest path during quantum circuit initialization, the problem of low efficiency in qubit mapping operations is solved, and more efficient qubit mapping is achieved.
Patent Information
- Application Number
- CN202511254325.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-03
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-09-03
AI Technical Summary
In existing technologies, the efficiency of qubit mapping operations is low, and there are no effective solutions to improve it.
By determining the movement operation frequency of each qubit in the quantum circuit and the movement operation path length of the processor region, N qubits with the highest movement operation frequency are selected and assigned initial coordinates with the shortest movement operation path length, and an initial coordinate matrix is constructed for physical initial arrangement.
This effectively reduces the path length of qubit movement and improves the efficiency of qubit mapping operations.
Smart Images

Figure CN120725172B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of quantum computing, and more particularly to a quantum circuit initialization method, apparatus, device, storage medium, and program product. Background Technology
[0002] Currently, quantum computers can execute algorithms described by quantum computers on quantum physical devices by manipulating the mapping of qubits.
[0003] However, there is currently no effective solution for improving the efficiency of qubit mapping operations. Summary of the Invention
[0004] To address the related technical issues, embodiments of this application provide a quantum circuit initialization method, apparatus, electronic device, storage medium, and computer program product.
[0005] The technical solution of this application embodiment is implemented as follows:
[0006] This application provides a quantum circuit initialization method, including:
[0007] First information and second information are determined, wherein the first information characterizes the movement operation frequency of each qubit in the first quantum circuit, and the second information characterizes the movement operation path length of each coordinate contained in the first region of the first processor, wherein the movement operation path length of the coordinate includes the length of the path formed by moving the qubit located at the coordinate to the second region of the first processor, wherein the first region is used at least for storing qubits, and the second region is used at least for gate operations and / or measurements of qubits.
[0008] Using the first information, identify the first qubits with the highest move operation frequency among the N qubits;
[0009] Using the second information, determine the first coordinate with the shortest path length among the N movement operations;
[0010] By associating the N first qubits with the N first coordinates, the association relationship is obtained;
[0011] Using the aforementioned correlation, an initial coordinate matrix is determined, which is used for the initial physical arrangement of the first quantum circuit; where N is an integer greater than or equal to 1.
[0012] In the above scheme, determining the first information includes:
[0013] Determine the correlation degree of each qubit in the first quantum circuit;
[0014] The first information is determined by utilizing the correlation of each qubit.
[0015] In the above scheme, determining the correlation degree of each qubit in the first quantum circuit includes:
[0016] Determine a first correlation matrix and a second correlation matrix for the first quantum circuit. The first correlation matrix represents the autocorrelation degree of each qubit in the first quantum circuit, and the second correlation matrix represents the cross-correlation degree between different qubits in the first quantum circuit.
[0017] The correlation degree of each qubit is determined using the first correlation matrix and the second correlation matrix. The correlation degree of the qubit includes autocorrelation correlation degree and cross-correlation correlation degree.
[0018] In the above scheme, determining the first qubit with the highest move operation frequency using the first information includes:
[0019] N first qubits are determined by using the correlation degree of each qubit and the first threshold.
[0020] The method in the above scheme further includes:
[0021] A qubit correlation graph is constructed using the correlation degree of each qubit. The nodes of the qubit correlation graph correspond one-to-one with the qubits of the first quantum circuit. For each edge in the qubit correlation graph, the value of the edge is equal to the cross-correlation degree of the two nodes associated with the edge.
[0022] The first threshold is determined using the aforementioned qubit correlation diagram.
[0023] In the above scheme, the construction of the qubit correlation graph includes:
[0024] Determine the second qubit, which includes the qubit with the highest correlation in the first quantum circuit;
[0025] Starting with the second qubit, construct the qubit association graph.
[0026] In the above scheme, determining the second information includes:
[0027] For each coordinate contained in the first region, determine the average path length for moving the qubit located at the coordinate to each coordinate contained in the second region; use the average value as the path length for the coordinate movement operation.
[0028] The second information is determined by using the length of the movement path at each coordinate.
[0029] In the above scheme, the average length of the movement operation path corresponding to the N first coordinates is less than the average length of the movement operation path corresponding to other coordinates in the first region other than the N first coordinates.
[0030] In the above scheme, associating the N first qubits with the N first coordinates includes:
[0031] A third qubit and a second coordinate are determined. The third qubit includes the qubit among the N first qubits that is not associated with the first coordinate and has the highest movement operation frequency. The second coordinate includes the first coordinate among the N first coordinates that is not associated with the first qubit and has the shortest movement operation path length. The third qubit is associated with the second coordinate. The third qubit and the second coordinate are redefined, and the redefined third qubit is associated with the redefined second coordinate, until all first qubits are associated with the first coordinate.
[0032] or,
[0033] A qubit correlation graph is constructed, wherein each node of the qubit correlation graph corresponds one-to-one with a qubit of the first quantum circuit. For each edge in the qubit correlation graph, the value of the edge is equal to the cross-correlation degree of the two nodes associated with the edge. Based on the correlation relationships in the qubit correlation graph, starting from the first qubit corresponding to the starting point of the qubit correlation graph, each first qubit is sequentially associated with a first coordinate. The associated first coordinate includes the first coordinate among the N first coordinates that is not associated with a first qubit and has the shortest movement operation path length.
[0034] The method in the above scheme further includes:
[0035] The evaluation results are obtained by evaluating the N determined first coordinates;
[0036] Update the N first coordinates using the evaluation results;
[0037] The process of associating N first qubits with N first coordinates to obtain the association relationship includes:
[0038] By associating the N first qubits with the updated N first coordinates, we obtain the association relationship.
[0039] The method in the above scheme further includes:
[0040] The initial coordinate matrix is loaded into the quantum computing operating system to perform the initial physical arrangement of the first quantum circuit.
[0041] This application also provides a quantum circuit initialization device, including:
[0042] A first determining unit is configured to determine first information and second information, wherein the first information characterizes the movement operation frequency of each qubit in the first quantum circuit, and the second information characterizes the movement operation path length of each coordinate contained in a first region of the first processor, wherein the movement operation path length of the coordinate includes the length of the path formed by moving the qubit located at the coordinate to a second region of the first processor, wherein the first region is used at least for storing qubits, and the second region is used at least for gate operations and / or measurements of qubits.
[0043] The second determining unit is used to determine, using the first information, the first qubits with the highest movement operation frequency among the N qubits; and to determine, using the second information, the first coordinates with the shortest movement operation path length among the N qubits.
[0044] The third determining unit is used to associate N first qubits with N first coordinates to obtain an association relationship; and to use the association relationship to determine an initial coordinate matrix, which is used for the physical initial arrangement of the first quantum circuit; wherein N is an integer greater than or equal to 1.
[0045] This application also provides an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor.
[0046] When the processor runs the computer program, it executes the steps of any of the above methods.
[0047] This application also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the above methods.
[0048] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above methods.
[0049] The quantum circuit initialization method, apparatus, electronic device, storage medium, and computer program product provided in this application determine first information and second information. The first information characterizes the movement operation frequency of each qubit in the first quantum circuit, and the second information characterizes the movement operation path length of each coordinate contained in a first region of a first processor. The movement operation path length of the coordinate includes the length of the path formed by moving the qubit located at the coordinate to a second region of the first processor. The first region is used at least for storing qubits, and the second region is used at least for gate operations and / or measurements of qubits. Using the first information, N first qubits with the highest movement operation frequencies are determined. Using the second information, N first coordinates with the shortest movement operation path lengths are determined. The N first qubits are associated with the N first coordinates to obtain an association relationship. Using the association relationship, an initial coordinate matrix is determined, and the initial coordinate matrix is used for the physical initial arrangement of the first quantum circuit. Wherein, N is an integer greater than or equal to 1. The solution provided in this application provides that, during the physical initialization of the quantum circuit (i.e., the first quantum circuit), the N qubits with the highest movement operation frequency (i.e., the first qubits) in the storage region (i.e., the first region) are assigned N initial coordinates (i.e., the first coordinates) with the shortest movement operation path length. This can effectively reduce the length of the path formed by the movement of qubits during the movement operation in the quantum computing process, thereby reducing the time required for the movement operation and improving the efficiency of the qubit mapping operation (at least including the movement operation). Attached Figure Description
[0050] Figure 1 This is a flowchart illustrating the quantum circuit initialization method according to an embodiment of this application;
[0051] Figure 2 This is a schematic diagram of the quantum bit correlation diagram in an embodiment of this application;
[0052] Figure 3 This is a schematic diagram showing the positional relationship between the storage area, temporary storage area, and operation area in an embodiment of this application;
[0053] Figure 4 A flowchart illustrating an initialization method based on a neutral atom quantum circuit, serving as an application example of this application;
[0054] Figure 5 This is a schematic diagram of the quantum circuit initialization device according to an embodiment of this application;
[0055] Figure 6 This is a schematic diagram of the electronic device structure according to an embodiment of this application. Detailed Implementation
[0056] The present application will now be described in further detail with reference to the accompanying drawings and embodiments.
[0057] Among related technologies, neutral atom quantum computers are quantum computing platforms that utilize neutral atoms as qubits, offering advantages such as long coherence time, high-fidelity quantum gate operation, and flexible qubit arrangement.
[0058] In practical applications, the specific process of quantum computing using a neutral atom quantum computer can include: determining the corresponding quantum circuit (or quantum line) based on the quantum computing algorithm to be implemented (or executed); then, based on the determined quantum circuit, determining the qubits required to implement the quantum circuit and the qubit mapping operations (or qubit operations) to be performed; next, based on the determined qubits, performing physical initialization in a programmable logic processor (PLC), that is, determining the initial physical arrangement of the qubits in the PLC (or the initial qubit array arrangement, initial physical arrangement, initial qubit arrangement, or the initial position of each qubit in the PLC); finally, based on the initial physical arrangement result and in conjunction with the quantum circuit, performing the qubit mapping operations.
[0059] Quantum bit mapping operations can be categorized into shift operations (also known as displacement operations) and quantum gate operations (also known as gate operations or logic gate operations) based on their operation type. Shift operations involve moving a qubit from the storage region to the operation region; quantum gate operations involve illuminating a qubit in the operation region with a laser to rotate the quantum gate. Furthermore, quantum bit mapping operations can also be categorized into single-qubit mapping operations and two-qubit mapping operations based on the object of the operation. Single-qubit mapping operations are associated with a single qubit, while two-qubit mapping operations are associated with two qubits.
[0060] The programmable logic processor of a neutral atom quantum computer can typically be divided into a storage region (also called a memory area) and an operation region (also called an operation area) based on hardware characteristics. The storage region is used to centrally store qubits (which can also be understood as storing the neutral atoms corresponding to the qubits); the operation region is used to perform quantum gate operations and / or measurement operations on the qubits. In this case, performing the initial physical arrangement in the programmable logic processor usually refers to performing the initial physical arrangement in the storage region.
[0061] For example, the programmable logic processor of a neutral atom quantum computer may include an optical tweezers array, which is a quantum manipulation platform that includes multiple optical tweezers points (which can also be understood as lattices). Each optical tweezers point can accommodate (or bind) a neutral atom or molecule. By using the neutral atom bound in the optical tweezers array as the qubit corresponding to the algorithm, and by capturing and / or manipulating the atom or molecule in the optical tweezers point with a laser beam, the qubit mapping operation corresponding to the algorithm can be realized.
[0062] In practical applications, when a neutral atom quantum computer performs a qubit mapping operation on a single qubit based on quantum circuits (i.e., when performing a single qubit mapping operation), the specific operation process may include: based on the initial physical arrangement of the qubits, determining the initial position corresponding to the qubit in the programmable logic processor (specifically, it may include the initial coordinates of the qubit in the storage area); then, moving the qubit from the initial position to the operation area; and then, performing a quantum gate operation on the qubit that has been moved to the operation area by laser irradiation.
[0063] When a neutral atom quantum computer performs a qubit mapping operation on two qubits based on quantum circuits (i.e., a two-qubit mapping operation), the specific operation process may include: based on the initial physical arrangement of the qubits, determining the initial positions of the two qubits related to the qubit mapping operation in a programmable logic processor; then, under the condition of satisfying the constraints, moving the two qubits from their initial positions to the operation region respectively, changing the connectivity between the two qubits, and satisfying the conditions for quantum gate operation; and then, performing a quantum gate operation on the two qubits moved to the operation region by laser irradiation.
[0064] The constraints can include maintaining the coherence and stability between the neutral atoms corresponding to the qubits. Under the condition of satisfying the constraints, the neutral atoms in the programmable logic processor can move their positions while maintaining coherence, thereby changing the connectivity between the qubits in real time during quantum computing. The conditions for quantum gate operation can include that the distance between the two qubits is less than the Rydberg distance. Performing quantum gate operation on two qubits can include executing a single global entanglement pulse in the operation region to excite the neutral atoms corresponding to the two qubits to the Rydberg state, so as to realize the intertwining of the two qubits (which can also be understood as realizing the entanglement between the two qubits).
[0065] As can be seen from the above description, both single-qubit and two-qubit mapping operations involve moving qubits from the storage region to the operation region. Here, the time required for the move operation is positively correlated with the length of the move path (which can also be understood as the length of the path, the distance traveled, etc.), and the move path length is related to the initial physical arrangement of the quantum circuit (i.e., the initial physical coordinates of the qubits). In other words, by setting a suitable initial physical arrangement, the move path length can be effectively reduced, thereby reducing the time required for the move operation and improving the efficiency of the qubit mapping operation.
[0066] Currently, common schemes for initializing quantum circuits include: randomly arranging the qubits physically initially, or setting the physical initial arrangement based on the coherence between the qubits. It is evident that when using these schemes for physical initial arrangement (i.e., when performing physical initialization), the time required for movement operations during quantum computing is not taken into account, making it difficult to effectively improve the efficiency of qubit mapping operations. Therefore, there is an urgent need for an initialization scheme that can effectively improve the efficiency of qubit mapping operations.
[0067] Based on this, in various embodiments of this application, when physically initializing the quantum circuit, N initial coordinates with the shortest movement operation path length are assigned to the N qubits with the highest movement operation frequency in the storage area. This can effectively reduce the length of the path formed by the movement of qubits during the movement operation in the quantum computing process, thereby reducing the time required for the movement operation and improving the efficiency of qubit mapping operation (including at least the movement operation).
[0068] This application provides a quantum circuit initialization method, applied to electronic devices, such as... Figure 1 As shown, the method includes:
[0069] Step 101: Determine first information and second information, wherein the first information characterizes the movement operation frequency of each qubit in the first quantum circuit, and the second information characterizes the movement operation path length of each coordinate contained in the first region of the first processor, wherein the movement operation path length of the coordinate includes the length of the path formed by moving the qubit located at the coordinate to the second region of the first processor, wherein the first region is used at least for storing qubits, and the second region is used at least for gate operations and / or measurements of qubits.
[0070] Step 102: Using the first information, determine the first qubits with the highest move operation frequency among the N qubits;
[0071] Step 103: Using the second information, determine the first coordinate with the shortest path length among the N movement operations;
[0072] Step 104: Associate the N first qubits with the N first coordinates to obtain the association relationship;
[0073] Step 105: Using the aforementioned correlation, determine the initial coordinate matrix, which is used for the initial physical arrangement of the first quantum circuit; where N is an integer greater than or equal to 1.
[0074] In practical applications, the electronic device may include a quantum computer or a device associated with a quantum computer. This application does not limit the name or specific implementation of the electronic device, as long as its functionality is achieved. The quantum computer may include a neutral atom quantum computer, and it must at least be capable of performing calculations related to quantum circuits.
[0075] The first quantum circuit can also be understood as a quantum circuit to be used for quantum computing, or a quantum circuit to be processed by a quantum computer, etc., and the embodiments of this application do not limit it in this way.
[0076] When the quantum computer performs calculations related to the first quantum circuit, it first needs to map each qubit (which can also be understood as a logical qubit) related to the first quantum circuit to a qubit (which can also be understood as a physical qubit, specifically including neutral atoms) in the first processor (i.e., the processor included in the quantum computer). Then, based on the order of quantum gate operations (which can also be understood as the quantum circuit order) related to the first quantum circuit, the quantum computer can sequentially perform a corresponding qubit mapping operation on the qubit associated with each quantum gate operation in the first processor. Afterward, the quantum computer can perform measurement operations on the qubits in the first processor to obtain measurement results, and use the measurement results to determine the calculation result of the first quantum circuit. The first processor can also be called a programmable logic processor, specifically including an optical tweezers array, etc. This application embodiment does not limit the name of the first processor, as long as its function is implemented. The first processor includes at least a first region for storing qubits and a second region for gate operations and / or measurements of qubits. The arrangement of the first and second regions can be determined according to actual hardware parameters, and this application embodiment does not limit this arrangement. The first region can also be called a storage area or storage region, and the second region can also be called an operation area or operation region. This application embodiment does not limit the names of the first and second regions.
[0077] In practical applications, the qubit mapping operation performed by a quantum computer for each quantum gate operation may include the following process: In the first processor, a move operation is performed on the qubit associated with the quantum gate operation, that is, the qubit associated with the quantum gate operation is moved from the first region to the second region; then, in the second region, a gate operation is performed on the qubit associated with the quantum gate by irradiating it with a laser; after that, the qubit that is not related to the execution of the next quantum gate operation is moved back to the first region.
[0078] In practical applications, during quantum computing in a quantum computer, the time required to perform a move operation on each qubit (which can also be understood as the total time for the move operation corresponding to that qubit) is related to the frequency of the qubit's move operation (which can also be understood as the number of move operations, or the frequency of move operations required to execute a quantum circuit, etc.) and the path length of a single move operation. In other words, the higher the frequency of the qubit's move operation and the longer the path length of a single move operation, the more time is required for the move operation, and the lower the efficiency of the qubit mapping operation. Conversely, the lower the frequency of the qubit's move operation and the shorter the path length of a single move operation, the less time is required for the move operation, and the higher the efficiency of the qubit mapping operation. The path length of the move operation is also called the move operation path length, and it is related to the initial physical coordinates of the qubit in the first region. For each coordinate in the first region, the corresponding move operation path length refers to the length of the path (which can also be understood as the length of the formed path) taken to move the qubit located at that coordinate to the second region.
[0079] Based on this, when initializing the first quantum circuit, a quantum circuit initialization scheme (which can also be understood as a physical initial coordinate allocation scheme or an initial quantum bit arrangement scheme) can be designed: for quantum bits with high movement operation frequency, physical initial coordinates with shorter path lengths required for a single movement operation are allocated, so that when the quantum computer performs the calculation of the first quantum circuit, the time required for movement operations is shorter and the efficiency of quantum bit mapping operations is high.
[0080] In practical applications, in order to implement the above quantum circuit initialization scheme, the electronic device needs to determine which qubits have a higher movement frequency and which coordinates correspond to shorter movement operation path lengths during the calculation process of the first quantum circuit.
[0081] The following sections explain the steps for determining qubits with higher shift frequencies and for determining coordinates with shorter shift operation paths:
[0082] 1) Identify the qubits with higher shift frequencies:
[0083] In practical applications, the electronic device can first obtain the description file of the first quantum circuit and use the description file to determine which qubits the first quantum circuit is associated with; then, in step 101, the electronic device determines the qubit shifting operation frequency, i.e., the first information, for each qubit associated with the first quantum circuit.
[0084] Based on this, in some optional embodiments, determining the first information includes:
[0085] Get the first file;
[0086] The first file is parsed to determine the first information.
[0087] The first file refers to a file used to describe the first quantum circuit. The type of the first file may include Open quantum assembly language (OpenQASM) files, etc., but this application embodiment does not limit this.
[0088] In practical applications, the electronic device may obtain the first file in the following ways: obtaining the first file from the quantum computer, or reading the first file pre-configured in the electronic device, etc. This application embodiment does not limit this.
[0089] In practical applications, the electronic device can determine each qubit associated with the first quantum circuit and each gate operation by parsing the first file; then, by statistically analyzing which qubits each gate operation is associated with, the correlation degree corresponding to each qubit can be obtained. The correlation degree corresponding to the qubit can be used to characterize the frequency at which the qubit needs to perform gate operations, which can also be used to characterize the frequency at which the qubit needs to be moved to the operation region, that is, the movement operation frequency of the qubit.
[0090] The correlation degree corresponding to the qubit can be divided into autocorrelation correlation degree and cross-correlation correlation degree according to the gate operation type. The autocorrelation correlation degree of the qubit refers to the frequency of single quantum gate (or single-bit gate) operation of the qubit in the first quantum circuit (or the number of single quantum gate operations that the qubit needs to perform). The cross-correlation correlation degree of the qubit refers to the frequency of multi-quantum gate (or multi-bit gate) operation between the qubit and other qubits in the first quantum circuit (or the number of multi-quantum gate operations between the qubit and other qubits), which can also be called the cross-correlation correlation degree between the qubit and other qubits.
[0091] For example, suppose the first quantum circuit contains three qubits, namely qubit A, qubit B, and qubit C. By analyzing the first quantum circuit, it can be statistically determined that qubit A requires two single-qubit gate operations, and there is one double-qubit gate operation between qubit A and qubit B. There is no multi-qubit gate operation between qubit A and qubit C. In this case, it can be determined that: the autocorrelation degree of qubit A is 2, the cross-correlation degree between qubit A and qubit B is 1, and the cross-correlation degree between qubit A and qubit C is 0. Thus, the autocorrelation degree of qubit A and the sum of all the cross-correlation degrees corresponding to qubit A can be taken as the correlation degree of qubit A. That is, the correlation degree of qubit A is 2 + 1 = 3.
[0092] It is evident that the correlation of a qubit can reflect the frequency of gate operations performed by that qubit. Assuming that each gate operation requires a shift operation, the correlation of a qubit can effectively characterize the frequency of shift operations of the qubit.
[0093] Based on this, in some optional embodiments, the specific implementation of determining the first information may include:
[0094] Determine the correlation degree of each qubit in the first quantum circuit;
[0095] The first information is determined by utilizing the correlation of each qubit.
[0096] In practical applications, the electronic device can generate a correlation matrix based on the first quantum circuit to determine the correlation degree of each qubit (which can also be understood as statistically analyzing the correlation degree of qubits related to the first quantum circuit using a matrix). The correlation matrix can include an autocorrelation correlation matrix and a cross-correlation correlation matrix.
[0097] Based on this, in some optional embodiments, determining the correlation degree of each qubit in the first quantum circuit includes:
[0098] Determine a first correlation matrix and a second correlation matrix for the first quantum circuit. The first correlation matrix represents the autocorrelation degree of each qubit in the first quantum circuit, and the second correlation matrix represents the cross-correlation degree between different qubits in the first quantum circuit.
[0099] The correlation degree of each qubit is determined using the first correlation matrix and the second correlation matrix. The correlation degree of the qubit includes autocorrelation correlation degree and cross-correlation correlation degree.
[0100] In practical applications, the electronic device can, after parsing the first file, utilize the relevant information of the first quantum circuit obtained from the parsing, such as each qubit and each gate operation of the first quantum circuit; then, the electronic device can generate a first correlation matrix and a second correlation matrix of the first quantum circuit based on the relevant information of the first quantum circuit.
[0101] The first correlation matrix can also be called the autocorrelation correlation matrix; the second correlation matrix can also be called the cross-correlation correlation matrix. This application embodiment does not limit the names of the first and second correlation matrices. The first correlation matrix may be a diagonal matrix, and its dimension is related to the number of qubits in the first quantum circuit. Each element on the diagonal of the first correlation matrix can represent the autocorrelation correlation of the qubits corresponding to the row (or column) in which the element is located. The second correlation matrix's dimension is related to the number of qubits in the first quantum circuit, and each element in the second correlation matrix can represent the cross-correlation correlation between the qubits corresponding to the row in which the element is located and the qubits corresponding to the column in which the element is located.
[0102] After determining the first correlation matrix and the second correlation matrix, the electronic device can use the first correlation matrix and the second correlation matrix to determine the correlation of each qubit, thereby knowing the mobile operation frequency corresponding to each qubit.
[0103] In practical applications, the electronic device pre-assigns corresponding initial physical coordinates to qubits with high movement operation frequency to ensure that the movement operation path length of qubits with high movement operation frequency is short. For qubits with low movement operation frequency (such as qubits that only perform one movement operation), since these qubits perform fewer movement operations, even if the movement operation path length corresponding to the assigned initial physical coordinates is longer, it will not have a significant impact on the overall qubit mapping operation. Therefore, the quantum computer can assign initial physical coordinates to qubits with low movement operation frequency during the initialization process (for example, by randomly assigning initial physical coordinates). In this way, by reducing the number of qubits that need to be assigned initial physical coordinates, the time required for the electronic device to determine the initial coordinate matrix can be reduced, which can effectively improve processing efficiency.
[0104] Based on this, in step 102, the electronic device can determine the N highest-frequency first qubits according to the order of movement operation frequency from high to low (that is, the order of correlation from large to small), as qubits that need to be pre-allocated with corresponding physical initial coordinates. Here, the first qubit can also be understood as a high-correlation-value qubit, or a high-movement-operation-frequency qubit, etc. This application embodiment does not limit the name of the first qubit; in this case, the value of N can be set according to actual needs.
[0105] Of course, in step 102, the electronic device may also use qubits with a correlation greater than a specific threshold as the first qubit, and use the number of qubits with a correlation greater than the threshold as the value of N. That is, in some optional embodiments, the specific implementation of step 102 may include:
[0106] N first qubits are determined by using the correlation degree of each qubit and the first threshold.
[0107] The first threshold can also be called the correlation threshold. In this embodiment of the application, the name of the first threshold is not limited.
[0108] In practical applications, the first threshold can be set according to actual needs, or the electronic device can construct a quantum bit correlation graph based on the correlation degree of the quantum bits, and then determine the first threshold based on the quantum bit correlation graph.
[0109] Based on this, in some optional embodiments, the method may further include:
[0110] A qubit correlation graph is constructed using the correlation degree of each qubit. The nodes of the qubit correlation graph correspond one-to-one with the qubits of the first quantum circuit. For each edge in the qubit correlation graph, the value of the edge is equal to the cross-correlation degree of the two nodes associated with the edge.
[0111] The first threshold is determined using the aforementioned qubit correlation diagram.
[0112] In practical applications, the specific implementation of the electronic device constructing a quantum bit correlation graph using the correlation degree of each quantum bit may include: using the first correlation degree matrix and the second correlation degree matrix to determine the correlation degree of each quantum bit, and then constructing the quantum bit correlation graph.
[0113] When constructing a qubit correlation graph, the electronic device can first identify the qubit with the highest correlation in the first quantum circuit, and use this qubit as the starting point to construct the qubit correlation graph. That is, in some optional embodiments, constructing the qubit correlation graph includes:
[0114] Determine the second qubit, which includes the qubit with the highest correlation in the first quantum circuit;
[0115] Starting with the second qubit, construct the qubit association graph.
[0116] The second quantum bit may also be called a key quantum bit or a key bit. In this application, the name of the second quantum bit is not limited.
[0117] In practical applications, when there are multiple qubits with the same correlation degree and all of them having the maximum correlation degree, the electronic device can randomly select one of these qubits as the second qubit; or, based on preset rules (such as prioritizing the selection of the qubit with the highest autocorrelation degree, or prioritizing the selection of the qubit with the first gate operation order, etc.), determine the second qubit from these qubits.
[0118] In practical applications, after determining the second qubit, the electronic device can determine the qubits connected to the second qubit in the qubit association graph based on the elements associated with the second qubit in the second association matrix, and determine the value of the edge associated with the second qubit based on the value of the element.
[0119] For example, suppose the first quantum circuit contains 5 qubits, namely q0, q1, q2, q3, and q4, where q0 is the second qubit (i.e., the key qubit), the cross-correlation between q0 and q1 is relevant(0,1), between q0 and q2 is relevant(0,2), between q0 and q3 is relevant(0,3), between q1 and q3 is relevant(1,3), and between q3 and q4 is relevant(3,4). Figure 2 As shown, the electronic device can construct a quantum bit correlation graph based on the aforementioned cross-correlation information.
[0120] After constructing the qubit correlation graph, the specific implementation of the electronic device using the qubit correlation graph to determine the first threshold may include: taking the average cross-correlation correlation degree between the second qubit and other qubits as the first threshold.
[0121] Based on this, in some optional embodiments, determining the first threshold using the qubit correlation graph includes:
[0122] Using the aforementioned qubit association graph, a first value is determined, which is the sum of the values of all edges associated with the second qubit;
[0123] The first threshold is determined by the ratio of the first value to the second value, where the second value is the number of other qubits in the first quantum circuit besides the second qubit.
[0124] After determining the first threshold, the electronic device can use qubits with a correlation degree greater than the first threshold as the first qubits to obtain the N first qubits. The N first qubits can also be understood as a high correlation qubit group. For qubits with a correlation degree less than or equal to the first threshold, these qubits can be collectively referred to as a low correlation qubit group. The method for determining the physical initial coordinates of the qubits in the low correlation qubit group can be set according to actual needs, such as being randomly determined by a quantum computer. This application embodiment does not limit this.
[0125] 2) Determine the coordinates of the shorter movement path:
[0126] In practical applications, the electronic device can first obtain the relevant information of the first processor, and use the relevant information of the first processor to determine which coordinates are contained in the first region and the second region of the first processor respectively; then, in step 101, the electronic device determines the length of the movement operation path corresponding to each coordinate in the first region (which can also be understood as a coordinate that can be used as a physical initial coordinate, or a coordinate that meets the physical initial arrangement conditions), which is the second information.
[0127] Based on this, in some optional embodiments, determining the second information includes:
[0128] Obtain relevant information about the first processor;
[0129] The second information is determined using the relevant information of the first processor.
[0130] In practical applications, the electronic device can determine each coordinate contained in the first region and each coordinate contained in the second region based on the relevant information of the first processor. Then, the electronic device can determine the length of the path formed by moving the quantum bit (which may specifically include a neutral atom) located at that coordinate to the second region for each coordinate in the first region.
[0131] In practical applications, when performing a movement operation on a qubit in the first processor, the movement operation can be divided into a one-step movement or a multi-step movement. Each step of movement refers to moving the qubit from its current coordinate position to an adjacent coordinate position (such as one of four adjacent coordinate positions).
[0132] Based on this, in some optional embodiments, determining the second information includes:
[0133] For each coordinate contained in the first region, determine the average path length for moving the qubit located at the coordinate to each coordinate contained in the second region; use the average value as the path length for the coordinate movement operation.
[0134] The second information is determined by using the length of the movement path at each coordinate.
[0135] Of course, the electronic device may also determine the second information by setting the distance between neighboring coordinates (which can also be understood as neighboring nodes or adjacent coordinates) in the first processor to "1", constructing an adjacency matrix, and determining the length of the movement operation path corresponding to each coordinate based on the adjacency matrix and the Dijkstra algorithm.
[0136] In practical applications, the electronic device may determine the second information using any of the above methods as needed, and this application embodiment does not limit this.
[0137] In practical applications, when performing the initial physical arrangement (i.e., determining the initial physical coordinates) of the N first qubits, it is necessary to assign an independent coordinate to each first qubit. Therefore, the electronic device needs to assign a total of N first coordinates to the N first qubits as the initial arrangement. These first coordinates can also be called temporary coordinates or temporary storage area coordinates, etc., and the name of the first coordinates is not limited in this embodiment. The area formed by the N first coordinates can be called a temporary storage area, etc. Figure 3 As shown, the temporary storage area belongs to the first region.
[0138] In practical applications, in step 103, the electronic device can use the N coordinates with the shortest movement operation path lengths as the N first coordinates. The N first coordinates determined by the electronic device should satisfy the following condition: the average movement operation path length of the N first coordinates is shorter than the average movement operation path length of other coordinates in the first region. That is, in some optional embodiments, the average movement operation path length corresponding to the N first coordinates is less than the average movement operation path length corresponding to other coordinates in the first region excluding the N first coordinates.
[0139] In practical applications, the electronic device can dynamically adjust the value of N based on the arrangement of the determined N first coordinates; or, dynamically adjust the first threshold to adjust the number of the first qubits, so as to avoid the number of the first qubits being too large, making it difficult to make a reasonable initial physical arrangement, or the number of the first qubits being too small, making it difficult to effectively improve the efficiency of the movement operation.
[0140] In practical applications, if one of the determined N first coordinates is located at the edge of the first processor, the quantum bit corresponding to that first coordinate may have a lower quality. Therefore, the N first coordinates should be located as far away from the edge region of the first processor as possible while ensuring a short movement path. Based on this, after determining the N first coordinates, the electronic device can evaluate the N first coordinates to obtain an evaluation result, and then use the evaluation result to optimize the N first coordinates.
[0141] Based on this, in some optional embodiments, the method may further include:
[0142] The evaluation results are obtained by evaluating the N determined first coordinates;
[0143] Update the N first coordinates using the evaluation results;
[0144] The process of associating N first qubits with N first coordinates to obtain the association relationship includes:
[0145] By associating the N first qubits with the updated N first coordinates, we obtain the association relationship.
[0146] In practical applications, the specific implementation of the N first coordinates determined by the electronic device may include: for each first coordinate, determining a first length and a second length corresponding to that first coordinate, where the first length represents the Euclidean distance between the first coordinate and a third coordinate, and the third coordinate represents the coordinate located at the center among the M coordinates adjacent to the second region in the first region, where M is an integer greater than or equal to 1; the second length is equal to the length of the movement operation path corresponding to the first coordinate; then, the first length and the second length are weighted and summed to obtain the third length; subsequently, it is determined whether the third length is greater than a specific threshold, and a judgment result is obtained; if the judgment result indicates that the third length is greater than the specific threshold, the electronic device can use a local search algorithm to adjust the position of the first coordinate in small steps, that is, redetermine the first coordinate; if the judgment result indicates that the third length is less than or equal to the specific threshold, the first coordinate is not adjusted. In this way, the N first coordinates can be optimally determined, ensuring that the movement operation path length of each first coordinate is short and the quality of the quantum bit is superior. The weights related to the weighted summation can be set according to actual needs, and the specific threshold can be set according to actual needs. This application embodiment does not limit this.
[0147] As can be seen from the above description, the electronic device can determine the N first qubits with the highest movement operation frequency and the N first coordinates with the shortest movement operation path lengths through the first information and the second information. Thus, in step 104, the electronic device associates the N first qubits with the N first coordinates, that is, assigns the N first qubits with the highest movement operation frequency and the N first coordinates with the shortest path lengths required for a single movement operation to the N first coordinates. This enables the quantum computer to perform calculations on the first quantum circuit based on the assigned initial physical coordinates, resulting in shorter movement operation time and higher efficiency of the qubit mapping operation.
[0148] In practical applications, when the electronic device associates N first qubits with N first coordinates, it can assign first coordinates with shorter movement operation path lengths to the first qubits with higher movement operation frequencies (or those with higher correlation), so as to minimize the total path length of all movement operations and improve the efficiency of qubit mapping operations.
[0149] Based on this, in some optional embodiments, the specific implementation of step 104 may include:
[0150] A third qubit and a second coordinate are determined. The third qubit includes the qubit among the N first qubits that is not associated with the first coordinate and has the highest movement operation frequency. The second coordinate includes the first coordinate among the N first coordinates that is not associated with the first qubit and has the shortest movement operation path length. The third qubit is associated with the second coordinate. The third qubit and the second coordinate are redefined, and the redefined third qubit is associated with the redefined second coordinate, until all first qubits are associated with the first coordinate.
[0151] Of course, when the electronic device associates N first qubits with N first coordinates, it can also consider the correlation between the qubits to prioritize assigning first qubits with correlation (such as those requiring two-quantum-gate operations) to first coordinates that are closer in location. Thus, when the quantum computer performs a qubit mapping operation on two correlated qubits, after moving the two closer qubits to the second region, it does not require many additional movement operations to ensure that the two qubits satisfy the Rydberg distance and the entanglement pulse excitation condition. In other words, it can effectively shorten the time of the qubit mapping operation and improve its efficiency.
[0152] Based on this, in some optional embodiments, associating the N first qubits with the N first coordinates includes:
[0153] A qubit correlation graph is constructed, wherein each node of the qubit correlation graph corresponds one-to-one with a qubit of the first quantum circuit. For each edge in the qubit correlation graph, the value of the edge is equal to the cross-correlation degree of the two nodes associated with the edge. Based on the correlation relationships in the qubit correlation graph, starting from the first qubit corresponding to the starting point of the qubit correlation graph, each first qubit is sequentially associated with a first coordinate. The associated first coordinate includes the first coordinate among the N first coordinates that is not associated with a first qubit and has the shortest movement operation path length.
[0154] In practical applications, the movement path lengths corresponding to adjacent first coordinates in the first processor are usually similar among the N first coordinates. Correspondingly, when the N first coordinates are allocated in ascending order of movement path length, the first coordinates with adjacent allocation sequences are also likely to be located close to each other in the first processor. Therefore, the electronic device can, based on the association relationships represented by the qubit association graph, assign the shortest movement path length to each first qubit sequentially, starting from the beginning of the qubit association graph. This ensures that the first qubits with associated relationships are assigned the closest possible first coordinates in the first processor, effectively improving qubit mapping efficiency.
[0155] In practical applications, the electronic device may associate the N first qubits with the N first coordinates in any of the above methods according to actual needs. This application embodiment does not limit this.
[0156] After obtaining the correlation between the N first qubits and the N first coordinates, in step 105, the electronic device generates an initial coordinate matrix based on the correlation, which can be loaded into the quantum operating system of the quantum computer. Thus, the quantum computer can load the initial coordinate matrix into the quantum operating system before performing calculations related to the first quantum circuit. By reading the initial coordinate matrix, it can directly obtain the physical initial coordinates (i.e., the N first coordinates) of the N first qubits related to the first quantum circuit, enabling rapid completion of the physical initialization process without additional calculations (such as calculating qubit coordinates) or physical adjustments (such as adjusting the physical positions of the qubits), effectively improving the efficiency of the physical initialization process.
[0157] Based on this, in some optional embodiments, the method may further include:
[0158] The initial coordinate matrix is loaded into the quantum computing operating system to perform the initial physical arrangement of the first quantum circuit.
[0159] The quantum circuit initialization method provided in this application involves determining first information and second information. The first information characterizes the movement operation frequency of each qubit in the first quantum circuit, and the second information characterizes the movement operation path length of each coordinate contained in a first region of a first processor. The movement operation path length of the coordinate includes the length of the path formed by moving the qubit located at the coordinate to a second region of the first processor. The first region is used at least for storing qubits, and the second region is used at least for gate operations and / or measurements of qubits. Using the first information, N first qubits with the highest movement operation frequencies are determined. Using the second information, N first coordinates with the shortest movement operation path lengths are determined. The N first qubits are associated with the N first coordinates to obtain an association relationship. Using the association relationship, an initial coordinate matrix is determined, and the initial coordinate matrix is used for the initial physical arrangement of the first quantum circuit. The solution provided in this application provides that, during the physical initialization of the quantum circuit (i.e., the first quantum circuit), the storage region (i.e., the first region) contains N qubits with the highest move operation frequency (i.e., the first qubits), and N initial coordinates (i.e., the first coordinates) with the shortest move operation path length are allocated. This can effectively reduce the length of the path formed by the qubit movement during the quantum computing process, thereby reducing the time required for the move operation and improving the efficiency of the qubit mapping operation (at least including the move operation); where N is an integer greater than or equal to 1.
[0160] The following section provides a more detailed description of this application with reference to application examples.
[0161] This application provides an initialization method based on a neutral atom quantum circuit, which enables qubit mapping optimization. The neutral atom quantum circuit can be processed by a neutral atom quantum computer, whose programmable logic processor is divided into a storage area and an operation area; the storage area is used for centralized storage of qubits, and the operation area is used for gate operations and measurements.
[0162] In neutral atom quantum computers, qubit mapping operations involve moving the qubit to be operated on from a lattice in the storage region (which can also be understood as an optical tweezers point or a coordinate) to an independent operating region; then, the operating region is illuminated with a laser to perform logic gate operations. When a qubit mapping operation is associated with two qubits, a multi-qubit gate (also understood as a two-qubit gate) between the two qubits can be achieved by executing a single global entanglement pulse in the operating region, exciting the neutral atoms corresponding to the two qubits to a Rydberg state, thus intertwining the two qubits.
[0163] In practical applications, the time required for a qubit mapping operation is related to the distance traveled. To shorten the travel distance from the storage area to the operation area, the initial qubit arrangement in the storage area is set, i.e., physical initialization is performed. For example... Figure 4 As shown, the steps for setting the initial qubit arrangement, i.e., the steps of this method, may include:
[0164] Step 401: Parse the OpenQASM file, calculate the frequency of qubit usage, and generate the correlation matrix; then, proceed to step 402.
[0165] In practical applications, the frequency of a single quantum gate operation on a qubit can be set as the autocorrelation degree of the qubit, thus generating an autocorrelation degree matrix, which is a diagonal matrix. Simultaneously, the frequency of multi-qubit gate operations between a qubit and other qubits can be set as the cross-correlation degree between the qubits, thus generating a cross-correlation degree matrix. If no multi-qubit gate operations are performed between two qubits, the cross-correlation degree between those two qubits can be recorded as 0.
[0166] Step 402: Generate the qubit correlation graph; then, proceed to step 403;
[0167] In practical applications, the most frequently used qubit can be designated as the key qubit. Then, starting with the key qubit, each qubit associated with it in the correlation matrix and its corresponding cross-correlation degree are sequentially read to determine the position of each qubit in the correlation graph. The edge values in the qubit correlation graph represent the cross-correlation degree between two corresponding qubits.
[0168] Step 403: Based on the threshold T, divide the qubits in the quantum circuit into a high correlation qubit group and a low correlation qubit group; wherein, qubits above the threshold T belong to the high correlation qubit group, and qubits below or equal to the threshold T belong to the low correlation qubit group; then, proceed to step 404.
[0169] In practical applications, the initial value of the correlation threshold T can be set based on the correlation degree of qubits linked to the key qubit in the qubit correlation diagram. For example, it can be set to the average correlation degree of qubits linked to the key qubit.
[0170] Step 404: Allocate a temporary storage area within the memory area of the programmable logic processor; then, execute step 405;
[0171] In practical applications, the distance between neighboring nodes can be set to 1 to construct an adjacency matrix. Then, based on this matrix, Dijkstra's algorithm is used to find the shortest path from the operation area to all other points in the temporary storage area, and the average distance between the coordinates of the temporary storage area and the coordinates of the operation area is calculated. The size of the temporary storage area (i.e., the number of coordinates it contains) is related to the number of bits in the high correlation metric. In practical applications, the temporary storage area should satisfy the following condition: the average distance between the coordinates of the temporary storage area and the coordinates of the operation area should be shorter than the average distance between the coordinates of the storage area and the coordinates of the operation area. This allows for dynamic adjustment of the correlation threshold T to its optimal value.
[0172] In practical applications, the suitability of the temporary storage area coordinates can be evaluated based on the distance evaluation function.
[0173] Step 405: Allocate temporary storage coordinates for the highly correlated metric bits; then, proceed to step 406;
[0174] In practical applications, the bits can be sorted according to their correlation with the key bits to obtain the sorting results. Then, based on the distance constraint, temporary storage area coordinates are assigned to the key bits and each associated bit corresponding to the sorting results.
[0175] Step 406: Save the coordinate information obtained from physical initialization and generate a coordinate matrix.
[0176] In practical applications, quantum computers require physical initialization before qubit mapping, i.e., arranging the initial qubits. By directly loading the coordinate matrix obtained in step 406 into the quantum computing operating system to arrange the initial qubit array, no additional computation or operation is required, enabling fast and efficient physical initialization.
[0177] The application example provided in this application generates a qubit correlation diagram based on an OpenQASM file. Before qubit mapping, the initial qubits in the storage area are pre-arranged, i.e., coordinates are pre-assigned to the qubits. This coordinate information is saved as a coordinate matrix. Thus, during computation, the coordinate matrix can be directly loaded into the quantum computing operating system to obtain the qubit coordinates in the storage area, eliminating the need for additional calculations to obtain custom bit coordinates, thereby achieving fast and efficient physical initialization.
[0178] Meanwhile, in dividing qubits, the correlation between qubits is used as the basis for division, with particular emphasis on the correlation between other qubits and key qubits. A correlation threshold T is set, and qubits are divided into two parts: high correlation and low correlation.
[0179] Meanwhile, current solutions for shortening the qubit mapping time in neutral atom quantum circuits mainly focus on reducing the number of quantum gates. However, the solution provided in this application example considers the movement distance of subsequent operations during quantum array arrangement, treating the distance the qubit needs to move to the target position as a variable affecting the quantum array arrangement. Coordinates are assigned to the qubits during the physical initialization phase. In other words, it optimizes the physical initialization process before mapping by shortening the qubit movement distance. Specifically, a correlation is established between the movement operation time and the frequency of qubit usage, so that qubits with higher movement operation frequencies require shorter movement operation times, thereby reducing the time spent on qubit mapping, improving mapping efficiency, and achieving qubit mapping optimization.
[0180] To implement the method of the embodiments of this application, the embodiments of this application also provide a quantum circuit initialization device, which is disposed on an electronic device, such as... Figure 5 As shown, the device includes:
[0181] The first determining unit 501 is used to determine first information and second information. The first information represents the movement operation frequency of each qubit in the first quantum circuit, and the second information represents the movement operation path length of each coordinate contained in the first region of the first processor. The movement operation path length of the coordinate includes the length of the path formed by moving the qubit located at the coordinate to the second region of the first processor. The first region is used at least for storing qubits, and the second region is used at least for gate operations and / or measurements of qubits.
[0182] The second determining unit 502 is used to determine the first qubits with the highest movement operation frequency among the N qubits using the first information; and to determine the first coordinates with the shortest movement operation path length among the N qubits using the second information.
[0183] The third determining unit 503 is used to associate N first qubits with N first coordinates to obtain an association relationship; and to use the association relationship to determine an initial coordinate matrix, which is used for the physical initial arrangement of the first quantum circuit; wherein N is an integer greater than or equal to 1.
[0184] In some optional embodiments, the first determining unit 501 is specifically used for:
[0185] Determine the correlation degree of each qubit in the first quantum circuit;
[0186] The first information is determined by utilizing the correlation of each qubit.
[0187] In some optional embodiments, the first determining unit 501 is specifically used for:
[0188] Determine a first correlation matrix and a second correlation matrix for the first quantum circuit. The first correlation matrix represents the autocorrelation degree of each qubit in the first quantum circuit, and the second correlation matrix represents the cross-correlation degree between different qubits in the first quantum circuit.
[0189] The correlation degree of each qubit is determined using the first correlation matrix and the second correlation matrix. The correlation degree of the qubit includes autocorrelation correlation degree and cross-correlation correlation degree.
[0190] In some optional embodiments, the second determining unit 502 is specifically used for:
[0191] N first qubits are determined by using the correlation degree of each qubit and the first threshold.
[0192] In some optional embodiments, the second determining unit 502 is further configured to:
[0193] A qubit correlation graph is constructed using the correlation degree of each qubit. The nodes of the qubit correlation graph correspond one-to-one with the qubits of the first quantum circuit. For each edge in the qubit correlation graph, the value of the edge is equal to the cross-correlation degree of the two nodes associated with the edge.
[0194] The first threshold is determined using the aforementioned qubit correlation diagram.
[0195] In some optional embodiments, the second determining unit 502 is specifically used for:
[0196] Determine the second qubit, which includes the qubit with the highest correlation in the first quantum circuit;
[0197] Starting with the second qubit, construct the qubit association graph.
[0198] In some optional embodiments, the first determining unit 501 is specifically used for:
[0199] For each coordinate contained in the first region, determine the average path length for moving the qubit located at the coordinate to each coordinate contained in the second region; use the average value as the path length for the coordinate movement operation.
[0200] The second information is determined by using the length of the movement path at each coordinate.
[0201] In some optional embodiments, the third determining unit 503 is specifically used for:
[0202] A third qubit and a second coordinate are determined. The third qubit includes the qubit among the N first qubits that is not associated with the first coordinate and has the highest movement operation frequency. The second coordinate includes the first coordinate among the N first coordinates that is not associated with the first qubit and has the shortest movement operation path length. The third qubit is associated with the second coordinate. The third qubit and the second coordinate are redefined, and the redefined third qubit is associated with the redefined second coordinate, until all first qubits are associated with the first coordinate.
[0203] or,
[0204] A qubit correlation graph is constructed, wherein each node of the qubit correlation graph corresponds one-to-one with a qubit of the first quantum circuit. For each edge in the qubit correlation graph, the value of the edge is equal to the cross-correlation degree of the two nodes associated with the edge. Based on the correlation relationships in the qubit correlation graph, starting from the first qubit corresponding to the starting point of the qubit correlation graph, each first qubit is sequentially associated with a first coordinate. The associated first coordinate includes the first coordinate among the N first coordinates that is not associated with a first qubit and has the shortest movement operation path length.
[0205] In some optional embodiments, the second determining unit 502 is further configured to:
[0206] The evaluation results are obtained by evaluating the N determined first coordinates;
[0207] Update the N first coordinates using the evaluation results;
[0208] By associating the N first qubits with the updated N first coordinates, we obtain the association relationship.
[0209] In some alternative embodiments, the device may further include:
[0210] The loading unit is used to load the initial coordinate matrix into the quantum computing operating system to perform the initial physical arrangement of the first quantum circuit.
[0211] In practical applications, the first determining unit 501 and the loading unit can be implemented by the communication interface in the quantum circuit initialization device, and the second determining unit 502 and the third determining unit 503 can be implemented by the processor in the quantum circuit initialization device.
[0212] It should be noted that the quantum circuit initialization device provided in the above embodiments is only illustrated by the division of the above-described program units when performing quantum circuit initialization. In practical applications, the above processing can be assigned to different program units as needed, that is, the internal structure of the device can be divided into different program units to complete all or part of the processing described above. In addition, the quantum circuit initialization device and the quantum circuit initialization method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0213] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiments of this application, the embodiments of this application also provide an electronic device, such as... Figure 6 As shown, the electronic device 600 includes:
[0214] The communication interface 601 enables information exchange with other devices;
[0215] The processor 602 is connected to the communication interface 601 to enable information interaction with other devices and to execute the methods provided by one or more of the above-mentioned technical solutions when running a computer program;
[0216] The computer program is stored in memory 603.
[0217] Specifically, the processor 602 is used for:
[0218] In conjunction with the communication interface 601, first information and second information are determined. The first information characterizes the movement operation frequency of each qubit in the first quantum circuit, and the second information characterizes the movement operation path length of each coordinate contained in the first region of the first processor. The movement operation path length of the coordinate includes the length of the path formed by moving the qubit located at the coordinate to the second region of the first processor. The first region is used at least for storing qubits, and the second region is used at least for gate operations and / or measurements of qubits.
[0219] Using the first information, identify the first qubits with the highest move operation frequency among the N qubits;
[0220] Using the second information, determine the first coordinate with the shortest path length among the N movement operations;
[0221] By associating the N first qubits with the N first coordinates, the association relationship is obtained;
[0222] Using the aforementioned correlation, an initial coordinate matrix is determined, which is used for the initial physical arrangement of the first quantum circuit; where N is an integer greater than or equal to 1.
[0223] In some optional embodiments, the processor 602 is specifically used for:
[0224] Using the communication interface 601, the correlation degree of each qubit in the first quantum circuit is determined;
[0225] The first information is determined by utilizing the correlation of each qubit.
[0226] In some alternative embodiments, the processor 602 is specifically used for:
[0227] Determine a first correlation matrix and a second correlation matrix for the first quantum circuit. The first correlation matrix represents the autocorrelation degree of each qubit in the first quantum circuit, and the second correlation matrix represents the cross-correlation degree between different qubits in the first quantum circuit.
[0228] The correlation degree of each qubit is determined using the first correlation matrix and the second correlation matrix. The correlation degree of the qubit includes autocorrelation correlation degree and cross-correlation correlation degree.
[0229] In some alternative embodiments, the processor 602 is specifically used for:
[0230] N first qubits are determined by using the correlation degree of each qubit and the first threshold.
[0231] In some optional embodiments, the processor 602 is further configured to:
[0232] A qubit correlation graph is constructed using the correlation degree of each qubit. The nodes of the qubit correlation graph correspond one-to-one with the qubits of the first quantum circuit. For each edge in the qubit correlation graph, the value of the edge is equal to the cross-correlation degree of the two nodes associated with the edge.
[0233] The first threshold is determined using the aforementioned qubit correlation diagram.
[0234] In some alternative embodiments, the processor 602 is specifically used for:
[0235] Determine the second qubit, which includes the qubit with the highest correlation in the first quantum circuit;
[0236] Starting with the second qubit, construct the qubit association graph.
[0237] In some alternative embodiments, the processor 602 is specifically used for:
[0238] In conjunction with the communication interface 601, for each coordinate contained in the first region, the average value of the path length for moving the qubit located at the coordinate to each coordinate contained in the second region is determined; the average value is used as the path length for the coordinate movement operation.
[0239] The second information is determined by using the length of the movement path at each coordinate.
[0240] In some alternative embodiments, the processor 602 is specifically used for:
[0241] A third qubit and a second coordinate are determined. The third qubit includes the qubit among the N first qubits that is not associated with the first coordinate and has the highest movement operation frequency. The second coordinate includes the first coordinate among the N first coordinates that is not associated with the first qubit and has the shortest movement operation path length. The third qubit is associated with the second coordinate. The third qubit and the second coordinate are redefined, and the redefined third qubit is associated with the redefined second coordinate, until all first qubits are associated with the first coordinate.
[0242] or,
[0243] A qubit correlation graph is constructed, wherein each node of the qubit correlation graph corresponds one-to-one with a qubit of the first quantum circuit. For each edge in the qubit correlation graph, the value of the edge is equal to the cross-correlation degree of the two nodes associated with the edge. Based on the correlation relationships in the qubit correlation graph, starting from the first qubit corresponding to the starting point of the qubit correlation graph, each first qubit is sequentially associated with a first coordinate. The associated first coordinate includes the first coordinate among the N first coordinates that is not associated with a first qubit and has the shortest movement operation path length.
[0244] In some optional embodiments, the processor 602 is further configured to:
[0245] The evaluation results are obtained by evaluating the N determined first coordinates;
[0246] Update the N first coordinates using the evaluation results;
[0247] By associating the N first qubits with the updated N first coordinates, we obtain the association relationship.
[0248] In some optional embodiments, the processor 602 is further configured to:
[0249] Using the communication interface 601, the initial coordinate matrix is loaded into the quantum computing operating system to perform the initial physical arrangement of the first quantum circuit.
[0250] It should be noted that the specific processing procedures of the processor 602 and the communication interface 601 can be understood with reference to the above method.
[0251] Of course, in practical applications, the various components in electronic device 600 are coupled together through bus system 604. It can be understood that bus system 604 is used to realize the connection and communication between these components. In addition to a data bus, bus system 604 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in... Figure 6 The general designated all buses as Bus System 604.
[0252] The memory 603 in this embodiment is used to store various types of data to support the operation of the electronic device 600. Examples of such data include any computer program used to operate on the electronic device 600.
[0253] The methods disclosed in the embodiments of this application can be applied to the processor 602, or implemented by the processor 602. The processor 602 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 602 or by instructions in the form of software. The processor 602 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 602 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in the memory 603. The processor 602 reads the information in the memory 603 and combines its hardware to complete the steps of the aforementioned method.
[0254] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.
[0255] It is understood that the memory (memory 603) in this embodiment of the application can be volatile memory or non-volatile memory, or both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); the magnetic surface memory can be disk storage or magnetic tape storage. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of memories.
[0256] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a memory 603 storing a computer program, which can be executed by the processor 602 of the electronic device 600 to complete the steps described in the aforementioned method. The computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.
[0257] In an exemplary embodiment, this application also provides a computer program product, including a computer program that can be executed by the processor 602 of the electronic device 600 to complete the steps described in the aforementioned method.
[0258] It should be noted that terms such as "first" and "second" are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0259] Furthermore, the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.
[0260] 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 quantum circuit initialization method, characterized in that, include: First information and second information are determined, wherein the first information characterizes the movement operation frequency of each qubit in the first quantum circuit, and the second information characterizes the movement operation path length of each coordinate contained in the first region of the first processor, wherein the movement operation path length of the coordinate includes the length of the path formed by moving the qubit located at the coordinate to the second region of the first processor, wherein the first region is used at least for storing qubits, and the second region is used at least for gate operations and / or measurements of qubits. Using the first information, identify the first qubits with the highest move operation frequency among the N qubits; Using the second information, determine the first coordinate with the shortest path length among the N movement operations; By associating the N first qubits with the N first coordinates, the association relationship is obtained; Using the aforementioned correlation, an initial coordinate matrix is determined, which is used for the initial physical arrangement of the first quantum circuit; wherein, N is an integer greater than or equal to 1, and the initial physical arrangement of the first quantum circuit includes the initial physical arrangement of qubits in the first region.
2. The method according to claim 1, characterized in that, The determination of the first information includes: Determine the correlation degree of each qubit in the first quantum circuit; The first information is determined by utilizing the correlation of each qubit.
3. The method according to claim 2, characterized in that, Determining the correlation degree of each qubit in the first quantum circuit includes: Determine a first correlation matrix and a second correlation matrix for the first quantum circuit. The first correlation matrix represents the autocorrelation degree of each qubit in the first quantum circuit, and the second correlation matrix represents the cross-correlation degree between different qubits in the first quantum circuit. The correlation degree of each qubit is determined using the first correlation matrix and the second correlation matrix. The correlation degree of the qubit includes autocorrelation correlation degree and cross-correlation correlation degree.
4. The method according to claim 2, characterized in that, The step of using the first information to determine the first qubits with the highest shift operation frequency includes: N first qubits are determined by using the correlation degree of each qubit and the first threshold.
5. The method according to claim 4, characterized in that, The method further includes: A qubit correlation graph is constructed using the correlation degree of each qubit. The nodes of the qubit correlation graph correspond one-to-one with the qubits of the first quantum circuit. For each edge in the qubit correlation graph, the value of the edge is equal to the cross-correlation degree of the two nodes associated with the edge. The first threshold is determined using the aforementioned qubit correlation diagram.
6. The method according to claim 5, characterized in that, The construction of the qubit correlation graph includes: Determine the second qubit, which includes the qubit with the highest correlation in the first quantum circuit; Starting with the second qubit, construct the qubit association graph.
7. The method according to claim 1, characterized in that, Determine the second piece of information, including: For each coordinate contained in the first region, determine the average path length for moving the qubit located at the coordinate to each coordinate contained in the second region; use the average value as the path length for the coordinate movement operation. The second information is determined by using the length of the movement path at each coordinate.
8. The method according to claim 1, characterized in that, The average length of the movement path corresponding to the N first coordinates is less than the average length of the movement path corresponding to other coordinates in the first region besides the N first coordinates.
9. The method according to claim 1, characterized in that, Associating N first qubits with N first coordinates includes: A third qubit and a second coordinate are determined. The third qubit includes the qubit among the N first qubits that is not associated with the first coordinate and has the highest movement operation frequency. The second coordinate includes the first coordinate among the N first coordinates that is not associated with the first qubit and has the shortest movement operation path length. The third qubit is associated with the second coordinate. The third qubit and the second coordinate are redefined, and the redefined third qubit is associated with the redefined second coordinate, until all first qubits are associated with the first coordinate. or, A qubit correlation graph is constructed, wherein each node of the qubit correlation graph corresponds one-to-one with a qubit of the first quantum circuit. For each edge in the qubit correlation graph, the value of the edge is equal to the cross-correlation degree of the two nodes associated with the edge. Based on the correlation relationships in the qubit correlation graph, starting from the first qubit corresponding to the starting point of the qubit correlation graph, each first qubit is sequentially associated with a first coordinate. The associated first coordinate includes the first coordinate among the N first coordinates that is not associated with a first qubit and has the shortest movement operation path length.
10. The method according to any one of claims 1 to 9, characterized in that, The method further includes: The evaluation results are obtained by evaluating the N determined first coordinates; Update the N first coordinates using the evaluation results; The process of associating N first qubits with N first coordinates to obtain the association relationship includes: By associating the N first qubits with the updated N first coordinates, we obtain the association relationship.
11. The method according to any one of claims 1 to 9, characterized in that, The method further includes: The initial coordinate matrix is loaded into the quantum computing operating system to perform the initial physical arrangement of the first quantum circuit.
12. A quantum circuit initialization device, characterized in that, include: A first determining unit is configured to determine first information and second information, wherein the first information characterizes the movement operation frequency of each qubit in the first quantum circuit, and the second information characterizes the movement operation path length of each coordinate contained in a first region of the first processor, wherein the movement operation path length of the coordinate includes the length of the path formed by moving the qubit located at the coordinate to a second region of the first processor, wherein the first region is used at least for storing qubits, and the second region is used at least for gate operations and / or measurements of qubits. The second determining unit is used to determine the N first qubits with the highest movement operation frequency using the first information; And using the second information, determine the first coordinate with the shortest length of the N movement operation paths; The third determining unit is used to associate N first qubits with N first coordinates to obtain an association relationship; and to use the association relationship to determine an initial coordinate matrix, the initial coordinate matrix being used for the physical initial arrangement of the first quantum circuit; wherein N is an integer greater than or equal to 1, and the physical initial arrangement of the first quantum circuit includes the physical initial arrangement of qubits in the first region.
13. An electronic device, characterized in that, include: The processor and the memory used to store computer programs that can run on the processor. When the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 11.
14. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.
15. 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 method according to any one of claims 1 to 11.