None
The present invention relates to methods and systems for optimization of multidimensional continuous functions.
A quantum algorithm for continuous optimization can be used to compute arbitrary series expansions such as but not limited to Fourier (harmonic) decompositions. It is known that Fourier analysis allows implementation a variety of tasks related to function calculus and thus the quantum algorithm can be used in, for example, the evaluation of multidimensional definite integrals, and solving systems of differential equations. Complex function calculation can solve different technical problems in science and engineering using quantum computers in a more efficient way than traditional classical methods.
U.S. Pat. No. 11,023,638 B2 (QC WARE Corp.) teaches a hybrid quantum-classical optimization technique for optimizing circuit parameters of discrete variational quantum algorithms. In a first stage, analytical tomography fittings are performed for a local cluster of the circuit parameters via sampling of the observable objective function at quadrature points in the circuit parameters. Optimization is used to determine the optimal circuit parameters within the cluster, with the other circuit parameters frozen. In a second stage, different clusters of circuit parameters are then optimized in “Jacobi sweeps” leading to a monotonically convergent fixed-point procedure. In a third stage, the iterative history of the fixed-point Jacobi procedure may be used to accelerate the convergence by applying Anderson acceleration/Pulay's direct inversion of the iterative subspace.
The aforementioned patent application U.S. Pat. No. '638 teaches the optimization of discrete functions. It is, however, one of the challenges with variational quantum algorithms is the optimization of continuous functions with continuous variables. However, technical problems in science and engineering are often modelled using continuous function and there is therefore a need to find methods for optimising this function.
Another challenge in the optimisation of function is that the currently available quantum computers have a limited number of qubits that can be used for such optimisation. There is therefore a need to efficiently use the few-qubit quantum computers currently available.
To this end, the present invention teaches a method and system for optimization of multidimensional continuous functions using a quantum processor (or a quantum simulation) with n qubits. The method comprising initialising quantum circuit parameters to set an initial guess of a function. A variational quantum circuit is run over n qubits of the quantum processor and the implementing a quantum state tomography function is implemented for the individual qubits to estimate qubit parameters of the function for each qubit and then estimating a vector of a continuous variable from the qubit parameters followed by estimating a value of the function and a gradient of the function at the point of the vector of the continuous variable. The previous steps can be iterated until optimization of the function.
The method and system of the present invention improves the optimisation of the multidimensional continuous functions by enabling the initializing of quantum circuit parameters to set an initial guess of the multidimensional continuous function in the continuous domain. This avoids the need to apply a discretization to the multidimensional continuous functions. The implementation of the quantum state tomography enhances accuracy and speed of quantum computations with a small number of qubits compared to prior art discretized approaches for the optimization of the multidimensional continuous functions.
The use of the variational quantum circuit set out in this document allows to minimize the value of the function. A cost function for example can be used to determine the minimum of the function and this allows to solve complex mathematical calculations.
The variables of the function are encoded in the degrees of freedom of the individual qubits. There are three degrees of freedom available for each individual qubit in a mixed state and thus 3*n continuous variables can be optimized using the variational quantum circuit of n qubits. 2*n continuous variables can be optimized for each qubit pure state having two degrees of freedom.
The method and system set out in this document can be applied to a variety of mathematical calculations using the quantum computer. For example, the method and system can be used to find the minimum of the function and to solve complex mathematical problems.
Examples include, but are not limited to, differential equations, series expansions, evaluating integrals, Fourier analysis, Taylor series expansion, integro-differential equations, vector and tensor fields, and non-linear differential equations.
The implementation of the quantum state tomography function of the individual qubits comprises the estimation of the qubit parameters of the function for each mixed-state qubit p or the qubit parameters for each pure-state qubit.
The implementing of the quantum state tomography function of the individual qubits may further comprise the encoding of the continuous variables of the function to the qubit parameters. Combining the encoding of the continuous variables of the function to the qubit parameters with quantum state tomography allows the optimization of the function of 3*n continuous variables.
In one aspect, the quantum circuit parameters are updated using a gradient descent. he optimization of the function is finding the minimum of the function. The finding the minimum of the function enables to compute complex series expansions.
In one aspect, the method may comprise entangled qubit states as initial guess.
The present invention also teaches a system for optimization of multidimensional continuous functions. The system comprises a variational quantum circuit and a quantum processor. The quantum processor is configured to initialize quantum circuit parameters to set initial guess of a function and to run a variational quantum circuit over n qubits.
The quantum processor can implement a quantum state tomography function of the individual qubits to estimate qubit parameters of the function for each qubit and estimate a vector of variables from the qubit parameters and to estimate a value of the function and a gradient of the function at the point of the variable. The quantum circuit parameters are updated by the quantum processor and, as noted above, the quantum processor is configured to iterate the quantum circuit parameters until optimization of the function.
In one aspect, the variational quantum circuit of the system of the invention may be implemented as a quantum gate computer.
In one aspect, the quantum state tomography function encodes the continuous variables of the function to the qubit parameters.
In one aspect, the variational quantum circuit may optimize the function with 3n continuous variables for n qubit mixed states.
In one aspect, the variational quantum circuit may optimize the function by finding the minimum of the function.
Universal quantum computers based on a quantum circuit model can handle mathematical analysis calculations for functions with continuous domains. The present document describes a variational quantum circuit in which a qubit is able to encode up to three continuous variables. The three continuous variables are, for example, two angles and one radius in the Bloch sphere. The combination of qubit encoding with quantum state tomography enables the variational quantum circuit of n qubits to optimize functions of up to 3n continuous variables in an analog way.
A quantum algorithm for continuous optimization can be used to compute arbitrary series expansions such as but not limited to Fourier (harmonic) decompositions. It is known that Fourier analysis allows to implement a variety of tasks related to function calculus and thus the quantum algorithm can be used in, for example, the evaluation of multidimensional definite integrals, and solving systems of differential equations. Complex function calculation can solve different technical problems in science and engineering using quantum computers in a more efficient way than traditional classical methods.
This document teaches a quantum optimization algorithm for mathematical analysis on NISQ processors. A quantum computer of 433 qubits, such as, but not limited to, the IBM-Q System Two, can use the quantum optimization algorithm described in this application to analyse 381-dimensional functions directly in the continuum. A simulation of the quantum optimization algorithms with quantum computational software demonstrates that the method and apparatus set out in this document are able to conduct the mathematical analysis at a processing time comparable to standard classical computational software. It would be expected that running the quantum optimisation algorithm on a true quantum processor (rather than a quantum simulation) will substantially speed up the processing time.
In a discrete optimization problem, which is the usual case addressed by quantum computing, the variables used in the objective function are discrete variables. In the quantum optimization algorithm described in this document, the variables employed in the objective function are continuous. The continuous variables are used by continuous and differentiable function for example. Continuous quantum optimization enables to solve problems in mathematical science and engineering, for example, in design of biomolecules, in financial portfolio optimization, and fluid dynamics.
For a more complete understanding of the present invention and the advantages thereof, reference is now made to the following description and the accompanying drawings, in which:
The present invention will now be described on the basis of the drawings. It will be
understood that the embodiments and aspects of the invention described herein are only examples and do not limit the protective scope of the claims in any way. The invention is defined by the claims and their equivalents. It will be understood that features of one aspect or embodiment of the invention can be combined with a feature of a different aspect or aspects and/or embodiments of the invention.
A graphics processing unit 35 for processing variable optimization and a field programmable gate array (FGPA) 40 for control logic can also be connected to the central processing unit 20. A quantum processor 50 (also termed quantum accelerator) is connected to the central processing unit 20. In an alternative embodiment, the quantum processor 50 is emulated on a classical processor.
In one implementation of the computing system 10, the quantum processor 50 can be a quantum gate system, such as one supplied by IBM-Q System One, but this is not limiting of the invention. The computing system 10 is connected to a computer network 60, such as the Internet. It will be appreciated that the computing system 10 of
The computer network 60 is accessed by a large number of devices 70 which can include personal computers, smartphones and/or tablets, but not limited to.
Two angular variables (θ, φ) can be expressed mathematically as follows: θ∈[0, π] and φ∈[0, 2π). The pure state |ψ of the qubit is given by the formula:
with {|0, |1} being the orthogonal computational basis of the Hilbert space.
Similarly, the mixed states p of the qubit corresponds to points in the interior of the Bloch sphere of
Mathematically, the mixed state p of the qubit is written as follows:
where I is a 2×2 identity matrix, n=(nx, ny, nz) is a three-dimensional vector of real components and {right arrow over (σ)}=(σx, σy, σz) is a three-dimensional vector of three Pauli matrices σx, σy, σz. In this notation, the qubit is in the pure state (e.g., on the surface of the Bloch sphere) if |{right arrow over (n)}|=1, where the vector is given by {right arrow over (n)}=r*(sin θ cos φ, sin θ sin φ, cos θ) in spherical coordinates, so that the mixed state ρ is expressed by: ρ=|ψψ|. The qubit is in the mixed state ρ when |{right arrow over (n)}|<1, so that {right arrow over (n)}=r*(sin θ cos φ, sin θ sin φ, cos θ), with r<1 being the radial coordinate of a point inside the Bloch sphere.
The way to encode continuous variables in the degrees of freedom of the quantum computer 50 will be explained herein.
Mathematically, the problem can be expressed as follows. Let that f({right arrow over (x)}) denote a real scalar function of m real continuous variables {right arrow over (x)}=(x1, x2, . . . , xm). The domain of each continuous variable xa is Da⊆ for all a=1, 2, . . . , m. All the derivations can be directly translated to more complex scenarios, as, for example, real and complex vector and tensor fields and complex variables.
The statement of the problem is to find the minimum of the function
To codify the continuous variable (xa, xβ, xy) of the function f({right arrow over (x)}), the continuous variables (xa, xβ, xy) are used in the encoding as set out above with reference to
The continuous function variables (xa, xβ, xy) are mapped to the continuous qubit parameters [θ, φ, r] with a corresponding embedding of the continuous domains Da, Dβ, Dy. In this way, up to three continuous variables (xa, xβ, xy) per the mixed-state qubit p can be encoded. Similarly, if the qubit is in the pure state, the radius r=1 and up to two continuous variables per pure-state qubit can be encoded.
Optimization Algorithm.
The encoding of the continuous variables (xa, xβ, xy) of the function f({right arrow over (x)}) occurs in the degrees of freedom of the individual qubits. The variational quantum circuit U({right arrow over (ω)}) of the n qubits can be used to optimize the function f({right arrow over (x)}) of up to m=3n continuous variables (xa, xβ, xy) for the mixed qubit states ρ. Similarly, the functions f({right arrow over (x)}) can be optimized up to 2n variables for the pure qubit states.
The variational quantum circuit U({right arrow over (ω)}) with a set of variational circuit parameters {right arrow over (ω)} also termed quantum circuit parameters {right arrow over (ω)}. The idea is to estimate the qubit parameters [{right arrow over (θ)}, {right arrow over (φ)}, {right arrow over (r)}] for all of the qubits via single-qubit tomography function and therefore to obtain the value of the continuous function variables {right arrow over (x)}. Quantum tomography function or quantum state tomography is the process by which a quantum state is reconstructed using measurements on an ensemble of identical quantum states.
The source of these states may be any device or system which prepares quantum states either consistently into quantum pure states or otherwise into general mixed states. When the function f({right arrow over (x)}) and function's gradient {right arrow over (∀)}f({right arrow over (x)}) are estimated, the quantum circuit parameters {right arrow over (ω)} can be updated via, for example, a conjugate gradient.
The method of the variational continuous optimization is outlined in
In step S410, the variational quantum circuit U({right arrow over (ω)}) is run over the n qubits.
In step S420, the quantum state tomography function of the individual qubits is implemented to estimate the qubit parameters [θ, φ, r] of the function f({right arrow over (x)}) for the each of the mixed-state qubits ρ. In one non-limiting example, the quantum state tomography function is also implemented to estimate the qubit parameters [θ, φ] of the function f({right arrow over (x)}) for each pure state qubit.
The quantum state tomography used in step S420 can be one of a single-qubit quantum state tomography or a multi-qubit quantum state tomography.
An example will illustrate this point. Let us suppose that there is an entangled state of N qubits, and this will enable representation of 2*2N-1 real continuous variables (xa, xβ, xy) for the entangled state of N qubits. In other words, the number of continuous variables which can be encoded depends on the number N of qubits available in the system.
The continuous variables (xa, xβ, xy) are then encoded to the qubit parameters [θ, φ, r] in step S420 as explained below. This multi-qubit quantum state tomography improves representation power. However, it will be appreciated that the representation power will be more complex to read out the qubit parameters [θ, φ, r] from the N qubits using the multiqubit quantum state tomography, as the read-out will involve making measurements acting simultaneously on the N qubits.
Step S420 may further comprise the encoding of the continuous variables (xa, xβ, xy) to the qubit parameters [θ, φ, r] of the mixed state qubits ρ. This means that the quantum state produced by the variational quantum circuit U{right arrow over ((ω))} is a multi-qubit entangled state, whereas the encoding in the pure state qubits produces a separable non-entangled state.
In step S430, a vector of variables {right arrow over (x)} is estimated from the qubit parameters [θ, φ, r].
In step S440, a value of the function f({right arrow over (x)}) and the function's gradient {right arrow over (∀)}f({right arrow over (x)}) are estimated at the point of the variable {right arrow over (x)}.
In step S450, the quantum circuit parameters {right arrow over (ω)} are updated. The quantum circuit parameters {right arrow over (ω)} are updated using gradient descent {right arrow over (∀)}f({right arrow over (x)}) method, for example, although this is not limiting of the invention and gradient-free methods can be used for the quantum circuit parameters {right arrow over (ω)} update.
In step S460, the previous steps from S410 to S450 are iterated until optimization of the function f({right arrow over (x)}). In a non-limiting example of the invention, the optimization of the function f({right arrow over (x)}) comprises finding the minimum of the function f({right arrow over (x)}).
The idea of the method set out in this document is to encode the continuous function variables (xa, xβ, xy) into the qubit parameters [θ, φ, r] and determine these qubit parameters via the single-qubit quantum state tomography. The continuous function variables (xa, xβ, xy), i.e., continuous states of individual qubits, are determined in the method described in this document without relying on a discrete set of individual qubit states.
The initial guess |ψ in step S400 can be chosen from either entangled states or product states. For example, an educated tensor network (TN) can be efficiently prepared on the quantum processor 50 (as a matrix product state) to generate the initial guess |ψ.
In one non-limiting example, the educated tensor network can be run using a classical tensor network simulation algorithm. The resulting matrix product state obtained from the classical tensor network simulation algorithm can be used as the initial guess |ψ of the quantum computer 50. In another aspect, a random product state can also be used as the initial guess |ψ of the quantum computer 50 in step S400.
The variational quantum circuit U{right arrow over ((ω))} subsequently adds or removes entanglement on top of the quantum processor 50. Such initial TN state could be, the outcome, or even an intermediate-step state, of a TN optimization algorithm.
Applications. The method and the system described in this document can be used to solve a variety of problems in mathematical analysis using the quantum processor 50.
Series expansions. A series expansion is an expansion of a function into a series or infinite sum. In science and engineering, the series expansions are a way to express and approximate the functions via truncation of the series, allowing to compute and approximate further, more complex calculations. An example of the series expansion are Fourier series in mathematics and engineering, as well as Taylor expansions.
Suppose that f({right arrow over (x)}) is a scalar function of m real variables, xa∈ f a=1, 2, . . . , m. A generic series expansion is given by
where the functions gl({circumflex over (x)}) are an orthogonal basis of the vector space of the functions in the domain D of variable {right arrow over (x)} with respect to a weight function w({right arrow over (x)}), e.g.,
g
l
, g′
l
=∫Dw({right arrow over (x)})g*l({right arrow over (x)})gl′{right arrow over ((x))}d{right arrow over (x)}=δu′
and coefficients ci are given by the scalar product
c
l=∫Dw({right arrow over (w)})g*l({right arrow over (x)})f{right arrow over ((x))}d{right arrow over (x)}
Approximations to the function f{right arrow over ((x))} can be implemented by truncating the series expansion with following function:
Keeping the first K terms in the series, and where the error is usually quantified with upper bounds. A more refined approximation to this function is computation of the optimal coefficients when involving only K terms in the expansion. This is the solution to the optimization problem
where the quadratic distance is minimized with respect to the product gl, gl′ as described before. {right arrow over (x)}≡(c0, c1, . . . , cK-1) is then defined as a vector of coefficients.
Given that computing the above integral may cumbersome, an approximation with
good accuracy can be applied by discretising the integral using a Riemann sum
where {right arrow over (x)}μ are M points in the domain D. The solution to this problem is equivalent to optimization of the squared distance:
This equation directly solves the optimization problem. The coefficients cl of an optimal truncated expansion are then better computed directly by solving the corresponding optimization problem for the coefficients ci. The coefficients ci can be computed straightforwardly using the quantum optimization algorithm described by the present document.
Fourier analysis. The Fourier analysis is a particular example of the series expansions described above. For example, a one-variable function of period 2L will be defined by the expression:
The last approximation involves a total of K Fourier modes. If the function is not periodic, then 2L is the size of the domain D for which the expansion is to be found. Similarly, the Fourier expansion can be expressed in terms of trigonometric function:
Following the method set out previously, the coefficients cl, al and bl can be found by solving the continuous optimization problem. This can be done using the continuous quantum optimization algorithm described herein, allowing then to implement Fourier analysis directly in an analog way on the quantum processor 50. This procedure can be extended to multidimensional functions following same instructions.
Integrals. The calculation of complicated integrals can be implemented using Fourier analysis. Let I(a, b) be the integral to be computed:
This is formula that can be used for approximating the integral when the coefficients cl are known.
Differential equations and systems. Transforms and series expansion are one of ways to solve differential equations, as well as systems of such types of equations. For the case of the linear differential equation:
a
0(x)f(x)+a1(x)f′(x)+. . . +an(x)fn(x)=b(x)
where a0(x), . . . , an(x) and b(x) are some functions and f(x), . . . , fn(x) are the derivatives of the function f with respect to the variable x. The solution to this problem is one that minimizes the functional
for every point x. The differential equation can then be solved by further expanding a0(x), . . . , an(x) and b(x) into Fourier series. After aggregating all exponential terms in the resulting sum, it the form: results in an expansion of
with gl({right arrow over (c)}) are known function of coefficients ĉ arranged in vector notation. Because of the orthogonality of exponentials, minimizing the above approximated functional over ĉ amounts to solve the set of minimization problems
with the constraints corresponding to boundary conditions as Lagrange multipliers.
As a solution of the above set of minimizations an approximated solution to the original differential equation is obtained in the form of a Fourier expansion. This procedure can be generalized to more complicated situations, such as multidimensional functions with partial differential equations, vector, and tensor fields, non-linear differential equations, systems of partial differential equations, integro-differential equations, and more.
The method of the present invention as described above allows one to solve a variety of technical problems in science and engineering more efficiently than with classical resources, using few-qubit quantum computers that are presently available. Non-limiting examples are computational fluid dynamics, system simulation, optimal control of machines in factories and predictive maintenance. Navier Stokes equations, Maxwell equations for electromagnetic fields, Lagrange equations for calculation of forces in structures are further non limiting examples of the solutions of technical problems provided by the described method and apparatus. Further non-limiting example is the optimization of the control of factories based on functions that depend on continuous parameters such as, for example, angles, speeds, forces or temperatures.
The foregoing description of the preferred embodiment of the invention has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed, and modifications and variations are possible in light of the above teachings or may be acquired from practice of the invention. The embodiment was chosen and described in order to explain the principles of the invention and its practical application to enable one skilled in the art to utilize the invention in various embodiments as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the claims appended hereto and their equivalents. The entirety of each of the aforementioned documents is incorporated by reference herein.