Embodiments are generally related to the field of quantum computers. Embodiments are further related to the field of computational modeling. Embodiments are also related to the field of quantum computations. Embodiments are further related to quantum computation circuits for exponential and Gaussian functions.
Quantum computing represents the most promising frontier for a wide range of computational problems that even the most advanced “classical” computers cannot solve. Many industry leaders are investing heavily in quantum computing. One of the challenges associated with quantum computing is that coding for a quantum computer is very difficult and generally, not well understood.
The exponential and Gaussian functions are among the most fundamental and important computing operations, appearing ubiquitously throughout all areas of science, engineering, and mathematics. Whereas formally, it is well-known that any function may in principle be realized on a quantum computer, in practice present-day quantum solutions tend to be very numerically expensive.
For example, one of the best strategies for evaluating general functions, f(x), involves dividing the domain, x, into a collection of non-intersecting subdomains. The function can then be approximated using a separate d'th order polynomial for each subdomain. The above parallel strategy is general, conceptually elegant, and effective. However, in the words of those who developed the technique: “While these methods allow to reduce the Toffoli [gate] and qubit counts significantly, the resulting circuits are still quite expensive, especially in terms of the number of gates that are required.”
As such, there is a need in the art for a more efficient quantum based evaluation of functions, such as the exponential or gaussian function, as disclosed herein.
In one embodiment, the systems and methods disclosed herein are directed to new systems and processes for quantum evaluation. In certain embodiments, systems, and methods for evaluating exponential and Gaussian functions efficiently on quantum computers are disclosed. The implementations require a (generally) small number of multiplications, which represent the overall computational bottleneck. The disclosed embodiments are, in principle, equally applicable to noisy intermediate-scale quantum (NISQ) calculations with non-error-corrected quantum multiplications, as well as fault-tolerant calculations using error-corrected multiplications.
For example, in an embodiment, quantum logic is presented, which is designed specifically to evaluate exponential and Gaussian functions efficiently on quantum computers. These methods require a (generally) small number of multiplications. The disclosed embodiments are thus, in principle, equally applicable to NISQ calculations with non-error-corrected quantum multiplications, as well as fault-tolerant calculations using error-corrected multiplications. In all such contexts, the “total multiplication count” can be used as the appropriate gate complexity metric—although the “Toffoli count” metric, which is currently quite popular, is also of note.
The gate complexity for the disclosed embodiments is dramatically reduced as compared to other state-of-the art methods. Indeed, for a specific, realistic quantum computational chemistry (QCC) application, the Toffoli count of the exponential function is reduced from 15,690 down to 912, under the most favorable conditions for each method. For the corresponding Gaussian function comparison, the Toffoli count is reduced from 19,090 down to 704. Space requirements are also generally reduced, and by most measures, quite modest—to the extent that in one case, the above QCC application can be implemented with as few as approximately 20 logical qubits.
Although the disclosed embodiments can be applied to any applications where exponential and Gaussian functions are relevant, QCC—i.e., quantum chemistry on quantum computers is one noteworthy field of applicability (as is quantum finance). QCC has long been regarded as one of the first important scientific applications where quantum supremacy will likely be realized. Particularly for “first-quantized” or coordinate-grid-based QCC, it becomes necessary to evaluate functions over a (generally) uniformly-distributed set of discrete grid points exactly of the sort that emerges in fixed-point arithmetic, as used here.
The most natural function to arise in the QCC context is the inverse-square-root function, f(x)=x−1/2, which can be used to represent Coulombic interactions. Even for a “general function evaluator” quantum code, this specific case poses some special challenges associated with the singularity at x=0, that result in substantially increased computational expense. On the other hand, the alternative Cartesian-component separated (CCS) approach, replaces the inverse square root with a small set of Gaussians. Using the disclosed exponential/Gaussian evaluator, the CCS approach becomes a viable approach to first-quantized QCC.
As such, the disclosed embodiments, include basic quantum exponentiation techniques and evaluator circuits, and associated asymptotic scaling. In certain embodiments, a detailed explanation of various computational improvements leading to reduced gate and space complexity are disclosed, that will be of particular value for quantum computing. In particular, quantum circuits for two specific implementations are presented—one designed to minimize gate complexity, and the other, space complexity.
In an embodiment a system comprises a quantum circuit, the quantum circuit comprising: a plurality of an integer number of d control qubits, an output register configured to store a current function value, at least one multiplication block, and an input register comprising a plurality of input qubits wherein successive multiplications are performed, according to the at least one multiplication block, between the current function value and successive constants stored in the input register, in order to evaluate a function. In an embodiment, the output register further comprises: a plurality of an integer number n of qubits configured to store the current function value. In an embodiment, the function comprises an exponential function. In an embodiment, the plurality of control qubits serve as control for the multiplication at the multiplication block. In an embodiment, each successive constant is stored in an integer n number of input qubits in the input register. In an embodiment, the at least one multiplication block comprises an integer number of d multiplication blocks. In an embodiment, the system further comprises at least one transformation gate configured to transform each of the successive constants into the next successive constant before the next multiplication block. In an embodiment the system further comprises a current function value transformation gate used to initialize the current function value. In an embodiment, the system further comprises a quantum computer, an input module for entering function parameters, quantum storage, and an output module for outputting the evaluated function.
In another embodiment, a method for quantum exponentiation, comprises representing the value of a function with a plurality of qubits, initially assigning an output register a constant value, storing a plurality of exponent values in a plurality of n qubits, multiplying the initially assigned constant value with a first of the plurality of exponent values to reach an adjusted constant value, iterating the multiplication for each of the exponent values with the adjusted constant value, and storing all of the adjusted constant values in an output register representing the value of the function. In an embodiment, the method for quantum exponentiation further comprises controlling the multiplication with a control qubit. In an embodiment, of the method for quantum exponentiation the function comprises an exponential function. In an embodiment, the method comprises defining a domain with a domain interval as xmin′≤x′≤xmax′. In an embodiment, the domain is represented with a plurality of d qubits. In an embodiment, the multiplication for each of the exponent values is overwritten on an additional input register with the product of the multiplication of the exponent value and adjusted constant value.
In another embodiment, a non-overwriting quantum circuit comprises a first input register for storing a multiplier, a second input register for storing a multiplicand, an accumulator register, a plurality of cascading controlled addition blocks for summing inputs provided by the second input register and successively bit-shifted subsets of qubits from the accumulator register, a plurality of CNOT gates, and a domain qubit. In an embodiment, the accumulator register is initialized to zero and the accumulator register stores the product of the multiplier and multiplicand. In an embodiment, of the non-overwriting quantum circuit the controlled addition blocks use fixed-point arithmetic. In an embodiment, the non-overwriting quantum circuit of claim 16 further comprises a cascade of controlled bit-copy operations configured to set a final output of the accumulator register.
The accompanying figures, in which like reference numerals refer to identical or functionally-similar elements throughout the separate views and which are incorporated in and form a part of the specification, further illustrate the embodiments and, together with the detailed description, serve to explain the embodiments disclosed herein.
The particular values and configurations discussed in the following non-limiting examples can be varied, and are cited merely to illustrate one or more embodiments and are not intended to limit the scope thereof.
Example embodiments will now be described more fully hereinafter with reference to the accompanying drawings, in which illustrative embodiments are shown. The embodiments disclosed herein can be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the embodiments to those skilled in the art. Like numbers refer to like elements throughout.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. As used herein, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” and/or “comprising,” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
Throughout the specification and claims, terms may have nuanced meanings suggested or implied in context beyond an explicitly stated meaning. Likewise, the phrase “in one embodiment” as used herein does not necessarily refer to the same embodiment and the phrase “in another embodiment” as used herein does not necessarily refer to a different embodiment. It is intended, for example, that claimed subject matter include combinations of example embodiments in whole or in part.
In general, terminology may be understood at least in part from usage in context. For example, terms, such as “and,” “or,” or “and/or,” as used herein may include a variety of meanings that may depend at least in part upon the context in which such terms are used. Typically, “or” if used to associate a list, such as A, B or C, is intended to mean A, B, and C, here used in the inclusive sense, as well as A, B or C, here used in the exclusive sense. In addition, the term “one or more” as used herein, depending at least in part upon context, may be used to describe any feature, structure, or characteristic in a singular sense or may be used to describe combinations of features, structures, or characteristics in a plural sense. In addition, the term “based on” may be understood as not necessarily intended to convey an exclusive set of factors and may, instead, allow for existence of additional factors not necessarily expressly described, again, depending at least in part on context.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
A block diagram of a computer system 100 that executes programming for implementing parts of the methods and systems disclosed herein is shown in
Computer 110 may include, or have access to, a computing environment that includes input 116, output 118, and a communication connection 120. The computer may operate in a networked environment using a communication connection 120 to connect to one or more remote computers, remote sensors and/or controllers, detection devices, hand-held devices, multi-function devices (MFDs), speakers, mobile devices, tablet devices, mobile phones, Smartphone, or other such devices. The remote computer may also include a personal computer (PC), server, router, network PC, RFID enabled device, a peer device or other common network node, or the like. The communication connection may include a Local Area Network (LAN), a Wide Area Network (WAN), Bluetooth connection, or other networks. This functionality is described more fully in the description associated with
Output 118 is most commonly provided as a computer monitor, but may include any output device. Output 118 and/or input 116 may include a data collection apparatus associated with computer system 100. In addition, input 116, which commonly includes a computer keyboard and/or pointing device such as a computer mouse, computer track pad, or the like, allows a user to select and instruct computer system 100. A user interface can be provided using output 118 and input 116. Output 118 may function as a display for displaying data and information for a user, and for interactively displaying a graphical user interface (GUI) 130.
Note that the term “GUI” generally refers to a type of environment that represents programs, files, options, and so forth by means of graphically displayed icons, menus, and dialog boxes on a computer monitor screen. A user can interact with the GUI to select and activate such options by directly touching the screen and/or pointing and clicking with a user input device 116 such as, for example, a pointing device such as a mouse, and/or with a keyboard. A particular item can function in the same manner to the user in all applications because the GUI provides standard software routines (e.g., module 125) to handle these elements and report the user's actions. The GUI can further be used to display the electronic service image frames as discussed below.
Computer-readable instructions, for example, program module or node 125, which can be representative of other modules or nodes described herein, are stored on a computer-readable medium and are executable by the processing unit 102 of computer 110. Program module or node 125 may include a computer application. A hard drive, CD-ROM, RAM, Flash Memory, and a USB drive are just some examples of articles including a computer-readable medium.
In the depicted example, device 204, server 206, and clients 210, 212, and 214 connect to network 202 along with storage unit 208. Clients 210, 212, and 214 may be, for example, personal computers or network computers, handheld devices, mobile devices, tablet devices, smart phones, personal digital assistants, printing devices, recording devices, speakers, MFDs, etc. Computer system 100 depicted in
Computer system 100 can also be implemented as a server such as server 206, depending upon design considerations. In the depicted example, server 206 provides data such as boot files, operating system images, applications, and application updates to clients 210, 212, and/or 214. Clients 210, 212, and 214 and device 204 are clients to server 206 in this example. Network data-processing system 200 may include additional servers, clients, and other devices not shown. Specifically, clients may connect to any member of a network of servers, which provide equivalent content.
In the depicted example, network data-processing system 200 is the Internet, with network 202 representing a worldwide collection of networks and gateways that use the Transmission Control Protocol/Internet Protocol (TCP/IP) suite of protocols to communicate with one another. At the heart of the Internet is a backbone of high-speed data communication lines between major nodes or host computers consisting of thousands of commercial, government, educational, and other computer systems that route data and messages. Of course, network data-processing system 200 may also be implemented as a number of different types of networks such as, for example, an intranet, a local area network (LAN), or a wide area network (WAN).
Generally, program modules (e.g., module 125) can include, but are not limited to, routines, subroutines, software applications, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types and instructions. Moreover, those skilled in the art will appreciate that elements of the disclosed methods and systems may be practiced with other computer system configurations such as, for example, hand-held devices, mobile phones, smart phones, tablet devices multi-processor systems, microcontrollers, printers, copiers, fax machines, multi-function devices, data networks, microprocessor-based or programmable consumer electronics, networked personal computers, minicomputers, mainframe computers, servers, medical equipment, medical devices, and the like.
Note that the term “module” or “node” as utilized herein may refer to a collection of routines and data structures that perform a particular task or implements a particular abstract data type. Modules may be composed of two parts: an interface, which lists the constants, data types, variables, and routines that can be accessed by other modules or routines; and an implementation, which is typically private (accessible only to that module), and which includes source code that actually implements the routines in the module. The term module may also simply refer to an application such as a computer program designed to assist in the performance of a specific task such as word processing, accounting, inventory management, etc., or a hardware component designed to equivalently assist in the performance of a task.
The interface 315 (e.g., a graphical user interface 130) can serve to display results, whereupon a user 320 may supply additional inputs or terminate a particular session. In some embodiments, operating system 310 and GUI 130 can be implemented in the context of a “windows” system. It can be appreciated, of course, that other types of systems are possible. For example, rather than a traditional “windows” system, other operation systems such as, for example, a real-time operating system (RTOS) more commonly employed in wireless systems may also be employed with respect to operating system 310 and interface 315. The software application 305 can include, for example, module(s) 125, which can include instructions for carrying out steps or logical operations such as those shown and described herein.
The following description is presented with respect to embodiments of the present invention, which can be embodied in the context of, or require the use of, a data-processing system such as computer system 100, in conjunction with program module 125, and data-processing system 200 and network 202 depicted in
In order to illustrate the disclosed systems and methods consider the exponential function of equation (1):
f(x′)=exp(−αx′) (1)
As an exemplary case, the systems and methods disclosed herein are configured to evaluate the function over the domain interval, xmin′≤x′≤xmax′, using a quantum computer. Note that x′ and α are presumed to be real-valued. If a were pure imaginary, then equation (1) would be unitary, but that is not the case here. For purposes of explanation, and without loss of generality, we can restrict consideration to α>0. The negative α case corresponds to the above, but with x′→−x′, xmin′→−xmax′, and xmax′→−xmin′.
Both the domain and the range of equation (1) can be represented discretely, using a finite number of qubits. For generality, the number of domain qubits, d, is allowed to differ from the number of range qubits, n. In the first-quantized QCC context, for instance, the d<<n case arises very naturally (where ‘<<’ can represent a factor of 3 or 4). More specifically, something like 100 grid points are needed to accurately represent each domain degree of freedom, although the function values themselves require a precision of somewhere between, 6-10 digits. For purposes of explanation, the discussion herein focuses on the d<<n case, although the d=n special case is obviously also important, and will also be considered.
The d qubits used to represent the domain correspond to 2d distinct grid points, distributed uniformly across the x′ interval, with grid spacing Δ=2−d(xmax′−xmin′). Such representations are typical in quantum arithmetic, and imply fixed-point rather than floating-point implementations. Indeed, since fixed-point arithmetic is closely related to integer arithmetic, it is convenient to transform x′ to the unitless domain variable, given by equation (2):
such that the x grid points become integers, x={0, 1, . . . , 2d−1}. In terms of x, the function then can be represented as illustrated in equations (3) and (4) as:
f(x)=exp[−α(xmin′+Δx)]=CAx, where (3)
C=exp(−αx′min) and A=exp(−αΔ) (4)
Next, the following binary decomposition of the x integers is defined, in terms of the d individual qubits, xi, with 0≤i<d and xi={0,1}, in equation (5) as:
x=Σ
i=0
d-1
x
i2i (5)
Note that increasing i corresponds to larger powers of 2; thus, the binary expansion of the integer x would be xd-1 . . . x1 x0. Put another way, the lowest index values correspond to the rightmost, or least significant, digits in the binary expansion. This convention is adopted throughout. Substituting equation (5) into equation (3), gives equations (6) and (7) as follows:
f(x)=C(A2
A
i
=A
2
(7)
In this manner, exponentiation is replaced with a sequence of d multiplications. Note from Eq. (7) that A0=A. As additional notation, it is convenient to introduce the quantities C0≤i≤d, through the recursion relation Ci+1=Ci Aixi with C0=C. Thus, Cd=f(x), and the other Ci<d quantities represent partial products in equation (6).
In certain embodiments a quantum system 400 can include quantum hardware configured to interface with a classical computer such as computer system 100 as illustrated in
The quantum system 400 can include an input module 410 for inputting data. The quantum system 400 can also include an output module 415 wherein data representing one or more quantum solutions (e.g., solutions to an exponential or gaussian function, ground and/or excited state energy levels, eigenstate and time-evolved wavefunctions, correlation functions, etc.) can be presented.
The quantum system 400 can be configured such that some operations are controlled with a classical computer control system 435, or can be configured to perform certain operations in combination with a quantum computer 405 using quantum hardware, and/or can be configured to perform operations with a quantum computer 405 using quantum software. The quantum hardware may include components for performing quantum computation. For example, the quantum hardware can include a quantum control and a quantum system. It should be appreciated that the quantum control and quantum system can be embodied as any number of known quantum computing systems without departing from the scope of this disclosure.
The quantum system 400 can include one or more multi-level quantum data storage 420. The multi-level quantum data storage structures 420 can be referred to as qubits. The type of quantum computer that the quantum system 400 uses can be selected from a variety of known quantum computing systems which can include one or more resonators attached to one or more superconducting qubits, e.g., Gmon or Xmon qubits. In other cases, ion traps, nuclear or electron spin, photonic devices, topological anyons, or superconducting cavities can be used. In other embodiments quantum subsystems include fluxmon qubits, silicon quantum dots or phosphorus impurity qubits. The quantum computer can include quantum circuits. The quantum computer 405 can include a control module or device 425 used to control quantum logic gates 430 associated with the quantum system.
The quantum hardware can further be selected according to the type of qubits included in the quantum computer 405. For example, in some cases the control devices can include devices that control the frequencies of qubits included in the quantum computer 405, e.g., an excitation pulse generator and control lines that couple the qubits to the excitation pulse generator. The control devices can then cause the frequency of each qubit to be adjusted towards or away from a quantum gate frequency of an excitation pulse on a corresponding control driveline. The control devices can also include measurement devices such as readout resonators. Measurement results obtained via measurement devices can be provided to the classical processors for processing and analyzing.
The exponent of every Ai value in equation (6) being the qubit xi, is associated with the two states or values, 0 and 1. From a quantum computing perspective, therefore, this can be interpreted as an instruction: If xi=1, then multiply by Ai; otherwise, if xi=0, do nothing.
This lends itself to a simple and straightforward quantum algorithm for exponentiation, comprising nothing but a sequence of d controlled multiplications, as illustrated in the quantum circuit 500 in
It is noteworthy that, as illustrated in
According to the disclosed embodiments, the Ci values can be stored in the n-qubit output register 545 (register 530 on input), whereas the Ai are stored in d separate n-qubit input registers 535 (or 550 on output). Since 0<Ai<1 for all Ai, it is convenient to represent these constants using the following n-bit binary expansion given in equation (8):
y=Σ
j=0
n-1
y
j2−(n-j) (8)
Thus, the binary expansion of y becomes y=0.yn-1 . . . y1 y0 with the y0 bit least significant. This representation has a resolution of 2−n. Likewise, 0<Ci≤1 for all 0≤l≤d, provided xmin′≥0 (if not, there are simple remedies that can be applied, although these are not needed here). It is, therefore, convenient to adopt the equation (8) representation for the Ci as well as the A values. This outlines the basic quantum logic or quantum circuit 500 for evaluating the exponential function of equation (1).
It should be understood that in this embodiment registers 535 (or 550) are input registers for this entire circuit 500, and they are not overwritten. The same is true for the control qubits 536. In contrast, the input register 530 does get overwritten, and on output, becomes the result of the calculation 545.
For the Gaussian function, given by equation (9) as:
f(x′)=exp(−αx′2) (9)
The same quantum circuit is used, except that it is necessary to perform an additional multiplication, to obtain x2 from x. There are some specialized quantum squaring algorithms, that shave a bit off of the cost of a generic multiplication. If d<<n however, this savings is not significant; the cost of the extra multiplication itself is much less than the others since it involves only d rather than n qubits.
In terms of memory (i.e., space) usage, the embodiment illustrated above requires dn+n+d qubits in all—not including the ancilla bits needed to actually implement the multiplications (as further detailed herein). As mentioned, the computational cost is simply that of applying d multiplications. Given the tremendous variety of quantum multiplication methods, and given that some will always be better than others in different circumstances—the number of required multiplications may serve as the appropriate gate complexity metric. As such, multiplications comprise the overall computational bottleneck. Likewise, the Toffoli count provides another implementation-independent metric—when comparing circuits whose bottleneck is the Toffoli gate.
If absolute costs are difficult to compare directly between different methods, then the next best thing to consider is asymptotic scaling. In the disclosed embodiments, this is realized in terms of the parameters n and d. For the basic disclosed exponentiation method, the scaling with respect to d is clearly linear—both for the space and gate complexity. As for the scaling with respect to n, this is determined by the multiplication method itself.
One quantum multiplication method for asymptotically large n in terms of scaling appears is the recursive Karatsuba scheme. The so called Gidney method requires O(n) space complexity, so that the overall scaling for our basic exponentiation algorithm would be O(nd). Likewise, the gate complexity for a single multiplication scales as O(nlog
In other embodiments detailed herein, more precise estimates will be provided for absolute costs—e.g., in terms of Toffoli counts-presuming multiplication methods that can be practically applied in a QCC context. In additional embodiments, improvements upon the basic exponentiation method are presented where a more efficient and refined approach is provided, and in additional embodiments two specific implementations suitable for QCC calculations, or other applications, are presented.
At this point it is worthwhile to compare the two cases, d=n and d<<n. If the exponentiation operation is itself part of a more complicated mathematical function network, with many nested inputs and outputs, then presumably a generic d=n code is desirable, with n sufficiently large to provide “machine precision”—i.e., n≥25 or so for single precision, or n≥50 for double precision. The O(n2) space complexity of the basic exponentiation quantum circuit and associated method likely places such calculations beyond the limits of quantum hardware in the near future.
On the other hand, there are situations where d<<n, and where n itself may be substantially reduced. For first quantized QCC, for example, it is estimated that d=7 and n=21 may suffice to achieve the so-called “chemical accuracy” benchmark. Such values place the present embodiments much closer to the NISQ regime, especially those embodiments taking advantage of the refined embodiments further disclosed herein.
For reference, the true cost of the d<<n Gaussian function evaluation, within the present basic scope of the systems and methods disclosed herein, the x2 operation per se adds little to the direct cost, but does have the effect of squaring the size of the domain interval. Thus, if the full resolution of the domain is to be preserved, this requires 2d rather than d qubits—as well as a commensurate doubling of the gate complexity. On the other hand, this relative increase can often be largely mitigated by the improvements disclosed herein.
The basic system and method illustrated in
There are two distinct aspects of the disclosed methods and systems used to improve upon the embodiment illustrated in
The parameters Ai have constant values that can be determined prior to calculation. Rather than storing them in d separate registers, it is far less costly in terms of space to simply transform Ai→Ai+1, prior to each successive multiplication.
If overwriting multiplications are used, it then becomes necessary to maintain only two such n-qubit registers—i.e., register 605 to store all of the successive Ai values, and register 610 to store the (conditionally superposed) Ci values. The upper of the two 21-qubit registers 605 is used to store the Ai, with the transformation gate 615 X⊗p i(i+1) used to transform A into Ai+1. Similarly, we define transformation gates Xi⊗p to convert the zero state 0 into Ai (or vice-versa). For example, the gate 610 X0⊗p is used at the start of the circuit to initialize A0 from 0. Likewise, the lower 21-qubit register 610 is initialized to C from 0, using the transformation gate 625 Xc⊗p. Each successive multiplication operation 630 (conditionally) multiplies this value by another factor of Ai. In this manner, the total number of qubits is reduced to 2n+d, or 49 for the present example with QCC parameter values-again, not including the various ancilla bits (not indicated in
This embodiment emphasizes minimal space complexity at the cost of greater gate depth. Alternatively, using all d Ai registers as described herein, the multiplications could be performed synchronously and hierarchically, so as to minimize gate depth, but without any space reduction. In any event, the two exemplary QCC implementations discussed below are based on non-overwriting multiplications, for which the situation is a bit more complicated than in
Another aspect of the disclosed embodiments is the implementation of the transformation gates. Since the transformations always correspond to fixed input and output values, they can be implemented as a set of very specific NOT gates, applied to just those qubits for which the binary expansions of equation 8 differ between input and output values. Hence the notation, ‘X⊗p’, refers to the resultant tensor product of p≈n/2 NOT gates used to effect the transformation.
In
Further embodiments disclosed herein are aimed at reducing gate complexity. In the initial discussion that follows, it is convenient to reconsider the d=n case. Note that for both the basic quantum method and system of
The important realization here is that equation (7) implies a very rapid reduction in Ai with increasing i—essentially, as the exponential of an exponential. Consequently, there is no need to apply an explicit multiplication for any Ai whose value is smaller than the smallest value that can be represented numerically in the fixed-point representation—i.e., 2−n, according to equation (8). What is needed, therefore, is an expression for m in terms of A and n, where m is the smallest i such that Ai<2−n.
For the d=n case, the following equation 10 can be easily shown:
For the generic case where d and n are independent, more than d multiplications are never needed. So, equation (10) can be replaced with the general form, equation (11) as:
The number of multiplications m scales asymptotically as either O(d) or O(log n), rather than O(n), if A is fixed. This assumes, however, that d and A have no implicit dependence on n, which in turn depends on assumptions about how the x grid points are increased. If the xmin′≤x′<xmax domain interval is expanded keeping the same spacing Δ, or if Δ decreases but d is kept constant, then the above holds. Otherwise, A→1 as n→∞, and the prefactor becomes divergently large, implying a less favorable asymptotic scaling law.
Consider the case where d<n. Since m(A) as described by equation (10) increases monotonically with A, there is, in general, an interval 0<A<Amax over which m(A)<d, and so a reduction in the number of multiplications can be realized and m<d. Beyond this point—i.e., for Amax≤A<1, all m=d basic multiplications must be used. The following expression for the transition A value is given as equation (12):
A
max=2−
As an illustrative example, consider the exemplary values d=7, n=21, A=0.389. In this exemplary case, m=4 multiplications will be required, exactly as illustrated in
Finally, Amax can be computed from equation (12), which, with the above n and d values, is Amax=0.796571. Thus, a reduction in m down from d, over about 80% of the range of possible A values is achieved. Now consider the Gaussian rather than exponential function, for which d→2d=14. Here, Amax=0.998225—which implies that there is almost always a reduction in m.
Although the refinement disclosed above, can lead to fewer than d multiplications (depending on the values of n, d, and A), this does not imply that the refined quantum method/system simply ends at the right edge circuit 600 of
Consider that when x=2i is a power of two, then all but the xi binary expansion coefficients in equation (5) vanish, and the function value simply becomes f(x)=CAi, according to equation (6). This implies that for any x≥2m, f(x)<2−n is smaller than the minimum non-zero number that can be represented, and so should be replaced with f(x)=0. This situation will occur if any of the (d−m) qubits, xi≥m, are in their 1 states. Otherwise—i.e., if all (d−m) of the xi≥m are in their 0 states so that x<2m then nothing will happen, as the lowest register is already set to the correct output value, f(x)=Cm, at the right edge of circuit 600 in
The above can be implemented as a series of steps. First, for the case A≥Amax, no additional circuitry is needed; the quantum circuit 600 of
For the last case where (d−m)≥2, the quantum circuit illustrated in
Meanwhile, the upper of the two n-qubit registers, which starts out representing the constant value Am-1, is transformed to the value 0, using the transformation gate, X⊗p m−1. Finally, the upper and lower n-qubit registers undergo a controlled SWAP⊗n, applied in qubit-wise or tensor-product fashion, across all n qubits of the two registers. If the swap occurs, then the function output as represented by the lower of the two n-qubit registers becomes zero; otherwise, it is left alone.
Consideration of the reversible quantum OR gate, used in the quantum circuit 800 of
A reversible quantum OR gate 900 can be constructed from a single reversible NAND (Toffoli) gate 905, together with various NOT gates 910, as illustrated in
It is noteworthy that the disclosed embodiments rely on the “multiplication count” metric for gate complexity. Indeed, whereas current multiplication algorithms largely make use of integer or fixed-point arithmetic as considered here, floating-point algorithms-which have very different implementations—are also of interest going forward, especially for exponentiation. The multiplication count metric described here will continue to be relevant for all such innovations.
In certain embodiments, on the other hand, the two exemplary QCC implementations of the exponentiation circuit are used. In certain of those embodiments, a modified version of Ha{umlaut over (n)}er's multiplication subroutine, which is itself a fixed-point version of “schoolbook” integer multiplication, based on bit shifts and controlled additions can be used. In particular, they exploit truncated additions (that maintain n fixed bits of precision), together with a highly efficient overwriting, controlled, ripple-carry addition circuit that minimizes both space and gate complexities. As it happens, there are some further improvements and simplifications that arise naturally for the disclosed exponentiation context, which can be exploited.
One characteristic of Ha{umlaut over (n)}er multiplication is that it does not overwrite the multiplier input—the way, for example, that QFT multiplication would. Consequently, each successive multiplication requires additional ancilla bits, unlike what is presumed in
Of course, it would be possible to employ QFT-based multiplication in our exponentiation method—which would require 4n+d qubits, with ancilla included. On the other hand, the QFT approach is not Toffoli-based, and would therefore not lend itself to direct comparison with Ha{umlaut over (n)}er, vis-à-vis gate complexity. In order to estimate a Toffoli count for QFT multiplication, one would have to presume some specific implementation for the Toffoli gate itself (e.g., in terms of T gates), which is not ideal. In any event, Toffoli counts have become a standard gate complexity metric in quantum computing.
For these reasons, overwriting QFT-based multiplications are not considered further here. Instead, for cases where the increased space complexity of the non-overwriting multipliers might pose a problem, the situation is addressed through the use of a simple alternative method (the second QCC implementation) that trades increased gate complexity for reduced space complexity—essentially by uncomputing intermediate results. In principle, there are any number of “reversible pebbling strategies” that might also be applied towards this purpose. The particular approach adopted herein, though, is quite effective.
Non-overwriting controlled quantum multiplication is disclosed herein as an aspect of the disclosed embodiments. As discussed, non-overwriting controlled-addition multiplication subroutines have three registers. The first is an input register for the multiplier; the second is another input register for the multiplicand; the third is the output or “accumulator” register. The accumulator register is initialized to zero, and therefore serves as an ancilla register, but comes to store the product of the multiplier and multiplicand at the end of the calculation.
For integer multiplication, the accumulator register requires 2n qubits, assuming that both input registers are n qubits each. The first register (multiplier) provides the control qubits for a cascade of n controlled additions. The second register (multiplicand) serves as the first input for each controlled addition. The second input for each controlled addition is a successively bit-shifted subset of n+1 qubits from the accumulator register. Note that overwriting controlled additions are used, so that for each controlled addition, the second register output is the sum of the two inputs.
In the case of the disclosed exponentiation methods and systems, a version of the above basic scheme can be used that is modified in two very important ways. First, the i'th multiplication is controlled, via the domain qubit xi (as in
Thus, we no longer treat the multiplier Ai as an input register—for there is no longer a need to use the Ai qubits as control bits for the additions. Instead, the binary expansion of Ai from equation (8) is used to hard-wire what would be a set of uncontrolled additions, directly into the quantum circuit—but only for those binary expansion coefficients equal to 1. In addition to reducing the set of inputs by one entire n-bit register, this modification also reduces the number of additions that must be performed by a factor of two—since on average, only half of the expansion coefficients have the value 1.
In addition to the above advantages, fixed-multiplier multiplication of circuit 1000 in
This is illustrated in
From
Note that the smallest possible addition corresponds to s=2 rather than s=1. This is because the first controlled addition can be replaced with a cascade of Toffoli gates—or controlled bit-copy operations—which is a much more efficient implementation. This substitution works because the accumulator register z 1020 is set to zero initially. The very first controlled addition thus always (conditionally) adds the multiplicand register y 1025 to zero.
For the example as illustrated, the first four binary expansion coefficients for A (from right to left) are all zero; these bits are simply ignored. The first coefficient equal to one is the j=4 or fifth bit. As illustrated in
Although the last (j=20) bit is zero, even if it were equal to one, the corresponding controlled addition gate would extend only up to y1. Thus, the top wire 1030, y0, or least-significant bit of the multiplicand, is never used. This reflects the fact that both numbers being multiplied have values less than one, and that n fixed bits of precision are maintained throughout the calculation. Also note that, as a result, there are never any overflow errors.
The final part of the controlled multiplication circuit is a cascade of n controlled bit-copy operations (i.e., modified Toffoli gates 1035), which conditionally set the final output 1040 of the accumulator register 1020 equal to y, when x0=0 (hence the open circles). Otherwise, this register would remain zero. Thus, the “do nothing” instruction, does not literally mean “do nothing” when non-overwriting multiplications are used, as it is still necessary to copy the multiplicand input register to the accumulator output register.
In further embodiments, Quantum space saving alternatives for exponentiation are disclosed. Now that the specific, controlled quantum multiplication method and associated circuit has been identified, a precise estimate of space requirements for the overall exponentiation circuit is possible. As noted, each of the m multiplications requires a clean n-qubit ancilla bundle as input for its accumulator register, together with the (accumulator) output from the most recent multiplication as input for its multiplicand register. Thus, for m successive multiplications, m+1 separate registers would be required in all.
However, significant savings can be realized—i.e., one entire register of space, and one entire controlled multiplication subroutine—by exploiting the fact that the first multiplicand (i.e., C) is a fixed constant. The first controlled multiplication, ×0, is therefore a controlled multiplication of the constant C by the constant A0. Since both constants are fixed, the controlled multiplication can be much more efficiently realized using two controlled transformation gates acting on a single register (i.e., the first two gates 1105 shown in circuit 1100 in
Since Takahashi addition does not use additional ancilla qubits, the total number of qubits required to implement the m multiplications is just mn. In addition to this, we have the d qubits needed to store the domain register, x 1110, that is used to supply the control qubits 1115. The current qubit count is thus mn+d.
However, if m<d, then the second half of the refined exponentiation circuit (i.e.,
To reduce qubit counts in cases where equation (13) renders a calculation unfeasible, the “space-saving” alternative implementation can be used. The basis of this embodiment is to uncompute some of the intermediate quantities, in order to restore some of the ancilla registers to their initial clean state, so that they can then be reused for subsequent computations. Of course, this requires additional overhead—i.e., in our case, additional controlled multiplications.
More specifically, the space-saving method reduces space requirements from O(mn) down to O(m1/2n)—a very marked reduction, especially if m is reasonably large. The added cost in terms of gate complexity, on the other hand, is never more than double that of our original QCC implementation described above. Thus, m<mss<2m, with mss the multiplication count for the space-saving approach.
For values of m that lie in the range given by equation (14):
(Where r>2 is an integer), the space-saving method requires a total of r n-qubit registers to perform all multiplications. Note that the r>2 restriction implies that the method is only applicable for m>3. However, the m≤3 case presents minimal space requirements, and so the space-saving approach is less likely to be needed. In any event, for all numerical examples considered herein, (including the worst Gaussian cases), 3≤r≤5.
The total qubit count for the space-saving alternative algorithm can be shown to be given by equation (15) as follows:
Note that unlike the original non-space-saving or “gate-saving” method, a zero n-qubit ancilla register can always be made available for the final controlled SWAP⊗n operation of
The space-saving implementation can proceed as follows. First, apply the first r multiplications, exactly as for the earlier gate-saving approach. This leaves the r registers in the states, C1, C2, . . . , Cr. Then, uncompute all but the most recent multiplication (i.e., the one that provided Cr). The first (r−1) registers are thereby restored to zero, but the final register remains in the Cr state. It is then possible to perform (r−1) additional multiplications, before once again running out of registers. All but the last of these is then uncomputed, allowing (r−2) more multiplications 1130 to be performed, and so on.
The space-saving quantum circuit 1100 used for d=7 and m=4-6 is presented in
As is clear from the above description, and from
Then,
The following table indicates specific values for all m≤36. Note that the mss multiplication count includes both ×0 and ×0−1; thus, the total actual number of controlled multiplication subroutines that must be executed is (mss−2), as indicated in the final column.
From the table, it can also be observed that greater space savings are usually associated with increased multiplication counts, and vice-versa.
It should be noted in accordance with the discussion above, that for m<d space saving calculations, a zero ancilla register is automatically available at the end of the
The methods and systems disclosed herein allow the exponential function to be evaluated on quantum computers for the cost of a few multiplications. This basic functionality will continue to hold true, regardless of the many quantum hardware and software innovations that will come on the scene in ensuing decades.
While there are a plethora of multiplication algorithms available, both overwriting (e.g. QFT-based) and non-overwriting (e.g. controlled addition), and for both integer and fixed-point arithmetic, as well as new strategies for floating-point arithmetic, quantum error correction, etc., the disclosed embodiments provide implementation-independent “multiplication count” as the most sensible gate complexity metric, for any quantum algorithm whose dominant cost can be expressed in terms of multiplications. The present methods are certainly of this type.
According to the disclosed exponentiation strategy, the (controlled) multiplication count m will indeed be rather small in practice—at least for the applications envisioned. To begin with, in a great many simulation contexts, the domain resolution as expressed in total qubits d, is far less than the range resolution n—with m≤d. For QCC, for instance, the exemplary d=7 and d=8 values considered herein are likely to suffice in practice. Conversely, the asymptotically large n=d limit, in which it can be shown (in Eq. (10)) that m=O(log n) for fixed A. In this limit, Karatsuba multiplication provides better asymptotic scaling. Using the Gidney implementation, the Toffoli and qubit counts for exponentiation scale as O(nlog
The embodiments disclosed herein include two specific implementations of the general exponentiation methods and systems, suitable for QCC calculations but also more broadly, e.g. for quantum finance. When compared with certain prior art methods the disclosed implementations are found to reduce Toffoli counts by an order of magnitude or more. Qubit counts are also (generally) substantially reduced. Note that the disclosed embodiments are complementary, with one designed to favor gate and the other space resource needs. Together, they provide the flexibility needed to actually implement exponentiation on quantum computing architectures.
Finally, the present exponentiation methods and systems can be applied within the context in which they were originally conceived—i.e., quantum computational chemistry (QCC). The long-awaited QCC revolution may be nearly upon us, although achieving full quantum supremacy will likely require quantum platforms that can accommodate first-quantized methods. On classical computers, the Cartesian-component separated approach, as developed offers a highly competitive first-quantized strategy.
On quantum computers, the question appears to boil down to the relative costs of the exponential function vs. the inverse square root. Note that the larger-domain-interval calculations—i.e., those with lower Toffoli counts—are the more realistic in this context. This is because the QCC CCS implementation requires multiple exponentiations with different a values to be performed, across the same grid domain interval—which must accordingly be large enough to accommodate all of them. The disclosed exponentiation cost as compared to the cost of the inverse-square-root function, as applied using prior art methods, offers significant improvement.
The embodiments disclosed herein can aid in the pursuit of an important goal, namely, achieving “quantum advantage,” or useful calculations performed on a quantum computer that cannot be performed on classical computers without an inordinate amount of time or computational resources. This requires: (a) validation of the accuracy level (i.e. error bars) of quantum results; and (b) the ability to perform a similar calculation on a classical computer.
The disclosed embodiment can aid in the field of “quantum benchmarking”, offering reliably accurate benchmark data for extremely challenging computational applications of interest using quantum computing hardware and software. For example, the disclosed embodiments can be used to perform calculations whose scope far exceeds that of conventional classical methods.
Such calculations will benefit quantum computing both in the drive towards quantum advantage, and to reliably and accurately benchmark data in order to validate the accuracy of results. Second, the disclosed systems and methods can also be used to help provide accurate resource estimates for quantum calculations.
The disclosed embodiments can be applied to many different types of applications of current interest in quantum computing, including but not limited to: first- and second-quantized electronic structure; spin models and problems of various kinds; quantum dynamics; optimization; cryptography (factorization), and quantum finance.
The disclosed embodiments thus establish a new paradigm of information representation and processing that can ultimately provide better methods and algorithms for quantum computers.
Furthermore, the disclosed embodiments can be used to provide benchmarking services, with methods sufficiently accurate and reliable to be applied in other domains such as drug discovery and materials. Other fields where the current methods and system can be applied include 1) second-quantized quantum chemistry; 2) spin models; 3) periodic boundary conditions; 4) optimization; 5) factorization, etc.
In the long term, once quantum error correction becomes viable and fault-tolerant quantum computing is widespread, aspects of the embodiments can be used to push the limits of what can be done on quantum computers, particularly in the realm of quantum chemistry and quantum finance.
Based on the foregoing, it can be appreciated that a number of embodiments, preferred and alternative, are disclosed herein. In an embodiment a system comprises a quantum circuit, the quantum circuit comprising: a plurality of an integer number of d control qubits, an output register configured to store a current function value, at least one multiplication block, and an input register comprising a plurality of input qubits wherein successive multiplications are performed, according to the at least one multiplication block, between the current function value and successive constants stored in the input register, in order to evaluate a function. In an embodiment, the output register further comprises: a plurality of an integer number n of qubits configured to store the current function value. In an embodiment, the function comprises an exponential function.
In an embodiment, the plurality of control qubits serve as control for the multiplication at the multiplication block. In an embodiment, each successive constant is stored in an integer n number of input qubits in the input register. In an embodiment, the at least one multiplication block comprises an integer number of d multiplication blocks.
In an embodiment, the system further comprises at least one transformation gate configured to transform each of the successive constants into the next successive constant before the next multiplication block. In an embodiment the system further comprises a current function value transformation gate used to initialize the current function value. In an embodiment a parameter value transformation gate is used to initialize a current parameter value.
In an embodiment, the system further comprises a quantum computer, an input module for entering function parameters, quantum storage, and an output module for outputting the evaluated function.
In another embodiment a method for quantum exponentiation, comprises representing the value of a function with a plurality of qubits, initially assigning an output register a constant value, storing a plurality of parameter values in a plurality of n qubits, multiplying the initially assigned constant value with a first of the plurality of parameter values to reach an intermediate exponential value, iterating the multiplication for each of the exponent values with the adjusted constant parameter value, and storing the final value in an output register representing the value of the exponential function.
In an embodiment the method for quantum exponentiation further comprises controlling the multiplication with a control qubit.
In an embodiment, the method for quantum exponentiation the function comprises one of: an exponential function or a Gaussian function. In an embodiment, the method for quantum exponentiation further comprises defining a domain with a domain interval as xmin′≤x′≤xmax′. In an embodiment the domain is represented with a plurality of d qubits.
In an embodiment, of the method for quantum exponentiation the multiplication for each of the exponent values is overwritten on an additional input register with a product of the multiplication of the exponent value and adjusted constant value.
In another embodiment, a non-overwriting quantum circuit comprises a first input register for storing a multiplier, a second input register for storing a multiplicand, an accumulator register, a plurality of cascading controlled addition blocks for summing inputs provided by the second input register and successively bit-shifted subsets of qubits from the accumulator register, a plurality of CNOT gates, and a domain qubit.
In an embodiment, the accumulator register is initialized to zero and the accumulator register stores the product of the multiplier and multiplicand.
In an embodiment, of the non-overwriting quantum circuit the controlled addition blocks use fixed-point arithmetic.
In an embodiment, the non-overwriting quantum circuit of claim 16 further comprises a cascade of controlled bit-copy operations configured to set a final output of the accumulator register.
It should be appreciated that variations of the above-disclosed and other features and functions, or alternatives thereof, may be desirably combined into many other different systems or applications. It should be understood that various presently unforeseen or unanticipated alternatives, modifications, variations, or improvements therein may be subsequently made by those skilled in the art which are also intended to be encompassed by the following claims.
This application claims the priority and benefit under 35 U.S.C. § 119(e) of U.S. Provisional Patent Application Ser. No. 63/274,877 filed Nov. 2, 2021, entitled “METHODS AND SYSTEMS FOR QUANTUM COMPUTING.” U.S. Provisional Patent Application Ser. No. 63/274,877 is herein incorporated by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
63274877 | Nov 2021 | US |