Generating quantum computing circuits by distributing approximation errors in quantum algorithms

By automatically decomposing quantum algorithms and distributed approximate errors to sub -routine, the problem of quantum algorithm decomposition and error management is solved, and the high -efficiency decomposition and low error circuit design of the quantum circuit is realized.

CN112204583BActive Publication Date: 2025-01-24MICROSOFT TECHNOLOGY LICENSING LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980035102.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-06-29
Filing Date
2019-05-17
Publication Date
2025-01-24
Estimated Expiration
2039-05-17

AI Technical Summary

Technical Problem

The prior art is difficult to effectively decompose quantum algorithms into quantum circuits and manage errors generated during algorithm conversion or compilation, resulting in difficulty in controlling the errors.

Method used

By using at least one processor, the quantum algorithm is automatically decomposed until the quantum algorithm is completely decomposed to the quantum circuit, and the overall approximate error caused by the decomposition is distributed into the sub -routine to ensure that the overall approximate error is lower than the specified threshold.

Benefits of technology

The effective decomposition of the quantum algorithm is implemented to the quantum circuit, and through optimization parameters and error management, the overall approximity error is kept within the specified threshold, reducing the cost of the circuit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112204583B_ABST
    Figure CN112204583B_ABST
Patent Text Reader

Abstract

A method for generating a quantum computing circuit by distributing approximation errors in a quantum algorithm is described. The method includes decomposing the quantum algorithm into a quantum circuit. The method includes automatically performing, using at least one processor, a stepwise decomposition of the quantum algorithm until the quantum algorithm is completely decomposed into the quantum circuit, wherein the automatically performing stepwise decomposition results in an approximation error set and a parameter set to instantiate at least a subset of quantum circuits corresponding to the quantum algorithm such that an overall approximation error caused by the automatically performing stepwise decomposition is maintained below a specified threshold approximation error.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] Quantum computing can solve certain problems much faster than classical devices. Examples of such problems include Shor's algorithm, unstructured search problems, and simulation of quantum mechanical systems.

[0002] Advances in quantum algorithms have been described at a very high level of abstraction, providing speed advantages over classical devices, and actual estimates of the quantum circuits or other resources required to execute quantum algorithms have not yet been provided. In order to estimate the resources required for a given quantum algorithm, the high-level representation of the quantum algorithm needs to be converted (or compiled) into a set of low-level operations that can be implemented using a standard set of gates (e.g., the set of Clifford+T gates). Additionally, in order to ensure that the resulting set of low-level operations executes the quantum algorithm within some specified tolerance, the errors generated during the algorithm conversion or compilation need to be managed. Summary of the invention

[0003] In one example, the present disclosure relates to a method for decomposing a quantum algorithm into a quantum circuit. The method may include, using at least one processor, automatically performing a stepwise decomposition of the quantum algorithm until the quantum algorithm is completely decomposed into the quantum circuit, wherein the automatically performing the stepwise decomposition produces an approximation error set and a parameter set to instantiate at least a subset of the quantum circuits corresponding to the quantum algorithm, such that an overall approximation error caused by the automatically performing the stepwise decomposition is maintained below a specified threshold approximation error.

[0004] In another example, the present disclosure relates to a method for decomposing a quantum algorithm into a quantum circuit. The method may include, using at least one processor, automatically performing a step-by-step decomposition of the quantum algorithm; and distributing an overall approximation error resulting from automatically performing the step-by-step decomposition into subroutines until the quantum algorithm is completely decomposed into the quantum circuit. The method may further include, using at least one processor, minimizing a cost metric associated with implementing the quantum circuit while maintaining an overall approximation error below a specified threshold approximation error.

[0005] In yet another example, the present disclosure relates to a computer-readable medium comprising computer-executable instructions for a method. The method may include, using at least one processor, automatically performing a step-by-step decomposition of a quantum algorithm; and distributing an overall approximation error resulting from automatically performing the step-by-step decomposition into subroutines until the quantum algorithm is fully decomposed into a quantum circuit, wherein the step-by-step decomposition into subroutines is implemented via a quantum phase estimation (QPE) process. The method may further include, using at least one processor, minimizing a cost metric associated with implementing the quantum circuit while maintaining an overall approximation error below a specified threshold approximation error.

[0006] This summary is provided to introduce some concepts in a simplified form, which will be further described in the detailed description below. This summary is neither intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. Furthermore, the claimed subject matter is not limited to implementations that address any or all of the disadvantages noted in any part of this disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0007] The present disclosure is illustrated by way of example and is not limited by the accompanying drawings, in which like reference numerals indicate like elements. Elements in the accompanying drawings are illustrated for simplicity and clarity, and are not necessarily drawn to scale.

[0008] Figure 1 A flow chart of a method for distributing approximation errors as part of generating a quantum circuit corresponding to a quantum algorithm according to one example is shown;

[0009] Figure 2 A diagram showing decomposition of a quantum algorithm into subroutines S1, S2, ..., Sn having approximation errors ∈1, ∈2, ..., ∈n, respectively, according to an example;

[0010] Figure 3 The time evolution operator U=e is applied according to an example. -itH A quantum circuit for quantum phase estimation of , where H is the Hamiltonian of the quantum system being simulated;

[0011] Figure 4 is an abstract depiction of a compilation process applied to quantum phase estimation (QPE) of a given unitary element U according to an example;

[0012] Figure 5 A diagram showing an example of a scheme for keeping track of a list of approximation errors when recursively decomposing a top-level quantum algorithm;

[0013] Figure 6 depicts the cost of the resulting circuit as a function of the desired overall accuracy ε according to one example;

[0014] Figure 7 shows that according to one example, when only two such parameters are used (e.g., setting ε R =ε Trotter ) and the circuit cost when all three parameters are used;

[0015] Figure 8 An example showing the increasing proportion of circuit cost as the number of parameters used for optimization increases;

[0016] Fig. 9 An example showing how the running time of the annealing process increases as the number of redundant parameters used increases; and

[0017] Fig.10 An example system environment for implementing aspects of components and methods related to generating quantum computer circuits by distributing approximation errors is shown. DETAILED DESCRIPTION

[0018] The examples described in this disclosure relate to generating quantum computing circuits by distributing approximation errors in quantum algorithms. As the field of quantum computing advances to a state where thousands of operations can be performed on tens or even hundreds of qubits, a supporting software stack is needed. When compiling algorithms for fault-tolerant quantum computing, some operations must be approximated while maintaining the overall error below a threshold defined by the user or application. As a result, several choices for distributing errors among subroutines emerge; the goal is to choose a good, even the best, choice. To this end, this disclosure describes an error management module that can be integrated into any quantum software framework.

[0019] The job of a quantum routine compiler is to convert a high-level description of a given quantum program into machine-level instructions specific to the hardware. During the compilation process, one of the requirements may be to optimize as much as possible to reduce the overall depth of the resulting circuit so that the overhead of the required quantum error correction is manageable. Optimizations include quantum forms of constant folding (e.g., merging consecutive rotating gates, or even constant additions), and identifying computed / action / uncomputed sections to reduce the number of controlled gates. To allow such optimizations, multiple layers of abstraction can be used, rather than compiling directly down to low-level machine instructions, which would make it impossible to, for example, identify two consecutive constant additions. For example, even canceling a gate followed by its inverse is difficult to compute, or even impossible to compute once consecutive gates are approximated.

[0020] To transform the intermediate representation to the next lower level of abstraction, a set of decomposition rules is used, some of which introduce additional errors that can be arbitrarily reduced at the expense of increased circuit size or depth, which means greater overhead when quantum error correction is applied. Therefore, it is of great interest to choose these error tolerances so that the computation can be performed successfully with high probability given the available resources (number and quality of qubits). At each level of abstraction, the compiler introduces additional precision parameters that must be chosen so that: (1) the cost of implementing the subroutine is automatically calculated as a function of precision; (2) the overall error is within the algorithm specification; and (3) the implementation cost is as low as possible while satisfying the first constraint.

[0021] An example solution manages these two constraints by expressing a final cost metric, which in one example is the total number of elementary quantum gates used, in terms of the cost of implementing all its different subroutines. These subroutine costs are first assumed to be parameters, leading to an optimization problem (usually non-convex) that attempts to minimize the overall metric while still guaranteeing a given overall approximation error. In one example implementation, this optimization problem is solved by using simulated annealing, starting from an initial random assignment of parameters.

[0022] While it is not possible to perform error correction on a continuous set of quantum operations (gates), this can be implemented on a discrete set of gates such as the aforementioned Clifford+T gate set. Therefore, certain operations must be approximated using gates from this discrete set. An example is the operation of implementing rotation around the z-axis,

[0023]

[0024] To implement such a gate on Clifford+T, a synthesis algorithm can be used. Given the angle θ of the gate, such a rotational synthesis algorithm will produce a sequence of Clifford+T gates Its approximate Rz θ To achieve a given tolerance ε R In most error correction protocols, the T-gate is the most expensive operation to implement, as it cannot be performed natively, but requires a distillation protocol to distill many noisy magic states into one good state, which can then be used to apply gates. As a result, it may be advantageous to minimize the number of these T-gates in order to allow a certain quantum computation to be performed.

[0025] As described, the job of a quantum routine compiler is to convert a high-level description of a given quantum routine into hardware-specific machine-level instructions. As in conventional computing, such a compilation framework can be implemented in a hardware-agnostic manner by introducing a backend-independent intermediate representation of the quantum code.

[0026] During the compilation process, it is useful to optimize as much as possible to reduce the overall depth of the resulting circuit to keep the overhead of the required quantum error correction manageable. Optimizations include quantum forms of constant folding (e.g., merging consecutive rotating gates, even by constant addition) and identifying computed / actioned / uncomputed sections to reduce the number of controlled gates. To allow such optimizations, it may be advantageous to introduce multiple layers of abstraction rather than compiling directly down to low-level machine instructions, which may make it impossible to identify, for example, two consecutive two constant additions. This is because once consecutive gates are approximated, even cancellation of gates followed by their inverses becomes computationally intractable.

[0027] To transform the intermediate representation to the next lower level of abstraction, a set of decomposition rules are used, some of which introduce additional errors that can be arbitrarily reduced at the expense of increasing the circuit size or depth, which in turn means greater overhead when applying quantum error correction.

[0028] Figure 1 A flow chart of a method for distributing approximation errors as part of generating a quantum circuit corresponding to a quantum algorithm is shown. In this example, the method is described using a framework for determining the total error from the decomposition of the quantum algorithm into lower level gates by estimating the individual errors of the lower level gates.

[0029] In one example, the time evolution of a closed quantum system can be described by a unitary operator. As a result, each time step of the example quantum computer can be described by a unitary operator of dimension 2. n ×2 n The unitary matrix (excluding the measurement value) is described by n, where n represents the number of quantum bits (qubits). Such a quantum operation U is decomposed into a sequence of low-level operations U M ...U1, the following Lemma 1 can be used to estimate the total error from the individual errors ε of the low-level gates. Given a unitary decomposition of U, such that U = U M ·U M-1 ...U1, and given the unitary operator U i Approximate unitary element V i Make The total error can be bounded as follows:

[0030]

[0031] The proof of Lemma 1 generalizes to the triangle inequality and the submultiplicative property of ||·|| and ||U||≤1. For the base case M=2, it can be shown as follows:

[0032]

[0033] The inductive step P(M-1) → P(M) can be shown in a similar way:

[0034]

[0035] Note that this also applies to subunits This means Thus, in this example, measurement can be safely ignored, and the resulting overall error must be smaller than the estimated error. Additionally, measurement is a rare operation, and thus the approximation is not valid for individual ε i The impact of the choice is small.

[0036] During compilation, only Lemma 1 is used to automatically optimize individual ε i The resulting optimization problem will be too large to be feasible. Additionally, since the number of lower-level gates changes when implementing higher-level operations at different precisions, the number of parameters to be optimized will change throughout the optimization process, which in turn changes the performance of different ε i To solve these two problems, Theorem 4 is introduced to generalize Lemma 1. First, some definitions of Theorem 4 are provided.

[0037] Definition 1: Let V M(ε) …V1 is the approximate decomposition of the target unitary element U, so that ||V M(ε) …V1||≤ε. If The collection of subroutine sets is a partition of U into subroutines, and we denote it by a function S(V) that returns the set S of subroutines such that V∈S.

[0038] This division will be used to assign a value to each V i Allocate to achieve full V i ∈S k Accuracy However, in order to decompose the cost of U, we also need to consider the cost partitioning of U's subroutines and the costs of its subsets: Definition 2: Let Is a collection of subroutine sets. is a cost partition of subroutines of U with respect to a given cost metric C(U,ε), where The cost of the set of subroutines S is then explicitly defined and given by C(S, ε) := C(V, ε) for any V∈S.

[0039] Using these definitions, we can now generalize Lemma 1. Theorem 4: Let is the cost h of a subroutine for a given decomposition of U, and the cost metric C(U,ε) represents the number of basic gates required to implement U. Then the cost of U can be calculated using the set of all subroutines The cost is expressed as follows:

[0040]

[0041] in

[0042] where it is assumed that if all subroutines are fully implemented, the decomposition of U will introduce an error ε U , then f S (ε U ) gives the number of subroutines in the decomposition of U in S, and ε S represents the error in implementing the subroutine in S.

[0043] In this example, the cost C(U,ε) can be decomposed into all subroutines V i In addition, due to

[0044] and

[0045] To prove that the overall error is still bounded by ε, let Indicated by the precision ε U Next, we apply the decomposition rule of U to obtain the unitary element, that is, (where all subroutines are fully implemented). Furthermore, let V denote the unitary that will eventually be executed by the quantum computer, i.e., the unitary obtained after applying all decomposition rules and approximations. By the triangle inequality and Lemma 1,

[0046]

[0047] Figure 4 is an abstract depiction of the compilation process of quantum phase estimation (QPE) applied to a given unitary element U according to an example. Figure 4 For example, the leftmost c The U frame takes ε1 as its error budget. c implementation details of U, even assuming c All subroutines of U have been fully implemented, and some of this budget may have been used to c U is decomposed into its subroutines. The remaining error budget is then distributed among its subroutines, which is exactly the statement of the above theorem. The cost decomposition can be performed at different levels of granularity. This means that having a larger set More functions f with sum equal to 1 S (ε U ). Two extreme cases are:

[0048] need gates to implement U:

[0049] Each gate has a different ε U ,

[0050] 2. Need f S (ε) = # gates to implement

[0051] All doors have the same

[0052] This therefore solves the first problem of Lemma 1: in practical implementations, the set The size of can be adaptively chosen so that the resulting optimization problem has the following form:

[0053]

[0054] Make

[0055] For user-defined or application-defined overall tolerances ε, this can be solved using a reasonable amount of resources.

[0056] In addition, the optimization cost can be achieved by changing the initial test parameters Initialization is reduced to the accuracy of the corresponding solution of a lower dimensional optimization problem with fewer different subroutines. This example method is very similar to the multigrid scheme for solving partial differential equations.

[0057] The second problem of directly applying Lemma 1 is to optimize the number of parameters, which is also solved by Theorem 4. Of course, one can simply replace is very large, so that most of the corresponding f S (ε) is zero. However, this is a very inefficient solution that is also possible when using Lemma 1 directly.

[0058] A better approach might be to check for different values ​​of ε Then select A set of auxiliary subroutines So that each additional subroutine that appears when changing ε (but not the original Any member of S) falls into exactly one of these sets.

[0059] Then, before running the optimization process, the original set can be extended by these auxiliary sets. Likewise, the level of granularity of these auxiliary sets and the number of such sets A can be adjusted according to the resources available to solve the final optimization problem.

[0060] In step 110, inputs related to the quantum algorithm A, the overall target error ∈, and the cost metric M may be received. As part of this step, the system may also access a database of available decomposition rules and a compiler 115 for applying the rules. Next, in step 120, the system may decompose the quantum algorithm into subroutines using the parameters and the corresponding approximation errors. For example, the quantum algorithm may be decomposed using the Trotter decomposition process. Alternatively, a method based on truncated Taylor series may also be used for the decomposition process. As an example, Figure 2 As shown, the quantum algorithm A can be decomposed into distributions with approximation errors ∈1,∈2,…∈ n Subroutines S1, S2, ..., S nThe example scenario involves decomposing the top-level algorithm A into subroutines using the resulting approximation error list. Figure 2 As further shown, subroutines S1, S2, ..., S n Each of can be further decomposed into additional subroutines and accompanying approximation errors.

[0061] An example of a decomposition quantum algorithm involves decomposing the transverse field Ising model into subroutines. Thus, Figure 4 As shown, as a decomposition step (for example, Figure 1 As part of step 120 of ), the top-level quantum phase estimation (QPE) is decomposed into several applications of the controlled unitary operator (U) and the inverse of the quantum Fourier transform (QFT). Figure 4 As shown, the controlled U block is further decomposed into rotations R1, R2, ..., R n .

[0062] Another example of a scheme for tracking a list of approximation errors when recursively decomposing a top quantum algorithm is in Figure 5 , where the top quantum algorithm is a linear combination of unitary elements. In the first decomposition step, the top quantum phase estimate (QPE) is decomposed into several time steps. Each time step is approximated by a subroutine Uδ, and each subroutine is implemented by a state preparation circuit StatePrep. Finally, each state preparation is implemented by rotating the sequence R(θ1), R(θ2), ..., R(θ L ) to achieve it.

[0063] Next, in step 130, the system can determine whether the subroutine comprising quantum algorithm A has been completely decomposed. If not, the system can continue to iterate until the subroutine has been completely decomposed.

[0064] Next, in step 140, the system may generate an optimization problem for achieving a target error ∈ from the calculated parameter set and the approximation error.

[0065] Next, in step 150, the system can solve the optimization problem by minimizing the cost metric M. As part of this step, the system can obtain a heuristic algorithm to solve the optimization problem for the specified cost metric M 155. In one example, the heuristic algorithm can be simulated annealing. In one example, the optimization problem can be solved in two steps or modes. Whenever the current overall error is greater than the target accuracy ∈, the first mode can be activated. In this mode, the system can perform annealing until the target accuracy is reached. At this point, the second mode can be activated. In the second mode, the system can perform annealing-based optimization to reduce the circuit cost function. After each such step, if the overall error increases above the target accuracy ∈, the system can switch back to the error reduction mode. Table 1 below provides a high-level description of an example annealing algorithm to solve the optimization problem as part of step 150.

[0066]

[0067] Table 1

[0068] Next, in step 160, the system can use the solution to the optimization problem to instantiate the parameters in all subroutines. In a preferred embodiment, the subroutines are unitary operations, each of which is associated with a parameter or a finite number of parameters, and each of the unitary operations operates on a finite number of qubits. The solution calculated using the heuristic algorithm 155 in step 150 then sets the parameters to specific values, which are typically real numbers in a certain interval. In another embodiment, the subroutine may involve unitary operations that are associated with several parameters and operate on an increasing number of qubits. Examples of such embodiments include, but are not limited to, reflection operations around a parameterized modeled state. Other examples of such embodiments include rotations on a subspace, where the rotation angle is a parameter. Other examples of such embodiments include single qubit unitary rotations and controlled single qubit unitary rotations.

[0069] Finally, in step 170, after the parameters have been used to determine the specific unitary operation on the complex numbers in step 160. This is done to set all subroutines to specific unitary operations that are no longer dependent on the parameters and can then be implemented by the quantum computer hardware. The collection of subroutines is then assembled into a program that is a quantum circuit for the instruction-level representation of algorithm A. The system can then output at least one quantum circuit to compute algorithm A with an approximation error of at most ∈, and execute the circuit on the target quantum computer.

[0070] Figure 3 It is shown that the time evolution operator U = e -itHA quantum circuit for quantum phase estimation of , where H is the Hamiltonian of the quantum system being simulated. In this example, after an inverse quantum Fourier transform (QFT), the measurement yields the phase picked up by the input state. For the ground state ψ0, this is This allows the extraction of the energy E0 of ψ0. As an example, a simulation of a quantum mechanical system known as the Transverse Field Ising Model (TFIM) is described, which is governed by the Hamiltonian shown below.

[0071]

[0072] Among them J ij is the coupling constant, and Γ i Represents the strength of the transverse field at the location. and is the Pauli matrix acting on the ith spin, that is

[0073] and

[0074] <i,j> The sum of . is over all pairs of sites (i, j) that are connected. In this example, this corresponds to the nearest neighbor sites on a one-dimensional spin chain of length N (with periodic boundary conditions). Given The approximation of the ground state ψ0 The ground state energy E0 can be determined such that

[0075]

[0076] In this example, quantum phase estimation (QPE) can be used to accomplish this task: if ψ0 and If the overlap between is large, then a successful application of QPE, followed by a measurement of the energy register, will cause the state vector to collapse onto ψ0 with high probability (i.e., ) outputs E0. There are various ways to implement QPE, but the simplest analytical approach is coherent QPE followed by measurement of all control qubits. Figure 3 A diagram of an example quantum circuit is shown.

[0077] This process requires that for a success probability of 1 / 2, the time evolution operator (Controlled version of) 16π / ε QPE applications, where ε QPE Indicates the desired precision (the bit resolution of the generated eigenvalues). δ Trotter decomposition of , that is, for larger M,

[0078]

[0079] Allows the use of local operation sequences to implement global propagators U δ In addition to the nearest neighbor CNOT gate, they also include z-rotation and x-rotation to calculate parity (parity is not calculated before and after z-rotation). For z-rotation and x-rotation, the rotation angles are and The definition of the Rz and Rx gates results in additional factors in both terms.

[0080] To apply error correction to the resulting circuit running on actual hardware, these rotations can be decomposed into sequences of Clifford+T gates using rotational synthesis. Such a discrete approximation can achieve the characteristic T gate accuracy ε R , which is even hidden in The constants in the symbols are also clearly defined.

[0081] The first compilation step is to resolve the QPE library call. In this example, the cost of the QPE applied to the generic propagator is

[0082]

[0083] in c U represents a controlled version of the unitary element U, that is,

[0084]

[0085] In addition, the selected tolerances must satisfy

[0086]

[0087] In this example, the next step is to approximate the propagator using the Trotter decomposition. Depending on the order of Trotter's formula used, we get

[0088]

[0089] in

[0090] In the experimental part, is chosen as an example. Finally, we approximate c U1 and c The (controlled) rotation in U2,

[0091]

[0092] in For i∈{1,2}.

[0093] Collect all these items and use C( c U1,·)=C(c U2,·), we get

[0094]

[0095] Next, implementation details and numerical results of an example error management module are described.Although the optimization process becomes difficult to perform fine-grained cost and error analysis, the benefits are enormous in terms of the cost of the resulting circuit.

[0096] A dual-mode annealing procedure for optimization is described, in which two objective functions are reduced as follows: Whenever the current overall error is greater than the target accuracy ε, the first mode is activated. In this case, annealing is performed until the target accuracy is reached. At this point, the second mode becomes active. It performs an annealing-based optimization to reduce the circuit cost function. After each such step, if the overall error increases above ε, it will switch back to the error reduction subroutine.

[0097] Both annealing-based optimization modes follow the same scheme, which consists of replacing the randomly chosen ε i Multiply / divide by a random factor f∈(1, 1+δ] to increase / decrease the randomly chosen ε i , where δ can be adjusted to achieve an acceptance rate of approximately 50%. Then, a new objective function value is determined, and the proposed ε is rejected. i Changes or acceptance with the following probability,

[0098] p accept =min(1,e -βΔE )

[0099] Where β = T -1 and T denotes the annealing temperature. Specifically, this means that moves that do not increase energy, i.e., ΔE ≤ 0, are always accepted. The pseudo code of the algorithm can be found in Table 2 provided later.

[0100] Using the example of the lateral field Ising model described previously, the benefits of the error management module were determined by running two experiments. The first objective was to evaluate feasible solutions (i.e., values ​​ε that produce an overall error less than a user-defined tolerance). i ) and optimizing a feasible solution. In the first case, only the first mode is run until a feasible solution is obtained; and in the latter, both modes as described above are adopted.

[0101] Figure 6 Numerical results for an optimization problem derived from an example of the transverse field Ising model are shown. Figure 6The relationship between the circuit cost (along the y-axis) for implementing a quantum algorithm and the target accuracy ∈ is shown. As shown, the circuit cost increases with increasing target accuracy. One curve shows the circuit cost before optimization, and the second curve shows the circuit cost after optimization. Improving the first feasible solution encountered by further optimization allows reducing the cost metric M by nearly a factor of two (see Figure 6 By optimizing with additional parameters, the cost metric M can be reduced by several orders of magnitude.

[0102] Figure 7 Shows improvement Figure 6 An example of the first feasible solution encountered is shown in . In this example, the circuit cost of performing an optimization based on two variables relative to an optimization based on three variables is shown.

[0103] Finally, by introducing redundant parameters (i.e., additional turnstile synthesis tolerance ) to measure the robustness of the optimizer, where for all i and j, the best choice will be However, since the resulting optimization problem has more parameters, it is more difficult to solve and the final circuit cost is expected to be higher.

[0104] Additionally, the time spent finding an initial feasible solution will also increase. As an example, Figure 8 and Fig. 9 The results indicate that the method is scalable to hundreds of variables if the goal is to find a feasible solution. However, as the number of parameters increases, it becomes increasingly difficult to simultaneously optimize the circuit cost. This can be observed, for example, in the case of 100 additional (redundant) parameters, where further optimization of a feasible solution increases the cost from 1.65908·10 12 Reduced to 1.10752·10 12 , which is consistent with Figure 6 and Figure 7 This is a far cry from the almost 2x improvement observed in smaller systems.

[0105] Figure 8 An example of the increasing proportion of circuit cost as the number of parameters used for optimization increases is shown. The proportion of circuit cost is the circuit cost in the case of multiple redundant parameters divided by the cost obtained in the case of no redundant parameters. In this example, the number of annealing runs is always chosen to be 10, and the annealing process is run with 1000 different random number generator seeds, so that the best result among the 1000 runs is reported. Figure 8 As shown, as more parameters are added, the problem becomes more difficult to optimize.

[0106] Fig. 9An example of how the running time of the annealing process increases as the number of redundant parameters used increases is shown. In this example, the number of annealings is always chosen to be 10, and the annealing process is run with 1000 different random number generator seeds, reporting the best result out of the 1000 runs. Because the new update is obtained by uniformly selecting at random (followed by increasing or decreasing ε i )i∈[0,...,N-1] to propose, Fig. 9 The scaling of the running time in can be explained. Since this random traversal is performed on i∈[0, ..., N-1], the overall running time should also be similar to the expected running time of a random traversal, so middle.

[0107] Fig.10 An example system environment for implementing various aspects of the techniques and methods described in the present disclosure is shown. The system environment includes a quantum computing system 1010 and a traditional computing system 1030 coupled to a remote computer 1050. The quantum computing system 1010 consumes quantum circuits generated using the traditional computing system 1030. The quantum computing system 1010 may include a quantum processor 1012 and a measurement / monitoring device 1014. In one example, the quantum processor 1012 and the measurement / monitoring device 1014 may be configured to operate in a cryogenic environment (e.g., between 4 Kelvin and 77 Kelvin) so that the quantum processor can perform superconducting operations. The quantum processor 1012 may execute a quantum circuit compiled by the traditional computing system 1030. The compiled quantum circuit may be communicated to the quantum processor 1012 via a bus 1006.

[0108] Continue to refer Fig. 9 , the traditional computing system 1030 may include (multiple) communication interfaces 1032, a traditional processor 1034, and a memory 1036. The memory 1036 may include a compiler unit 1038, which includes libraries and other programs or codes for compiling high-level descriptions of quantum algorithms into quantum circuits. The compiler unit 1038 may further include programs or codes to perform Figure 1 The steps described. Therefore, the compiler unit 1038 may include a program or code that, when executed by the conventional processor 1034, can perform various methods described in the present disclosure. In one example, the code shown in Table 2 below may be stored in the memory 1036 as part of the compiler unit 1038 or separately. The high-level description of the quantum algorithm may be stored in the memory 1036 or the memory 1052 associated with the remote computer 1050.

[0109]

[0110]

[0111]

[0112]

[0113]

[0114]

[0115]

[0116] Table 2

[0117] In summary, the present disclosure relates to a method for decomposing a quantum algorithm into a quantum circuit. The method may include automatically performing, using at least one processor, a stepwise decomposition of the quantum algorithm until the quantum algorithm is completely decomposed into a quantum circuit, wherein the automatically performing the stepwise decomposition results in an approximation error set and a parameter set to instantiate at least a subset of quantum circuits corresponding to the quantum algorithm, such that an overall approximation error caused by the automatically performing the stepwise decomposition is maintained below a specified threshold approximation error.

[0118] Each of the quantum circuits may be a gate that can be implemented using a quantum processor. Each of the quantum circuits may be a fault-tolerant logic gate. Each of the quantum circuits may be implemented as a protection operation on the encoded quantum data.

[0119] The method may further include using an optimization problem that minimizes a cost metric associated with implementing the quantum circuit while maintaining an overall approximation error below a specified threshold approximation error. The optimization problem may encode conditions that satisfy the overall approximation error and conditions that minimize the cost metric associated with the quantum circuit. The optimization problem may be solved using a heuristic method to select parameters of the quantum circuit. The optimization problem may be solved by selecting a random initial assignment of the approximation error and the parameters. The solution to the optimization problem may be computed using simulated annealing.

[0120] In another example, the present disclosure relates to a method for decomposing a quantum algorithm into a quantum circuit. The method may include: using at least one processor, automatically performing a step-by-step decomposition of the quantum algorithm; and distributing an overall approximation error resulting from automatically performing the step-by-step decomposition into subroutines until the quantum algorithm is completely decomposed into the quantum circuit. The method may further include, using at least one processor, minimizing a cost metric associated with implementing the quantum circuit while maintaining an overall approximation error below a specified threshold approximation error.

[0121] Each of the quantum circuits may be implemented as a protection operation on the encoded quantum data.

[0122] Minimizing the cost metric may further include selecting parameters of the quantum circuit using a heuristic method to solve an optimization problem. The optimization problem may be solved by selecting a random initial assignment of the approximation error and the parameters.

[0123] In yet another example, the present disclosure relates to a computer-readable medium comprising computer-executable instructions for a method. The method may include: using at least one processor, automatically performing a step-by-step decomposition of a quantum algorithm; and distributing an overall approximation error resulting from automatically performing the step-by-step decomposition into subroutines until the quantum algorithm is completely decomposed into a quantum circuit, wherein the step-by-step decomposition into subroutines is implemented via a quantum phase estimation (QPE) process. The method may further include, using at least one processor, minimizing a cost metric associated with implementing the quantum circuit while maintaining an overall approximation error below a specified threshold approximation error.

[0124] The QPE process can realize the time evolution of the Ising model in the transverse field. The QPE process can be applied to the task of evolving a quantum mechanical system that is initialized in a given state within a specified total duration. The total duration can be divided into subintervals. The total duration can be divided into subintervals using the Trotter method or the Trotter-Suzuki method. The total duration can be divided into multiple subintervals using the unitary linear combination (LCU) method. The LCU method can be implemented using a state preparation circuit.

[0125] It should be understood that the methods, modules and components described herein are exemplary only. Alternatively or additionally, the functions described herein may be performed at least in part by one or more hardware logic components. For example, but not limited to, the hardware logic components of the exemplary types that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), etc. In an abstract but still clear sense, the arrangement of components for implementing the same function is effectively "associated" so that the desired function is implemented. Therefore, regardless of the architecture or intermediate components, any two components combined to implement a specific function herein can be regarded as "associated" with each other so that the desired function is implemented. Similarly, any two components so associated can also be regarded as "operably connected" or "coupled" to each other to implement the desired function.

[0126] Functionality associated with some examples described in this disclosure may also include instructions stored in non-transitory media. As used herein, the term "non-transitory media" refers to any medium that stores data and / or instructions that cause a machine to operate in a particular manner. Exemplary non-transitory media include non-volatile media and / or volatile media. Non-volatile media include, for example, hard disks, solid-state drives, disks or tapes, optical disks or tapes, flash memory, EPROM, NVRAM, PRAM or other such media or network versions of such media. Volatile media include, for example, dynamic memory (e.g., DRAM, SRAM, cache) or other such media. Non-transitory media are different from transmission media, but can be used in conjunction with transmission media. Transmission media are used to transmit data and / or instructions to or from a machine. Exemplary transmission media include coaxial cables, fiber optic cables, copper wires, and wireless media (e.g., radio waves).

[0127] In addition, those skilled in the art will recognize that the boundaries between the functions of the above-mentioned operations are only illustrative. The functions of multiple operations can be combined into a single operation and / or the functions of a single operation can be distributed in additional operations. In addition, alternative embodiments can include multiple instances of specific operations, and the order of operations can be changed in various other embodiments.

[0128] Although the present disclosure provides specific examples, various modifications and changes may be made without departing from the scope of the present disclosure as set forth in the appended claims. Therefore, the specification and drawings should be regarded as illustrative rather than restrictive, and all such modifications are intended to be included within the scope of the present disclosure. Any benefits, advantages, or solutions to problems described herein for specific examples should not be construed as key, required, or essential features or elements of any or all claims.

[0129] In addition, the terms "a" or "an" as used herein are defined as one or more than one. Likewise, the use of introductory phrases such as "at least one" and "one or more" in a claim should not be interpreted as implying that the introduction of another claim element by the indefinite article "a" or "an" limits any particular claim containing the introduced claim element to the invention containing only one such element, even if the same claim includes the introductory phrases "one or more" or "at least one" and an indefinite article (e.g., "a" or "an"). The same is true for the use of definite articles.

[0130] Unless otherwise stated, terms such as "first" and "second" are used to arbitrarily distinguish between the elements such terms describe. Therefore, these terms are not necessarily intended to indicate temporal or other prioritization of such elements.

Claims

1. A method for decomposing a quantum algorithm into a quantum circuit, the method comprising: using at least one processor, automatically performing a stepwise decomposition of the quantum algorithm, wherein performing the stepwise decomposition comprises iteratively decomposing the quantum algorithm into subroutines until the quantum algorithm is completely decomposed into the quantum circuit, and wherein each subroutine has parameters and a corresponding approximation error; wherein automatically performing the stepwise decomposition produces a set of approximation errors and a set of parameters to instantiate at least a subset of the quantum circuits corresponding to the quantum algorithm such that an overall approximation error resulting from automatically performing the stepwise decomposition is maintained below a specified threshold approximation error; and An optimization problem is used that minimizes a cost metric associated with implementing the quantum circuit while maintaining the overall approximation error below the specified threshold approximation error, wherein the optimization problem encodes conditions for satisfying the overall approximation error and conditions for minimizing the cost metric.

2. The method of claim 1, wherein each of the quantum circuits is a gate that can be implemented using a quantum processor.

3. The method of claim 1, wherein each of the quantum circuits is a fault-tolerant logic gate.

4. The method of claim 1, wherein each of the quantum circuits is implemented as a protection operation on encoded quantum data.

5. The method of claim 1, wherein the optimization problem is solved using a heuristic approach to selecting parameters of the quantum circuit.

6. The method of claim 5, wherein the optimization problem is solved by selecting a random initial assignment of approximation errors and parameters.

7. The method of claim 6, wherein the solution to the optimization problem is computed using simulated annealing.

8. A method for decomposing a quantum algorithm into a quantum circuit, the method comprising: automatically performing a step-by-step decomposition of the quantum algorithm using at least one processor, wherein performing the step-by-step decomposition comprises iteratively decomposing the quantum algorithm into subroutines and distributing an overall approximation error resulting from automatically performing the step-by-step decomposition into the subroutines until the quantum algorithm is completely decomposed into the quantum circuit, wherein each subroutine has parameters and a corresponding approximation error; and Using the at least one processor, using an optimization problem that minimizes a cost metric associated with implementing the quantum circuit while maintaining the overall approximation error below a specified threshold approximation error, wherein the optimization problem encodes conditions for satisfying the overall approximation error and conditions for minimizing the cost metric.

9. The method of claim 8, wherein each of the quantum circuits is implemented as a protection operation on encoded quantum data.

10. The method of claim 8, wherein minimizing the cost metric further comprises solving an optimization problem using a heuristic method to select parameters of the quantum circuit.

11. The method of claim 10, wherein the optimization problem is solved by selecting a random initial assignment of approximation errors and parameters.

12. A computer-readable medium comprising computer-executable instructions for a method comprising: using at least one processor, automatically performing a step-by-step decomposition of a quantum algorithm, wherein performing the step-by-step decomposition comprises iteratively decomposing the quantum algorithm into subroutines, and distributing an overall approximation error resulting from automatically performing the step-by-step decomposition into the subroutines until the quantum algorithm is fully decomposed into quantum circuits, wherein each subroutine has parameters and a corresponding approximation error, and wherein the step-by-step decomposition into the subroutines is accomplished via a quantum phase estimation (QPE) process; as well as Using the at least one processor, using an optimization problem that minimizes a cost metric associated with implementing the quantum circuit while maintaining the overall approximation error below a specified threshold approximation error, wherein the optimization problem encodes conditions for satisfying the overall approximation error and conditions for minimizing the cost metric.

13. The computer readable medium of claim 12, wherein the QPE process implements the time evolution of an Ising model in the transverse field.

14. The computer-readable medium of claim 12, wherein the QPE process is applied to the task of evolving a quantum mechanical system that is initialized in a given state for a specified total duration.

15. The computer-readable medium of claim 14, wherein the total duration is divided into sub-intervals.

16. The computer-readable medium of claim 15, wherein the total duration is divided into subintervals using a Trotter method or a Trotter-Suzuki method.

17. The computer-readable medium of claim 15, wherein the total duration is divided into sub-intervals using a Unitary Linear Combination (LCU) method.

18. The computer readable medium of claim 17, wherein the LCU method is implemented using a state preparation circuit.