Optimizer and optimization based on variational rotational landscape
An apparatus or system comprising at least one classical processor and/or at least one quantum processor configured to calculate a first cost of a predetermined cost function associated with both a predetermined optimization problem and a set of variables as parameters, and calculate the cost of the cost function a plurality of times running an optimization by applying gradient descent to a converted set of variables a plurality of times considering the most recent calculated cost of the cost function in each conversion of the set of variables.
1 . An apparatus or system configured to:
calculate a cost of a predetermined cost function, ƒ(x), associated with both a predetermined optimization problem and a set of variables as parameters, wherein the cost is calculated taking a predetermined set of the variables, x, associated with the predetermined optimization problem as parameters;
include the calculated cost in the set of the variables x; and
repeat the following N times:
define a first predetermined coordinate system with a set formed by the set of the variables x including the most recent calculated cost of the cost function ƒ(x), thereby obtaining a functional F[ƒ];
apply gradient descent to the functional F[ƒ], thereby obtaining an optimized functional F O [ƒ];
convert the optimized functional F O [ƒ] into a second predetermined coordinate system different from the first predetermined coordinate system, and provide the set of the variables x with values from the converted optimized functional F O [ƒ], thereby obtaining an updated set of the variables x U ; and
calculate the cost of the cost function ƒ(x) taking the updated set of the variables x U as parameters;
wherein the repetition takes place at least until a difference between the most recent cost of the cost function ƒ(x) and at least one previous cost of the cost function ƒ(x) is equal to or less than a predetermined convergence threshold;
wherein the apparatus or system is further configured to replace the set of the variables x by the updated set of the variables x U in at least all repetitions from the first to the N-th minus one, and in each said replacement or after each said replacement, replace the cost of the cost function ƒ(x) by the most recent calculated cost of the cost function ƒ(x) so that the set of the variables x includes the most recent calculated cost of the cost function ƒ(x); and
wherein N is a natural number greater than one.
2 . The apparatus or system of claim 1 , wherein the apparatus or system is further configured to either obtain the predetermined cost function from a computing device or a user input device or define the predetermined cost function based on data associated with the predetermined optimization problem.
3 . The apparatus or system of claim 1 , wherein the apparatus or system is further configured to obtain one or more variables of the set of the variables x from at least one or more sensors or one or more computing devices or both the one or more sensors and the one or more computing devices.
4 . The apparatus or system of claim 1 , wherein the apparatus or system is further configured to command actuation of one or more actuators based on one or more variables of the updated set of the variables x U after doing all the repetitions.
5 . The apparatus or system of claim 1 , wherein the first predetermined coordinate system is a hyperspherical coordinate system.
6 . The apparatus or system of claim 1 , wherein the second predetermined coordinate system is a Cartesian coordinate system.
7 . The apparatus or system of claim 1 , wherein the predetermined optimization problem is one of the following: cost function optimization in a machine learning algorithm; or solution of a combinatorial optimization problem; or
optimization in a factory line; or predictive maintenance in manufacturing; or
optimization of traffic of air or sea or road means of transportation; or optimization of an electric market; or finance portfolio optimization; or optimization of one or more cost functions in a computer vision system or a factory.
8 . The apparatus or system of claim 1 , wherein a target associated with the predetermined optimization problem includes one of the following: a computing device or system, a factory line or a machine thereof, a factory, means of transportation, an electric grid or network, or a wind farm.
9 . An apparatus or system configured to:
calculate a cost of a predetermined cost function, ƒ(x), associated with both a predetermined optimization problem and a set of variables as parameters, wherein the cost is calculated taking a predetermined set of the variables, x, associated with the predetermined optimization problem as parameters;
include the calculated cost in the set of the variables x;
repeat the following N times:
define a first rotation matrix such that there is a turning angle between each variable in the set of the variables x and the most recent calculated cost of the cost function ƒ(x) in a first predetermined reference frame;
apply the first rotation matrix to the set of the variables x so that it is moved to a second predetermined reference frame;
apply gradient descent to the cost function ƒ(x) with the set of the variables x in the second predetermined reference frame, thereby obtaining an optimized set of the variables x in the second predetermined reference frame;
apply a second rotation matrix to the optimized set of the variables x in the second predetermined reference frame thereby obtaining an optimized set of the variables x in the first predetermined reference frame, the second rotation matrix being an inverse of the first rotation matrix; and
calculate the cost of the cost function ƒ(x) in the first predetermined reference frame with the optimized set of the variables x in the first predetermined reference frame;
wherein the repetition takes place at least until a difference between the most recent cost of the cost function ƒ(x) and at least one previous cost of the cost function ƒ(x) is equal to or less than a predetermined convergence threshold; and
wherein the apparatus or system is further configured to replace the set of the variables x by the optimized set of the variables x in the first predetermined reference frame in at least all repetitions from the first to the N-th minus one, and in each said replacement or after each said replacement, replace the cost of the cost function ƒ(x) by the most recent calculated cost of the cost function ƒ(x) so that the set of the variables x includes the most recent calculated cost of the cost function ƒ(x); and
wherein N is a natural number greater than one.
10 . The apparatus or system of claim 9 , wherein the apparatus or system is further configured to: include, in the set of the variables x, the axis for each variable; and optimize, in one or more repetitions of all the repetitions, the axis of each variable that is in the set of the variables x; wherein the definition of the axis for each variable is based on the axis of each variable that is in the set of the variables x.
11 . The apparatus or system of claim 9 , wherein the apparatus or system is further configured to either obtain the predetermined cost function from a computing device or a user input device or define the predetermined cost function based on data associated with the predetermined optimization problem.
12 . The apparatus or system of claim 9 , wherein the apparatus or system is further configured to obtain one or more variables of the set of the variables x from at least one or more sensors or one or more computing devices or both the one or more sensors and the one or more computing devices.
13 . The apparatus or system of claim 9 , wherein the apparatus or system is further configured to command actuation of one or more actuators based on one or more variables of the updated set of the variables x U after doing all the repetitions.
14 . The apparatus or system of claim 9 , wherein the first predetermined coordinate system is a hyperspherical coordinate system.
15 . The apparatus or system of claim 9 , wherein the second predetermined coordinate system is a Cartesian coordinate system.
16 . The apparatus or system of claim 9 , wherein the predetermined optimization problem is one of the following: cost function optimization in a machine learning algorithm; or solution of a combinatorial optimization problem; or
optimization in a factory line; or predictive maintenance in manufacturing; or
optimization of traffic of air or sea or road means of transportation; or optimization of an electric market; or finance portfolio optimization; or optimization of one or more cost functions in a computer vision system or a factory.
17 . The apparatus or system of claim 9 , wherein a target associated with the predetermined optimization problem includes one of the following: a computing device or system, a factory line or a machine thereof, a factory, means of transportation, an electric grid or network, or a wind farm.
18 . A method for solving a predetermined optimization problem, the method being run in an apparatus or system in turn comprising at least one classical processor or at least one quantum processor or both the at least one classical processor and the at least one quantum processor, the method comprising:
calculating a cost of a predetermined cost function, ƒ(x), associated with both a predetermined optimization problem and a set of variables as parameters, wherein the cost is calculated taking a predetermined set of the variables, x, associated with the predetermined optimization problem as parameters;
including the calculated cost in the set of the variables x;
repeating the following N times:
defining a first predetermined coordinate system with a set formed by the predetermined cost function and the set of the variables x including the most recent calculated cost of the cost function ƒ(x), thereby obtaining a functional F[ƒ];
applying gradient descent to the functional F[ƒ], thereby obtaining an optimized functional F O [ƒ];
converting the optimized functional F 0 [ƒ] into a second predetermined coordinate system different from the first predetermined coordinate system, and providing the set of the variables x with values from the converted optimized functional F O [ƒ], thereby obtaining an updated set of the variables x U ; and
calculating the cost of the cost function ƒ(x) taking the updated set of the variables x U as parameters; and
replacing, at least in each repetition from the first to the N-th minus one, the set of the variables x by the updated set of the variables x U , and in each said replacement step or after each said replacement step, replacing the cost of the cost function ƒ(x) by the most recent calculated cost of the cost function ƒ(x) so that the set of the variables x includes the most recent calculated cost of the cost function ƒ(x); wherein the repeating step is repeated at least until a difference between the most recent cost of the cost function ƒ(x) and at least one previous cost of the cost function ƒ(x) is equal to or less than a predetermined convergence threshold; and wherein N is a natural number greater than one.
19 . The method of claim 18 , further comprising either obtaining the predetermined cost function from a computing device or a user input device or defining the predetermined cost function based on data associated with the predetermined optimization problem.
20 . The method of claim 18 , further comprising obtaining one or more variables of the set of the variables x from at least one or more sensors or one or more computing devices or both the one or more sensors and the one or more computing devices.