Calculation device, calculation program, recording medium, and calculation method
A parallel update algorithm using separable Hamiltonian equations and the symplectic Euler method addresses the inefficiencies of existing methods for large-scale optimization problems, achieving faster and more accurate solutions for combinatorial optimization problems like the Ising problem.
Patent Information
- Application Number
- JP2023171040
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-10-02
- Publication Date
- 2024-08-20
- Estimated Expiration
- 2038-02-23
AI Technical Summary
Existing methods for solving large-scale optimization problems, such as the Ising problem, are inefficient and require significant computational resources, particularly due to the need for sequential update algorithms that are not suitable for parallel computation.
A computing device and method that employs a parallel update algorithm using separable Hamiltonian equations, specifically the symplectic Euler method, to update variables in a manner that reduces computational load and allows for high-speed calculation of optimization problems, particularly combinatorial optimization problems like the Ising problem.
The proposed method significantly speeds up the calculation of large-scale optimization problems, such as the Ising problem, by reducing the amount of calculation required and enabling parallel computation, resulting in more accurate solutions in less time compared to existing methods like simulated annealing and coherent Ising machines.
Smart Images

Figure 0007536980000016 
Figure 0007536980000024 
Figure 0007536980000020
Abstract
Description
[Technical field]
[0001] The present invention relates to a computing device, a computing system, a computing program, a recording medium, and a computing method. [Background technology]
[0002] Optimization problems arise in various social issues. One example of an optimization problem is the Ising problem. There is a need to solve large-scale optimization problems quickly. [Prior art documents] [Non-patent literature]
[0003] [Non-Patent Document 1] T. Inagaki et al., Science 354, 603 (2016). [Non-Patent Document 2] H. Goto, Sci. Rep. 6, 21686 (2016). [Non-Patent Document 3] Y. Haribara et al., Quantum Sci. Technol. 2, 044002 (2017). Summary of the Invention [Problem to be solved by the invention]
[0004] The embodiments of the present invention provide a calculation device, a calculation program, a recording medium, and a calculation method capable of calculating an optimization problem at high speed. [Means for solving the problem]
[0005] According to an embodiment of the present invention, a computing device includes a processing unit that repeats a processing procedure, the processing procedure including a first variable update and a second variable update, the first variable update being an ith (i is an integer between 1 and N, and N is an integer between 2 and 3) first variable x before the first variable update. i Add the first function to the i-th first variable x iThe i-th first variable x i is one of the first variable set {x}. The variable of the first function is the i-th second variable y i The i-th second variable y i is one of the second variable group {y}. The second variable update is performed by updating the i-th second variable y i The second variable y i The variable of the second function is the i-th first variable x i The variables of the third function include at least a part of a first parameter group {J} and at least a part of the first variable group {x}. The processing unit at least i , and the i-th first variable x obtained after the iteration of the procedure i Output at least one of the functions. [Brief description of the drawings]
[0006] [Figure 1] FIG. 1 is a schematic diagram illustrating an example of a computing device according to an embodiment. [Diagram 2] 1 is a flowchart illustrating the operation of a computing device according to an embodiment. [Diagram 3] 1 is a flowchart illustrating a part of the operation of a computing device according to an embodiment. [Figure 4] 1 is a flowchart illustrating a part of the operation of a computing device according to an embodiment. [Diagram 5] 1 is a flowchart illustrating a part of the operation of a computing device according to an embodiment. [Figure 6] 1 is a flowchart illustrating a part of the operation of a computing device according to an embodiment. [Figure 7] 1 is a flowchart illustrating a part of the operation of a computing device according to an embodiment. [Figure 8] 1 is a flowchart illustrating a part of the operation of a computing device according to an embodiment. [Figure 9]1 is a flowchart illustrating a part of the operation of a computing device according to an embodiment. [Figure 10] 1 is a flowchart illustrating a part of the operation of a computing device according to an embodiment. [Figure 11] FIG. 1 is a schematic diagram illustrating an example of a computing device according to an embodiment. [Figure 12] 11 is a graph illustrating the characteristics of a calculation according to an embodiment. [Figure 13] 11 is a graph illustrating a calculation result. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0007] Hereinafter, embodiments of the present invention will be described with reference to the drawings. In this specification and each drawing, elements similar to those described above with reference to the previous drawings are given the same reference numerals and detailed descriptions thereof will be omitted as appropriate.
[0008] (First embodiment) FIG. 1 is a schematic diagram illustrating an example of a computing device according to an embodiment. As shown in FIG. 1, a computing device 110 according to this embodiment includes, for example, a processing unit 20 and a storage unit 10. The processing unit 20 includes, for example, a CPU (Central Processing Unit) and the like. The processing unit 20 includes, for example, an electronic circuit and the like. The storage unit 10 is capable of storing various data. The storage unit 10 is, for example, a memory unit. The storage unit 10 includes a ROM (Read Only Memory) and RA. M( The computing device 110 may include at least one of a memory, a storage device, a memory controller, a memory array, a storage device ...
[0009] In this example, the computing device 110 is provided with an acquisition unit 31. The acquisition unit 31 can obtain, for example, various data. The acquisition unit 31 includes, for example, an I / O port. The acquisition unit 31 may have a function of an output unit. The acquisition unit 31 may have, for example, a communication function.
[0010] As shown in FIG. 1, the computing device 110 may include an operation unit 32 and a display unit 33. The operation unit 32 is, for example, a device having an operation function (for example, a keyboard). D , a mouse, a touch-type input panel, or a voice recognition input device). The display unit 33 may include various types of displays.
[0011] The elements included in the computing device 110 can communicate with each other by at least one of wireless and wired methods. The elements included in the computing device 110 may be provided in different locations. For example, a general-purpose computer may be used as the computing device 110. For example, multiple computers connected to each other may be used as the computing device 110. A dedicated circuit may be used as at least a part of the computing device 110 (for example, the processing unit 20 and the storage unit 10, etc.). For example, multiple circuits connected to each other may be used as the computing device 110.
[0012] Examples of elements that may be included in computing device 110 are described below.
[0013] An example of the operations performed by the computing device 110 according to the embodiment will be described below.
[0014] FIG. 2 is a flowchart illustrating the operation of the computing device according to the embodiment. As shown in Fig. 2, parameters are set (step S201). The parameters include, for example, a first parameter group {J}. The parameters may further include, for example, a second parameter group {h}. Examples of these parameters will be described later.
[0015] A plurality of variables are set (step S202). The variables include, for example, a first variable group {x} and a second variable group {y}. In step S202, the variables are initialized to appropriate values. An example of the initialization will be described later.
[0016] A calculation (e.g., updating) of a plurality of variables is performed (step S210). For example, the time evolution of a plurality of variables is calculated. For example, a first variable set {x} is updated, and a second variable set {y} is updated. These calculations are repeated until a predetermined condition (described later) is satisfied. Step S210 is, for example, a subroutine.
[0017] After the subroutine (updating the variables), for example, a function is calculated (step S220). For example, a function of at least one element included in the first variable set {x} is calculated. In one example, the function is the sign of at least one element included in the first variable set {x}.
[0018] This function is output (step S230). For example, in one example, the code of at least one element included in the first variable set {x} is output. In step S230, at least one element included in the updated first variable set {x} may be output. In this case, step S220 may be omitted.
[0019] In an embodiment, in the calculation of the multiple variables (step S210), for example, the first variable set {x} is updated using the second variable set {y}. Then, the second variable set {y} is updated using the first variable set {x}. These updates are performed multiple times. In one example, in one of the multiple updates, the first variable set {x} is updated before the second variable set {y} is updated. In another example, in one of the multiple updates, for example, the first variable set {x} is updated after the second variable set {y} is updated.
[0020] The calculation device 110 can quickly calculate an optimization problem. The optimization problem is, for example, a combinatorial optimization problem (for example, a discrete optimization problem). For example, a large-scale Ising problem can be quickly solved.
[0021] The Ising problem will now be described as an example of the calculations performed by the calculation device 110.
[0022] For example, the Ising energy E Ising is expressed by the following first equation.
[0023]
number
[0024] Regarding the above formula 1, a classical model of a quantum bifurcation machine (hereinafter, referred to as a classical bifurcation machine) has been proposed. In the classical bifurcation machine, the equations of motion are given by the following formulas 2 to 4.
[0025]
number
number
number
[0026] In the above equations 2 to 4, when p(t) is increased from zero to a sufficiently large value, "x i The sign of the final value of "±1" is the optimal solution (ground state) Ising spin "s i"a(t)" is a parameter that increases with "p(t)". "a(t)" is expressed, for example, by the following fifth equation.
number
[0027] The classical bifurcation machine above can be regarded as a Hamiltonian dynamical system with “H” as the Hamiltonian in the second to fourth equations.
[0028] On the other hand, simulated annealing is known. This method employs a sequential update algorithm. In the sequential update algorithm, multiple spins are updated one by one. This type of sequential update algorithm is not suitable for parallel computing.
[0029] In response to this, it is possible to solve the equations of motion of the classical bifurcation machine using a digital computer with a discrete solution method. This algorithm is a parallel update algorithm, unlike simulated annealing. In a parallel update algorithm, multiple variables can be updated simultaneously. Therefore, it is expected that parallel calculations will lead to faster processing.
[0030] The approach using the above equations 2 to 5 is thought to have the following problems. Calculations using matrix J, which has the largest computational complexity, are required to update both the first variable x and the second variable y. The above equation of motion cannot be easily solved numerically, so for example, a discrete solution method with a large computational complexity (such as the fourth-order Runge-Kutta method) is required.
[0031] In contrast to this, in the embodiment, instead of the simultaneous ordinary differential equations shown in the second to fourth equations, for example, the simultaneous ordinary differential equations shown in the following sixth to eighth equations are used.
[0032]
number
number
number
[0033] The multiplication and accumulation operation for the matrix J, which requires the largest amount of calculation, is performed only to update the second variable y, and not to update the first variable x. Therefore, the amount of calculation is reduced. In these equations, the time differential of the first variable x includes the second variable y. For example, the time differential of the first variable x does not include the first variable x. The time differential of the second variable y includes the first variable x. For example, the time differential of the second variable y does not include the second variable y. In the Hamiltonian, x and y are separated from each other. Therefore, a discrete solution method with a small amount of calculation and stability can be applied. For example, a method called the symplectic Euler method can be applied. In the above equations 6 to 8, "p" is eliminated from the time differential of "x".
[0034] When using such a method, high performance (e.g., high accuracy) can be maintained. R It has been found that. In the computing device according to the embodiment, the equation of motion of the Hamiltonian dynamical system (new classical bifurcation machine) having the above-mentioned separable Hamiltonian is solved by, for example, the symplectic Euler method. The computing device according to the embodiment is configured to perform the calculation of such a new algorithm as fast as possible by parallel calculation.
[0035] In an embodiment, for example, the first variable x i The sign of the final value ("±1") is the optimal solution (ground state) Ising spin s iIt becomes.
[0036] For example, the first variable x i Reach and the second variable y i are initialized to appropriate values in variable setting (step S202). For example, these variables are randomly initialized by random numbers whose absolute values are 0.1 or less.
[0037] Below, some examples of step S210 (see FIG. 2) will be described.
[0038] FIG. 3 is a flowchart illustrating a part of the operation of the computing device according to the embodiment. FIG. 3 illustrates step S210. The formulas shown in FIG. 3 are examples. As shown in FIG. 3, "t", "p" and "a" are initialized (step S101). In one example, "t", "p" and "a" are set to 0. "T" corresponds to the final value of time t. "dt" is the increment of time t per step. "dp" is the increment of parameter p per step.
[0039] When "t" is smaller than "T", a loop process (repeating the procedure) including a series of processes described below is performed (step S105). For example, the loop process may be performed when "p" is smaller than "P" that is appropriately set in advance.
[0040] The first variable x of the i-th i For example, the first variable x before the update is i dt*D*y i The value obtained by adding i Here, "*" is the symbol for multiplication.
[0041] i-th second variable y iis updated (step S120). In this example, an update based on the first variable set {x} (step S121) and an update based on the first parameter {J} and the first variable set {x} (step S122) are performed. The order of steps S121 and S122 can be interchanged. At least a part of step S121 and at least a part of step S122 may be performed simultaneously. Step S121 corresponds to, for example, a first sub-update. Step S122 corresponds to a second sub-update.
[0042] In the first sub-update, for example, the second variable y before the update i dt*[(pDx i *x i )*x i -c*h i *a] is added to the updated second variable y i Let us assume that.
[0043] In the second sub-update, for example, the second variable y before the update i dt*c*Σ(J i,j *x j ) and the updated value of the second variable y i "Σ" represents the sum with respect to j. For example, "dt*c*J" may be the J matrix. In this case, it is not necessary to actually perform the calculation of "dt*c*".
[0044] A parameter change process for updating is performed (step S130). That is, the value obtained by adding "dt" to "t" before the update is set as "t" after the update. The value obtained by adding "dp" to "p" before the update is set as "t" after the update. 「p "a" is, for example, p 1 / 2 It is.
[0045] Then, when "t" is smaller than "T", the process returns to step S105 (step S106). For example, the process may return to step S105 when "p" is smaller than "P" that is appropriately set in advance.
[0046] If "t" is equal to or greater than "T", the update ends and the process proceeds to step S220 or step S230 shown in FIG.
[0047] FIG. 4 is a flowchart illustrating a part of the operation of the computing device according to the embodiment. Fig. 4 illustrates step S210. In the example illustrated in Fig. 4, in one iterative process, step S120 is performed before step S110. In this manner, the order of steps S110 and S120 is arbitrary.
[0048] In one example, "K" is 1. For example, "N", "D", "c", "T", "dt", and "dp" can be preset to appropriate values.
[0049] In the examples of FIG. 3 and FIG. 4, a linear increase is applied in updating “p”. In the embodiment, any increasing function may be used in updating “p”. In the embodiment, as described above, there are two kinds of update methods. That is, in one update method, the first variable x i After the update, the updated first variable x i Using the second variable y i Another method is to update the second variable y i After updating, the updated second variable y i Using the first variable x i These two methods correspond to Fig. 3 and Fig. 4, respectively.
[0050] In this manner, in the computing device 110 according to this embodiment, the processing unit 20 (see FIG. 1) repeats the process procedure (step S210: see FIG. 2). This process procedure includes, for example, a first variable update (step S110) and a second variable update (step S120).
[0051] The first variable update is the first variable x of the i-th (i is an integer between 1 and N, and N is an integer between 2 and 3) variable before the first variable update. i Add the first function to the i-th first variable x i This includes updating the i-th first variable xi is one of the first set of variables {x}. The variable of the first function is the i-th second variable y i Contains the i-th second variable y i is one of the second set of variables {y}.
[0052] The second variable update is the i-th second variable y before the second variable update. i Add the second and third functions to the i-th second variable y i The variables of the second function are the i-th first variable x i The variables of the third function include at least a portion of the first parameter set {J} and at least a portion of the first variable set {x}.
[0053] Then, the processing unit 20 calculates the i-th first variable x obtained after repeating the above processing procedure. i , and the i-th first variable x obtained after repeating the procedure i For example, at least one of an arbitrary first variable included in the first variable set {x} and a function of an arbitrary first variable obtained after repeating the processing procedure is output. For example, at least one of all first variables included in the first variable set {x} and a function of all first variables obtained after repeating the processing procedure may be output.
[0054] In an embodiment, the first function above is independent of a first set of variables {x}. Changing the values of the first set of variables {x} does not change the value of the result of the first function. The second function above is independent of a second set of variables {y}. Changing the values of the second set of variables {y} does not change the value of the result of the second function. The third function above is independent of a second set of variables {y}. Changing the values of the second set of variables {y} does not change the value of the result of the third function.
[0055] The first function is, for example, dt*D*y i (See FIG. 3 for example.) The second function is, for example, dt*[(pDx i *x i )*x i -c*h i*a] (see, for example, Figure 3). The third function is, for example, dt*c*Σ(J i,j *x j ) (see, for example, FIG. 3).
[0056] In an embodiment, in one of the above-mentioned processing procedures that are repeatedly performed, the second variable update may be performed after the first variable update, or the first variable update may be performed after the second variable update.
[0057] Algorithms executed by the computing device according to the embodiment include, for example, the following: For example, a matrix J (one example of the first parameter group {J}) is obtained. Alternatively, the matrix J is determined by calculation. The matrix J is, for example, a parameter of the Ising model. At this time, a vector h (one example of the second parameter group {h}) may be further obtained. Alternatively, the vector h may be determined by calculation. Two types of variables (a first variable group {x} and a second variable group {y}) are used. When updating one variable, the value of the other variable is used. When updating one variable, the value of that one variable is not used. After updating one variable, the updated value of that one variable is used to update the other.
[0058] The second function above includes a fourth function, which is, for example, a nonlinear function of the i-th first variable xi. The fourth function also includes a calculation parameter "p". "p" changes with the update of the two types of variables.
[0059] When "p" changes along with the update of the two types of variables, the number of real roots of the fourth function changes. The "real root of a function" refers to the value (real number) of the variable at which the value of the function becomes zero. When only the fourth function is considered in the update of the second variable, the real root of the fourth function corresponds to a fixed point of the nonlinear dynamical system. (In a Hamiltonian dynamical system, the fixed point corresponds to an extreme value of the Hamiltonian.) Therefore, a change in the number of real roots of the fourth function corresponds to a change in the number of fixed points. This corresponds to the bifurcation phenomenon of the nonlinear dynamical system. In the algorithm used in the computing device according to the embodiment, the initial value of the variable is set to the vicinity of one initial stable fixed point. Bifurcation occurs by changing "p". A correspondence is established between multiple stable fixed points after bifurcation (the value of the variable changes to the vicinity of one of the multiple stable fixed points) and the discrete variables of the combinatorial optimization to be solved. This allows the combinatorial optimization problem to be solved by the bifurcation phenomenon. For example, in the above example, the value of each x at the stable fixed point after bifurcation is a binary value, positive or negative, and the sign is associated with the Ising spin (discrete variable of the Ising problem). Since the initial stable fixed point is the origin, the initial value of each x and the initial value of each y are set to values near the origin (i.e., small random numbers with absolute values of 0.1 or less).
[0060] The fourth function is, for example, dt*(p-D'-xi*xi)*xi. "D'" is an appropriate constant that satisfies 0≦D'≦D. At the initial time, p=0, and the fourth function has only one root, xi=0. 、 When p is greater than D', there are three roots, and the two roots, the positive and negative, correspond to the Ising spin. If the second function is, for example, dt*[(pD-xi*xi)*xi-c*hi*a], the second function can be expressed as the sum of a fourth function and a linear function, such as dt*(p-D'-xi*xi)*xi+dt*[-(D-D')*xi-c*hi*a]. Therefore, the second function includes the fourth function.
[0061] The fourth function is, for example, a cubic function. This type of processing makes the calculation easier than a calculation using a nonlinear function (for example, a sigmoid function) used in a neural network.
[0062] In an embodiment, increasing the time step (e.g., "dt") makes the calculation faster. On the other hand, making the time step too large makes the calculation unstable. Taking this into consideration, the time step may be increased in one part of the calculation and decreased in another part of the calculation. For example, a large time step may be applied to updates including multiplication and accumulation of the matrix J and the first variable x, which require a large amount of calculation. A small time step may be applied to other updates. This allows for further speedup.
[0063] An example of such a calculation will be described below. FIG. 5 is a flowchart illustrating a part of the operation of the computing device according to the embodiment. FIG. 5 illustrates step S210. In the example shown in FIG. 5, a small loop (steps S107a to S107b) is provided in one loop (steps S105 to S106). In step S107a, loop variable "m" is 1 or more and M or less. In the small loop, steps S110 and S121 are repeated M times. The order of steps S110 and S121 can be interchanged. After this, the process proceeds to step S122.
[0064] In the example of FIG. 5, step S122 is performed after steps S110 and S121 are repeated.
[0065] FIG. 6 is a flowchart illustrating a part of the operation of the computing device according to the embodiment. FIG. 6 illustrates step S210. In the example shown in FIG. 6, a small loop (steps S107c to S107d) is provided in one loop (steps S105 to S106). In step S107a, loop variable "m" is 1 to M. After step S122 is performed, the small loop (repetition of steps S121 and S110) is performed. In the small loop, steps S121 and S110 are repeated M times. The order of steps S121 and S110 can be reversed.
[0066] In the example in Figure 5, the first variable x i After updating the second variable y i In the example of Figure 6, the second variable y i After updating, the first variable x i For example, the time step "dt'" of an update that does not include a multiply-and-accumulate operation for matrix J is set to "dt / M". On the other hand, in one update (large loop) that includes a multiply-and-accumulate operation for matrix J, M small loops (updates that do not include a multiply-and-accumulate operation for matrix J) are performed. As a result of the above, for example, the time step dt of the large loop can be made a relatively large value. For example, high-speed calculations become possible.
[0067] Thus, in one example of the embodiment, the above second variable update (step S120) includes a first sub-update (step S121) and a second sub-update (step S122).
[0068] The first sub-update (step S121) is a step of updating the i-th second variable y i Add the second function to the i-th second variable y i The second sub-update (step S122) includes updating the i-th second variable y i Add the third function to the i-th second variable y i Again, the second function is independent of the second set of variables {y}. The third function is independent of the second set of variables {y}.
[0069] For example, the first variable update and the first sub-update are alternately performed M times (M is an integer equal to or greater than 1), and then the second sub-update is performed. Or, after the second sub-update, the first variable update and the first sub-update are alternately performed M times. The order in which the first variable update and the first sub-update are alternately performed can be changed.
[0070] The third function includes, for example, a multiply-and-accumulate operation between at least a portion of the first parameter group {J} and at least a portion of the first variable group {x}.
[0071] In one example, the number of real roots of the fourth function after repeating the above procedure is 2 or more. One of the roots of the fourth function after repeating the procedure is positive. Another of the roots of the fourth function after repeating the procedure is negative. The processing unit 20 (see FIG. 1 ) may, for example, calculate the i-th first variable x obtained after repeating the procedure. i Outputs the sign of (i.e. ±1).
[0072] As already explained, the second function is the i-th second parameter h i The i-th second parameter h i is one of the second set of parameters {h}.
[0073] In the embodiment, the processing unit 20 reads out data stored in the storage unit 10, updates the data, and causes the storage unit 10 to store the updated data.
[0074] For example, the first variable update (step S110) is performed by updating the i-th first variable x i is obtained from the storage unit 10, and the i-th first variable x after the first variable update is obtained. i The second variable update (step S120) includes causing the i-th second variable y i is obtained from the storage unit 10, and the i-th second variable y i The above includes holding the above in the holding portion 10.
[0075] For example, the first variable update is the i-th second variable yi is obtained from the holding unit 10, the first function is calculated, and the i-th first variable x i Add the first function to the i-th first variable x i For example, the second variable update may further include updating the i-th No. 1 variable x i from the storage unit 10 to calculate a second function, and at least a part of the first parameter group {J} and at least a part of the first variable group {x} are obtained from the storage unit 10 to calculate a third function, No. Two variables y i Add the second and third functions to the i-th second variable y i This may further include updating the
[0076] In the embodiment, for example, when the matrix J is a sparse matrix, a compressed format of the sparse matrix may be used. For example, the COO (coordinate) format or the CSR (compressed sparse row) format can be applied as the compressed format of the sparse matrix. For example, the memory size can be saved by using the compressed format of the sparse matrix. For example, the multiplication and accumulation operation of the matrix J and the first variable x can be performed at high speed by using the compressed format of the sparse matrix.
[0077] An example of the constant "c" will be described below. For example, the detuning "D" is set to be larger than c times the maximum eigenvalue λmax of the matrix J (see, for example, Non-Patent Document 2). If "D" is too large, unnecessary calculation time will occur. For this reason, for example, "D" is set to be substantially equal to c times λmax. In this case, c=D / λmax. On the other hand, in one example, the matrix J is a real symmetric matrix. In this case, the row column If the size of J is large enough, λmax is 2σ×N 1 / 2 This relationship is based on Wigner's semicircle law for random matrices. "σ" is the standard deviation of the off-diagonal elements of the matrix J. In this case, c=D / (2σ×N 1 / 2 ) It is recommended to set it as follows. A calculation example for this case will be described later.
[0078] In this embodiment, a method for improving accuracy is to change the function used as the nonlinear function. For example, the following functions of Equation 9 and Equation 10 may be used.
[0079]
number
number
[0080] The above algorithms implemented by the computing device 110 according to the embodiment can be implemented by various configurations. The computing device 110 may include, for example, a PC cluster. The computing device 110 may include, for example, a Graphics Processing Unit (GPU). The computing device 110 may include, for example, a dedicated circuit. The dedicated circuit may include, for example, at least one of a field-programmable gate array (FPGA), a gate array, and an application specific integrated circuit (ASIC). The computing device 110 may include, for example, a parallel digital computing device.
[0081] 7 to 10 are flowcharts illustrating a part of the operation of the computing device according to the embodiment. These figures show another example of step S210. As shown in these figures, in the examples of Figures 3 to 6, steps S110 and S121 may be interchanged.
[0082] FIG. 11 is a schematic diagram illustrating an example of a computing device according to an embodiment. As shown in FIG. 11, a computing device 111 according to the embodiment includes a plurality of circuits (such as a first circuit 15A, a second circuit 15B, and a third circuit 15C). Each of the plurality of circuits is, for example, a single computer. Each of the plurality of circuits may be, for example, a single semiconductor circuit. The plurality of circuits are capable of communicating with each other (for example, transmitting and receiving data). The computing device 111 is further provided with a control circuit unit 15X. The control circuit unit 15X controls communication in the plurality of circuits.
[0083] For example, each of the circuits is provided with a processing unit and a holding unit (storage unit). In addition, a control unit may be provided.
[0084] Parallel calculations are performed by a plurality of circuits (such as a first circuit 15A, a second circuit 15B, and a third circuit 15C). The number of the plurality of circuits is arbitrary.
[0085] For example, the first circuit 15A is provided with a first calculation unit 20A and a first holding area 10A. In this example, the first circuit 15A further includes a first control unit 16A. The second circuit 15B is provided with a second calculation unit 20B and a second holding area 10B. In this example, the second circuit 15B further includes a second control unit 16B. Such a configuration is also provided in the third circuit 15C.
[0086] The processing unit 20 includes the above-mentioned multiple calculation units (such as the first calculation unit 20A and the second calculation unit 20B). For example, the first calculation unit 20A performs a part of the calculation of the third function. The second calculation unit 20B performs another part of the calculation of the third function. At least some of these calculations are performed in parallel. For example, at least some of the execution of the part of the calculation of the third function in the first calculation unit 20A and at least some of the execution of the other part of the calculation of the third function in the second calculation unit 20B are performed simultaneously. Parallel calculation can speed up the calculation. The calculation amount of the third function is large. Therefore, parallelizing the calculation of the third function effectively speeds up the calculation.
[0087] In parallel calculation, for example, the first calculation unit 20A stores a part of the first parameter set {J} required to perform a part of the calculation of the third function in the first holding area 10A. In this way, the storage and processing required for a part of the calculation of the third function are performed in the first circuit 15A. Meanwhile, the second calculation unit 20B stores another part of the first parameter set {J} required to perform another part of the calculation of the third function in the second holding area 10B. In this way, the storage and processing required for the other part of the calculation of the third function are performed in the second circuit 15B.
[0088] For example, the first parameter set {J} includes a first calculation used portion and a second calculation used portion. The first calculation used portion is used in part of the calculation of the third function. The second calculation used portion is used in another part of the calculation of the third function. The first calculation unit 20A stores the first calculation used portion in the first holding area 10A. The second calculation unit 20B stores the second calculation used portion in the second holding area 10B.
[0089] In an embodiment, the i-th and j-th ("j" is different from "i") first variable updates and first sub-updates (updates by the second function) may be calculated in parallel. In this case, the processing unit 20 may be provided with a third calculation unit 20C and a fourth calculation unit 20D. The third calculation unit 20C is provided in the first circuit 15A. The fourth calculation unit 20D is provided in the second circuit 15B. These calculation units are functional blocks. The processing performed by at least a part of the third calculation unit 20C may be performed by at least a part of the first calculation unit 20A. The processing performed by at least a part of the fourth calculation unit 20D may be performed by at least a part of the second calculation unit 20B.
[0090] For example, the third calculation unit 20C performs a part of the calculation of the first variable update and a part of the calculation of the second function (first sub-update). The fourth calculation unit 20D performs another part of the calculation of the first variable update and another part of the calculation of the second function (first sub-update).
[0091] As already explained, the first variable update is the i-th first variable x before the first variable update. iAdd the first function to the i-th first variable x i Similarly, the first variable update includes updating the jth (j is different from i and is an integer between 1 and N) first variable x j Add the first function to the jth first variable x j where the j-th first variable x j is one of the first set of variables {x}. The variable of the first function is the jth second variable y j The jth second variable y j is one of the second set of variables {y}.
[0092] For example, part of the calculation for updating the first variable is the i-th first variable x i Another part of the calculation of the first variable update is the calculation of the update of the j-th first variable x j Includes calculation of updates.
[0093] On the other hand, part of the calculation of the second function is the i-th first variable x i Another part of the calculation of the second function involves the calculation of the j-th first variable x j This involves the calculation of a second function that contains as a variable.
[0094] At least a part of the calculation of the first variable update and a part of the calculation of the second function (first sub-update) in the third calculation unit 20C and at least a part of the calculation of another part of the first variable update and a part of the calculation of the second function (first sub-update) in the fourth calculation unit 20D may be performed simultaneously. Such parallel calculation allows high-speed calculation. You can do that.
[0095] A calculation example of the calculation device according to the embodiment will be described below. In the following calculation example, the calculation time does not include the time for setting parameters. The calculation time corresponds to the time required to solve the differential equation after the parameters are set.
[0096] In the first calculation example, the calculation is performed by a PC cluster. In the first calculation example, variables and parameters are treated as "float" (32-bit floating-point real number). The number of calculation cores is "Q". "Q" is a divisor of N. Let L=N / Q.
[0097] MPI (Message Passing Interface) is used to calculate the above algorithm in parallel on a PC cluster. MPI corresponds to distributed memory parallel calculation. In MPI, each of multiple calculation cores processes one combination of L first divided variables (x) and L second divided variables (y).
[0098] For example, the i-th computing core is {x n |n=(i-1)L+1, …, iL}, and {y n |n=(i-1)L+1, …, iL} and perform these updates.
[0099] The i-th computing core is n |n=(i-1)L+1, …, iL}, and {J m,n |m=(i-1)L+1, …, iL;n=1…N} can also be held. n |n=(i-1)L+1, …, iL}, and {J m,n |m=(i-1)L+1, …, iL;n=1…N} is {y n |n=(i-1)L+1, …, iL}.
[0100] For example, {y n For each update of |n=(i-1)L+1, …, iL}, n |n =1 , …, N} are used. For example, the Allgather function uses {x n Information of {n=1, …, N} is supplied to all the computing cores. In other words, the information (data) is shared.
[0101] In the embodiment, communication is performed between the multiple computing cores. In other words, data is transmitted and received. In this communication, {y n |n=(i-1)L+1, …, iL}, and {J m,n No communication is required regarding |m=(i-1)L+1, ..., iL;n=1...N}.
[0102] For example, a method can be considered in which, without communication regarding the first variable set {x}, the multiplication and accumulation operations of the first parameter set {J} and the first variable set {x} are divided and performed in parallel, and the results are communicated to update the second variable set {y}. In this method, the multiplication and accumulation operations of the first parameter set {J} and the first variable set {x} are divided and performed.
[0103] Below, calculation examples will be described for the case where N=2000 (first calculation example) and the case where N=100000 (second calculation example).
[0104] As the first calculation example (when N=2000), 2000 We will explain a calculation example of the "K 2000 The problem is a fully coupled Ising model with N=2000. The off-diagonal elements of matrix J are either ±1. The elements of vector h are all zero. Therefore, no calculation is performed for terms that include vector h. In this case, the standard deviation σ of the off-diagonal elements of matrix J is 1. Therefore, let us define "c" as c0=D / (2N 1 / 2 ) to set it to "K 2000 The actual maximum eigenvalue of matrix J in the problem is 88.813324. On the other hand, the theoretical value in random matrix theory is 2σN 1 / 2 =89.442719, and these values are very close to each other.
[0105] In the first calculation example described below, Q=25, dp*(T / dt)=D=2, and T=50.
[0106] In the embodiment, when M=1 and dt=0.25, the calculation time is 7.6 ms. The average value of 100 Ising energies obtained at this time is approximately -66086. This value converted into the "cut number" (see Equation 11, Equation 12, and Non-Patent Document 1) is 32523. A large "cut number" corresponds to high accuracy.
[0107] In the embodiment, when M=5 and dt=0.5, the calculation time is 4.1 ms. The average value of 100 Ising energies obtained at this time is approximately -66137. This value is converted to the "number of cuts" to be 32549. "dt" when M=5 can be twice as long as "dt" when M=1. The calculation time when M=5 is approximately half that when M=1. High-speed calculation is possible.
[0108] On the other hand, according to Non-Patent Document 1, in a coherent Ising machine, the average value of 100 "cut numbers" in 5 ms (see Non-Patent Document 1) is 32457. On the other hand, according to Non-Patent Document 1, in simulated annealing, the average value of 100 "cut numbers" in 50 ms is 32314. In this way, the calculation according to the embodiment can obtain a more accurate solution in a shorter time than the coherent Ising machine and simulated annealing.
[0109] FIG. 12 is a graph illustrating the characteristics of a calculation according to an embodiment. FIG. 12 shows an example of the relationship between the "number of cuts" obtained by calculation and "c." The vertical axis of FIG. 12 is "c / c0." As already explained, c0=D / (2N 1 / 2 12 is the number of cuts Nmc. The number of cuts Nmc is expressed by the following formulas 11 and 12.
[0110]
number
[0111]
number
[0112] As shown in Figure 12, "c / c0 "but A large cut number Nmc can be obtained when Nmc is about 1 or more and about 1.5 or less.
[0113] A second calculation example (when N=100000) will be described below. In the second calculation example, the off-diagonal elements of the matrix J and the elements of the vector h are set by "random numbers". The "random numbers" are set uniformly to values between -1 and 1. In this case, the standard deviation σ of the off-diagonal elements of the matrix J is 1 / (3 1 / 2 ) Therefore, c=3 1 / 2 D / (2N 1 / 2 ) for the other parameters. Q=1250, dp*(T / dt)=D=2, T=50, dt=0.5, and M=5.
[0114] FIG. 13 is a graph illustrating the calculation results. FIG. 13 shows a result of a second calculation example in the calculation according to the embodiment and a result of a second calculation example in the calculation according to the reference example. The horizontal axis of FIG. 13 is the calculation time Tc (seconds). The vertical axis is the average value Vave of the Ising energy calculated 100 times. FIG. 13 shows a calculation result 110E according to the embodiment and a calculation result 119R of the reference example. In these calculation examples, the number of calculation cores is 1250.
[0115] In the calculation result 110E according to the embodiment, "n" indicates the value of "n" in Equation 10 when the nonlinear function of Equation 10 is used. In the calculation result 110E, the curve without "n" corresponds to the case where Equation 7 is used.
[0116] In the calculation result 119R of the reference example, calculations are performed by simulated annealing. In the simulated annealing, the energy change due to the spin inversion is calculated in parallel by MPI. In these calculations, the inverse temperature is increased linearly. The increase rates are different from each other in the multiple curves of the calculation result 119R of the reference example.
[0117] As can be seen from FIG. 13, in the calculation result 110E according to the embodiment, the final average value Vave is low (the absolute value is large). In contrast, in the calculation result of the reference example, the final average value Vave is not sufficiently low (the absolute value is not sufficiently large). Thus, in the embodiment, a calculation result with high accuracy is obtained. According to the embodiment, the calculation time Tc required to obtain the same accuracy is 1 / 10 or less compared to the reference example (simulated annealing). The calculation according to the embodiment is 10 times faster than the reference example.
[0118] A third calculation example according to the present embodiment will be described below. In the third calculation example, the above calculation is performed by a GPU. In this calculation, for example, variables and parameters are treated as floats (32-bit floating-point real numbers).
[0119] In this method, a first set of variables {x}, a second set of variables {y}, a first set of parameters {J}, and a second set of parameters {h} are defined as device variables. The first set of parameters {J} is a matrix J. The update of the second variable y using a multiply-and-accumulate operation of the matrix J and the first variable x is performed by a matrix-vector multiplication function. For other updates of the first variable x and the second variable y, the i-th component (x i ,y i ) updates are done in a single thread.
[0120] In the third calculation example, one GPU is used under the same conditions as the first calculation example, and "K 2000The calculation time for the third calculation example is 14.7 ms, and the average value of the 100 "number of cuts" is 32549. The third calculation example also achieves faster calculations than the simulated annealing results of the reference example.
[0121] Second embodiment The second embodiment includes a circuit capable of performing the calculations described with respect to the first embodiment.
[0122] Third embodiment The third embodiment relates to a calculation program that causes a computer to repeat a processing procedure, the processing procedure including a first variable update and a second variable update.
[0123] The first variable update is the first variable x of the i-th (i is an integer between 1 and N, and N is an integer between 2 and 3) variable before the first variable update. i Add the first function to the i-th first variable x i This includes updating the i-th first variable x i is one of the first set of variables {x}. The variable of the first function is the i-th second variable y i Contains the i-th second variable y i is one of the set of second variables {y}. The second variable update is the i-th second variable y before the second variable update. i Add the second and third functions to the i-th second variable y i The variables of the second function are the i-th first variable x i The variables of the third function include at least a part of the first parameter group {J} and at least a part of the first variable group {x}. The calculation program causes the computer to calculate the i-th first variable x obtained after repeating the processing procedure. i and the i-th first variable x obtained after repeating the procedure i Functions of At least one of them is output.
[0124] The processing described in relation to the first and second embodiments can be applied to the calculation program according to this embodiment.
[0125] (Fourth embodiment) A fourth embodiment is a computer-readable recording medium. The recording medium has a program recorded thereon for causing a computer to repeat a processing procedure. The processing procedure includes a first variable update and a second variable update.
[0126] The first variable update is the first variable x of the i-th (i is an integer between 1 and N, and N is an integer between 2 and 3) variable before the first variable update. i Add the first function to the i-th first variable x i This includes updating the i-th first variable x i is one of the first set of variables {x}, and the variable of the first function is the i-th second variable y i Contains the i-th second variable y i is one of the set of second variables {y}. The second variable update is the i-th second variable y before the second variable update. i Add the second and third functions to the i-th second variable y i The variables of the second function are the i-th first variable x i The variables of the third function include at least a part of the first parameter group {J} and at least a part of the first variable group {x}. The program causes the computer to i and the i-th first variable x obtained after repeating the procedure i Functions of At least one of them is output.
[0127] The recording medium according to this embodiment includes the same recording medium as described in the first and second embodiments. did Processing can be applied.
[0128] Fifth embodiment The present embodiment relates to a calculation method, which repeats a procedure, which includes updating a first variable and updating a second variable.
[0129] The first variable update is the first variable x of the i-th (i is an integer between 1 and N, and N is an integer between 2 and 3) variable before the first variable update. iAdd the first function to the i-th first variable x i This includes updating the i-th first variable x i is one of the first set of variables {x}. The variable of the first function is the i-th second variable y i Contains the i-th second variable y i is one of the set of second variables {y}. The second variable update is the i-th second variable y before the second variable update. i Add the second and third functions to the i-th second variable y i The variables of the second function are the i-th first variable x i The variables of the third function include at least a portion of the first parameter set {J} and at least a portion of the first variable set {x}.
[0130] This calculation method is the ith first variable x obtained after repeating the processing procedure. i and the i-th first variable x obtained after repeating the procedure i Functions of At least one of them is output.
[0131] The processing (instructions) of the various pieces of information (data) described above is executed based on, for example, a program (software). For example, a computer stores this program and reads out this program to process the various pieces of information described above.
[0132] The above various types of information processing may be recorded on a magnetic disk (such as a flexible disk or hard disk), an optical disk (such as a CD-ROM, CD-R, CD-RW, DVD-ROM, DVD±R, DVD±RW), a semiconductor memory, or other recording medium as a program that can be executed by a computer.
[0133] For example, information recorded on a recording medium can be read by a computer (or an embedded system). The recording medium may have any recording format (storage format). For example, the computer reads a program from the recording medium and causes a CPU to execute instructions described in the program based on the program. The computer may acquire (or read) the program via a network.
[0134] At least a part of the above information processing may be performed in various software programs running on a computer based on a program installed in the computer (or embedded system) from a recording medium. This software may include, for example, an OS (operating system). This software may also include, for example, middleware that operates on a network.
[0135] The recording medium in the embodiment includes a recording medium on which a program is downloaded and stored, the program being obtained via a LAN or the Internet, etc. The above processing may be performed based on a plurality of recording media.
[0136] The computer according to the embodiment includes one or more devices (for example, a personal computer, etc.) The computer according to the embodiment may include multiple devices connected via a network.
[0137] According to the embodiments, it is possible to provide a calculation device, a calculation program, a recording medium, and a calculation method that can calculate an optimization problem at high speed.
[0138] The above describes the embodiment of the present invention with reference to examples. However, the present invention is not limited to these examples. For example, the specific configuration of each element such as a processing unit, an acquisition unit, and a storage unit included in a computing device is included in the scope of the present invention as long as a person skilled in the art can implement the present invention in the same way and obtain the same effect by appropriately selecting from the known range.
[0139] Any combination of two or more elements of each example, within the scope of technical feasibility, is also included within the scope of the present invention as long as it includes the gist of the present invention.
[0140] All computing devices, computing programs, recording media, and computing methods that can be implemented by a person skilled in the art through appropriate design modifications based on the computing device, computing program, recording medium, and computing method described above as the embodiments of the present invention also fall within the scope of the present invention, so long as they include the gist of the present invention.
[0141] Within the scope of the concept of the present invention, a person skilled in the art may conceive of various modifications and alterations, and it is understood that these modifications and alterations also fall within the scope of the present invention.
[0142] Although some embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope and spirit of the invention, and are included in the scope of the invention and its equivalents described in the claims. [Explanation of symbols]
[0143] 10...holding part, 10A, 10B...first and second holding areas, 10Ap, 10Bp...1st, 2nd holding circuit, 15A~15C...1st~3rd circuit, 15X: Control circuit section, 16A, 16B...first and second control units, 16X...Circuit, 20... Processing section, 20A~20D...1st~4th calculation section, 20Ap, 20Bp...first and second processing circuits, 31...Acquisition Department; 32...operation unit, 33...display section, 110, 111...computing device, 110E, 119R…calculation results, Nmc…number of cuts, Tc…calculation time, Vave…Average value
Claims
1. A processing unit for repeating a processing procedure, The process includes a first variable update and a second variable update, The first variable update is performed by updating the i-th (i is an integer between 1 and N, and N is an integer between 2 and 3) first variable x i The i-th first variable x i updating the i-th first variable x i is one of the first variable set {x}, and the variable of the first function is the i-th second variable y i the i-th second variable y i is one of the second set of variables {y}, The second variable update is performed by updating the i-th second variable y i , the i-th first variable x i and at least a part of the first variable group {x} as variables to obtain the i-th second variable y i Including updating The first variable x i By repeating the above processing procedure, the calculation device branches away from the initial value.
2. The function further includes an operation parameter p, The computing device according to claim 1 , wherein the processing unit varies the calculation parameter p in the repetition of the processing procedure.
3. The function further includes an operation parameter p, The computing device according to claim 1 , wherein the processing unit increases the calculation parameter p in each iteration of the processing procedure.
4. The update of the i-th second variable yi and the update of the j-th second variable yj (j is different from the i and is an integer equal to or greater than 1 and equal to or less than the N) are performed in parallel. The computing device according to any one of claims 1 to 3.
Citation Information
Patent Citations
Quantum calculation device and method
JP2017073106A
