Quantum operation processing method, device, equipment and storage medium

By determining and applying the first linear constraint and the second linear constraint in the quantum circuit, calculating the target start time of the quantum operation, and optimizing the quantum circuit, the challenge of quantum circuit optimization in a medium-scale noisy quantum computer is solved and reduced Runtime errors and crosstalk conflicts.

CN116341664BActive Publication Date: 2024-10-29BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310215697.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-10-29
Estimated Expiration
2043-02-28

AI Technical Summary

Technical Problem

In the era of medium-scale noisy quantum computers, how to effectively use quantum computers to solve practical problems at higher noise levels, especially how to optimize quantum circuits to reduce operational errors.

Method used

By determining the first linear constraint condition and the second linear constraint condition of the quantum circuit, respectively constraining the sequential relationship and crosstalk conflict between quantum operations, and using these conditions to calculate the target start time of the quantum operation, thereby realizing the optimization and arrangement of the quantum circuit. cloth to avoid crosstalk conflicts.

Benefits of technology

Without affecting the correctness of the quantum circuit, it can effectively avoid crosstalk conflicts between quantum operations, reduce operational errors of the quantum circuit, and improve computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116341664B_ABST
    Figure CN116341664B_ABST
Patent Text Reader

Abstract

The present disclosure provides a processing method, device, equipment and storage medium for quantum operations, which relate to the field of computer technology, and in particular to the field of quantum chips, quantum measurement and control technology. The specific implementation scheme is: determine the first linear constraint corresponding to the quantum circuit to be arranged, the quantum circuit contains N quantum operations; the first linear constraint is used to constrain the start time of each quantum operation between two quantum operations that need to have a sequential relationship in the N quantum operations; determine the second linear constraint corresponding to the quantum circuit, the second linear constraint is used to constrain the start time of each quantum operation between two quantum operations that have crosstalk conflicts in the N quantum operations; when the start time of the quantum operation is used as a parameter to be processed, the first linear constraint and the second linear constraint are used to obtain the target start time of each quantum operation in the N quantum operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to the field of quantum chips, quantum measurement and control technology. Background Art

[0002] Quantum computing is a new computing paradigm that can effectively solve certain problems that classical computers cannot solve effectively, that is, it has quantum advantages and therefore has very broad application prospects. Currently, in the era of noisy intermediate-scale quantum (NISQ), one of the main challenges is how to use quantum computers to solve practical problems at a high noise level. One of the main directions to achieve this challenge is the optimization of quantum circuits. Summary of the invention

[0003] The present disclosure provides a processing method, apparatus, device and storage medium for quantum operations.

[0004] According to one aspect of the present disclosure, a method for processing quantum operations is provided, comprising:

[0005] Determining a first linear constraint condition corresponding to a quantum circuit to be arranged, wherein the quantum circuit includes N quantum operations; the first linear constraint condition is used to constrain the start time of each quantum operation between two quantum operations that need to have a sequential relationship among the N quantum operations;

[0006] Determining a second linear constraint condition corresponding to the quantum circuit, wherein the second linear constraint condition is used to constrain the start time of each quantum operation between two quantum operations having crosstalk conflicts among the N quantum operations;

[0007] When the start time of the quantum operation is used as a parameter to be processed, the target start time of each quantum operation in the N quantum operations is obtained by using the first linear constraint condition and the second linear constraint condition.

[0008] According to another aspect of the present disclosure, there is provided a quantum operation processing device, comprising:

[0009] A processing unit is used to determine a first linear constraint condition corresponding to a quantum circuit to be arranged, wherein the quantum circuit includes N quantum operations; the first linear constraint condition is used to constrain the start time of each quantum operation between two quantum operations that need to have a sequential relationship among the N quantum operations; N is a positive integer greater than or equal to 2; determine a second linear constraint condition corresponding to the quantum circuit, wherein the second linear constraint condition is used to constrain the start time of each quantum operation between two quantum operations that have a crosstalk conflict among the N quantum operations; when the start time of the quantum operation is used as a parameter to be processed, the first linear constraint condition and the second linear constraint condition are used to obtain a target start time of each quantum operation among the N quantum operations;

[0010] An output unit is used to output a target start time of each quantum operation in the N quantum operations.

[0011] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0012] at least one processor; and

[0013] a memory communicatively connected to the at least one processor; wherein,

[0014] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method of any embodiment of the present disclosure.

[0015] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method according to any embodiment of the present disclosure.

[0016] According to another aspect of the present disclosure, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method according to any one of the embodiments of the present disclosure is implemented.

[0017] In this way, the disclosed solution obtains the target start time of each quantum operation in the quantum circuit through the first linear constraint condition and the second linear constraint condition; thus, a feasible solution is provided for realizing the arrangement of quantum circuits; and, without affecting the correctness of the quantum circuits, crosstalk conflicts between quantum operations can be effectively avoided.

[0018] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0020] Figure 1 This is a schematic flow chart of a method for processing quantum operations according to an embodiment of the present application. Figure 1 ;

[0021] FIG. 2( a ) and FIG. 2( b ) are schematic diagrams of a quantum circuit before and after optimization in an example of the disclosed solution according to an embodiment of the present application;

[0022] Figure 3 is a schematic flow chart 2 of a method for processing quantum operations according to an embodiment of the present application;

[0023] Figure 4 This is a schematic flow chart of a method for processing quantum operations according to an embodiment of the present application. Figure 3 ;

[0024] Figure 5 This is a schematic flow chart of a method for processing quantum operations according to an embodiment of the present application. Figure 4 ;

[0025] Figure 6 It is a schematic diagram of the implementation flow of a processing method for quantum operation according to an embodiment of the present disclosure in a specific embodiment;

[0026] Figure 7 is a schematic diagram of the structure of a processing device for quantum operations according to an embodiment of the present disclosure;

[0027] Figure 8 The block diagram is a block diagram of an electronic device used to implement the quantum operation processing method of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0029] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The term "at least one" in this article means any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C. The terms "first" and "second" in this article refer to multiple similar technical terms and distinguish them. They do not mean to limit the order or to limit them to only two. For example, the first feature and the second feature refer to two types / two features. The first feature can be one or more, and the second feature can also be one or more.

[0030] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the specific embodiments below. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present disclosure.

[0031] Quantum computing is a new computing paradigm that can effectively solve certain problems that classical computers cannot effectively solve, that is, it has quantum advantages and has very broad application prospects. However, the capabilities of quantum computers that are actually realized physically today are very limited, and there is still a certain distance from large-scale general-purpose quantum computers. The quantum computers that are currently realized physically are medium-scale noisy quantum computers, and this era is called the NISQ (Noisy Intermediate-Scale Quantum) era. In the NISQ era, one of the main challenges is how to use quantum computers to solve practical problems at higher noise levels. And one of the main directions to achieve this challenge is the optimization of quantum circuits.

[0032] The following is an explanation of the basic concepts required for the disclosed solution:

[0033] (I) Quantum Circuits

[0034] Quantum circuits are mainly composed of quantum operations (such as quantum logic gates and quantum measurements), and quantum operations can be used to implement basic operations on quantum bits. Based on this, quantum circuits can be used to write relevant quantum algorithms. Here, the performance of quantum circuit execution will directly affect the actual effect of quantum algorithms. Therefore, quantum circuits need to be optimized to reduce operational errors.

[0035] The arrangement of quantum operations in quantum circuits is an important direction for quantum circuit optimization. Here, the arrangement of quantum operations refers to the purpose of rearranging quantum operations by changing the quantum operations themselves and / or the positions of quantum operations without affecting the correctness of the results of quantum circuit operation, so as to avoid crosstalk errors and suppress decoherence errors of quantum circuits. It should be pointed out that when the quantum circuit is determined, the duration of each quantum operation is known. Therefore, changing the position of the quantum operation can be specifically changing the starting time of the quantum operation.

[0036] (ii) Principles for optimizing quantum circuits, including correctness constraints, crosstalk conflict constraints, and decoherence errors;

[0037] (1) Correctness restriction rules

[0038] In actual scenarios, if the quantum bits acted on by two quantum operations contain the same quantum bits, the order of the two quantum operations containing the same quantum bits must be determined to ensure the correctness of the quantum circuit. This condition can be called the correctness restriction rule, which is one of the principles followed by the disclosed scheme to optimize the quantum circuit.

[0039] (2) Crosstalk conflict limitation rules

[0040] Other principles that can be followed in optimizing quantum circuits include crosstalk conflict restriction rules. Due to the limitations of quantum chips, there are certain conflicts between certain quantum operations in quantum circuits. For example, certain quantum operations will have large errors when activated at the same time, which can be called crosstalk errors. Therefore, these quantum operations with crosstalk errors cannot be used at the same time. In other words, the overlap of the operation time of these quantum operations is avoided. Here, the operation time of the quantum operation refers to the time period from the start time to the end time of the quantum operation. Based on this, the disclosed scheme calls this restriction rule that certain quantum operations in quantum circuits cannot overlap in operation time due to the existence of crosstalk errors a crosstalk conflict restriction rule.

[0041] (3) Decoherence Error

[0042] The arrangement of quantum operations in quantum circuits will also affect the decoherence errors of quantum circuits. Decoherence errors cause the quantum state to deviate from the original quantum state over time, which is called decoherence errors, making the calculation results no longer reliable. For example, for a superconducting quantum bit, the initial quantum state is |1>. At this time, a perfect measurement is performed, and the probability of measuring 1 is 100%. After a period of time, due to the existence of decoherence errors, even if a perfect measurement is performed, there is a certain probability of getting 0, making the measurement result no longer reliable. Decoherence errors increase with time, so decoherence errors should be suppressed as much as possible in the process of arranging quantum operation positions.

[0043] Based on this, the disclosed solution proposes a quantum operation arrangement method based on mixed integer linear programming to realize the arrangement of quantum operations in quantum circuits.

[0044] Specifically, Figure 1 This is a schematic flow chart of a method for processing quantum operations according to an embodiment of the present application. Figure 1 The method may optionally be applied to a classical computing device, such as a personal computer, a server, a server cluster, or other electronic device with classical computing capabilities. Further, the method includes at least part of the following contents. Specifically, Figure 1 As shown, including:

[0045] Step S101: Determine the first linear constraint condition corresponding to the quantum circuit to be arranged.

[0046] Here, the quantum circuit includes N quantum operations; the first linear constraint condition is used to constrain the start time of each quantum operation between two quantum operations that need to have a sequential relationship among the N quantum operations; and N is a positive integer greater than or equal to 2.

[0047] Step S102: Determine a second linear constraint condition corresponding to the quantum circuit.

[0048] Here, the second linear constraint condition is used to constrain the start time of each quantum operation between two quantum operations in which crosstalk conflicts exist among the N quantum operations.

[0049] It is understandable that the execution order of step S101 and step S102 can be swapped. In other words, the disclosed solution does not limit the above execution order, as long as the first linear constraint condition and the second linear constraint condition are obtained before step S103.

[0050] Step S103: When the start time of the quantum operation is used as the parameter to be processed, the target start time of each quantum operation in the N quantum operations is obtained by using the first linear constraint condition and the second linear constraint condition.

[0051] In this way, the disclosed solution obtains the target start time of each quantum operation in the quantum circuit through the first linear constraint condition and the second linear constraint condition; thus, a feasible solution is provided for realizing the arrangement of quantum circuits; and, without affecting the correctness of the quantum circuits, crosstalk conflicts between quantum operations can be effectively avoided.

[0052] In a specific example, the quantum circuit is mainly composed of quantum operations (such as quantum logic gates and quantum measurements) and quantum bits. Here, the quantum operations in the quantum circuit act on the quantum bits in the quantum circuit to achieve basic operations on the quantum bits.

[0053] In a specific example, the two quantum operations that need to have a sequential relationship mentioned above can specifically refer to: two quantum operations containing the same quantum bits. That is to say, when the quantum bits acted on by the two quantum operations in the quantum circuit are at least partially the same, at this time, in order to meet the correctness restriction rules, the order between the two quantum operations in the quantum circuit needs to be determined, that is, the two need to have a sequential relationship. In other words, in two quantum operations that have a sequential relationship, the quantum bits acted on by different quantum operations are at least partially the same.

[0054] For example, a quantum circuit includes quantum bit Q1 and quantum bit Q2, and quantum operations 1 to 3; moreover, quantum operation 1 acts on quantum bit Q1, quantum operation 2 acts on quantum bit Q2, and quantum operation 3 acts on quantum bit Q1 and quantum bit Q2. At this time, the two quantum operations that need to have a sequential relationship are: quantum operation 1 and quantum operation 3 (both contain the same quantum bit Q1), and quantum operation 2 and quantum operation 3 (both contain the same quantum bit Q2).

[0055] Accordingly, the first linear constraint condition can be used to constrain the start time of quantum operation 1 and quantum operation 3 to ensure that quantum operation 1 and quantum operation 3 are carried out smoothly. At the same time, the start time of quantum operation 2 and quantum operation 3 is constrained to ensure that quantum operation 2 and quantum operation 3 are carried out smoothly.

[0056] Furthermore, if there is a crosstalk conflict between quantum operation 1 and quantum operation 2, at this time, the second linear constraint condition can be used to constrain the start time of quantum operation 1 and quantum operation 2 to avoid the crosstalk conflict between quantum operation 1 and quantum operation 2. Further, after determining the above constraint conditions, the start time of each quantum operation can be used as the parameter to be solved, and the first linear constraint condition and the second linear constraint condition can be used as the total constraint condition to solve the target start time of each quantum operation in quantum operation 1-quantum operation 3.

[0057] For another example, if the quantum circuit described in the above example also includes quantum operation 4, and quantum operation 4 acts on quantum bit Q2, then the two quantum operations that need to have a sequential relationship also include: quantum operation 2 and quantum operation 4 (both of which have the same quantum bit Q2); accordingly, the first linear constraint condition also needs to constrain the start time of quantum operation 2 and quantum operation 4 to ensure that quantum operation 2 and quantum operation 4 can be carried out smoothly. Furthermore, if there is a crosstalk conflict between quantum operation 4 and quantum operation 1, the second linear constraint condition also needs to constrain the start time of quantum operation 1 and quantum operation 4 to avoid the crosstalk conflict between quantum operation 1 and quantum operation 4.

[0058] In a specific example of the disclosed solution, after obtaining the target start time of each quantum operation, the quantum operations in the quantum circuit can be rearranged, so that a new quantum circuit is obtained, and the new quantum circuit can effectively comply with the correctness restriction rules and the crosstalk conflict restriction rules. Specifically, after obtaining the target start time of each quantum operation in the N quantum operations, the method further includes: arranging the N quantum operations based on the target start time of each quantum operation in the N quantum operations to obtain the arranged quantum circuit. In this way, the optimization of the quantum circuit is achieved, and the new quantum circuit obtained after optimization can effectively reduce operation errors.

[0059] It should be noted that for a certain quantum circuit, the disclosed solution will not change the quantum operation itself during the optimization of the quantum operation, but will rearrange the quantum operations in the quantum circuit. Therefore, the quantum operation arrangement scheme provided by the disclosed solution is more efficient and convenient, and has a lower threshold for use.

[0060] For example, as shown in FIG2(a), the quantum circuit is composed of quantum bits and quantum operations, wherein the quantum circuit specifically includes:

[0061] At the first moment, a single-qubit gate S1 acting on qubit Q1 and a single-qubit gate S2 acting on qubit Q2 need to be operated simultaneously;

[0062] A single-qubit gate S3 acting on qubit Q2 that needs to be operated at the second moment;

[0063] A two-qubit gate D acting on qubit Q2 and qubit Q3 that needs to be operated at the third moment;

[0064] At the fourth moment, quantum measurement 1 acting on quantum bit Q1, quantum measurement 2 acting on quantum bit Q2, and quantum measurement 3 acting on quantum bit Q3 need to be performed simultaneously.

[0065] Based on this, it can be seen that the above-mentioned single-qubit gate S1 and quantum measurement 1 contain the same qubit Q1; single-qubit gate S2, single-qubit gate S3, two-qubit gate D and quantum measurement 2, the four (can also be called any two of the four) contain the same qubit Q2; two-qubit gate D and quantum measurement 3, contain the same qubit Q3. Based on this, it can be determined that the first linear constraint condition that satisfies the correctness constraint rule is obtained.

[0066] Furthermore, there is a crosstalk conflict between the two-qubit gate D and the single-qubit gate S1, based on which a second linear constraint condition satisfying the crosstalk conflict restriction rule can be obtained.

[0067] Furthermore, by using the first linear constraint condition that satisfies the correctness restriction rule and the second linear constraint condition that satisfies the crosstalk conflict restriction rule, the start time of each quantum operation is solved to obtain the target start time of each quantum operation, and then based on the obtained target start time, the quantum operations in the quantum circuit are rearranged to obtain the quantum circuit shown in Figure 2(b). Specifically, the rearranged quantum circuit, according to the order of action of the quantum operations, specifically includes:

[0068] A single-qubit gate S2 acting on qubit Q2 that needs to be operated at the first moment;

[0069] At the second moment, the single-qubit gate S1 acting on the qubit Q1 and the single-qubit gate S3 acting on the qubit Q2 need to be operated simultaneously;

[0070] A two-qubit gate D acting on qubit Q2 and qubit Q3 that needs to be operated at the third moment;

[0071] At the fourth moment, quantum measurement 1 acting on quantum bit Q1, quantum measurement 2 acting on quantum bit Q2, and quantum measurement 3 acting on quantum bit Q3 need to be performed simultaneously.

[0072] In this way, without changing the quantum operation itself, the optimization of the quantum circuit is achieved, thereby effectively reducing the operational errors of the quantum circuit.

[0073] In a specific example of the disclosed solution, the first linear constraint condition is obtained based on at least one of the following of each quantum operation between two quantum operations that need to have a sequential relationship: the start time of the quantum operation, and the duration of the quantum operation acting on the quantum bit.

[0074] For example, in a specific example, the quantum circuit includes N quantum operations, and two quantum operations that need to have a sequential relationship among the N quantum operations are quantum operations g and i and quantum operation gj , at this time, the first linear constraint condition may at least include:

[0075] s i +d i ≤s j ; or j +d j ≤s i ;

[0076] Here, the s i Denotes the quantum operation g i The starting time, the d i Denotes the quantum operation g i The duration, s j Denotes the quantum operation g j The starting time of the operation, i, j (i≠j) are both positive integers greater than or equal to 1 and less than or equal to N, and N is a positive integer greater than or equal to 2.

[0077] In another specific example, the quantum circuit includes N quantum operations, and two quantum operations that need to have a sequential relationship among the N quantum operations are quantum operations g i and quantum operation g j For example, in this example, the first linear constraint condition may at least include:

[0078] |s j -s i |≥Δ;

[0079] Wherein, Δ is a preset threshold value, which may be an empirical value, for example, it may be determined based on the maximum duration of all quantum operations in the N quantum operations, for example, Δ is greater than or equal to max{d1, d2, …, d N} real number; here, the s i Denotes the quantum operation g i The starting time, the d i Denotes the quantum operation g i The duration, s j Denotes the quantum operation g j The starting time of , wherein i, j (i≠j) are both positive integers greater than or equal to 1 and less than or equal to N.

[0080] In this way, the disclosed solution effectively ensures the correctness of the quantum circuit through the first linear constraint condition, laying the foundation for realizing the reasonable arrangement of quantum operations.

[0081] In a specific example of the disclosed solution, the second linear constraint condition is obtained by converting the target nonlinear constraint condition; wherein the target nonlinear constraint condition is used to constrain the operation time of two quantum operations with crosstalk conflicts among the N quantum operations. In other words, the second linear constraint condition described in the disclosed solution is obtained on the basis of the target nonlinear constraint condition, so that the conditions used to constrain the start time are all linear conditions, which lays a foundation for effectively improving processing efficiency and reducing processing complexity.

[0082] Furthermore, the target nonlinear constraint condition can be specifically used to constrain the operation time of two quantum operations with crosstalk conflicts among the N quantum operations, so that the operation time of the two quantum operations with crosstalk conflicts does not overlap, thereby effectively avoiding crosstalk conflicts.

[0083] It should be noted that the operation time of the quantum operation in the disclosed solution may specifically refer to the time period from the start time to the end time of the quantum operation, for example, expressed as: [start time, end time]. k The starting time is s k , quantum operation g k The duration is d k , then the quantum operation g k The end time is s k +d k , at this time, the quantum operation g k The operation time can be specifically expressed as [s k ,s k +d k ].

[0084] In this way, the disclosed solution effectively solves the crosstalk conflicts between quantum operations through the second linear constraint condition, thereby laying a foundation for realizing the reasonable arrangement of quantum operations.

[0085] Further, in a specific example, the target nonlinear constraint condition can be obtained in the following manner. Specifically, the target nonlinear constraint condition is obtained based on the following information of each quantum operation between two quantum operations with crosstalk conflicts in the N quantum operations: the start time of the quantum operation, and the duration of the quantum operation acting on the quantum bit. In other words, the operation time of each quantum operation between the two quantum operations with crosstalk conflicts can be constrained based on the start time of the quantum operation and the duration of the quantum operation acting on the quantum bit, so that the two quantum operations with crosstalk conflicts do not overlap in operation time.

[0086] For example, in a specific example, the quantum circuit includes N quantum operations, and there is a quantum operation g with crosstalk conflict in the N quantum operations.k and quantum operation g l At this time, in order to avoid crosstalk conflicts, quantum operation g is required k and quantum operation g l There should be no overlap in operation time, therefore, the target nonlinear constraint condition may at least include:

[0087] s k +d k ≤s l or l +d l ≤s k ;

[0088] Among them, the s k Denotes the quantum operation g k The starting time, the d k Denotes the quantum operation g k The duration, s l Denotes the quantum operation g l The starting time, the d l Denotes the quantum operation g l duration, wherein k, l (k≠l) are both positive integers greater than or equal to 1 and less than or equal to N.

[0089] In this way, the disclosed solution effectively solves the crosstalk conflicts between quantum operations through the target nonlinear constraint relationship, thereby laying the foundation for realizing the reasonable arrangement of quantum operations.

[0090] In a specific example of the disclosed solution, the target nonlinear constraint condition can be converted into a second linear constraint condition through an integer variable, so that the conditions for constraining the start time are all linear conditions, which lays a foundation for effectively improving processing efficiency and reducing processing complexity. Specifically, Figure 3 FIG2 is a schematic flow chart of a method for processing quantum operations according to an embodiment of the present application. The method can optionally be applied to classical computing devices, such as personal computers, servers, server clusters and other electronic devices with classical computing capabilities. It can be understood that the above Figure 1 The relevant contents of the method shown in the figure can also be applied to this example, and the relevant contents will not be repeated in this example. Further, the method includes at least part of the following contents. Specifically, Figure 3 As shown, including:

[0091] Step S301: Determine the first linear constraint condition corresponding to the quantum circuit to be arranged.

[0092] Here, the quantum circuit includes N quantum operations; the first linear constraint condition is used to constrain the start time of each quantum operation between two quantum operations that need to have a sequential relationship among the N quantum operations; and N is a positive integer greater than or equal to 2.

[0093] Step S302: Determine the second linear constraint corresponding to the quantum circuit. Here, the second linear constraint is obtained by converting the target nonlinear constraint using integer variables; the integer variables in the second linear constraint and the start time of the quantum operation are parameters to be processed.

[0094] Furthermore, in one example, the target nonlinear constraint condition is obtained based on the following information of each quantum operation between two quantum operations in which crosstalk conflicts exist among the N quantum operations: the start time of the quantum operation, and the duration of the quantum operation acting on the quantum bit.

[0095] In a specific example, the integer variable is the first value or the second value, so that it is convenient to quickly solve the target start time of each quantum operation. For example, the value of the integer variable is 0 or 1. At this time, the target start time of each quantum operation can be efficiently solved by using the first linear constraint and the second linear constraint.

[0096] It is understandable that, during the solution process, the integer variable may also be other values, and the disclosed solution does not impose any limitation on this, as long as the target start time of each quantum operation can be solved using the first linear constraint and the second linear constraint.

[0097] Step S303: When the integer variable and the start time of the quantum operation are both used as parameters to be processed, the target start time of each quantum operation in the N quantum operations is obtained by using the first linear constraint condition and the second linear constraint condition.

[0098] For example, after obtaining the first linear constraint condition and the second linear constraint condition, the first linear constraint condition and the second linear constraint condition can be input into a preset solver together to obtain the target start time of each quantum operation in the N quantum operations. Here, the preset solver uses the integer variable and the start time of the quantum operation as parameters to be processed.

[0099] That is to say, in a specific example, after determining the quantum circuit to be arranged, a first linear constraint condition for constraining two quantum operations that need to have a sequential relationship in the quantum circuit is determined, and a target nonlinear constraint relationship for constraining two quantum operations that have crosstalk conflicts in the quantum circuit is determined, and the target nonlinear constraint relationship is converted into a second linear constraint condition using an integer variable; then, the first linear constraint condition and the second linear constraint condition are input into a preset solver to obtain the target start time of each quantum operation in the N quantum operations.

[0100] In this way, the disclosed scheme can use integer variables to convert the target nonlinear constraint condition into a second linear constraint condition, thereby effectively resolving the crosstalk conflict between quantum operations, and thereby making the conditions used to constrain the start time all linear conditions, laying the foundation for effectively improving processing efficiency and reducing processing complexity.

[0101] Furthermore, in a specific example, the quantum circuit includes N quantum operations, and two quantum operations in which crosstalk conflicts occur among the N quantum operations are quantum operations g k and quantum operation g l , then the second linear constraint condition at least includes:

[0102] s k +d k -b k,l ×inf≤s l or, l +d l -(1-b k,l )×inf≤s k ;

[0103] Among them, s k Denotes the quantum operation g k The starting time, d k Denotes the quantum operation g k duration, inf is the preset threshold, s l Denotes the quantum operation g l The starting time, d l Denotes the quantum operation g l The duration of b k,l For the quantum operation g k and quantum operation g l The corresponding integer variables, k, l (k≠l), are both positive integers greater than or equal to 1 and less than or equal to N.

[0104] Here, the two quantum operations with crosstalk conflicts in the quantum circuit can be called a crosstalk conflict pair, and the integer variable used in the disclosed solution to transform the target nonlinear constraint condition is an integer variable corresponding to the crosstalk conflict pair. In other words, different crosstalk conflict pairs correspond to different integer variables. For example, based on the above example, if the N quantum operations also include two other quantum operations with crosstalk conflicts, and they are quantum operations g and g respectively. m and quantum operation g n , at this time, the second linear constraint also includes:

[0105] s m +d m -b m,n ×inf≤s n or, n +d n -(1-b m,n )×inf≤s m ;

[0106] Here, the s m Denotes the quantum operation g m The starting time, the d m Denotes the quantum operation g m The duration, s n Denotes the quantum operation g n The starting time, the d n Denotes the quantum operation g n duration, wherein m, n (m≠n) are both positive integers greater than or equal to 1 and less than or equal to N. m,n is the quantum operation g m and quantum operation g n The integer variables corresponding to each other. k,l With integer variable b m,n different.

[0107] It should be noted that the integer variable b k,l With integer variable b m,n Different means that the two have different meanings. In other words, the crosstalk conflict pairs corresponding to the two are different. However, the values ​​of the two may be the same or different, and the disclosed solution does not limit this. For example, in actual scenarios, the values ​​of the two can be obtained based on the preset solver.

[0108] In a specific example, the preset threshold inf is obtained based on the duration of all quantum operations in the N quantum operations; for example, the duration of the N quantum operations in the quantum circuit is The sum is recorded as At this time, the preset threshold inf can be specifically any constant greater than max.

[0109] In this way, the disclosed scheme provides a specific scheme for converting the target nonlinear constraint condition into a second linear constraint condition by using an integer variable, thereby effectively resolving the crosstalk conflict between quantum operations, and thereby making the conditions used to constrain the start time all linear conditions, laying the foundation for effectively improving processing efficiency and reducing processing complexity.

[0110] In a specific example of the disclosed solution, in the process of obtaining the target start time of each quantum operation, an objective function can also be set, and then the objective function is used to constrain the decoherence error of the quantum circuit, so as to minimize the impact of the decoherence error on the quantum circuit. Specifically, Figure 4 This is a schematic flow chart of a method for processing quantum operations according to an embodiment of the present application. Figure 3 The method can optionally be applied to classical computing devices, such as personal computers, servers, server clusters, and other electronic devices with classical computing capabilities.

[0111] It is understandable that the above Figure 1 or Figure 3 The relevant contents of the method shown can also be applied to this example, and the relevant contents will not be described in detail in this example.

[0112] Further, the method includes at least part of the following contents. Specifically, Figure 4 As shown, including:

[0113] Step S401: Determine the first linear constraint condition corresponding to the quantum circuit to be arranged.

[0114] Here, the quantum circuit includes N quantum operations; the first linear constraint condition is used to constrain the start time of each quantum operation between two quantum operations that need to have a sequential relationship among the N quantum operations; and N is a positive integer greater than or equal to 2.

[0115] Step S402: Determine a second linear constraint condition corresponding to the quantum circuit.

[0116] Here, the second linear constraint condition is used to constrain the start time of each quantum operation between two quantum operations in which crosstalk conflicts exist among the N quantum operations.

[0117] Step S403: Determine the objective function.

[0118] Here, the objective function is used to characterize the decoherence error of the quantum circuit.

[0119] It is understandable that the execution order of step S401 to step S403 can be swapped. In other words, the disclosed solution does not limit the execution order of the above three, as long as the first linear constraint condition, the second linear constraint condition and the objective function are obtained before step S404.

[0120] Step S404: minimizing the objective function when the start time of the quantum operation is used as the parameter to be processed and when the first linear constraint condition and the second linear constraint condition are met.

[0121] Here, minimizing the objective function may specifically include: adjusting the start time of the quantum operation under the first linear constraint condition and the second linear constraint condition to minimize the objective function.

[0122] Step S405: When it is determined that the preset requirements are met, a target start time of each quantum operation in the N quantum operations is obtained.

[0123] In a specific example, a loop iteration method is used to minimize the objective function. At this time, the preset requirement may be: the difference between the function value of the objective function in the current optimization process and the function value of the objective function in the previous optimization process is less than the preset value, that is, the function value of the objective function reaches convergence. Here, the preset value is an empirical value. Alternatively, the preset requirement may be: the number of iterations reaches a preset number, which may also be an empirical value. In actual scenarios, it can be set according to needs, and the disclosed solution does not limit this.

[0124] Or, in another specific example, Figure 5 As shown, the processing method of the quantum operation specifically includes:

[0125] Step S501: Determine the first linear constraint condition corresponding to the quantum circuit to be arranged.

[0126] Here, the quantum circuit includes N quantum operations; the first linear constraint condition is used to constrain the start time of each quantum operation between two quantum operations that need to have a sequential relationship among the N quantum operations; and N is a positive integer greater than or equal to 2.

[0127] Step S502: Determine a second linear constraint condition corresponding to the quantum circuit.

[0128] Here, the second linear constraint condition is obtained by converting the target nonlinear constraint condition using integer variables; the integer variables in the second linear constraint condition and the start time of the quantum operation are parameters to be processed.

[0129] Furthermore, in one example, the target nonlinear constraint condition is obtained based on the following information of each quantum operation between two quantum operations in which crosstalk conflicts exist among the N quantum operations: the start time of the quantum operation, and the duration of the quantum operation acting on the quantum bit.

[0130] Step S503: Determine the objective function.

[0131] Here, the objective function is used to characterize the decoherence error of the quantum circuit.

[0132] It is understandable that the execution order of steps S501 to S503 can be swapped. In other words, the disclosed solution does not limit the execution order of the above three, as long as the first linear constraint condition, the second linear constraint condition and the objective function are obtained before step S504.

[0133] Step S504: minimizing the objective function when the integer variable and the start time of the quantum operation are used as parameters to be processed and when the first linear constraint condition and the second linear constraint condition are met.

[0134] Here, minimizing the objective function may specifically include: under the first linear constraint condition and the second linear constraint condition, adjusting at least one of the following parameters to minimize the objective function: the start time of the quantum operation, an integer variable.

[0135] Step S505: When it is determined that the preset requirements are met, a target start time of each quantum operation in the N quantum operations is obtained.

[0136] Step S506: Arranging the N quantum operations based on the target start time of each quantum operation in the N quantum operations to obtain an arranged quantum circuit.

[0137] In this way, the disclosed solution constrains decoherence errors by minimizing the objective function, and further avoids decoherence errors on the basis of effectively satisfying the correctness restriction rules and the crosstalk conflict restriction rules, thereby achieving the optimization of the quantum circuit, so that the quantum circuit obtained after the optimization can effectively reduce operation errors.

[0138] In a specific example of the disclosed solution, the objective function can be obtained in the following manner: Specifically, the above-mentioned determination of the objective function (such as Figure 4 Step S403 in , or Figure 5 The step S503 in the step specifically comprises: determining the operation period of each quantum bit in the quantum circuit, and obtaining the objective function based on the operation periods of all quantum bits in the quantum circuit.

[0139] Here, the operation period of the quantum bit is based on the duration of the quantum operation acting on the quantum bit.

[0140] Thus, the disclosed scheme provides a specific scheme for determining an objective function, through which the decoherence errors of quantum bits are constrained. In this way, on the basis of effectively satisfying the correctness restriction rules and the crosstalk conflict restriction rules, decoherence errors are further avoided, thereby effectively realizing the optimization of the quantum circuit, so that the quantum circuit obtained after the optimization can effectively reduce the operation errors.

[0141] Further, in one example, the operation period of the quantum bit is obtained based on the following two parameters:

[0142] The end time of the last quantum operation among all quantum operations acting on the quantum bit, and the start time of the first quantum operation among all quantum operations acting on the quantum bit.

[0143] For example, for the quantum bit Qn in the quantum circuit, at this time, the last quantum operation among all quantum operations acting on the quantum bit Qn is recorded as quantum operation l Qn , the first quantum operation among all quantum operations acting on quantum bit Qn is recorded as quantum operation f Qn At this time, the operation cycle of the quantum bit Qn can be recorded as O n , its expression can be specifically as follows:

[0144]

[0145] here, Represents the quantum operation l Qn The start time, Represents quantum operation l Qn duration, at this time, That is the quantum operation l Qn The end time of . Denotes the quantum operation f Qn The start time of the .

[0146] Furthermore, the objective function O is:

[0147] O=∑ n O n .

[0148] Here, we continue to use Figure 2(a) as an example. The last quantum operation among all quantum operations acting on quantum bit Q2 is quantum measurement 2, and the first quantum operation among all quantum operations acting on quantum bit Q2 is single-qubit gate S2. At this time, the operation cycle of quantum bit Q2 is

[0149]

[0150] here, is the starting time of quantum measurement 2, is the duration of quantum measurement 2, is the starting time of the single-qubit gate S2.

[0151] In this way, the disclosed solution determines the objective function through the operation period of the quantum bit, thereby constraining the decoherence error and effectively reducing the operation error of the optimized quantum circuit.

[0152] In addition, in a specific example, the value range of the start time of each quantum operation can also be used as a linear constraint condition, so as to more efficiently solve the target start time of each quantum operation. That is, the first linear constraint condition or the second linear constraint condition can also be used to constrain the value range of the start time of each quantum operation in the N quantum operations.

[0153] For example, the following linear condition can be used to limit the range of the variable to be solved. Specifically, the sum of the durations of all quantum operations in the quantum circuit is recorded as max = ∑ i d i At this time, assuming that the current time is the starting time, which can be recorded as 0, the latest ending time is (0+max), which can be recorded as max (also referred to as max). The minimum starting time of each quantum operation is the starting point, that is, 0, and the maximum starting time of each quantum operation must be less than the latest ending time, that is, max. Based on this, for any quantum operation in the quantum circuit, such as quantum operation g i For quantum operation g i The start time s i The following relationship needs to be satisfied:

[0154] 0≤s i ≤max-d i ;

[0155] Among them, the d i >0.

[0156] In summary, for a certain quantum circuit, the disclosed solution can use the start time of the quantum operation as a variable to be solved without changing the quantum operation itself, and at the same time, based on the sequence relationship between certain quantum operations in the quantum circuit, obtain the first linear constraint condition, so as to ensure the correctness of the quantum circuit; and convert the crosstalk conflict relationship between the quantum operations into the second linear constraint condition, so as to avoid crosstalk conflicts; here, the disclosed solution introduces an integer variable in the process of converting the crosstalk conflict relationship into the second linear constraint condition, and the integer variable can be used as another variable to be solved. In addition, a linear expression that can measure the decoherence error of the quantum circuit is used as the objective function, and then a preset solver is used to obtain the target start time of each quantum operation under the optimal conditions of the objective function to achieve the arrangement of quantum operations; and the arrangement of quantum operations obtained by the disclosed solution is the optimal arrangement of the quantum circuit.

[0157] It should be pointed out that when considering the correctness and crosstalk conflicts of quantum circuits at the same time, since the variables to be solved contain both real numbers and integers, the arrangement problem of quantum operations described in the present disclosure becomes a mixed integer linear programming problem, that is, a mixed integer linear programming problem (MILP). At this time, the preset solver can be specifically a MILP solver.

[0158] Further, it should be pointed out that for a set of input variables (including real numbers and integers), given some linear constraints (using linear expressions of ≥, ≤ and ==), and an objective function and optimization goal of a linear function (the optimization goal refers to making the objective function reach a minimum value or a maximum value, etc.), the MILP solver can give a solution that achieves the optimal target value. Therefore, the target start time of each quantum operation obtained by the disclosed solution can be specifically the optimal solution of the quantum circuit, and the obtained arrangement is the optimal arrangement scheme of the quantum circuit.

[0159] In addition, it should be noted that some quantum circuit optimization solutions require changing the quantum operation itself, such as merging some quantum logic gates into an equivalent quantum logic gate. In this case, you can first perform optimization by changing the quantum operation itself, such as merging quantum logic gates, and then use the disclosed solution, so as to jointly achieve the optimization of the quantum circuit.

[0160] In addition, it should be noted that the disclosed solution does not consider the commutativity of quantum operations when dealing with crosstalk conflicts.

[0161] The following is a further detailed description of the disclosed solution in conjunction with specific examples; specifically, the disclosed solution proposes a quantum operation arrangement method based on mixed integer linear programming, where the mixed integer linear programming means that the constraints are linear constraints, the objective function is a linear function, and the variables to be solved include integers (such as integer variables in the disclosed solution) and real numbers. Here, the real number can be specifically the start time of the quantum operation, based on which, the real number can be specifically a non-negative real number.

[0162] Further, the method mainly converts the correctness restriction rules and the crosstalk conflict restriction rules into linear constraints, and at the same time, uses the linear expression as the objective function to convert the arrangement problem of quantum operations in the quantum circuit into a mixed integer linear programming problem (MILP) with linear constraints. Specifically, for the input quantum circuit, the start time of the quantum operation in the quantum circuit is used as the variable to be solved, the correctness restriction relationship between certain quantum operations in the quantum circuit is converted into a linear expression for constraint, and the crosstalk conflict restriction relationship between the quantum operations in the quantum circuit is converted into a linear expression for constraint; here, when converting the crosstalk conflict restriction relationship into a linear expression, an integer variable with a value of 0 or 1 can be introduced, and at this time, the integer variable is another variable to be solved in the disclosed scheme; then a linear expression that can measure the decoherence error of the quantum circuit is used as the objective function, and finally, the MILP solver is used to obtain the target start time of all quantum operations in the quantum circuit under the optimal conditions of the objective function.

[0163] The following is divided into three parts to explain the disclosed solution; the first part explains the core idea of ​​the disclosed solution; the second part introduces the core steps of the specific implementation of the disclosed solution; the third part is an application demonstration to verify the effectiveness of the disclosed solution.

[0164] Part I: Core Ideas

[0165] Before introducing this section, some relevant basic definitions and concepts are first introduced.

[0166] The quantum circuit described in the disclosed solution is mainly composed of at least two quantum operations; here, the quantum operation includes a quantum logic gate and / or a quantum measurement; and each quantum operation operates on one or more quantum bits. It is understandable that the quantum bits operated by different quantum operations can be the same or different.

[0167] Further, assuming that the quantum circuit includes N quantum operations, in this case, the i-th quantum operation among the N quantum operations can be used iIndicates that, here, N is a positive integer greater than or equal to 2, and i is a positive integer greater than or equal to 1 and less than or equal to N.

[0168] Furthermore, the quantum operation g i Duration available i Indicates that the duration d i is a real number greater than 0. Usually, when the quantum circuit is determined, this term is a known quantity. i The starting time is expressed in s i Indicates that it is the variable to be solved in the disclosed solution; at this time, the quantum operation g i The end time is s i +d i .

[0169] As mentioned above, if the quantum bits acted on by the two quantum operations of the quantum circuit contain the same quantum bits, for example, the quantum operation g i In the quantum operation g j Before, and in the quantum operation g i and quantum operation g j If the quantum bits being operated have the same quantum bits, then the quantum operation g i It is necessary to perform the quantum operation g j Before, in other words, the quantum operation g i The end time of the quantum operation g j Before the start time, the following relationship needs to be satisfied:

[0170] s i +d i ≤s j Formula (1)

[0171] Among them, the s i Denotes the quantum operation g i The starting time, the d i Denotes the quantum operation g i The duration, s j Denotes the quantum operation g j The start time of the .

[0172] By formula (1), we can ensure that the quantum operation g i and quantum operation g j The order of operations is determined, thereby ensuring the correctness of the quantum circuit. Formula (1) is the linear constraint condition that satisfies the correctness constraint rule, which can also be called the correctness constraint condition.

[0173] Furthermore, for two quantum operations, such as quantum operation g k and quantum operation g lAlthough the quantum bits operated by the two are not the same, if the quantum operation g k and quantum operation g l If applied simultaneously, a large crosstalk error will occur. Therefore, the quantum operation g k and quantum operation g l , there should be no overlap in operation time, that is, the following relationship needs to be satisfied:

[0174] s k +d k ≤s l or l +d l ≤s k Formula (2)

[0175] Among them, the s k Denotes the quantum operation g k The starting time, the d k Denotes the quantum operation g k The duration, s l Denotes the quantum operation g l The starting time, the d l Denotes the quantum operation g l duration.

[0176] Here, in order to avoid crosstalk errors, as long as the quantum operation g k and quantum operation g l In practical applications, if the order of operations is not specified, there will be two situations. The first is that in the quantum operation g k In the quantum operation g l Before, and the quantum operation g k and quantum operation g l There should be no overlap in the operation time. At this time, s k +d k ≤s l ; The second is in the quantum operation g l In the quantum operation g k Before, and the quantum operation g k and quantum operation g l There should be no overlap in the operation time. At this time, s l +d l ≤s k .

[0177] Here, the operation time of the quantum operation refers to the time period from the start time to the end time of the quantum operation, which can be represented by the interval between the start time and the end time of the quantum operation, such as [start time, end time]. For example, the quantum operation g k The starting time is sk , the quantum operation g k The duration is d k , then the quantum operation g k The operation time can be specifically expressed as [s k ,s k +d k ].

[0178] The above formula (2) can ensure that the operation time of two quantum operations with crosstalk conflict does not overlap. The formula (2) satisfies the crosstalk conflict restriction rule, which can be called the crosstalk conflict restriction condition.

[0179] It is worth noting that not every two quantum operations in a quantum circuit will have crosstalk conflicts. It depends on the chip structure of the specific quantum chip.

[0180] In addition, the crosstalk conflict constraint condition shown in formula (2) is not a linear constraint condition, so a conversion process is required. The specific conversion is as follows:

[0181] The sum of the durations of all quantum operations in the quantum circuit is recorded as max = ∑ i d i At this time, assuming that the current time is the starting time, which can be recorded as 0, the latest ending time is (0+max), which can be recorded as max (also referred to as max). The minimum starting time of each quantum operation is the starting point, i.e. 0, and the maximum starting time of each quantum operation must be less than the latest ending time, i.e. max. Based on this, for any quantum operation in the quantum circuit, such as quantum operation g i For quantum operation g i The start time s i The following relationship needs to be satisfied:

[0182] 0≤s i ≤max-d i Formula (3)

[0183] Among them, the d i >0.

[0184] It can be understood that when all quantum operations in the quantum circuit are lined up, the start time of any quantum operation is less than max, and the end time is less than or equal to max.

[0185] Furthermore, in order to convert the crosstalk conflict constraint condition into a linear constraint condition, the following conversion is performed:

[0186] For each quantum operation pair with crosstalk conflict, such as the quantum operation pair (g k ,g l ), introduce an integer variable bk,l , whose value is 0 or 1; further, taking any constant greater than max, denoted as inf, the above formula (2) can be converted into the following expression:

[0187] s k +d k -d k,l ×inf≤s l Formula (4)

[0188] s l +d l -(1-b k,l )×inf≤s k Formula (5)

[0189] Formula (4) and formula (5) are two linear constraints of the crosstalk conflict restriction condition.

[0190] Furthermore, in order to suppress the decoherence error of the quantum circuit as much as possible, the disclosed solution designs the objective function based on the principle of suppressing the decoherence error; here, Qn is used to represent the nth quantum bit, which can be recorded as quantum bit Qn, for example, quantum bit Q0 represents the 0th quantum bit. After determining the quantum circuit, all quantum operations acting on each quantum bit can be obtained; the first quantum operation of all quantum operations acting on quantum bit Qn is recorded as f Qn , the last quantum operation is denoted as l Qn , at this time, the quantum operation l Qn End time Subtract the quantum operation f Qn Start time As the operation cycle of the quantum bit Qn, it is recorded as O n ,Right now

[0191]

[0192] Among them, the represents the first quantum operation f among all quantum operations acting on quantum bit Qn Qn The starting time of represents the last quantum operation l among all quantum operations acting on quantum bit Qn Qn The starting time of Represents the last quantum operation l Qn duration.

[0193] Furthermore, since the length of the operation cycle of a quantum bit will affect the decoherence of the quantum bit, the longer the operation cycle of the quantum bit, the greater the decoherence error. Therefore, the disclosed solution takes the sum of the operation time of all quantum bits in the quantum circuit as the objective function O, that is,

[0194] O=∑ n O n Formula (7)

[0195] The objective function O is a linear function. At this time, the optimization goal of the disclosed solution is to find the minimum function value of the objective function under the premise of satisfying the above linear constraints, that is, to find the minimum value of the objective function O under the premise of satisfying the linear constraints formula (1), formula (4) and formula (5).

[0196] In summary, in the entire MILP problem of the disclosed solution, the starting time s of each quantum operation in the quantum circuit is i and the additional integer variable b k,l As the variable to be solved, and use formula (3) to limit the range of the variable to be solved. At the same time, the linear constraint conditions representing the correctness restriction rule (i.e., formula (1)) and the linear constraint conditions satisfying the crosstalk conflict restriction rule (i.e., formula (4) and formula (5)) are used as the linear constraints of the MILP solver, and the objective function O (i.e., formula (7)) is used as the linear function of the MILP solver. In this way, the minimum value of the objective function O is obtained by using the MILP solver. At the same time, the target start time of each quantum operation in the quantum circuit is obtained, as well as the integer variables introduced for crosstalk conflict, such as b k,l The value of .

[0197] It is understandable that the disclosed solution only needs to obtain the quantum operation g i The start time s i This can achieve the optimization of quantum circuits.

[0198] For example, suppose that a quantum circuit includes five quantum operations. In this case, according to the operation order of the quantum operations, the quantum circuit includes:

[0199] Quantum operation g0 → quantum bit Q0 (indicates that quantum operation g0 is performed on quantum bit Q0);

[0200] Quantum operation g1→qubit Q2 (indicates that quantum operation g1 is performed on qubit Q2);

[0201] Quantum operation g2 → qubit Q0 and qubit Q1 (indicates that quantum operation g2 is performed on qubit Q0 and qubit Q1);

[0202] Quantum operation g3 → quantum bit Q1 (indicates that quantum operation g3 is performed on quantum bit Q1)

[0203] Quantum operation g4→qubit Q3 (indicating that quantum operation g4 is performed on qubit Q3).

[0204] It can be seen that the quantum bits acted on by the above quantum operations g0 and g2 contain the same quantum bit Q0, and the quantum bits acted on by the quantum operations g2 and g3 contain the same quantum bit Q1. Therefore, both the quantum operation pair (g0, g2) and the quantum operation pair (g2, g3) need to satisfy the linear constraints of the correctness restriction rule, that is, satisfy:

[0205] s0+d0≤s2;

[0206] s2+d2≤s3.

[0207] Furthermore, assuming that there is a crosstalk conflict between quantum operation g2 and quantum operation g1, according to formula (4) and formula (5), the quantum circuit needs to satisfy:

[0208] s2+d2-b 1,2 *inf≤s1

[0209] s1+d1-(1-b 1,2 )*inf≤s2

[0210] Furthermore, for the calculation of the objective function O, the quantum operations acting on the quantum bit Q0 are quantum operations g0 and g2, the quantum operations acting on the quantum bit Q1 are quantum operations g2 and g3, the quantum operations acting on the quantum bit Q2 are quantum operations g1, and the quantum operations acting on the quantum bit Q3 are quantum operations g4. Therefore, we obtain:

[0211] The operation cycle of quantum bit Q0: O0 = s2 + d2 - s0,

[0212] The operation cycle of quantum bit Q1: O1 = s3 + d3 - s2,

[0213] The operation cycle of quantum bit Q2: O2 = s1 + d1 - s1 = d1,

[0214] The operation cycle of quantum bit Q3: O3 = s4 + d4 - s4 = d4,

[0215] Based on the above operation cycle, the objective function O is obtained as:

[0216]

[0217] Here, the linear constraints satisfying the correctness restriction rule, the linear constraints satisfying the crosstalk conflict restriction rule, and the objective function O are input into the MILP solver to obtain the minimum value min of the objective function O. O And the target start time of each quantum operation can be recorded as

[0218] It should be noted that the solution that satisfies the objective function minimization may not contain the target start time of all quantum operations. For example, the solution that satisfies the objective function minimization only contains the target start time of quantum operation g0. and the target start time of quantum operation g3 At this time, the target start time of quantum operation g1 is Target start time of quantum operation g2 and the target start time of quantum operation g4 As long as it is within the value range (i.e., formula (3)), in this case, for the target start time Target start time and target start time Just take any set.

[0219] Part II: Implementation Steps

[0220] Specifically, the input of this example may be the quantum circuit to be arranged; the output may be the target start time of each quantum operation in the quantum circuit.

[0221] Specifically, Figure 6 As shown, the core steps of the disclosed solution include:

[0222] Step S601: Calculate max and inf. Specifically, based on the duration {d i}Calculate max, that is, max = ∑ i d i ; Further, take any constant greater than max as inf.

[0223] Step S602: Traverse all quantum operations in the quantum circuit to obtain all two quantum operations that need to satisfy the correctness restriction rule, for example, obtain the quantum operation g that needs to satisfy the correctness restriction rule. i and quantum operation g j , which can be expressed as (g i ,g j ).

[0224] Step S603: Set the variables to be solved and the value range of the start time of each quantum operation. Add the variables to be solved to the MILP solver: the start time of each quantum operation (for example, it can be recorded as {s i}), and the integer variable to be solved (for example, it can be recorded as {b k,l}). According to formula (3) and the max value obtained in step S601, the value range of the start time of each quantum operation is set, for example, 0≤s i ≤max-d i .

[0225] Step S604: Setting linear constraints. Specifically, the linear constraints of the correctness constraint rule (i.e., the first linear constraints described above) and the linear constraints that satisfy the crosstalk conflict constraint rule (i.e., the second linear constraints described above) are used together as the linear constraints of the MILP solver.

[0226] Step S605: Setting the objective function and optimization target. Specifically, the objective function is set based on the above formula (6) and formula (7), and at the same time, the minimum value of the objective function is set as the optimization target of the MILP solver.

[0227] Step S606: Run the MILP solver to obtain the target start time of each quantum operation to be solved And get the minimum value of the objective function and each integer variable

[0228] Part 3: Application Display

[0229] The disclosed solution proposes a method for arranging quantum operations, which can be based on the quantum circuit input by the user and the duration of each quantum operation {d i}, under the constraints of the sequential correctness of quantum operations and crosstalk conflicts, the starting time of quantum operations is automatically given, thus realizing the arrangement of quantum operations.

[0230] In order to show the advantages of the quantum operation arrangement scheme proposed in the disclosed solution, other existing arrangement schemes are compared. Other arrangement algorithms refer to first performing the optimal arrangement with the goal of suppressing decoherence errors, then traversing the quantum operations after the arrangement, and finally separating the conflicting quantum operations in time. This is an easy-to-think, simple and fast algorithm.

[0231] This application demonstrates the use of the sum of the operation cycles of all quantum bits as a performance indicator. The smaller the value, the better the performance. The specific comparison results are shown in Table 1, where each row in Table 1 represents an experiment, and each experiment randomly generates 10 quantum operations.

[0232] Table 1 (nanoseconds)

[0233] The present disclosure arrangement Other existing layout plans 2737.1 5842.3 2152.4 3796.4 2209.9 3326.7 2238.9 5893.1 1657.7 3582.5

[0234] In addition, the execution time of the two schemes is also counted. Here, the shorter the execution time, the higher the efficiency. The specific comparison results are shown in Table 2, where each row in Table 2 represents an experiment, and 20 quantum operations are randomly generated in each experiment.

[0235] Table 2: (seconds)

[0236] This public scheme Other existing layout plans 3.55 0.017 0.285 0.016 0.425 0.016 3.63 0.018 0.196 0.019

[0237] It can be clearly seen from Table 1 and Table 2 that the disclosed solution is superior to other existing arrangement solutions in terms of execution performance and execution time, and the disclosed solution also meets expectations.

[0238] The disclosed solution also provides a quantum operation processing device, such as Figure 7 As shown, including:

[0239] A processing unit 701 is used to determine a first linear constraint condition corresponding to a quantum circuit to be arranged, wherein the quantum circuit includes N quantum operations; the first linear constraint condition is used to constrain the start time of each quantum operation between two quantum operations that need to have a sequential relationship among the N quantum operations; N is a positive integer greater than or equal to 2; determine a second linear constraint condition corresponding to the quantum circuit, wherein the second linear constraint condition is used to constrain the start time of each quantum operation between two quantum operations that have a crosstalk conflict among the N quantum operations; when the start time of the quantum operation is used as a parameter to be processed, the first linear constraint condition and the second linear constraint condition are used to obtain a target start time of each quantum operation among the N quantum operations;

[0240] The output unit 702 is used to output the target start time of each quantum operation in the N quantum operations.

[0241] In a specific example of the disclosed solution, the processing unit 701 is further used to arrange the N quantum operations based on the target start time of each quantum operation in the N quantum operations to obtain an arranged quantum circuit;

[0242] The output unit 702 is also used to display the arranged quantum circuits.

[0243] In a specific example of the disclosed solution, the first linear constraint condition is obtained based on at least one of the following of each quantum operation between two quantum operations that need to have a sequential relationship: the start time of the quantum operation, and the duration of the quantum operation acting on the quantum bit.

[0244] In a specific example of the disclosed solution, the second linear constraint condition is obtained by converting the target nonlinear constraint condition; wherein the target nonlinear constraint condition is used to constrain the operation time of two quantum operations in which crosstalk conflicts exist among the N quantum operations.

[0245] In a specific example of the disclosed solution, the target nonlinear constraint condition is obtained based on the following information of each quantum operation between two quantum operations in which crosstalk conflicts occur among the N quantum operations: the start time of the quantum operation, and the duration of the quantum operation acting on the quantum bit.

[0246] In a specific example of the disclosed solution, the second linear constraint condition is obtained by converting the target nonlinear constraint condition using an integer variable; the integer variable in the second linear constraint condition and the start time of the quantum operation are parameters to be processed;

[0247] The processing unit 701 is specifically configured to:

[0248] When the integer variable and the start time of the quantum operation are used as parameters to be processed, the target start time of each quantum operation in the N quantum operations is obtained by using the first linear constraint condition and the second linear constraint condition.

[0249] In a specific example of the disclosed solution, the two quantum operations in the quantum circuit that have crosstalk conflicts are quantum operations g and k and quantum operation g l In the case where the second linear constraint condition includes at least:

[0250] s k +d k -b k,l ×inf≤s l or, l +d l -(1-b k,l )×inf≤s k ;

[0251] Among them, s k Denotes the quantum operation g k The starting time, d k Denotes the quantum operation g k duration, inf is the preset threshold, s l Denotes the quantum operation g l The starting time, d l Denotes the quantum operation g l The duration of b k,l For the quantum operation g k and quantum operation g l The corresponding integer variables, k, l (k≠l), are both positive integers greater than or equal to 1 and less than or equal to N.

[0252] In a specific example of the disclosed solution, the processing unit 701 is further configured to:

[0253] Determining an objective function; wherein the objective function is used to characterize the decoherence error of the quantum circuit;

[0254] Minimizing the objective function with the start time of the quantum operation as a parameter to be processed and with the first linear constraint and the second linear constraint;

[0255] When it is determined that the preset requirements are met, a target start time of each quantum operation in the N quantum operations is obtained.

[0256] In a specific example of the disclosed solution, the processing unit 701 is specifically configured to:

[0257] Determining an operation period of each qubit in the quantum circuit, where the operation period of the qubit is based on the duration of a quantum operation acting on the qubit;

[0258] The objective function is obtained based on the operation cycles of all quantum bits in the quantum circuit.

[0259] In a specific example of the disclosed solution, the operation period of the qubit is obtained based on the following two parameters:

[0260] The end time of the last quantum operation among all quantum operations acting on the quantum bit, and the start time of the first quantum operation among all quantum operations acting on the quantum bit.

[0261] For the description of the specific functions and examples of each unit of the device in the embodiment of the present disclosure, reference can be made to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.

[0262] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0263] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0264] like Figure 8As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0265] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0266] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the processing method of quantum operations. For example, in some embodiments, the processing method of quantum operations may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the processing method of quantum operations described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the processing method of quantum operations by any other appropriate means (e.g., by means of firmware).

[0267] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0268] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0269] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0270] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0271] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0272] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0273] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0274] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for processing quantum operations, comprising: Determine a first linear constraint condition corresponding to a quantum circuit to be arranged, wherein the quantum circuit includes N quantum operations; the first linear constraint condition is used to constrain the start time of each quantum operation between two quantum operations that need to have a sequential relationship among the N quantum operations; N is a positive integer greater than or equal to 2; Determining a second linear constraint condition corresponding to the quantum circuit, wherein the second linear constraint condition is used to constrain the start time of each quantum operation between two quantum operations having crosstalk conflicts among the N quantum operations; When the start time of the quantum operation is used as a parameter to be processed, the target start time of each quantum operation in the N quantum operations is obtained by using the first linear constraint condition and the second linear constraint condition.

2. The method according to claim 1, further comprising: The N quantum operations are arranged based on the target start time of each quantum operation in the N quantum operations to obtain an arranged quantum circuit.

3. The method according to claim 1, wherein: The first linear constraint condition is obtained based on at least one of the following of each quantum operation between two quantum operations that need to have a sequential relationship: the start time of the quantum operation, and the duration of the quantum operation acting on the quantum bit.

4. The method according to claim 1, wherein: The second linear constraint condition is obtained by converting the target nonlinear constraint condition; wherein the target nonlinear constraint condition is used to constrain the operation time of two quantum operations in which crosstalk conflicts exist among the N quantum operations.

5. The method according to claim 4, wherein: The target nonlinear constraint condition is obtained based on the following information of each quantum operation between two quantum operations with crosstalk conflict in the N quantum operations: the starting time of the quantum operation and the duration of the quantum operation acting on the quantum bit.

6. The method according to claim 4, wherein: The second linear constraint condition is obtained by converting the target nonlinear constraint condition using an integer variable; the integer variable in the second linear constraint condition and the start time of the quantum operation are parameters to be processed; Wherein, when the start time of the quantum operation is used as the parameter to be processed, the target start time of each quantum operation in the N quantum operations is obtained by using the first linear constraint condition and the second linear constraint condition, including: When the integer variable and the start time of the quantum operation are used as parameters to be processed, the target start time of each quantum operation in the N quantum operations is obtained by using the first linear constraint condition and the second linear constraint condition.

7. The method according to claim 6, wherein: The two quantum operations in which crosstalk conflicts occur in the quantum circuit are respectively quantum operations and quantum operations In the case where the second linear constraint condition includes at least: ;or, ; in, Representing quantum operations The start time, Representing quantum operations duration, is the preset threshold, Representing quantum operations The start time, Representing quantum operations duration, For the quantum operation and quantum operations The corresponding integer variables are ( ) are all positive integers greater than or equal to 1 and less than or equal to N.

8. The method according to any one of claims 1 to 7, further comprising: Determining an objective function; wherein the objective function is used to characterize the decoherence error of the quantum circuit; Wherein, when the start time of the quantum operation is used as the parameter to be processed, the target start time of each quantum operation in the N quantum operations is obtained by using the first linear constraint condition and the second linear constraint condition, including: Minimizing the objective function with the start time of the quantum operation as a parameter to be processed and with the first linear constraint and the second linear constraint; When it is determined that the preset requirements are met, a target start time of each quantum operation in the N quantum operations is obtained.

9. The method according to claim 8, wherein: Determining the objective function comprises: Determining an operation period of each qubit in the quantum circuit, where the operation period of the qubit is based on the duration of a quantum operation acting on the qubit; The objective function is obtained based on the operation cycles of all quantum bits in the quantum circuit.

10. The method according to claim 9, wherein: The operation period of the qubit is based on the following two parameters: The end time of the last quantum operation among all quantum operations acting on the quantum bit, and the start time of the first quantum operation among all quantum operations acting on the quantum bit.

11. A quantum operation processing device, comprising: A processing unit is used to determine a first linear constraint condition corresponding to a quantum circuit to be arranged, wherein the quantum circuit includes N quantum operations; the first linear constraint condition is used to constrain the start time of each quantum operation between two quantum operations that need to have a sequential relationship among the N quantum operations; N is a positive integer greater than or equal to 2; determine a second linear constraint condition corresponding to the quantum circuit, wherein the second linear constraint condition is used to constrain the start time of each quantum operation between two quantum operations that have a crosstalk conflict among the N quantum operations; when the start time of the quantum operation is used as a parameter to be processed, the first linear constraint condition and the second linear constraint condition are used to obtain a target start time of each quantum operation among the N quantum operations; An output unit is used to output a target start time of each quantum operation in the N quantum operations.

12. The device according to claim 11, wherein The processing unit is further used to arrange the N quantum operations based on the target start time of each quantum operation in the N quantum operations to obtain an arranged quantum circuit; The output unit is also used to display the arranged quantum circuits.

13. The device according to claim 11, wherein: The first linear constraint condition is obtained based on at least one of the following of each quantum operation between two quantum operations that need to have a sequential relationship: the start time of the quantum operation, and the duration of the quantum operation acting on the quantum bit.

14. The device according to claim 11, wherein: The second linear constraint condition is obtained by converting the target nonlinear constraint condition; wherein the target nonlinear constraint condition is used to constrain the operation time of two quantum operations in which crosstalk conflicts exist among the N quantum operations.

15. The device according to claim 14, wherein: The target nonlinear constraint condition is obtained based on the following information of each quantum operation between two quantum operations with crosstalk conflict in the N quantum operations: the starting time of the quantum operation and the duration of the quantum operation acting on the quantum bit.

16. The device according to claim 14, wherein: The second linear constraint condition is obtained by converting the target nonlinear constraint condition using an integer variable; the integer variable in the second linear constraint condition and the start time of the quantum operation are parameters to be processed; Wherein, the processing unit is specifically used for: When the integer variable and the start time of the quantum operation are used as parameters to be processed, the target start time of each quantum operation in the N quantum operations is obtained by using the first linear constraint condition and the second linear constraint condition.

17. The device according to claim 16, wherein: The two quantum operations in which crosstalk conflicts occur in the quantum circuit are respectively quantum operations and quantum operations In the case where the second linear constraint condition includes at least: ;or, ; in, Representing quantum operations The start time, Representing quantum operations duration, is the preset threshold, Representing quantum operations The start time, Representing quantum operations duration, For the quantum operation and quantum operations The corresponding integer variables are ( ) are all positive integers greater than or equal to 1 and less than or equal to N.

18. The device according to any one of claims 11 to 17, wherein: The processing unit is further used for: Determining an objective function; wherein the objective function is used to characterize the decoherence error of the quantum circuit; Minimizing the objective function with the start time of the quantum operation as a parameter to be processed and with the first linear constraint and the second linear constraint; When it is determined that the preset requirements are met, a target start time of each quantum operation in the N quantum operations is obtained.

19. The device according to claim 18, wherein: The processing unit is specifically used for: Determining an operation period of each qubit in the quantum circuit, where the operation period of the qubit is based on the duration of a quantum operation acting on the qubit; The objective function is obtained based on the operation cycles of all quantum bits in the quantum circuit.

20. The device according to claim 19, wherein The operation period of the qubit is based on the following two parameters: The end time of the last quantum operation among all quantum operations acting on the quantum bit, and the start time of the first quantum operation among all quantum operations acting on the quantum bit.

21. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 10.

22. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-10.

23. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Method and device for compiling quantum circuit, storage medium and compiling system

    CN114548414A

  • Method and system for optimized circuit autorouting

    US7620922B1