Optimization device, optimization method, and optimization program
By introducing temperature control and stochastic state transition mechanisms into the Ising computing device, the problem of finding the minimum energy solution to combinatorial optimization problems in existing technologies is solved, thereby improving the processing performance of combinatorial optimization problems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-10
- Publication Date
- 2026-04-10
AI Technical Summary
Existing techniques struggle to effectively search for minimum energy solutions in combinatorial optimization problems, especially when spin reversal leads to energy increases, making it difficult to transition to lower energy states. Furthermore, existing methods are less effective at escaping local solutions.
The system employs a temperature control unit, an annealing unit, a speculative reversal control unit, a deterministic unit, and an energy calculation unit. By controlling the temperature and randomly determining whether to perform a state transition, combined with energy calculation, the minimum energy solution is obtained.
It improves the performance of combinatorial optimization problems, and increases the efficiency and accuracy of finding the minimum energy solution in combinatorial optimization problems.
Smart Images

Figure CN113496280B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments discussed herein relate to an optimization device, an optimization method, and an optimization program. BACKGROUND
[0002] In our society, there are a large number of "combinatorial optimization problems" in which an optimal combination is selected from a combination of a large number of elements under constraints such as limited personnel, time, and the like, regarding disaster recovery procedures, delivery route optimization, and the like. One of these methods of searching for an optimal solution of a combinatorial optimization problem is an Ising computing device obtained by applying a simulated annealing method, which is a Monte Carlo method, and a method of randomly obtaining a solution using random numbers.
[0003] An Ising computing device is a computing device that searches for a combination of variables that minimizes the energy of an Ising model expressed by a predetermined evaluation formula. In some cases, the variable is referred to as a spin, the value of the variable is referred to as a spin state, and a transition of the spin state is referred to as a flip.
[0004] An Ising computing device determines whether each spin is flipped or not based on a flip determination formula, sequentially transitions the state, and searches for a minimum energy. Then, by formulating an actual problem as an Ising model energy formula and searching for a combination of spin states that minimizes the energy by the Ising computing device, various types of combinatorial optimization problems can be solved.
[0005] Here, a minimum energy search method using a simulated annealing method will be simply described. An Ising computing device searches from an initial state in which 0 or 1 is assigned to each variable of an evaluation function expressing a problem to be solved. Then, the Ising computing device selects a state close to the current state of the combination of variables from the current state and considers a state transition. The state close to the current state is, for example, a state in which the state of a single variable is changed. Next, the Ising computing device calculates the amount of energy change of the state, and randomly selects whether to adopt the state transition or maintain the original state without adopting the state transition according to the calculated value. If the adoption probability in the case of energy reduction is set to be higher than the adoption probability in the case of energy increase, the state is changed in the direction of energy reduction on average, and the Ising computing device can eventually reach an optimal solution or reach an energy close to the optimal solution. If the state transition is adopted deterministically in the case of energy reduction, and the state transition is not adopted in the case of energy increase, the change in energy monotonically decreases with respect to time in a broad sense. However, in the case of reaching a local solution, the state transition no longer occurs, and it is difficult to expect to reach an optimal solution. Therefore, in the search in a combinatorial optimization problem, it is important to randomly determine whether to adopt the state transition.
[0006] Note that a method of solving a combinatorial optimization problem includes a related technology that allows a state to be updated while a plurality of states of a plurality of neuron circuits that are not connected to each other are simultaneously changed based on a plurality of weight values simultaneously changing the plurality of states of the plurality of neuron circuits. In addition, there is a related technology that escapes from a local solution by searching only for a state in which a partial evaluation function that is a component of an evaluation function is improved more than the local solution.
[0007] [CITATION LIST]
[0008] [PTL 1] Japanese Patent No. 2017-219952
[0009] [PTL 2] Japanese Patent No. 2006-072820
[0010] [PTL 2] Japanese Patent No. 2006-072820 SUMMARY
[0011] [TECHNICAL PROBLEM]
[0012] However, in the related art in which it is determined whether each spin is inverted, the state is sequentially changed, and a search is performed, the following problem occurs. For example, in a case where the energy greatly increases in a case where one spin is inverted, even if there is a state of lower energy in a surrounding spin state such as a state in which two spins are inverted, a transition to a high-energy state is selected once.
[0013] As a simple example, for example, under a constraint condition in which the number of spins in a single state is even, all states that can be changed by inverting only one bit are high-energy states, and it is difficult to change the state to other states. In this way, for the related art that performs a search using a determination formula based on the inversion of each spin to determine, there is a possibility that it is difficult to effectively search for a minimum energy depending on the type of a problem.
[0014] In addition, even with the related art that allows a state to be updated while a plurality of states of a plurality of neuron circuits that are not connected to each other are simultaneously changed, it is difficult to change to a state of lower energy after a transition to a high-energy state is selected. This is also true for the related art that escapes from a local solution by searching only for a state in which a partial evaluation function that is a component of an evaluation function is improved more than the local solution. Therefore, even with these related arts, it can be difficult to effectively search for a minimum energy depending on the type of a problem.
[0015] The disclosed technology is made in view of the above circumstances, and an object of the disclosed technology is to provide an optimizer, an optimization method, and an optimization program that improve the processing performance of a combinatorial optimization problem.
[0016] [TECHNICAL PROBLEM]
[0017] According to one aspect of the embodiments, the optimization device includes a temperature control unit, an annealing unit, a speculation reversal control unit, an adoption determination unit, an energy calculation unit, and a search unit. The temperature control unit is configured to control a temperature value indicative of a temperature. The annealing unit is configured to change a state of any one of a plurality of state variables included in an evaluation function representing an energy, calculate an amount of change in the energy represented by the evaluation function, and newly obtain a total amount of change by adding the calculated total amount of change to an obtained amount of change. The speculation reversal control unit is configured to repeat a process of speculatively selecting a state variable to be changed and causing the annealing unit to obtain a first total amount of change until the changed state variables reach a predetermined number. The adoption determination unit is configured to randomly determine whether to adopt a state transition of changing the states of the predetermined number of state variables by the annealing unit, according to a correlation between a threshold value and the first total amount of change, the threshold value being calculated based on the temperature value and a random number value. The energy calculation unit is configured to calculate a transition energy after performing the state transition when it is determined to adopt the state transition. The search unit is configured to obtain a minimum energy by setting the transition energy as the minimum energy when the transition energy is smaller than the minimum energy.
[0018] [Effects]
[0019] In one aspect, the present application can improve the processing performance of a combinatorial optimization problem. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 is a block diagram of an Ising calculation device according to the first embodiment;
[0021] Figure 2 is a block diagram illustrating details of an annealing unit according to the first embodiment;
[0022] Figure 3A is a flowchart of an optimal solution search process of an Ising calculation device according to the first embodiment;
[0023] Figure 3B is a flowchart of an optimal solution search process of an Ising calculation device according to the first embodiment;
[0024] Figure 4 is a layout configuration diagram of an Ising calculation device;
[0025] Figure 5 is a diagram of a circuit image of a unit circuit;
[0026] Figure 6 is a diagram of an operation image when an Ising calculation device according to the first embodiment performs an optimal solution search process;
[0027] Figure 7 is a flowchart of a process when an Ising calculation device is used;
[0028] Figure 8 is a block diagram showing details of the annealing unit according to the second embodiment;
[0029] Figure 9A is a flowchart of the optimal solution search processing by the Ising calculation device according to the second embodiment;
[0030] Figure 9B is a flowchart of the optimal solution search processing by the Ising calculation device according to the second embodiment;
[0031] Figure 10 is a diagram of an operation image when the optimal solution search processing is performed by the Ising calculation device according to the second embodiment;
[0032] Figure 11 is a block diagram showing details of the annealing unit according to the third embodiment;
[0033] Figure 12 is a diagram showing an example of the initial value setting instruction of the Ising calculation device according to the third embodiment;
[0034] Figure 13A is a flowchart of the optimal solution search processing by the Ising calculation device according to the third embodiment for a problem with n-hot constraint;
[0035] Figure 13B is a flowchart of the optimal solution search processing by the Ising calculation device according to the third embodiment for a problem with n-hot constraint;
[0036] Figure 14 is a diagram showing a modification of the traveling salesman problem for spins;
[0037] Figure 15 is a block diagram showing details of the annealing unit according to the fourth embodiment;
[0038] Figure 16 is a diagram showing an example of the spin flipping method according to the 2way-1hot constraint by the Ising calculation device according to the fourth embodiment;
[0039] Figure 17 is a diagram showing an example of the read condition according to the fourth embodiment; and
[0040] Figure 18 is a diagram showing an example of the initial value setting instruction of the Ising calculation device according to the fourth embodiment. DETAILED DESCRIPTION
[0041] Hereinafter, embodiments of the optimizer, the optimization method, and the optimization program disclosed herein will be described in detail with reference to the accompanying drawings. Note that the following embodiments do not limit the optimizer, the optimization method, and the optimization program disclosed herein.
[0042] [First Embodiment]
[0043] Figure 1 is a block diagram of an Ising computing device according to the first embodiment. The Ising computing device 1 includes a plurality of annealing units 10, a temperature control unit 20, a threshold value generation unit 30, a random number generation unit 40, an inverted spin candidate selection unit 50, a control signal generation unit 60, an energy management unit 70, and a search result holding unit 80. For example, 1024 annealing units 10 are installed on a single Ising computing device 1.
[0044] The Ising computing device 1 is an optimizer that searches for a combination (x0, x1,..., x i ) of variables x n that minimizes the energy of an Ising model expressed by Formulas (1) to (4) as evaluation functions. i Here, the variable x i in Formula (1) is a state variable and takes a value of 0 or 1. In the following description, the variable x i is referred to as a "spin", the value of the variable x i is referred to as a "spin state", and a transition of the spin state is referred to as an "inversion". For example, the spin state is represented as 0 or 1. Then, the inversion corresponds to a transition of the spin state from 0 to 1 or from 1 to 0.
[0045] [Expression 1]
[0046]
[0047] [Expression 2]
[0048]
[0049] [Expression 3]
[0050]
[0051] [Expression 4]
[0052]
[0053] Here, the reference sign E represents the energy, the reference sign ΔE i represents an amount of change in the energy in the case where x i is inverted. In addition, the reference sign h i represents a local field having x i , and the reference sign δh irepresents a change amount of a local field having x i In addition, in the following description, there are cases where the energy change amount is indicated as ΔE.
[0054] In addition, the Ising computation device 1 of the present embodiment, in a case where a specific spin is inverted, causes another spin to be inverted while temporarily maintaining the inversion of the specific spin regardless of the evaluation result of the energy change. Then, the Ising computation device 1 superimposes the inversions of the plurality of spins and determines whether to collectively adopt the inversions of the plurality of spins according to the evaluation result of the energy change in this case. Therefore, in the following description, the step of causing a plurality of spins to collectively invert is referred to as “collective inversion”. In addition, in a case where the collective inversion is performed, causing a spin to be temporarily inverted regardless of the evaluation result of the energy change is referred to as “speculative inversion”. Furthermore, a spin temporarily inverted by the speculative inversion is referred to as a “speculative inversion spin”. In a case where the collective inversion is performed, the speculative inversion spin at the time of acquiring the energy change to be evaluated for determining whether to perform the adoption is referred to as an “adoption determination target spin”.
[0055] The temperature control unit 20 is a circuit that controls the value of the temperature parameter. The temperature parameter is a temperature value for controlling the temperature. In the following description, there are cases where the temperature parameter is represented as T.
[0056] For example, according to the simulated annealing method, the temperature control unit 20 lowers the temperature by gradually reducing the value of the temperature parameter from an initial temperature that is sufficiently high according to the number of iterations of the search. From the initial state, iterations are repeatedly performed while the temperature is lowered by the temperature control unit 20. When an end determination condition is satisfied, for example, a certain number of iterations is reached or the energy value falls below a certain specific value, the operation is terminated. In addition, the temperature control unit 20 can use the replica exchange method that searches for the minimum energy while switching between low-temperature conditions and high-temperature conditions by performing a plurality of systems called replicas having different temperature conditions in parallel and exchanging the systems for each of a predetermined number of iterations.
[0057] The random number generation unit 40 is a circuit that generates a random number value. The random number generation unit 40 outputs the generated random number to the threshold value generation unit 30 and the inverted spin candidate selection unit 50.
[0058] The threshold value generation unit 30 is a circuit that generates a threshold value for determining whether each spin is an inversion candidate. The threshold value generation unit 30 acquires the temperature parameter from the temperature control unit 20. In addition, the threshold value generation unit 30 acquires the random number value from the random number generation unit 40.
[0059] Here, in the present embodiment, the inversion of the variable is adopted according to the following formula (5). For example, the smaller one of e -ΔE / T or 1 is adopted as the adoption probability to adopt the inversion of the variable.
[0060] [Expression 5]
[0061]
[0062] In the present embodiment, according to the random number generated by the random number generation unit 40, the inversion spin is randomly adopted according to formula (5). In this case, the adoption probability according to the condition of formula (5) is the same as the condition in which the inversion is adopted in the case where formula (6) below is satisfied by using a uniform random number r.
[0063] [Expression 6]
[0064]
[0065] This formula (6) is a formula for determining whether the inversion is adopted, and can be referred to as an "inversion determination formula" below.
[0066] Accordingly, the threshold generation unit 30 generates the value on the right side of formula (6) by using the temperature parameter and the random number value. Then, the threshold generation unit 30 outputs the generated value on the right side of formula (6) to the annealing unit 10.
[0067] The annealing unit 10 is a circuit that holds a spin state of one spin and a local field and determines whether the spin that is inverted is a candidate for inversion based on an amount of energy change when the own spin is inverted. Details of the annealing unit 10 will be described below with reference to Figure 2 FIG. 1. Figure 2 is a block diagram illustrating details of the annealing unit according to the first embodiment. As Figure 1 indicated, there are a plurality of annealing units 10. Then, although each annealing unit 10 controls a different spin, each annealing unit 10 performs the same processing. Therefore, a specific annealing unit 10 will be described below. In the following, the spin controlled by each annealing unit 10 will be referred to as the own spin.
[0068] As Figure 2 indicated, the annealing unit 10 includes a local field management unit 101, a spin state management unit 102, an amount of energy change calculation unit 103, a speculative inversion energy addition unit 104, an inversion determination formula evaluation unit 105, a determination unit 106, a spin number holding unit 107, and a spin attribute holding unit 108. Further, the annealing unit 10 according to the present embodiment includes a local field holding unit 111 for restoration and a spin state holding unit 112 for restoration.
[0069] The spin number holding unit 107 holds a spin number for identifying the own spin. For example, in the case where the spin is expressed as x i , the spin number corresponds to i. If the annealing unit 10 has a spin xi the spin number holding unit 107 holds i as the spin number for identifying the spin x i The spin number holding unit 107 then outputs the held spin number to the spin state management unit 102 and the reverse spin candidate selection unit 50.
[0070] The spin state management unit 102 saves the current spin state of the own spin and manages the spin state of the own spin. For example, the spin state management unit 102 receives a setting of an initial value of the spin state of the own spin at the start of the optimal solution search processing. Further, the spin state management unit 102 acquires the spin number from the spin number holding unit 107. The spin state management unit 102 then outputs the spin state and the spin number to the energy change amount calculation unit 103 and the reverse spin candidate selection unit 50.
[0071] Thereafter, in either case of the normal single spin reversal and the collective reversal, in the case where the reversal is adopted, the spin state management unit 102 receives a confirmation notification indicating the reversed spin together with the spin number of the reversed spin from the control signal generation unit 60. Then, in the case where the reversed spin is the own spin, the spin state management unit 102 updates the held spin state by setting the reversed spin state as the current spin state of the own spin. Thereafter, the spin state management unit 102 outputs the held spin state to the spin state holding unit for recovery 112.
[0072] Further, even in the case where the speculative reversal is executed, the spin state management unit 102 receives a confirmation notification indicating the reversed spin together with the spin number of the reversed spin from the control signal generation unit 60. Then, in the case where the own spin is the reversed spin, the spin state management unit 102 updates the held spin state by setting the reversed spin state as the current spin state of the own spin. In this case, the spin state management unit 102 does not output the spin state to the spin state holding unit for recovery 112.
[0073] Further, in the case where the speculative reversal is executed after the collective reversal and the collective reversal is not adopted, the spin state management unit 102 receives a notification indicating that the collective reversal is not adopted and a recovery instruction from the control signal generation unit 60. In this case, the spin state management unit 102 acquires the spin state of the own spin before the speculative reversal is executed from the spin state holding unit for recovery 112. Thereafter, the spin state management unit 102 updates the held spin state by setting the spin state of the own spin acquired before the speculative reversal is executed as the current spin state of the own spin, and recovers the spin state.
[0074] The spin state holding unit for recovery 112 receives an input of a spin state before the own spin is inverted from the spin state management unit 102. Then, the spin state holding unit for recovery 112 holds a spin state for speculative inversion. Thereafter, when the spin state is recovered, the spin state holding unit for recovery 112 outputs the held spin state for speculative inversion to the spin state management unit 102.
[0075] The local field management unit 101 holds information on a current local field, and manages a local field corresponding to the own spin. Here, since an amount of change in energy in a case where the spin is inverted can be calculated according to Equation (2) on the basis of the local field and the spin state, the local field management unit 101 holds information on the local field of each annealing cell 10 to calculate an amount of change in energy of each annealing cell 10. Then, the local field management unit 101 outputs the held local field to the energy change amount calculation unit 103.
[0076] For example, the local field management unit 101 receives a setting of an initial value of the local field with respect to the own spin at the start of the optimal solution search processing. In addition, the local field management unit 101 can calculate the initial value of the local field with respect to the own spin by receiving an input of an initial value of each spin. Thereafter, when the speculative inversion and the inverted spin are confirmed, the local field management unit 101 updates the held information on the local field with respect to the own spin as described later. Then, the local field management unit 101 outputs the held information on the local field to the energy change amount calculation unit 103.
[0077] In either case of the single spin inversion or the common inversion, in a case where the inversion is adopted, the local field management unit 101 receives a confirmation notification indicating the inverted spin from the control signal generation unit 60 together with a spin number of the inverted spin. Next, the local field management unit 101 calculates an amount of change in the local field by using the spin number of the inverted spin whose inversion is confirmed in Equation (4). Then, the local field management unit 101 calculates the local field with respect to the own spin by using the calculated amount of change in the local field for the held information on the local field. Thereafter, the local field management unit 101 updates the held information on the local field using the information on the calculated local field as the information on the current local field. Further, the local field management unit 101 outputs the updated information on the current local field to the local field holding unit for recovery 111.
[0078] Further, in a case where the speculative reversal is executed in the common reversal, the local field management unit 101 receives, from the control signal generation unit 60, a confirmation notification indicating a reversed spin together with a spin number of the speculative reversed spin for which the reversal has been confirmed. Next, the local field management unit 101 calculates an amount of change of the local field by using the spin number of the speculative reversed spin for which the reversal has been confirmed in Equation (4). Then, the local field management unit 101 calculates the local field with respect to the own spin by using the calculated amount of change of the local field for the held information with respect to the local field. Thereafter, the local field management unit 101 updates the held information with respect to the local field using the information with respect to the calculated local field as the information with respect to the current local field. In this case, the local field management unit 101 does not output the information with respect to the local field to the local field holding unit for recovery 111.
[0079] Further, in a case where the speculative reversal is executed in the common reversal, the local field management unit 101 receives, from the control signal generation unit 60, a confirmation notification indicating a reversed spin together with a spin number of the speculative reversed spin for which the reversal has been confirmed. Next, the local field management unit 101 calculates an amount of change of the local field by using the spin number of the speculative reversed spin for which the reversal has been confirmed in Equation (4). Then, the local field management unit 101 calculates the local field with respect to the own spin by using the calculated amount of change of the local field for the held information with respect to the local field. Thereafter, the local field management unit 101 updates the held information with respect to the local field using the information with respect to the calculated local field as the information with respect to the current local field. In this case, the local field management unit 101 does not output the information with respect to the local field to the local field holding unit for recovery 111.
[0080] The local field holding unit for recovery 111 receives an input of the information with respect to the speculative reversed local field from the local field management unit 101. Then, the local field holding unit for recovery 111 holds the information with respect to the speculative reversed local field. Thereafter, when the local field is recovered, the local field holding unit for recovery 111 outputs the held information with respect to the speculative reversed local field to the local field management unit 101.
[0081] The energy amount of change calculation unit 103 receives an input of the information with respect to the local field from the local field management unit 101. Further, the energy amount of change calculation unit 103 receives an input of the spin state of the own spin from the spin state management unit 102. Then, the energy amount of change calculation unit 103 calculates an amount of change of energy caused by the reversal of the own spin using Equation (2). Thereafter, the energy amount of change calculation unit 103 outputs the calculated amount of change of energy caused by the reversal of the own spin to the speculative reversal energy addition unit 104 and the reversed spin candidate selection unit 50.
[0082] The speculative inversion energy addition unit 104 receives an input of the energy change amount caused by the inversion of the own spin from the energy change amount calculation unit 103. Further, in a case where the speculative inversion is performed, the speculative inversion energy addition unit 104 receives an input of the energy change amount of the speculative inversion as the energy change amount caused by the speculative inversion from the energy calculation unit 72. In a case where the speculative inversion is not performed, the speculative inversion energy addition unit 104 receives a zero input as the energy change amount of the speculative inversion.
[0083] Then, the speculative inversion energy addition unit 104 calculates the total change amount up to the point by adding the energy change amount caused by the inversion of the own spin and the energy change amount of the speculative inversion. Here, in the case of the common inversion, the left side of the inversion determination formula expressed by the formula (6) indicates the total energy when a plurality of spins are inverted. However, each annealing cell 10 calculates the energy change amount caused by the inversion of the own spin. Therefore, by adding the energy change amount for the speculative inversion up to the point acquired from the energy calculation unit 72 to the energy change amount caused by the inversion of the own spin, the energy change amount up to the point in the case where the spin is speculative inverted can be calculated.
[0084] The speculative inversion energy addition unit 104 outputs the energy change amount as the addition result to the inversion determination formula evaluation unit 105. In a case where the speculative inversion is performed, the addition result is the energy change amount for the speculative inversion in the case where the inversion of the own spin is added to the speculative inversion up to the point. Further, in a case where the speculative inversion is not performed, the speculative inversion energy addition unit 104 adds 0 to the energy change amount caused by the inversion of the own spin, and the addition result coincides with the energy change amount caused by the inversion of the own spin.
[0085] The inversion determination formula evaluation unit 105 receives an input of the energy change amount from the speculative inversion energy addition unit 104. Further, the inversion determination formula evaluation unit 105 receives an input of the value of the right side of the inversion determination formula expressed by the formula (6) from the threshold generation unit 30. Then, the inversion determination formula evaluation unit 105 determines whether the energy change amount satisfies the inversion determination formula using the value acquired from the threshold generation unit 30 as the right side of the formula (6). Then, the inversion determination formula evaluation unit 105 outputs a determination result indicating whether the energy change amount satisfies the inversion determination formula to the determination unit 106.
[0086] In the case of the common inversion, the inversion determination formula evaluation unit 105 evaluates the inversion determination formula by using the total amount of the energy change caused by the speculative inversion of the plurality of spins. For example, in a case where the speculative inversion is performed on N spins, the inversion determination formula evaluation unit 105 evaluates the inversion determination formula by using the following formula (7). Here, the reference sign ΔE irepresents an amount of energy change when the i-th speculative reversal spin is reversed.
[0087] ΔE1+ΔE2+......ΔE N-1 +ΔE N <T x log(l / r)... (7)
[0088] The spin attribute holding unit 108 holds a spin attribute of the own spin. The spin attribute is a value determined in accordance with a constraint condition of a problem to be solved. The spin attribute includes a spin type and an attribute in the type. For example, the spin attribute includes information indicating whether the spin is a spin to be collectively reversed, how many spins are speculative reversed, under what condition a subsequent spin during the speculative reversal is selected, and the like. Then, the spin attribute holding unit 108 outputs holding information related to the spin attribute of the own spin to the determination unit 106 and the reversal spin candidate selection unit 50.
[0089] The determination unit 106 receives an input of a determination result indicating whether the amount of energy change satisfies the reversal determination formula from the reversal determination formula evaluation unit 105. Further, the determination unit 106 receives an input of a read condition from the control signal generation unit 60. Here, the read condition is information for determining a spin that is a pair of a spin for which the speculative reversal has been performed and is a target of collective reversal, and is generated in accordance with spin information including each piece of information of a spin state, a spin attribute, and a spin number of a spin that has been speculative reversed. In a case where the speculative reversal is not performed, the read condition is unconditional.
[0090] Because the read condition is unconditional in a case where the speculative reversal is not performed, if the amount of energy change satisfies the reversal determination formula, the determination unit 106 generates a reversal candidate flag indicating that the own spin is a reversal candidate, and outputs the generated flag to the reversal spin candidate selection unit 50. If the amount of energy change does not satisfy the reversal determination formula, the determination unit 106 generates a reversal candidate flag indicating that the spin is not a reversal candidate, and outputs the generated flag to the reversal spin candidate selection unit 50. For example, when assuming that the reversal candidate flag is F, the determination unit 106 sets a value of F to 1 in a case where the flag indicates that the own spin is a reversal candidate, and sets the value of F to 0 in a case where the flag indicates that the own spin is not a reversal candidate.
[0091] In a case where the speculation reversal is executed, the determination unit 106 acquires information on the spin attribute of the own spin from the spin attribute holding unit 108. Then, the determination unit 106 determines whether the own spin satisfies the read condition by using the attribute of the spin attribute. The determination of whether the read condition is satisfied includes a determination of whether the energy change amount satisfies the reversal determination formula made by using the reversal candidate flag. In a case where the own spin satisfies the read condition, the determination unit 106 generates a reversal candidate flag indicating that the own spin is a reversal candidate, and outputs the generated flag to the reversal spin candidate selection unit 50. On the other hand, in a case where the own spin does not satisfy the read condition, the determination unit 106 generates a reversal candidate flag indicating that the own spin is not a reversal candidate, and outputs the generated flag to the reversal spin candidate selection unit 50. Further, the determination unit 106 outputs information indicating whether the own spin is a spin to be commonly reversed and information on a common reversal control indicating how many spins are commonly reversed to the reversal spin candidate selection unit 50.
[0092] Returning to Figure 1 The description will be continued. The reversal spin candidate selection unit 50 receives inputs of the spin attribute, the spin state, the energy change amount, and the reversal candidate flag from the annealing units 10 together with the spin number of the own spin in each annealing unit 10.
[0093] Then, the reversal spin candidate selection unit 50 selects a reversal candidate spin from the spin numbers acquired from the respective annealing units 10 according to the random number value input from the random number generation unit 40. Thereafter, the reversal spin candidate selection unit 50 outputs the spin attribute, the spin state, and the reversal candidate flag together with the spin number of the selected reversal candidate spin to the control signal generation unit 60. Further, the reversal spin candidate selection unit 50 outputs the energy change amount caused by the reversal of the reversal candidate spin to the energy management unit 70.
[0094] Here, in a case where the common reversal is executed, the reversal spin candidate selection unit 50 receives inputs of information indicating whether the own spin is a spin to be commonly reversed and information on a common reversal control indicating how many spins are to be commonly reversed from the determination unit 106. Then, the reversal spin candidate selection unit 50 races to select a reversal spin candidate by using the acquired information. Here, since the read condition is set to select a specific spin, and the spin not to be selected is set not to be marked before entering the reversal spin candidate selection unit 50, the reversal spin candidate selection unit 50 can preferably select the spin to be commonly reversed.
[0095] As Figure 1As shown, the control signal generating unit 60 includes an inversion spin confirmation unit 61, a speculative inversion control unit 62, a spin information holding unit 63, and a read condition generating unit 64. The control signal generating unit 60 receives the input of the spin number, the spin attribute, the spin state, and the inversion candidate flag of the inversion candidate spin from the inversion spin candidate selection unit 50.
[0096] The speculative inversion control unit 62 determines whether the inversion candidate spin is a spin to be commonly inverted according to the spin attribute of the inversion candidate spin. In the case where the inversion candidate spin is not a spin to be commonly inverted, the speculative inversion control unit 62 outputs a request for inversion adoption determination to the inversion spin confirmation unit 61.
[0097] On the other hand, in the case where the inversion candidate spin is a spin to be commonly inverted, the speculative inversion control unit 62 determines whether the inversion candidate spin is an adoption inversion target spin in the common inversion. In the case where the inversion candidate spin is not the adoption inversion target spin, the speculative inversion control unit 62 instructs the inversion spin confirmation unit 61 to confirm the inversion spin in the speculative inversion. Whereas, in the case where the inversion candidate spin is the adoption inversion target spin, the speculative inversion control unit 62 outputs a request for inversion adoption determination for the common inversion to the inversion spin confirmation unit 61.
[0098] When receiving the request for inversion adoption determination from the speculative inversion control unit 62, the inversion spin confirmation unit 61 checks the inversion candidate flag of the inversion candidate spin, and determines whether to adopt the inversion of the inversion candidate spin. In the case where the value of the inversion candidate flag indicates that the spin to be inverted is an inversion candidate, the inversion spin confirmation unit 61 determines to adopt the inversion of the inversion candidate spin. Then, the inversion spin confirmation unit 61 confirms the inversion candidate spin as the inversion spin. Thereafter, the inversion spin confirmation unit 61 notifies the energy management unit 70 of the confirmation of the inversion spin. Further, the inversion spin confirmation unit 61 notifies each annealing unit 10 of the confirmation of the inversion spin together with the spin number of the inversion spin. Further, the inversion spin confirmation unit 61 notifies the spin information holding unit 63 and the read condition generating unit 64 of the clearing of the spin information and the read condition.
[0099] On the other hand, in the case where the value of the inversion candidate flag indicates that the spin to be inverted is not an inversion candidate, the inversion spin confirmation unit 61 determines not to adopt the inversion candidate spin. Then, the inversion spin confirmation unit 61 notifies the spin information holding unit 63 and the read condition generating unit 64 of the non-adoption of the inversion candidate spin.
[0100] Further, when receiving an instruction for confirming the reverse spin in the speculative reversal from the speculative reversal control unit 62, the reverse spin confirming unit 61 confirms the reverse candidate spin as the reverse spin. Then, the reverse spin confirming unit 61 notifies the energy management unit 70 of the confirmation of the reverse spin in the speculative reversal. Further, the reverse spin confirming unit 61 notifies each annealing unit 10 of the confirmation of the reverse spin together with the spin number of the reverse spin. As a result, the reverse candidate spin is reversed regardless of the evaluation result of the energy increase amount, and the speculative reversal is executed. Further, the reverse spin confirming unit 61 outputs spin information including the spin number of the speculative reversal spin, the spin attribute, and the spin state to the spin information holding unit 63. Further, the reverse spin confirming unit 61 instructs the read condition generating unit 64 to generate the read condition.
[0101] Further, when receiving a request for the reverse adoption determination in the common reversal from the speculative reversal control unit 62, the reverse spin confirming unit 61 checks the reverse candidate flag of the reverse candidate spin, and determines whether to adopt the common reversal. In a case where the value of the reverse candidate flag indicates that the spin to be reversed is the reverse candidate, the reverse spin confirming unit 61 determines to reverse the reverse candidate spin. Then, the reverse spin confirming unit 61 confirms the reverse candidate spin as the reverse spin. Thereafter, the reverse spin confirming unit 61 notifies the energy management unit 70 of the confirmation of the reverse spin. Further, the reverse spin confirming unit 61 notifies each annealing unit 10 of the confirmation of the reverse spin together with the spin number of the reverse spin. Further, the reverse spin confirming unit 61 notifies the spin information holding unit 63 and the read condition generating unit 64 of the adoption of the common reversal.
[0102] On the other hand, in a case where the value of the reverse candidate flag indicates that the spin to be reversed is not the reverse candidate, the reverse spin confirming unit 61 determines not to adopt the common reversal. Then, the reverse spin confirming unit 61 notifies the spin information holding unit 63, the read condition generating unit 64, and the energy management unit 70 of the non-adoption of the common reversal. In addition, the reverse spin confirming unit 61 notifies each annealing unit 10 of the notification indicating the non-adoption of the common reversal, the spin state, and the local field recovery instruction. This reverse spin confirming unit 61 is an example of an “adoption determining unit”.
[0103] The spin information holding unit 63 receives an input of the spin information including the spin number, the spin attribute, and the spin state of the spin which is reversed speculatively from the reverse spin confirming unit 61. Then, the spin information holding unit 63 stores and holds the acquired spin information of the spin which is reversed speculatively. The spin information holding unit 63 sequentially and additionally stores the spin information of the reverse spin each time the speculative reversal is repeatedly executed.
[0104] Further, the spin information holding unit 63 receives a notification indicating adoption or non-adoption of inversion. Then, in a case where spin information is held, the spin information holding unit 63 clears the held spin information. Further, in a case where a notification indicating non-adoption of common inversion is received, the spin information holding unit 63 clears the held spin information.
[0105] In a case where a speculative inversion is executed, the read condition generating unit 64 receives an instruction to generate a read condition from the inversion spin confirmation unit 61. In this case, the read condition generating unit 64 acquires spin information of each spin in which the speculative inversion is executed from the spin information holding unit 63. Then, the read condition generating unit 64 generates a read condition including information that enables selection of a spin from spins to be commonly inverted including a spin that is speculatively inverted while excluding a spin that has been selected, by using the acquired spin information. Thereafter, the read condition generating unit 64 outputs the generated read condition to the determination unit 106 of the annealing unit 10 while holding the generated read condition.
[0106] The read condition generating unit 64 receives a notification indicating adoption or non-adoption of inversion. In this case, in a case where a read condition is held, the read condition generating unit 64 clears the held read condition. Further, the read condition generating unit 64 clears the held read condition in a case where a notification indicating non-adoption of common inversion is received.
[0107] The energy management unit 70 calculates an energy according to a spin state. The energy management unit 70 includes an energy calculation unit 71 for a speculative inversion and an energy calculation unit 72.
[0108] The energy calculation unit 72 has an initial value of each spin in advance. For example, the initial value can be set to 0 for all spin states, or an appropriate spin state of each spin can be set in advance according to a calculation. The energy calculation unit 72 obtains an energy in an initial state by using the initial value of each spin in Formula (1), and holds the obtained energy. Further, the energy calculation unit 72 receives an input of a spin number of an inversion candidate spin from the inversion spin candidate selection unit 50. Further, the energy calculation unit 72 acquires an energy change amount in a case where the inversion spin input from the inversion spin candidate selection unit 50 is inverted.
[0109] Thereafter, upon confirmation of the inversion in the single spin, the energy calculation unit 72 receives a notification indicating the confirmation of the inverted spin from the inverted spin confirmation unit 61. The energy calculation unit 72 inverts the spin state of the spin having the spin number notified from the inverted spin candidate selection unit 50 among the spin states of the respective spins held by the energy calculation unit 72. Further, the energy calculation unit 72 adds the energy change amount input from the inverted spin candidate selection unit 50 to the current energy held by the energy calculation unit 72, and calculates the energy in the case where the spin state of the inverted spin is inverted. Thereafter, the energy calculation unit 72 holds the spin state of each spin in the state where the spin state of the inverted spin is inverted. In addition, the energy calculation unit 72 outputs the spin state of each spin in the state where the spin state of the inverted spin is inverted and the calculated energy to the search result holding unit 80. In addition, the energy calculation unit 72 instructs the energy calculation unit 71 for speculative inversion to clear the information for speculative inversion.
[0110] Further, upon confirmation of the inversion in the single spin, the energy calculation unit 72 receives a notification indicating the confirmation of the inverted spin from the inverted spin confirmation unit 61. Next, the energy calculation unit 72 acquires the spin state of each spin of the speculative inversion up to this point from the energy calculation unit 71 for speculative inversion. Then, the energy calculation unit 72 inverts the spin state of the spin having the spin number notified from the inverted spin candidate selection unit 50 among the spin states of the respective spins acquired. Further, the energy calculation unit 72 adds the energy change amount input from the inverted spin candidate selection unit 50 to the current energy held by the energy calculation unit 72, and calculates the energy in the case where the spin state of the inverted spin is inverted. Thereafter, the energy calculation unit 72 holds the spin state of each spin in the state where the spin state of each spin to be collectively inverted is inverted. In addition, the energy calculation unit 72 outputs the spin state of each spin in the state where the spin state of each spin to be collectively inverted is inverted and the calculated energy to the search result holding unit 80. In addition, the energy calculation unit 72 instructs the energy calculation unit 71 for speculative inversion to clear the information for speculative inversion.
[0111] In the case where the speculative inversion is performed in the collective inversion, the energy calculation unit 71 for speculative inversion receives a notification indicating the confirmation of the inverted spin in the speculative inversion from the inverted spin confirmation unit 61. Further, the energy calculation unit 71 for speculative inversion acquires the spin information of the speculative inverted spin input from the inverted spin candidate selection unit 50. In addition, in the case of the first speculative inversion in the collective inversion, the energy calculation unit 71 for speculative inversion acquires the spin state of each spin from the energy calculation unit 72.
[0112] The energy calculation unit for speculative reversal 71 acquires the energy change amount in the state where the spin state of the spin having the spin number notified from the spin reversal candidate selection unit 50 is reversed from the spin reversal candidate selection unit 50. In the case of the first speculative reversal, the energy calculation unit for speculative reversal 71 sets the acquired energy change amount as the energy change amount for speculative reversal. On the other hand, in the case where the energy change amount for speculative reversal has been calculated, the energy calculation unit for speculative reversal 71 adds the acquired energy change amount to the held energy change amount for speculative reversal, and sets the addition result as the energy change amount for speculative reversal. Thereafter, the energy calculation unit for speculative reversal 71 outputs the calculated energy change amount for speculative reversal to each annealing unit 10. Further, the energy calculation unit for speculative reversal 71 stores the spin state of each spin in the case where the spin state of the spin having the spin number notified from the spin reversal confirmation unit 61 is reversed in the held spin state of each spin.
[0113] Thereafter, in the case where it is confirmed in the common reversal that the reversal of the determined target is adopted, the energy calculation unit for speculative reversal 71 notifies the energy calculation unit 72 of the information on the spin state of each spin to which the speculative reversal is added until then. Thereafter, the energy calculation unit for speculative reversal 71 receives an instruction to clear the information for speculative reversal from the energy calculation unit 72. Then, the energy calculation unit for speculative reversal 71 clears the stored energy change amount for speculative reversal and the information on the spin state of each spin to which the speculative reversal is added.
[0114] In the case where the reversed spin is confirmed, the search result holding unit 80 receives the input of the spin state of each spin and the information on the calculated energy from the energy management unit 70. In the case where the minimum energy is not held, the search result holding unit 80 sets the acquired energy as the minimum energy. In this case, the search result holding unit 80 holds the spin information of each spin in the case where the acquired energy is set as the minimum energy.
[0115] On the other hand, in a case where the minimum energy has been maintained, the search result holding unit 80 compares the acquired energy with the maintained minimum energy. In a case where the acquired energy is smaller than the minimum energy, the search result holding unit 80 sets the acquired energy as the minimum energy. Further, the search result holding unit 80 holds the spin state of each spin in a case where the acquired energy is the minimum energy as the spin state under the minimum energy. In a case where the acquired energy is equal to or larger than the minimum energy, the search result holding unit 80 maintains the maintained minimum energy. Further, the search result holding unit 80 maintains the spin state of each spin in a case where the maintained minimum energy is used. The search result holding unit 80 corresponds to an example of a "search unit".
[0116] Next, the flow of the optimal solution search processing of the Ising calculation device 1 according to the present embodiment will be described with reference to Figure 3A and Figure 3B Next, the flow of the optimal solution search processing of the Ising calculation device 1 according to the present embodiment will be described with reference to Figure 3A and Figure 3B is a flowchart of the optimal solution search processing of the Ising calculation device according to the first embodiment.
[0117] The Ising calculation device 1 sets initial values in each unit based on information input by an operator, for example, by using an external terminal (not shown) or the like (step S101). For example, the spin state management unit 102 of each annealing unit 10 sets an initial value of the spin state of the own spin. Further, the spin number holding unit 107 sets the spin number of the own spin. Further, the local field management unit 101 sets an initial value of the local field for the own spin. Further, the spin attribute holding unit 108 sets the spin attribute of the own spin. Further, the initial value of each spin is input to the energy calculation unit 72. Further, the spin state of each spin held by the energy calculation unit 71 for the speculative reversal and the energy change amount for the speculative reversal, the spin state held by the spin information holding unit 63, and the read condition held by the read condition generation unit 64 are cleared.
[0118] Next, the energy change amount calculation unit 103 of the annealing unit 10 acquires information on the local field held by the local field management unit 101. Further, the energy change amount calculation unit 103 receives an input of the spin state of the own spin that is reversed from the spin state management unit 102. Then, the energy change amount calculation unit 103 calculates the energy change amount when the own spin is reversed using Formula (2) (step S102). Thereafter, the energy change amount calculation unit 103 outputs the calculated energy change amount when the own spin is reversed to the speculative reversal energy addition unit 104.
[0119] The speculative inversion energy addition unit 104 receives an input of the energy change amount when the own spin is inverted from the energy change amount calculation unit 103. Next, in a case where the speculative inversion is executed, the speculative inversion energy addition unit 104 acquires the energy change amount for the speculative inversion caused by the already executed speculative inversion from the energy calculation unit 72. In a case where the speculative inversion is not executed, the energy change amount for the speculative inversion acquired from the energy management unit 70 is 0. Then, the speculative inversion energy addition unit 104 adds the acquired energy change amount when the own spin is inverted to the energy change amount for the speculative inversion (step S103). Thereafter, the speculative inversion energy addition unit 104 outputs the energy change amount as a result of the addition to the inversion determination formula evaluation unit 105.
[0120] The inversion determination formula evaluation unit 105 receives an input of the energy change amount from the speculative inversion energy addition unit 104. Further, the inversion determination formula evaluation unit 105 receives an input of the value on the right side of the formula (6) to be the threshold value from the threshold value generation unit 30. Then, the inversion determination formula evaluation unit 105 determines whether the acquired energy change amount satisfies the inversion determination formula using the value acquired from the threshold value generation unit 30 as the right side of the formula (6). Thereafter, the inversion determination formula evaluation unit 105 outputs a determination result indicating whether the energy change amount satisfies the inversion determination formula to the determination unit 106. The determination unit 106 receives an input of the determination result indicating whether the energy change amount satisfies the inversion determination formula from the inversion determination formula evaluation unit 105. Further, the determination unit 106 receives an input of the read condition from the control signal generation unit 60. Further, the determination unit 106 acquires information on the spin attribute of the own spin from the spin attribute holding unit 108. Then, in a case where the own spin satisfies the read condition, the determination unit 106 generates an inversion candidate flag indicating that the own spin is an inversion candidate. On the other hand, in a case where the own spin does not satisfy the read condition, the determination unit 106 generates an inversion candidate flag indicating that the own spin is not an inversion candidate (step S104). Thereafter, the determination unit 106 outputs the generated inversion candidate flag to the inversion spin candidate selection unit 50.
[0121] The inversion spin candidate selection unit 50 receives inputs of the spin attribute, the spin state, the energy change amount, and the inversion candidate flag from the annealing unit 10 and the spin number of the own spin in each annealing unit 10. Then, the inversion spin candidate selection unit 50 selects an inversion candidate spin from the spin numbers acquired from the respective annealing units 10 according to the random number value input from the random number generation unit 40 (step S105). Thereafter, the inversion spin candidate selection unit 50 outputs the spin attribute, the spin state, and the inversion candidate flag together with the spin number of the inversion candidate spin to the control signal generation unit 60.
[0122] The control signal generating unit 60 receives the input of the spin number, the spin attribute, the spin state, and the inversion candidate flag of the inversion candidate spin from the inversion spin candidate selecting unit 50. Then, the inversion control unit 62 determines whether the inversion candidate spin is a spin to be collectively inverted according to the spin attribute of the inversion candidate spin (step S106).
[0123] In a case where the inversion candidate spin is a spin to be collectively inverted (step S106: Yes), the inversion control unit 62 determines whether the inversion candidate spin is an inversion target spin in the collective inversion (step S107).
[0124] In a case where the inversion candidate spin is not the inversion target spin (step S107: No), the inversion control unit 62 instructs the inversion spin confirming unit 61 to confirm the inversion spin in the tentative inversion. Upon receiving the instruction to confirm the inversion spin in the tentative inversion, the inversion spin confirming unit 61 confirms the inversion candidate spin as the inversion spin (step S108). Thereafter, the inversion spin confirming unit 61 notifies the energy management unit 70 of the confirmation of the inversion spin in the tentative inversion. Further, the inversion spin confirming unit 61 notifies each annealing unit 10 of the confirmation of the inversion spin together with the spin number of the inversion spin in the tentative inversion. Further, the inversion spin confirming unit 61 outputs the spin information including the spin number, the spin attribute, and the spin state of the inversion spin in the tentative inversion to the spin information holding unit 63. Further, the inversion spin confirming unit 61 instructs the read condition generating unit 64 to generate the read condition.
[0125] The spin information holding unit 63 receives the input of the spin information of the inversion spin in the tentative inversion from the inversion spin confirming unit 61. Then, the spin information holding unit 63 holds the spin information of the inversion spin in the tentative inversion (step S109).
[0126] Upon receiving the instruction to generate the read condition, the read condition generating unit 64 acquires the spin information of each spin in which the tentative inversion has been performed from the spin information holding unit 63. Then, the read condition generating unit 64 generates the read condition by using the acquired spin information (step S110).
[0127] The energy calculation unit 71 for the speculative inversion of the energy management unit 70 receives a notification indicating confirmation of the inversion spin in the speculative inversion. Further, the energy calculation unit 71 for the speculative inversion acquires the amount of energy change in the case where the spin state of the inversion spin is inverted from the inversion spin candidate selection unit 50. Then, the energy management unit 70 updates the held amount of energy change for the speculative inversion by setting the amount obtained by adding the amount of energy change to the held amount of energy change for the speculative inversion as the amount of energy change for the speculative inversion (step S111). Further, the energy calculation unit 71 for the speculative inversion stores the spin state of each spin in the held spin state of each spin in the case where the spin state of the spin having the spin number notified from the inversion spin confirmation unit 61 is inverted.
[0128] The annealing unit 10 receives input of the spin number of the speculative inversion spin and confirmation of the inversion spin from the inversion spin confirmation unit 109. In the case where the self spin is the speculative inversion spin confirmed to be inverted, the spin state management unit 102 updates the spin state (step S112).
[0129] The local field management unit 101 calculates the amount of change in the local field by using the spin number of the inversion spin confirmed to be inverted in formula (4). Then, the local field management unit 101 calculates the local field with respect to the self spin by using the calculated amount of change in the local field for the saved information of the local field. Thereafter, the local field management unit 101 updates the saved information of the local field using information with respect to the calculated local field as information with respect to the current local field (step S113). Thereafter, the optimal solution search processing proceeds to step S128.
[0130] In the case where the inversion candidate spin is the inversion target spin (step S107: Yes), the speculative inversion control unit 62 outputs a request for determination of inversion adoption for the common inversion to the inversion spin confirmation unit 61. Upon receiving the request for determination of inversion adoption for the common inversion, the inversion spin confirmation unit 61 checks the inversion candidate flag of the inversion candidate spin, and determines whether to adopt the common inversion (step S114). In the case of adopting the common inversion (step S114: Yes), the optimal solution search processing proceeds to step S119.
[0131] On the other hand, in a case where the common inversion is not adopted (step S114: No), the self-spin information holding unit 63, the read condition generating unit 64, and the energy management unit 70 are notified of the fact that the common inversion is not adopted. Further, the inversion spin confirmation unit 61 notifies each annealing unit 10 of the fact that the common inversion is not adopted as well as the spin state and the local field recovery instruction. Upon receiving the notification of the fact that the common inversion is not adopted, the self-spin information holding unit 63 clears the held self-spin information. Further, the read condition generating unit 64 clears the held read condition upon receiving the notification of the fact that the common inversion is not adopted (step S115).
[0132] Further, upon receiving the notification of the fact that the common inversion is not adopted, the energy change amount for speculation inversion holding unit 71 of the energy management unit 70 clears the held energy change amount for speculation inversion (step S116).
[0133] Further, each annealing unit 10 receives the notification of the fact that the common inversion is not adopted as well as the spin state and the local field recovery instruction from the inversion spin confirmation unit 61. Then, in a case where the own spin is a spin to be commonly inverted, the spin state management unit 102 acquires the spin state from the spin state holding unit for recovery 112 and recovers the spin state by setting the acquired spin state as the current spin state of the own spin. Further, the local field management unit 101 acquires information on the local field from the local field holding unit for recovery 111 and recovers the local field using the acquired information on the local field as information on the current local field corresponding to the own spin (step S117).
[0134] On the other hand, in a case where the inversion candidate spin is not a spin to be commonly inverted (step S106: No), the speculation inversion control unit 62 outputs a request for adoption determination of inversion to the inversion spin confirmation unit 61. Upon receiving the request for adoption determination of inversion from the speculation inversion control unit 62, the inversion flag of the inversion candidate spin is checked and it is determined whether to adopt the inversion of the inversion candidate spin (step S118). In a case where the inversion of the inversion candidate spin is not adopted (step S118: No), the optimal solution search processing proceeds to step S128.
[0135] In a case where the common inversion is employed (step S114: Yes) and in a case where the inversion candidate spin is inverted (step S118: Yes), the inversion spin confirmation unit 61 confirms the inversion candidate spin as the inversion spin (step S119). Then, the inversion spin confirmation unit 61 notifies the energy management unit 70 of the confirmation of the inversion spin. Further, the inversion spin confirmation unit 61 notifies each of the annealing units 10 of the confirmation of the inversion spin along with the spin number of the inversion spin. In addition, the inversion spin confirmation unit 61 notifies the spin information holding unit 63 and the read condition generation unit 64 of the employment of the inversion.
[0136] Upon receiving the notification indicating the employment of the common inversion, the spin information holding unit 63 clears the held spin information. Further, the read condition generation unit 64 clears the held read condition upon receiving the notification indicating the employment of the common inversion (step S120).
[0137] Upon receiving the notification indicating the confirmation of the inversion spin, the energy calculation unit 72 of the energy management unit 70 acquires the spin state of each spin to which the speculative inversion is added up to that point from the energy calculation unit for speculative inversion 71. Then, the energy calculation unit 72 inverts the spin state of the spin having the spin number acquired from the inversion spin candidate selection unit 50 among the spin states of each spin to which the speculative inversion up to that point is added. Further, the energy calculation unit 72 adds the energy change amount input from the inversion spin candidate selection unit 50 to the current energy held by the energy calculation unit 72, and calculates the energy in a case where the spin state of the inversion spin is inverted. Here, since the spin information is not received from the energy calculation unit for speculative inversion 71 in a case where the speculative inversion is not performed, the energy calculation unit 72 inverts the spin state of the spin having the spin number acquired from the inversion spin candidate selection unit 50 among the spin states of each spin of the energy calculation unit 72. Further, the energy calculation unit 72 adds the energy change amount input from the inversion spin candidate selection unit 50 to the current energy held by the energy calculation unit 72, and calculates the energy in a case where the spin state of the inversion spin is inverted. Thereafter, the energy calculation unit 72 updates the spin state of each spin and the held information on the energy (step S121).
[0138] Next, the energy calculation unit 72 instructs the energy calculation unit for speculative inversion 71 to clear the energy change amount for speculative inversion. Upon receiving the instruction from the energy calculation unit 72, the energy calculation unit for speculative inversion 71 clears the held energy change amount for speculative inversion (step S122).
[0139] Further, the energy calculating unit 72 outputs information about the calculated energy and the spin state of each spin to the search result holding unit 80. The search result holding unit 80 determines whether the energy acquired from the energy calculating unit 72 is smaller than the held minimum energy (step S123). In a case where the energy acquired from the energy calculating unit 72 is equal to or larger than the held minimum energy (step S123: No), the optimal solution search processing proceeds to step S125.
[0140] On the other hand, in a case where the energy acquired from the energy calculating unit 72 is smaller than the held minimum energy (step S123: Yes), the search result holding unit 80 updates the held minimum energy by setting the energy acquired from the energy calculating unit 72 as the minimum energy. Further, the search result holding unit 80 saves the spin state of each spin acquired from the energy calculating unit 72 as the spin state in the case of the minimum energy (step S124).
[0141] The annealing unit 10 receives the input of the confirmation of the inverted spin from the inverted spin confirmation unit 61 together with the spin number of the inverted spin. In a case where the own spin is the inverted spin confirmed to be inverted, the spin state management unit 102 updates the spin state (step S125).
[0142] The local field management unit 101 calculates the amount of change in the local field by using the spin number of the inverted spin confirmed to be inverted in formula (4). Then, the local field management unit 101 calculates the local field with respect to the own spin by using the amount of change in the local field for the held information about the local field. Thereafter, the local field management unit 101 updates the held information about the local field using the information about the calculated local field as the information about the current local field (step S126).
[0143] Thereafter, the spin state holding unit for restoration 112 saves the spin state held by the spin state management unit 102. Further, the local field holding unit for restoration 111 saves the information about the local field held by the local field management unit 101 (step S127).
[0144] Thereafter, the search result holding unit 80 determines whether the calculation of the predetermined number of times is terminated (step S128). In a case where the calculation of the predetermined number of times is not terminated (step S128: No), the optimal solution search processing returns to step S102. On the other hand, in a case where the calculation of the predetermined number of times is terminated (step S128: Yes), the search result holding unit 80 determines the spin state having the minimum energy at this time as the optimal solution, and terminates the optimal solution search processing.
[0145] Figure 4 is a layout configuration diagram of an Ising calculation device. The Ising calculation device 1 according to the present embodiment corresponds toFigure 4 The annealing circuit 201 is a functional unit that can perform annealing. Each annealing circuit 201 includes a plurality of unit circuits 202 and a control circuit 203. For example, 1024 unit circuits 202 are mounted on a single annealing circuit 201. The unit circuit 202 is a logic and implementation unit for a single spin determination and state management and corresponds to the annealing unit 10. Further, the control circuit 203 is a circuit that performs control in the annealing circuit 201, and corresponds to the control signal generation unit 60, the energy management unit 70, the search result holding unit 80, and the like. For example, when any one of the own spins of the respective unit circuits 202 is selected as an inversion candidate spin, the control circuit 203 adopts the inversion candidate spin, and confirms the inversion spin, and notifies the unit circuit 202.
[0146] Further, Figure 5 is a graph of a circuit image of the unit circuit. Figure 5 The selection circuit 204 shown in FIG. 2 corresponds to an example of the inversion spin candidate selection unit 50, and races using information input from each unit circuit 202 to select a spin. The control circuit 203 inverts or restores the spin state, and creates a read condition to be a spin selection condition based on information about the spin selected by the selection circuit 204.
[0147] The circuit shown as the determination spin inversion side in the unit circuit 202 performs processing for calculating the local field by the local field management unit 101, and processing by the energy change amount calculation unit 103, the speculative inversion energy addition unit 104, the inversion determination formula evaluation unit 105, and the determination unit 106. In the determination spin inversion side of the unit circuit 202, the energy change amount of the speculative inversion input to this point by the control circuit 203, and the energy change amount caused by the next inversion are added, and the total value is calculated. Further, the determination condition matching circuit 21 determines whether the condition matches based on the input of the read condition.
[0148] Further, the circuit that updates the spin state and the one side of the local field in the unit circuit 202 is a circuit that outputs information for generating data to be transmitted to the spin inversion determination circuit using information on the inverted spin input from the control circuit 203. In this case, a random access memory (RAM) 210 for data retention is installed. When the inverted spin is confirmed, a signal to save is input to the selection circuit 22. In this case, the selection circuit 22 selects the value of the path whose value is 1, for example, the output value of the local field. Further, the selection circuit 23 selects the value of the path whose value is 0, for example, the value of the current local field. At the time of recovery, a recovery signal is input to the selection circuit 23. The selection circuit 23 selects the value of the path whose value is 1, for example, the value of the local field for recovery. Further, the selection circuit 22 selects the value of the path whose value is 0, for example, the value of the local field for recovery. The RAM 210 corresponds to an example of the local field retention unit 111 for recovery and the spin state retention unit 112 for recovery.
[0149] Further, the operation of the Ising calculation device 1 according to the present embodiment when performing the optimal solution search processing will be described with reference to Figure 6 the operation of the Ising calculation device according to the first embodiment when performing the optimal solution search processing. Figure 6 is a diagram of an operation image when the Ising calculation device according to the first embodiment performs the optimal solution search processing. Here, a case where four spins are collectively inverted will be described. Here, Figure 6 (1) to (4) in FIG. 12 indicate the spin numbers of the presumed inverted spins read in the Nth (N = 1, 2, 3, 4) order.
[0150] In the case where the common inversion is executed, as shown in state 211, the first spin in the common inversion is selected, and the control circuit 203 sends the confirmation of the inverted spin with respect to the first spin to the cell circuit 202. Next, as shown in state 212, the second spin is selected, and the control circuit 203 sends the confirmation of the inverted spin with respect to the second spin to the cell circuit 202. Next, as shown in state 213, the third spin is selected, and the control circuit 203 sends the confirmation of the inverted spin with respect to the third spin to the cell circuit 202. Thereafter, the control circuit 203 adopts the common inversion at the time of selection of the fourth spin. In the case where the common inversion is adopted, as shown in state 214, the control circuit 203 sends the confirmation of the inverted spin with respect to the fourth spin to the cell circuit 202, and updates the spin state and the local field. On the other hand, in the case where the common inversion is not adopted, as shown in state 215, the control circuit 203 sends the non-adoption of the common inversion to the cell circuit 202. Then, each cell circuit 202 restores the spin state and the local field to the state before the execution of the speculative inversion. In this case, the number of loops to be executed is the same regardless of the adoption or non-adoption of the common inversion. For example, as shown in table 216, in the case where the number of spins to be commonly inverted is N, the number of loops is N both in the case of adoption and in the case of non-adoption.
[0151] Figure 7 is a flowchart of processing when the Ising computing device is used. Here, a user who uses the Ising computing device 1 is referred to as a user.
[0152] There is a problem to be solved 51 which the user desires to solve. The user converts the problem to be solved into an Ising model using a computer or the like (step S151). With this conversion, an Ising model energy formula 53 expressed by formula (1) is acquired.
[0153] Further, after the problem is converted into the Ising model, the user extracts a constraint condition to solve the problem (step S152). As a result, a spin attribute and an initial spin state 54 are acquired.
[0154] Next, the initial value of the local field and the energy is calculated using the Ising model energy formula 53 and the spin attribute and the initial spin state 54 by a computer or the like (step S153).
[0155] Further, the user determines an operation condition 52, such as the number of calculations at the time of execution of the calculation. Then, the Ising model energy formula 53, the spin attribute and the initial spin state 54, the initial value of the local field and the energy, and the operation condition 52 are input as parameters to the Ising computing device 1 (step S154).
[0156] Thereafter, the Ising computing device 1 performs a calculation (step S155). This process is the optimal solution search process performed by the above-described Ising computing device 1. As a result, a calculation result 55 is obtained.
[0157] The user acquires the calculation result 55 (step S156). Then, the user interprets the acquired calculation result 55 (step S157). With this interpretation, the user obtains a solution 56 to the problem to be solved 51 with respect to the problem to be solved 51.
[0158] As described above, the Ising computing device according to the present embodiment speculatively inverts a plurality of spins that satisfy a condition, and collectively determines whether to adopt a series of spin inversions. Then, in a case where the inversion is not adopted, a value can be returned to an original value using the saved information for recovery. As a result, the minimum energy can be reached in a shorter time, and the processing performance for the combinatorial optimization problem for the Ising computing device can be improved. Further, in the case of the Ising computing device according to the present embodiment, because a storage device that holds a local field and a spin state for recovery is arranged, a physical quantity for the storage device increases. However, an additional loop for recovery is not required, and the processing efficiency can be improved.
[0159] [Second Embodiment]
[0160] Figure 8 is a block diagram illustrating details of an annealing unit according to the second embodiment. The Ising computing device 1 according to the present embodiment differs from the Ising computing device 1 in the first embodiment in that recovery is performed by re-inverting a speculatively inverted spin in a case where collective inversion is not adopted. Hereinafter, a recovery process performed by re-inversion of a speculatively inverted spin will be mainly described. In the following description, there are cases where a description of a process of a unit similar to each unit of the first embodiment is omitted.
[0161] Here, in a case where collective inversion is performed, the inverted spin candidate selection unit 50 receives input of the following information from the determination unit 106: information indicating whether a spin is a spin to be collectively inverted; and information on collective inversion control indicating how many spins are collectively inverted. Then, the inverted spin candidate selection unit 50 races using the acquired information on collective inversion control to select an inverted spin candidate. Here, because a read condition is set to select a specific spin, and a spin that will not be selected is set to be unmarked before entering the inverted spin candidate selection unit 50, the inverted spin candidate selection unit 50 can preferably select a spin to be collectively inverted.
[0162] When the spin number of the reverse candidate spin is input from the reverse spin candidate selection unit 50, the speculation reverse control unit 62 checks the held recovery processing flag and determines whether or not to perform the recovery processing. In the case of performing the recovery processing, the speculation reverse control unit 62 instructs the reverse spin confirmation unit 61 to confirm the reverse spin in the recovery processing.
[0163] On the other hand, in the case of not performing the recovery processing, the speculation reverse control unit 62 determines whether or not the reverse candidate spin is a spin to be commonly reversed according to the spin attribute of the reverse candidate spin as in the first embodiment, and performs the common reverse processing or the processing for reversing a single spin according to the determination result.
[0164] Further, in the case of not employing the common reverse, the speculation reverse control unit 62 receives a notification indicating that the common reverse is not employed from the reverse spin confirmation unit 61. Then, the speculation reverse control unit 62 generates a recovery processing flag indicating that the recovery processing is performed.
[0165] Further, when the recovery of all the speculation reverse spins is completed, the speculation reverse control unit 62 receives an instruction to clear the recovery processing flag from the reverse spin confirmation unit 61. Then, the speculation reverse control unit 62 clears the held recovery processing flag according to the instruction from the reverse spin confirmation unit 61.
[0166] In the case of not employing the common reverse in the determination of whether or not to employ the common reverse, the reverse spin confirmation unit 61 notifies the spin information holding unit 63, the read condition generation unit 64, and the energy management unit 70 that the common reverse is not employed. Further, in the present embodiment, the spin information holding unit 63 generates a condition of a spin to be a reverse spin in the recovery according to the spin information held by the spin information holding unit 63. Then, the spin information holding unit 63 notifies the speculation reverse control unit 62 that the common reverse is not employed and outputs the condition of the spin to be the reverse spin in the recovery to the annealing unit 10.
[0167] Further, in the case of performing the recovery processing, the reverse spin confirmation unit 61 receives an instruction to confirm the reverse spin in the recovery processing from the speculation reverse control unit 62. Then, the reverse spin confirmation unit 61 confirms the reverse candidate spin output from the reverse spin candidate selection unit 50 as the reverse spin. Thereafter, the reverse spin confirmation unit 61 notifies the energy management unit 70 of the confirmation of the reverse spin in the recovery processing.
[0168] Next, the reverse spin confirmation unit 61 causes the spin information holding unit 63 to delete the spin information of the presumed reverse spin that is confirmed to be a reverse spin. Then, the reverse spin confirmation unit 61 determines whether or not the restoration of all restoration targets is completed depending on whether or not the spin information held by the spin information holding unit 63 remains. In the case where the restoration of all restoration targets is completed, the reverse spin confirmation unit 61 instructs the presumed reverse control unit 62 to clear the restoration processing flag.
[0169] In the case where the energy management unit 70 receives the notification indicating the confirmation of the reverse spin in the restoration processing, the energy calculation unit 72 maintains the held information on the energy. In other cases, the energy management unit 70 operates as in the first embodiment.
[0170] In the case of the restoration processing, the annealing unit 10 receives the notification indicating the confirmation of the reverse spin and the spin number of the presumed reverse spin to be restored, and updates the spin state and the local field as in the ordinary optimal solution search processing. For example, the annealing unit 10 receives the input of the confirmation of the reverse spin and the spin number of the reverse spin from the reverse spin confirmation unit 61. Then, in the case where the own spin is the reverse spin that is confirmed to be reversed, the spin state management unit 102 updates the spin state. Further, the local field management unit 101 calculates the amount of change of the local field by using the spin number of the reverse spin that is confirmed to be reversed in Equation (4). Then, the local field management unit 101 calculates the local field with respect to the own spin by using the calculated amount of change of the local field to the held information on the local field. Thereafter, the local field management unit 101 updates the held information on the local field using the information on the calculated local field as the information on the current local field. With this update, the single spin of the presumed reverse spin is reversed and restored.
[0171] Further, the annealing unit 10 receives the input of the condition of the spin to be the reverse spin in the restoration from the control signal generation unit 60. Then, the determination unit 106 of the annealing unit 10 performs determination using the condition of the spin to be the reverse spin in the restoration as in the case of the common reverse. Then, the determination unit 106 outputs the information for the restoration control (for example, information indicating that the own spin is the spin to be restored) to the reverse spin candidate selection unit 50 together with the determination result.
[0172] The reverse spin candidate selection unit 50 participates in the race using the information for the restoration control to select the reverse candidate spin and selects the spin. Here, since the read condition is set to select the specific spin, and the spin that is not to be selected is set not to be marked before entering the reverse spin candidate selection unit 50, the reverse spin candidate selection unit 50 can preferably select the spin to be commonly reversed.
[0173] Next, the flow of the optimal solution search processing by the Ising calculation device 1 according to the present embodiment will be described with reference to FIG. 9. FIG. 9 is a flowchart of the optimal solution search processing by the Ising calculation device according to the second embodiment.
[0174] The Ising calculation device 1 sets an initial value in each cell based on information inputted by an operator, for example, by using an external terminal (not shown) or the like (step S201).
[0175] Next, the energy change amount calculation unit 103 of the annealing unit 10 acquires information on the local field held by the local field management unit 101. Further, the energy change amount calculation unit 103 receives input of the spin state of the own spin which is inverted from the spin state management unit 102. Then, the energy change amount calculation unit 103 calculates the energy change amount when the own spin is inverted using Formula (2) (step S202). Thereafter, the energy change amount calculation unit 103 outputs the calculated energy change amount when the own spin is inverted to the speculative inversion energy addition unit 104.
[0176] The speculative inversion energy addition unit 104 receives input of the energy change amount when the own spin is inverted from the energy change amount calculation unit 103. Next, in a case where the speculative inversion is performed, the speculative inversion energy addition unit 104 acquires the energy change amount for the speculative inversion caused by the already performed speculative inversion from the energy calculation unit 72. In a case where the speculative inversion is not performed, the energy change amount for the speculative inversion acquired from the energy management unit 70 is 0. Then, the speculative inversion energy addition unit 104 adds the acquired energy change amount when the own spin is inverted to the energy change amount for the speculative inversion (step S203). Thereafter, the speculative inversion energy addition unit 104 outputs the energy change amount as a result of the addition to the inversion determination formula evaluation unit 105.
[0177] The reverse determination formula evaluation unit 105 receives an input of the energy change amount from the speculative reverse energy addition unit 104. Further, the reverse determination formula evaluation unit 105 receives an input of the right side value of the formula (6) to be the threshold value from the threshold value generation unit 30. Then, the reverse determination formula evaluation unit 105 determines whether or not the acquired energy change amount satisfies the reverse determination formula using the value acquired from the threshold value generation unit 30 as the right side of the formula (6). Then, the reverse determination formula evaluation unit 105 outputs a determination result indicating whether or not the energy change amount satisfies the reverse determination formula to the determination unit 106. The determination unit 106 receives an input of the determination result indicating whether or not the energy change amount satisfies the reverse determination formula from the reverse determination formula evaluation unit 105. Further, the determination unit 106 receives an input of the read condition from the control signal generation unit 60. Further, the determination unit 106 acquires information on the spin attribute of the own spin from the spin attribute holding unit 108. Then, in a case where the own spin satisfies the read condition, the determination unit 106 generates a reverse candidate flag indicating that the own spin is a reverse candidate. On the other hand, in a case where the own spin does not satisfy the read condition, the determination unit 106 generates a reverse candidate flag indicating that the own spin is not a reverse candidate (step S204). Thereafter, the determination unit 106 outputs the generated reverse candidate flag to the reverse spin candidate selection unit 50.
[0178] The reverse spin candidate selection unit 50 receives inputs of the spin attribute, the spin state, the energy change amount, and the reverse candidate flag from the annealing units 10 together with the spin number of the own spin in each annealing unit 10. Then, the reverse spin candidate selection unit 50 selects a reverse candidate spin from the spin numbers acquired from the respective annealing units 10 according to the random value input from the random number generation unit 40 (step S205). Thereafter, the reverse spin candidate selection unit 50 outputs the spin attribute, the spin state, and the reverse candidate flag together with the spin number of the reverse candidate spin to the control signal generation unit 60.
[0179] The control signal generation unit 60 receives inputs of the spin number of the reverse candidate spin, the spin attribute, the spin state, and the reverse candidate flag from the reverse spin candidate selection unit 50. Next, the speculative reverse control unit 62 checks the held recovery processing flag and determines whether or not to perform the recovery processing (step S206). In a case where the recovery processing is not performed (step S206: No), the speculative reverse control unit 62 determines whether or not the reverse candidate spin is a spin to be commonly reversed according to the spin attribute of the reverse candidate spin (step S207).
[0180] In a case where the reverse candidate spin is a spin to be commonly reversed (step S207: Yes), the speculative reverse control unit 62 determines whether or not the reverse candidate spin is an adoption reverse target spin in the common reversal (step S208).
[0181] In a case where the inversion candidate spin is not the inversion target spin (step S208: No), the inversion spin presumption unit 62 instructs the inversion spin confirmation unit 61 to confirm the inversion spin in the presumption inversion. Upon receiving the instruction to confirm the inversion spin in the presumption inversion, the inversion spin confirmation unit 61 confirms the inversion candidate spin as the inversion spin (step S209). Thereafter, the inversion spin confirmation unit 61 notifies the energy management unit 70 of the confirmation of the inversion spin. Further, the inversion spin confirmation unit 61 notifies each of the annealing units 10 of the confirmation of the inversion spin together with the spin number of the inversion spin in the presumption inversion. Further, the inversion spin confirmation unit 61 outputs the spin information including the spin number of the inversion spin in the presumption inversion, the spin attribute, and the spin state to the spin information holding unit 63. Further, the inversion spin confirmation unit 61 instructs the read condition generation unit 64 to generate the read condition.
[0182] The spin information holding unit 63 receives the input of the spin information of the inversion spin in the presumption inversion from the inversion spin confirmation unit 61. Then, the spin information holding unit 63 holds the spin information of the inversion spin in the presumption inversion (step S210).
[0183] Upon receiving the instruction to generate the read condition, the read condition generation unit 64 acquires the spin information of each spin in which the presumption inversion has been performed from the spin information holding unit 63. Then, the read condition generation unit 64 generates the read condition by using the acquired spin information (step S211).
[0184] Upon receiving the notification indicating the confirmation of the inversion spin in the presumption inversion, the energy calculation unit 71 for the presumption inversion of the energy management unit 70 acquires the energy change amount in a case where the spin state of the inversion spin is inverted from the inversion spin candidate selection unit 50. Then, the energy management unit 70 updates the held energy change amount for the presumption inversion by setting an amount obtained by adding the energy change amount to the held energy change amount for the presumption inversion as the energy change amount for the presumption inversion (step S212). Further, the energy calculation unit 71 for the presumption inversion stores the spin state of each spin in a case where the spin state of the spin having the spin number notified from the inversion spin confirmation unit 61 is inverted in the held spin state of each spin. Thereafter, the optimal solution search processing proceeds to step S221.
[0185] On the other hand, in a case where the inversion candidate spin is a spin to be inverted by the common inversion (step S208: Yes), the inversion spin confirmation unit 61 is outputted, by the inversion adoption determination request unit 62, with a request for inversion adoption determination for the common inversion. Upon receiving the request for inversion adoption determination for the common inversion, the inversion spin confirmation unit 61 checks the inversion candidate flag of the inversion candidate spin, and determines whether to adopt the common inversion (step S213). In a case where the common inversion is adopted (step S213: Yes), the optimal solution search processing proceeds to step S218.
[0186] On the other hand, in a case where the inversion candidate spin is a spin to be inverted by the common inversion (step S208: Yes), the inversion spin confirmation unit 61 is outputted, by the inversion adoption determination request unit 62, with a request for inversion adoption determination for the common inversion. Upon receiving the request for inversion adoption determination for the common inversion, the inversion spin confirmation unit 61 checks the inversion candidate flag of the inversion candidate spin, and determines whether to adopt the common inversion (step S213). In a case where the common inversion is adopted (step S213: Yes), the optimal solution search processing proceeds to step S218.
[0187] Next, the inversion spin confirmation unit 61 notifies the spin information holding unit 63, the read condition generation unit 64, and the energy calculation unit 72 that the common inversion is not adopted. Further, the spin information holding unit 63 notifies the inversion spin confirmation unit 62 of a condition for selecting the designated inversion candidate spin together with a notification indicating that the common inversion is not adopted. Upon receiving the notification indicating that the common inversion is not adopted, the inversion spin confirmation unit 62 generates a recovery processing flag indicating that recovery processing is performed (step S215).
[0188] Upon receiving the notification indicating that the common inversion is not adopted, the spin information holding unit 63 clears the held spin information. Further, the read condition generation unit 64 clears the held read condition upon receiving the notification indicating that the common inversion is not adopted (step S216). Thereafter, the optimal solution search processing proceeds to step S221.
[0189] On the other hand, in a case where the inversion candidate spin is a spin to be inverted by the common inversion (step S208: Yes), the inversion spin confirmation unit 61 is outputted, by the inversion adoption determination request unit 62, with a request for inversion adoption determination for the common inversion. Upon receiving the request for inversion adoption determination for the common inversion, the inversion spin confirmation unit 61 checks the inversion candidate flag of the inversion candidate spin, and determines whether to adopt the common inversion (step S213). In a case where the common inversion is adopted (step S213: Yes), the optimal solution search processing proceeds to step S218.
[0190] In a case where the common inversion is employed (step S213: Yes) and in a case where the inversion of the inversion candidate spin is employed (step S217: Yes), the inversion spin confirming unit 61 confirms the inversion candidate spin as the inversion spin (step S218). Then, the inversion spin confirming unit 61 notifies the energy management unit 70 of the confirmation of the inversion spin. Further, the inversion spin confirming unit 61 notifies each of the annealing units 10 of the confirmation of the inversion spin together with the spin number of the inversion spin. Further, the inversion spin confirming unit 61 notifies the spin information holding unit 63 and the read condition generating unit 64 of the employment of the inversion.
[0191] When receiving the notification indicating the employment of the common inversion, the spin information holding unit 63 clears the held spin information. Further, the read condition generating unit 64 clears the held read condition when receiving the notification indicating the employment of the common inversion (step S219).
[0192] Upon receiving the notification indicating the confirmation of the inversion spin, the energy calculating unit 72 of the energy management unit 70 acquires the spin state of each spin of the speculative inversion up to this point from the energy calculating unit for speculative inversion 71. Then, the energy calculating unit 72 inverts the spin state of the spin having the spin number acquired from the inversion spin candidate selection unit 50 among the spin states of each spin of the speculative inversion up to this point. Further, the energy calculating unit 72 adds the energy change amount input from the inversion spin candidate selection unit 50 to the current energy held by the energy calculating unit 72, and calculates the energy in a case where the spin state of the inversion spin is inverted. Here, since the spin information is not received from the energy calculating unit for speculative inversion 71 in a case where the speculative inversion is not performed, the energy calculating unit 72 inverts the spin state of the spin having the spin number acquired from the inversion spin candidate selection unit 50 among the spin states of each spin of the energy calculating unit 72. Further, the energy calculating unit 72 adds the energy change amount input from the inversion spin candidate selection unit 50 to the current energy held by the energy calculating unit 72, and calculates the energy in a case where the spin state of the inversion spin is inverted. Thereafter, the energy calculating unit 72 updates the spin state of each spin and the held information on the energy (step S220). The energy calculating unit 72 outputs the information on the calculated energy and the spin state of each spin to the search result holding unit 80.
[0193] Further, the energy calculating unit 72 instructs the energy calculating unit for speculative inversion 71 to clear the energy change amount for speculative inversion. Upon receiving the instruction from the energy calculating unit 72, the energy calculating unit for speculative inversion 71 clears the held energy change amount for speculative inversion (step S221).
[0194] The search result holding unit 80 determines whether the energy acquired from the energy calculation unit 72 is smaller than the held minimum energy (step S222). In the case where the energy acquired from the energy calculation unit 72 is equal to or larger than the held minimum energy (step S222: No), the optimal solution search processing proceeds to step S227.
[0195] On the other hand, in the case where the energy acquired from the energy calculation unit 72 is smaller than the held minimum energy (step S222: Yes), the search result holding unit 80 updates the held minimum energy by setting the energy acquired from the energy calculation unit 72 as the minimum energy. Further, the search result holding unit 80 saves the spin state of each spin acquired from the energy calculation unit 72 as the spin state in the case of the minimum energy (step S223).
[0196] On the other hand, in the case where the recovery processing is executed (step S206: Yes), the presumed inversion control unit 62 instructs the inverted spin confirmation unit 61 to confirm the inverted spin in the recovery processing. Upon receiving the instruction to confirm the inverted spin in the recovery processing, the inverted spin confirmation unit 61 selects a spin to be an inverted spin from the spin information held by the spin information holding unit 63, and confirms the inverted spin (step S224). Then, the inverted spin confirmation unit 61 notifies the energy management unit 70 of the confirmation of the inverted spin in the recovery processing. In the case where the notification indicating the confirmation of the inverted spin in the recovery processing is received, the energy calculation unit 72 of the energy management unit 70 maintains the held information on the energy.
[0197] Next, the inverted spin confirmation unit 61 causes the spin information holding unit 63 to delete the spin information of the presumed inverted spin confirmed as the inverted spin. Then, the inverted spin confirmation unit 61 determines whether the recovery of all the recovery targets is completed or not, depending on whether the spin information held by the spin information holding unit 63 still exists or not (step S225). In the case where the recovery target still exists (step S225: No), the optimal solution search processing proceeds to step S227.
[0198] On the other hand, in the case where the recovery of all the recovery targets is completed (step S225: Yes), the inverted spin confirmation unit 61 instructs the presumed inversion control unit 62 to clear the recovery processing flag. Upon receiving the instruction from the inverted spin confirmation unit 61, the presumed inversion control unit 62 clears the held recovery processing flag (step S226). Thereafter, the optimal solution search processing proceeds to step S227.
[0199] The annealing unit 10 receives the input of the confirmation of the inverted spin from the inverted spin confirmation unit 61 together with the spin number of the inverted spin. In the case where the own spin is the inverted spin confirmed to be inverted, the spin state management unit 102 updates the spin state (step S227).
[0200] The local field management unit 101 calculates the amount of change in the local field by using the spin number of the reversed spin confirmed to be reversed in Formula (4). Then, the local field management unit 101 calculates the local field with respect to the own spin by using the calculated amount of change in the local field with respect to the information held with respect to the local field. Thereafter, the local field management unit 101 updates the held information with respect to the local field using the information with respect to the calculated local field as the information with respect to the current local field (Step S228).
[0201] Thereafter, the search result holding unit 80 determines whether the calculation of the predetermined number of times is terminated (Step S229). In the case where the calculation of the predetermined number of times is not terminated (Step S229: No), the optimal solution search processing returns to Step S202. On the other hand, in the case where the calculation of the predetermined number of times is terminated (Step S229: Yes), the search result holding unit 80 determines the spin state having the minimum energy at this time as the optimal solution, and terminates the optimal solution search processing.
[0202] Further, the operation of the Ising calculation device 1 according to the present embodiment at the time of executing the optimal solution search processing will be described with reference to Figure 10 Figure 10 is a diagram of an operation image when the Ising calculation device according to the second embodiment executes the optimal solution search processing. Here, a case where four spins are collectively reversed will be described. Figure 10 (1) to (4) in FIG. 22 indicate the spin numbers of the presumed reversed spins read in the Nth (N = 1, 2, 3, 4) order.
[0203] In the case of executing the collective reversal, as indicated by the state 221, the first spin in the collective reversal is selected, and the control circuit 203 transmits the confirmation of the reversed spin with respect to the first spin to the unit circuit 202. Next, as indicated by the state 222, the second spin is selected, and the control circuit 203 transmits the confirmation of the reversed spin with respect to the second spin to the unit circuit 202. Next, as indicated by the state 223, the third spin is selected, and the control circuit 203 transmits the confirmation of the reversed spin with respect to the third spin to the unit circuit 202. Thereafter, the control circuit 203 adopts the collective reversal at the time of selecting the fourth spin. In the case of adopting the collective reversal, as indicated by the state 224, the control circuit 203 transmits the confirmation of the reversed spin with respect to the fourth spin to the unit circuit 202, and updates the spin state and the local field.
[0204] On the other hand, in a case where the common inversion is not employed, as indicated by a state 225, the control circuit 203 transmits a confirmation of the third spin as an inverted spin to the cell circuit 202, and inverts and recovers the third spin. Next, as indicated by a state 226, the control circuit 203 transmits a confirmation of the second spin as an inverted spin to the cell circuit 202, and inverts and recovers the second spin. Next, as indicated by a state 227, the control circuit 203 transmits a confirmation of the first spin as an inverted spin to the cell circuit 202, and inverts and recovers the first spin. With this operation, each cell circuit 202 recovers the spin state and the local field to the state before the speculative inversion is performed.
[0205] In this case, two more cycles are performed in a case where the common inversion is not employed than in a case where the common inversion is employed. For example, as indicated by a table 228, in a case where the number of spins to be commonly inverted is N, the number of cycles in the case where the common inversion is employed is N, and the number of cycles in the case where the common inversion is not employed is 2(N-1).
[0206] As described above, the Ising calculation device according to the present embodiment speculatively inverts a plurality of spins satisfying a condition, and commonly determines whether to employ a series of spin inversions. Then, in a case where the inversion is not employed, the value can be returned to the original value by sequentially inverting the speculatively inverted spins again. As a result, the processing performance for a combinatorial optimization problem of the Ising calculation device can be improved. Further, in the case of the Ising calculation device according to the present embodiment, the number of cycles for recovery increases. However, a storage device storing information for recovery does not need to be newly provided, and the physical quantity can be reduced.
[0207] [Third Embodiment]
[0208] Next, the third embodiment will be described. In a case where a bit indicating each spin is allocated to each spin, the Ising calculation device 1 according to the present embodiment solves a problem having a constraint condition that each of n bits in a spin of a predetermined number of bits is 1. Hereinafter, this constraint condition is referred to as an "n-hot constraint". The problem having the n-hot constraint includes the four-color theorem and the like. Hereinafter, there is a case where a spin is referred to as a "bit" indicating a bit allocated to the spin.
[0209] Here, in a case where an optimal solution is searched for a problem with an n-hot constraint, the n-hot constraint can be satisfied by satisfying the following conditions. The first condition is a condition that, in a case where a spin having a spin state of 1 according to the n-hot constraint is reversed, a spin having a spin state of 0 in a group of spins satisfying the n-hot constraint is collectively reversed. Further, the second condition is a condition that, in a case where a spin having a spin state of 0 according to the n-hot constraint is reversed, a spin having a spin state of 1 in a group of spins satisfying the n-hot constraint is collectively reversed. Thus, in a case of a problem with an n-hot constraint, it is considered that a search in which two spins are collectively reversed is effective. Thus, a case in which two spins are collectively reversed will be described below. Hereinafter, a group of spins satisfying the same n-hot constraint will be referred to as an n-hot constraint group.
[0210] Further, in the present embodiment, as the recovery method, the method of sequentially recovering the speculative reversed spin described in the second embodiment is adopted. However, since two spins are collectively reversed, when the collective reversal is not adopted, the recovery is completed by returning one speculative reversed spin. Thus, the recovery processing does not occur.
[0211] Figure 11 is a block diagram illustrating details of the annealing unit according to the third embodiment. The spin attribute holding unit 108 according to the present embodiment includes an n-hot target information 181, a group number 182, an intra-group identifier 183 as the spin attribute.
[0212] The n-hot target information 181 is a flag for determining whether a bit is a bit satisfying the n-hot constraint. For example, the n-hot target information 181 is represented as Ti, and a case where Ti = 1 indicates that the bit satisfies the n-hot constraint, and a case where Ti = 0 indicates that the bit does not satisfy the n-hot constraint. Further, the group number 182 indicates a group number of the n-hot constraint group to which the bit belongs in a case where the bit satisfies the n-hot constraint. Hereinafter, there is a case where the group number is represented as Gi. Further, the intra-group identifier 183 is an identifier for distinguishing the spins in the n-hot constraint group. Hereinafter, there is a case where the intra-group identifier 183 is represented as Ni.
[0213] In a case where the reversed candidate spin input from the reversed spin candidate selection unit 50 satisfies Ti = 1, the speculative reversal control unit 62 determines that the reversed candidate spin is a collective reversal target satisfying the n-hot constraint. Then, the speculative reversal control unit 62 instructs the reversed spin confirmation unit 61 to confirm the reversed spin in the speculative reversal.
[0214] Upon receiving an instruction for confirming a reversed spin in a speculative reversal from the speculative reversal control unit 62, the reversed spin confirmation unit 61 confirms the reversal of the reversed candidate spin regardless of the value of the reversed candidate flag and performs a speculative reversal.
[0215] Further, in a case where the selection candidate spin is the determined target, the reversed spin confirmation unit 61 receives an instruction for determining whether to adopt a common reversal from the speculative reversal control unit 62. Then, the reversed confirmation unit 61 checks the reversed candidate flag and determines whether to adopt a common reversal. In a case where a common reversal is adopted, the reversed spin confirmation unit 61 confirms the selection candidate spin as a reversed spin. Then, the reversed spin confirmation unit 61 outputs the confirmation of the reversed spin to the energy management unit 70 and each annealing unit 10.
[0216] On the other hand, in a case where a common reversal is not adopted, the reversed spin confirmation unit 61 specifies a speculative reversed spin from the spin information held by the spin information holding unit 63, generates a condition for selecting the speculative reversed spin, and outputs the generated condition to the annealing unit 10. Further, the reversed spin confirmation unit 61 outputs the spin information and the clear of the read condition to the spin information holding unit 63 and the read condition generating unit 64. Thereafter, upon receiving an instruction for confirming a reversed spin in a recovery from the speculative reversal control unit 62, the reversed spin confirmation unit 61 outputs the confirmation of the reversed spin to the energy management unit 70 and the annealing unit 10. According to the above-described processing in a case where the reversed spin confirmation unit 61 does not adopt a common reversal, the recovery is completed.
[0217] The read condition generating unit 64 generates a read condition that satisfies Tj = 1, Gj = Gi, Nj ≠ Ni, and x j ≠ x i and a determination formula as a subsequent bit read condition. Here, Gi, Ni, and x i indicate the group number 182, the in-group identifier 183, and the spin state of the spin selected in the first bit, respectively. Further, Tj, Gj, Nj, and x j indicate the value of the spin attribute of the spin selected in the second bit.
[0218] According to Tj = 1, a bit that satisfies the n-hot constraint is selected as the second bit. Further, according to Gj = Gi and x j ≠ x i , a bit that is in the same n-hot constraint group as the first bit and has a different spin state from the first bit is selected as the second bit. Further, according to Nj ≠ Ni, the re-selection of a bit that is the same as the first bit that has been reversed speculatively as the second bit is excluded.
[0219] Then, the condition generation unit 64 reads the output from the annealing unit 10, which satisfies Tj=1, Gj=Gi, Nj≠Ni and x. j ≠x i And determine the conditions for reading the formula.
[0220] The state that satisfies the n-hot constraint is input into the annealing unit 10 as the initial setting. Figure 12 This is a diagram illustrating an example of an initial value setting instruction performed by the Ising computing device according to a third embodiment. Figure 12 As shown, the Ising computing device 1 according to this embodiment is configured with initial values for spin properties that satisfy the 1-hot constraint, as well as for the local field and spin state.
[0221] Next, we will refer to Figure 13A and Figure 13B The flow of the optimal solution search process performed by the Ising computing device 1 according to this embodiment is described. Figure 13A and Figure 13B This is a flowchart of the optimal solution search process performed by the Ising computing device according to the third embodiment on a problem with n-hot constraints.
[0222] The Ising computing device 1 sets initial values in each cell based on information input by an operator, for example, using an external terminal (not shown) (step S301).
[0223] Next, the energy change calculation unit 103 of the annealing unit 10 acquires information about the local field maintained by the local field management unit 101. Furthermore, the energy change calculation unit 103 receives input from the spin state management unit 102 regarding the spin state of its own spin being reversed. Then, the energy change calculation unit 103 uses formula (2) to calculate the energy change when its own spin is reversed (step S302). Afterward, the energy change calculation unit 103 outputs the calculated energy change when its own spin is reversed to the inferred reverse energy addition unit 104.
[0224] The speculative inversion energy addition unit 104 receives input from the energy change calculation unit 103 regarding the energy change when its own spin is inverted. Next, if speculative inversion is performed, the speculative inversion energy addition unit 104 obtains from the energy calculation unit 72 the energy change for speculative inversion caused by the already performed speculative inversion. If speculative inversion is not performed, the energy change for speculative inversion obtained from the energy management unit 70 is 0. Then, the speculative inversion energy addition unit 104 adds the obtained energy change when its own spin is inverted to the energy change for speculative inversion (step S303). Afterward, the speculative inversion energy addition unit 104 outputs the energy change as the addition result to the inversion determination formula evaluation unit 105.
[0225] The reverse determination formula evaluation unit 105 receives the input of the energy change amount from the speculative reverse energy addition unit 104. Further, the reverse determination formula evaluation unit 105 receives the input of the right side value of the formula (6) to be the threshold value from the threshold value generation unit 30. Then, the reverse determination formula evaluation unit 105 determines whether or not the acquired energy change amount satisfies the reverse determination formula using the value acquired from the threshold value generation unit 30 as the right side of the formula (6). Thereafter, the reverse determination formula evaluation unit 105 outputs the determination result indicating whether or not the energy change amount satisfies the reverse determination formula to the determination unit 106. The determination unit 106 receives the input of the determination result indicating whether or not the energy change amount satisfies the reverse determination formula from the reverse determination formula evaluation unit 105. Further, the determination unit 106 receives the input of the read condition from the control signal generation unit 60. Further, the determination unit 106 acquires information on the spin attribute of the own spin from the spin attribute holding unit 108. Then, in a case where the own spin satisfies the read condition, the determination unit 106 generates a reverse candidate flag indicating that the own spin is a reverse candidate. On the other hand, in a case where the own spin does not satisfy the read condition, the determination unit 106 generates a reverse candidate flag indicating that the own spin is not a reverse candidate (step S304). Thereafter, the determination unit 106 outputs the generated reverse candidate flag to the reverse spin candidate selection unit 50.
[0226] The reverse spin candidate selection unit 50 receives the input of the spin attribute, the spin state, the energy change amount, and the reverse candidate flag from the annealing unit 10, and the spin number of the own spin in each annealing unit 10. Then, the reverse spin candidate selection unit 50 selects a reverse candidate spin from the spin numbers acquired from the respective annealing units 10 according to the random number value input from the random number generation unit 40 (step S305). Thereafter, the reverse spin candidate selection unit 50 outputs the spin attribute, the spin state, and the reverse candidate flag together with the spin number of the reverse candidate spin to the control signal generation unit 60.
[0227] The control signal generation unit 60 receives the input of the spin number of the reverse candidate spin, the spin attribute, the spin state, and the reverse candidate flag from the reverse spin candidate selection unit 50. Next, the speculative reverse control unit 62 checks the n-hot target information 181 included in the spin attribute of the reverse candidate spin, and determines whether or not T = 1 is satisfied (step S306).
[0228] In a case where T = 1 is satisfied (step S306: Yes), since the reverse candidate spin is a spin to be co-reversed, the speculative reverse control unit 62 determines whether or not the reverse candidate spin is an adoption reverse target spin in the co-reversal (step S307).
[0229] In a case where the inversion candidate spin is not the inversion target spin (step S307: No), the inversion spin presumption unit 62 instructs the inversion spin confirmation unit 61 to confirm the inversion spin in the presumption inversion. Upon receiving the instruction to confirm the inversion spin in the presumption inversion, the inversion spin confirmation unit 61 confirms the inversion candidate spin as the inversion spin (step S308). Thereafter, the inversion spin confirmation unit 61 notifies the energy management unit 70 of the confirmation of the inversion spin. Further, the inversion spin confirmation unit 61 notifies each of the annealing units 10 of the confirmation of the inversion spin together with the spin number of the inversion spin in the presumption inversion. Further, the inversion spin confirmation unit 61 outputs spin information including the spin number of the inversion spin in the presumption inversion, the spin attribute, and the spin state, to the spin information holding unit 63. Further, the inversion spin confirmation unit 61 instructs the read condition generation unit 64 to generate the read condition.
[0230] The spin information holding unit 63 receives the input of the spin information of the inversion spin in the presumption inversion from the inversion spin confirmation unit 61. Then, the spin information holding unit 63 holds the spin information of the inversion spin in the presumption inversion (step S309).
[0231] Upon receiving the instruction to generate the read condition, the read condition generation unit 64 acquires the spin information of each spin in which the presumption inversion has been performed, from the spin information holding unit 63. Then, the read condition generation unit 64 generates the read condition by using the acquired spin information (step S310).
[0232] Upon receiving the notification indicating the confirmation of the inversion spin in the presumption inversion, the energy calculation unit 71 for the presumption inversion of the energy management unit 70 acquires the energy change amount in a case where the spin state of the inversion spin is inverted, from the inversion spin candidate selection unit 50. Then, the energy management unit 70 updates the held energy change amount for the presumption inversion by setting an amount obtained by adding the energy change amount to the held energy change amount for the presumption inversion, as the energy change amount for the presumption inversion (step S311). Further, the energy calculation unit 71 for the presumption inversion stores the spin state of each spin in a case where the spin state of the spin having the spin number notified from the inversion spin confirmation unit 61 is inverted, in the held spin state of each spin. Thereafter, the optimal solution search processing proceeds to step S322.
[0233] On the other hand, in a case where the inversion candidate spin is a spin that is not to be subjected to the common inversion (step S306: No), the tentative inversion control unit 62 outputs a request for inversion adoption determination to the inversion spin confirmation unit 61. Upon receiving the request for inversion adoption determination from the tentative inversion control unit 62, the inversion spin confirmation unit 61 checks the inversion candidate flag of the inversion candidate spin and determines whether to adopt the inversion of the inversion candidate spin (step S315). In a case where the inversion of the inversion candidate spin is not adopted (step S315: No), the optimal solution search processing proceeds to step S324.
[0234] On the other hand, in a case where the inversion candidate spin is a spin that is not to be subjected to the common inversion (step S306: No), the tentative inversion control unit 62 outputs a request for inversion adoption determination to the inversion spin confirmation unit 61. Upon receiving the request for inversion adoption determination from the tentative inversion control unit 62, the inversion spin confirmation unit 61 checks the inversion candidate flag of the inversion candidate spin and determines whether to adopt the inversion of the inversion candidate spin (step S315). In a case where the inversion of the inversion candidate spin is not adopted (step S315: No), the optimal solution search processing proceeds to step S324.
[0235] Upon receiving the notification indicating that the common inversion is not adopted, the spin information holding unit 63 clears the held spin information. Further, the read condition generating unit 64 clears the held read condition upon receiving the notification indicating that the common inversion is not adopted (step S314). Thereafter, the optimal solution search processing proceeds to step S320.
[0236] On the other hand, in a case where the inversion candidate spin is a spin that is not to be subjected to the common inversion (step S306: No), the tentative inversion control unit 62 outputs a request for inversion adoption determination to the inversion spin confirmation unit 61. Upon receiving the request for inversion adoption determination from the tentative inversion control unit 62, the inversion spin confirmation unit 61 checks the inversion candidate flag of the inversion candidate spin and determines whether to adopt the inversion of the inversion candidate spin (step S315). In a case where the inversion of the inversion candidate spin is not adopted (step S315: No), the optimal solution search processing proceeds to step S324.
[0237] On the other hand, in a case where the inversion candidate spin is a spin that is not to be subjected to the common inversion (step S306: No), the tentative inversion control unit 62 outputs a request for inversion adoption determination to the inversion spin confirmation unit 61. Upon receiving the request for inversion adoption determination from the tentative inversion control unit 62, the inversion spin confirmation unit 61 checks the inversion candidate flag of the inversion candidate spin and determines whether to adopt the inversion of the inversion candidate spin (step S315). In a case where the inversion of the inversion candidate spin is not adopted (step S315: No), the optimal solution search processing proceeds to step S324.
[0238] When the notification indicating adoption of the common reversal is received, the spin information holding unit 63 clears the held spin information. In addition, the read condition generating unit 64 clears the held read condition when the notification indicating adoption of the common reversal is received (step S317).
[0239] When the notification indicating the confirmation of the reversed spin is received, the energy calculation unit 72 of the energy management unit 70 acquires the spin state of each spin of the speculative reversal up to this point from the energy calculation unit for speculative reversal 71. Then, the energy calculation unit 72 reverses the spin state of the spin having the spin number acquired from the reversed spin candidate selection unit 50 among the spin states of each spin of the speculative reversal up to this point. In addition, the energy calculation unit 72 adds the energy change amount input from the reversed spin candidate selection unit 50 to the current energy held by the energy calculation unit 72, and calculates the energy in the case where the spin state of the reversed spin is reversed. Here, in the case where the speculative reversal is not performed, the energy calculation unit 72 does not receive the spin information from the energy calculation unit for speculative reversal 71. In this case, the energy calculation unit 72 reverses the spin state of the spin having the spin number acquired from the reversed spin candidate selection unit 50 among the spin states of each spin of the energy calculation unit 72. In addition, the energy calculation unit 72 adds the energy change amount input from the reversed spin candidate selection unit 50 to the current energy held by the energy calculation unit 72, and calculates the energy in the case where the spin state of the reversed spin is reversed. Thereafter, the energy calculation unit 72 updates the spin state of each spin and the held information about the energy (step S318). The energy calculation unit 72 outputs the information about the calculated energy and the spin state of each spin to the search result holding unit 80.
[0240] In addition, the energy calculation unit 72 instructs the energy calculation unit for speculative reversal 71 to clear the energy change amount for speculative reversal. When the instruction is received from the energy calculation unit 72, the energy calculation unit for speculative reversal 71 clears the held energy change amount for speculative reversal (step S319).
[0241] The search result holding unit 80 determines whether the energy acquired from the energy calculation unit 72 is smaller than the held minimum energy (step S320). In the case where the energy acquired from the energy calculation unit 72 is equal to or larger than the held minimum energy (step S320: No), the optimal solution search processing proceeds to step S322.
[0242] On the other hand, in a case where the energy acquired from the energy calculation unit 72 is smaller than the held minimum energy (step S320: Yes), the search result holding unit 80 updates the held minimum energy by setting the energy acquired from the energy calculation unit 72 as the minimum energy. Further, the search result holding unit 80 saves the spin state of each spin acquired from the energy calculation unit 72 as the spin state in the case of the minimum energy (step S321).
[0243] The annealing unit 10 receives the input of the confirmation of the inverted spin from the inverted spin confirmation unit 61 together with the spin number of the inverted spin. In a case where the own spin is the inverted spin confirmed to be inverted, the spin state management unit 102 updates the spin state (step S322).
[0244] The local field management unit 101 calculates the amount of change in the local field by using the spin number of the inverted spin confirmed to be inverted in Formula (4). Then, the local field management unit 101 calculates the local field with respect to the own spin by using the calculated amount of change in the local field with respect to the held information on the local field. Thereafter, the local field management unit 101 updates the saved information on the local field using the information on the calculated local field as the information on the current local field (step S323).
[0245] Thereafter, the search result holding unit 80 determines whether or not the calculation of the predetermined number of times is terminated (step S324). In a case where the calculation of the predetermined number of times is not terminated (step S324: No), the optimal solution search processing returns to step S302. On the other hand, in a case where the calculation of the predetermined number of times is terminated (step S324: Yes), the search result holding unit 80 determines the spin state having the minimum energy at this time as the optimal solution, and terminates the optimal solution search processing.
[0246] As described above, the Ising calculation device according to the present embodiment can solve a problem with an n-hot constraint in a short time. In this way, it is possible to improve the processing performance of a combinatorial optimization problem for the Ising calculation device.
[0247] [Fourth Embodiment]
[0248] Next, the fourth embodiment will be described. The Ising calculation device 1 according to the present embodiment solves a problem with a constraint condition that each spin belongs to two groups and the number of spins having a spin state of 1 among the spins belonging to each group is 1. Hereinafter, this constraint condition will be referred to as a “2way-1hot constraint”. The problem with the 2way-1hot constraint includes a traveling salesman problem (TSP), a quadratic assignment problem (QAP), and the like. Here, it is assumed and described that a bit is assigned to the state of each spin.
[0249] Figure 14 is a graph showing a modification of the traveling salesman problem on spins. Figure 14 is an example of the traveling salesman problem in which the traveling order and city names of the five cities shown in the graph 401 are illustrated by the 25 spins shown in the graph 402. Each spin belongs to two groups, which include an "order group" indicating the order and a "city name group" indicating the city name. Then, the value of one specific bit of all order groups and all city groups is 1. In viewing the 5 x 5 matrix shown in the graph 402, it is required to satisfy the constraint that, in all vertical columns and horizontal rows, only one spin has a spin state of 1, and it can be said that the traveling salesman problem has a 2way-1hot constraint. The Ising computing device 1 according to the present embodiment obtains the spin state of each spin at the minimum energy shown in the graph 403 in which the bits in the graph 402 are aligned in a straight line and one dimension.
[0250] The Ising computing device 1 starts the calculation after setting the state satisfying the 2way-1hot constraint as the initial state. In the case of four bits in which every two bits are arranged vertically and horizontally, in order to satisfy the 2way-1hot constraint, it is required that the number of spins having a spin state of 1 is 1 in both the horizontal direction and the vertical direction. Therefore, in the case of inverting the spins in compliance with the 2way-1hot constraint, if the Ising computing device 1 inverts four bits in which two bits are arranged vertically and horizontally, respectively, in common, it is possible to perform the minimum energy search calculation while the inversion result satisfies the 2way-1hot constraint.
[0251] Figure 15 is a block diagram showing details of the annealing unit according to the fourth embodiment. The spin attribute holding unit 108 according to the present embodiment includes a 2way-1hot target information 185, a first group number 186, and a second group number 187 as the spin attribute.
[0252] The 2way-1hot target information 185 is a flag for determining whether or not the bit complies with the n-hot constraint. For example, the 2way-1hot target information 185 is expressed as Ti, Ti = 2t in the case of indicating that the bit complies with the 2way-1hot constraint, and Ti is other values in the case of indicating that the bit does not comply with the 2way-1hot constraint. Further, the first group number 186 is a group number of a first group that is one of the two 2way-1hot constraint groups to which the bit belongs in the case where the bit complies with the 2way-1hot constraint. Further, the second group number 187 is a group number of a second group that is the other of the two 2way-1hot constraint groups to which the bit belongs in the case where the bit complies with the 2way-1hot constraint. Hereinafter, the first group number 186 is expressed as Xi, and the second group number 187 is expressed as Yi.
[0253] In a case where the reverse candidate spin input from the reverse spin candidate selection unit 50 satisfies Ti = 2, the speculative reverse control unit 62 determines that the reverse candidate spin is a common reverse target that complies with the 2way-1hot constraint. Then, the speculative reverse control unit 62 instructs the reverse spin confirmation unit 61 to confirm the reverse spin in the speculative reverse.
[0254] Upon receiving the instruction for confirming the reverse spin in the speculative reverse from the speculative reverse control unit 62, the reverse spin confirmation unit 61 confirms the reverse of the reverse candidate spin regardless of the value of the reverse candidate flag and performs the speculative reverse.
[0255] Further, in a case where the selection candidate spin is a determination target, the reverse spin confirmation unit 61 receives an instruction for determining whether to adopt common reverse from the speculative reverse control unit 62. Then, the reverse confirmation unit 61 checks the reverse candidate flag and determines whether to adopt common reverse. In a case where common reverse is adopted, the reverse spin confirmation unit 61 confirms the selection candidate spin as the reverse spin. Then, the reverse spin confirmation unit 61 outputs the confirmation of the reverse spin to the energy management unit 70 and each annealing unit 10.
[0256] On the other hand, in a case where common reverse is not adopted, the reverse spin confirmation unit 61 specifies the speculative reverse spin in accordance with the spin information held by the spin information holding unit 63, generates a condition for selecting the speculative reverse spin, and outputs the generated condition to the annealing unit 10. Further, the reverse spin confirmation unit 61 outputs the spin information and the clear of the read condition to the spin information holding unit 63 and the read condition generation unit 64. Thereafter, upon receiving an instruction for confirming the reverse spin in the recovery from the speculative reverse control unit 62, the reverse spin confirmation unit 61 outputs the confirmation of the reverse spin to the energy management unit 70 and the annealing unit 10. According to the above-described processing when common reverse is not adopted in the reverse spin confirmation unit 61, the recovery is completed.
[0257] The read condition generation unit 64 sets the read condition so that the bits to be commonly reversed are selected as shown in Figure 16 Figure 16 is a diagram illustrating an example of a spin reverse method according to the 2way-1hot constraint performed by the Ising calculation apparatus according to the fourth embodiment.
[0258] Here, the four bits are denoted as bit i, bit k, bit j, and bit l. The bits i to l are arranged in a grid pattern, and two bits are arranged vertically and horizontally, respectively. Then, bit i belongs to the first group Xi and the second group Yi. Further, bit j belongs to the first group Xi and the second group Yj. Further, bit k belongs to the first group Xj and the second group Yi. Further, bit l belongs to the first group Xj and the second group Yj. In this case, since these bits satisfy the 2way-1hot constraint, adjacent bits of bits i to l are in different spin states.
[0259] Then, the read condition generation unit 64 sets the read condition of the subsequent bit of the first bit as common inversion as shown in Figure 17 to perform Figure 16 the inversion as shown in Figure 17 is a graph showing an example of the read condition according to the fourth embodiment. Here, the first bit to the fourth bit are the first selection bit to the fourth selection bit in common inversion, respectively.
[0260] For example, in a case where the spin state of the first spin that is commonly inverted as in the inversion transition 411 in Figure 16 is 0, the read condition generation unit 64 generates the read condition of the second bit to the fourth bit as the read condition 421 in Figure 17 . Here, the reference marks i, j, k, and l denote the first selection spin, the second selection spin, the third selection spin, and the fourth selection spin, respectively. Further, the reference mark f denotes a condition that requires satisfaction of the inversion formula, and the condition is that the inversion formula is satisfied when the value of f is 1. Since the fourth bit is a bit that determines whether to adopt common inversion, the read condition generation unit 64 includes f = 1 in the read condition of the fourth bit spin. On the other hand, since the second bit and the third bit are speculatively inverted even if the inversion determination formula is not satisfied, the read condition generation unit 64 does not include the condition of f in the read condition of the spin of the second bit and the third bit. Further, according to Ti = 2, the bits that satisfy the 2way-1hot constraint are selected as the second bit to the fourth bit.
[0261] If the first bit is the target of common inversion, the speculative inversion is performed. Next, according to the read condition of the second bit in the read condition 421, in the second bit, as shown in the second bit in Figure 16 , the bit x j is inverted. Next, according to the read condition of the third bit in the read condition 421, in the third bit, as shown in the third bit in Figure 16 , the bit x k is inverted. Next, according to the read condition of the fourth bit in the read condition 421, in the fourth bit, as shown in the fourth bit in Figure 16 , the bit x l is inverted, and the adoption determination is made.
[0262] Further, in a case where the spin state of the first spin to be collectively inverted as in the reverse transition 412 of Figure 16 , the read condition generation unit 64 generates the read condition of the second bit to the fourth bit as Figure 17 422 in the read condition 422.
[0263] If the first bit is the target of the collective inversion, the speculative inversion is performed. Next, in the second bit, according to the read condition of the second bit in the read condition 422, the bit x j is inverted as shown in the second bit in Figure 16 . Next, in the third bit, according to the read condition of the third bit in the read condition 422, the bit x l is inverted as shown in the third bit in Figure 16 . Next, in the fourth bit, according to the read condition of the fourth bit in the read condition 422, the bit x k is inverted as shown in the fourth bit in Figure 16 , and in addition, the adoption determination is performed.
[0264] The state satisfying the 2way-1hot constraint is input to the annealing unit 10 as an initial setting. Figure 18 is a diagram showing an example of an initial value setting instruction by the Ising calculation device according to the fourth embodiment. As shown in Figure 18 , the Ising calculation device 1 according to the present embodiment sets the initial values of the spin attributes and the local fields and the spin states satisfying the 2way-1hot constraint.
[0265] As in the first embodiment, the Ising calculation device 1 according to the present embodiment holds information on the spin state for restoration and the local field for restoration. Then, the Ising calculation device 1 restores the spin state and the local field using the information on the spin state for restoration and the local field for restoration. Thus, as in the first embodiment, the optimal solution search processing of the Ising calculation device 1 according to the present embodiment is represented as the flowchart in Figure 3A and Figure 3B . Then, in the Ising calculation device 1 according to the present embodiment, in the processing of step S107 in the flowchart of Fig. 3, if the inversion candidate spin is the fourth bit spin as the spin to be collectively inverted, the speculative inversion control unit 62 determines the inversion candidate spin as the adoption determination target of the collective inversion.
[0266] As described above, the Ising calculation device according to the present embodiment can solve a problem with the 2way-1hot constraint in a short time. In this way, it is possible to improve the processing performance of the combinatorial optimization problem for the Ising calculation device.
Claims
1. An optimization device configured to perform a search of a combination of a plurality of state variables included in an evaluation function representing an energy of an Ising model, the combination minimizing the energy of the Ising model, the optimization device comprising: a temperature control unit configured to control a temperature value indicating a temperature by gradually decreasing the temperature value according to a number of iterations of the search; an annealing circuit including a plurality of unit circuits as annealing units and a control circuit performing control in the annealing circuit, the annealing units being configured to change a state of any one of the plurality of state variables included in the evaluation function representing an energy, calculate an amount of change of the energy represented by the evaluation function, and obtain a first total amount of change by adding a second total amount of change to the calculated amount of change; a speculative reversal control unit configured to repeat a process of speculatively selecting a state variable to be changed and causing the annealing units to obtain the first total amount of change until the changed state variables reach a predetermined number; an adoption determination unit configured to randomly determine whether to adopt a state transition of the predetermined number of state variables changed by the annealing units according to a correlation between a threshold value and the first total amount of change, the threshold value being calculated based on the temperature value and a random number value; an energy calculation unit configured to calculate a transition energy after performing the state transition when it is determined to adopt the state transition; and a search unit configured to specify the transition energy as a minimum energy when the transition energy is smaller than a previously specified minimum energy.
2. The optimization device according to claim 1, further comprising: a read condition generation unit configured to generate a read condition for determining a state variable to be selected next based on the state variable selected by the speculative reversal control unit, and cause the annealing units to change a state of a state variable satisfying the generated read condition.
3. The optimization device according to claim 2, wherein the read condition is a condition for selecting a state variable included in a specific range of state variables, the specific range being a specific range in which a state variable whose state has been changed by the annealing units is included, and one of the plurality of state variables is 1 and the other state variables are 0.
4. The optimization device according to claim 2, wherein the read condition is a condition for selecting a state variable included in two groups of grouped state variables, the two groups of grouped state variables being two groups in which a state variable whose state has been changed by the annealing units is included, and in each group, one of the state variables is 1.
5. The optimization device according to any one of claims 1 to 4, wherein the annealing units store state variables and local fields before the state transition, and the annealing units are configured to calculate the first total amount of change by adding the second total amount of change to the calculated amount of change, and When the adoption determination unit determines not to perform adoption, the annealing unit restores the state before the state transition based on the stored state variables and the stored local field.
6. The optimization device according to any one of claims 1 to 4, wherein When the adoption determination unit determines not to perform adoption, the annealing unit restores the state before the state transition by sequentially changing the respective states of the predetermined number of state variables to original states.
7. An optimization method for performing a search of a combination of a plurality of state variables included in an evaluation function representing an energy of an Ising model, the combination minimizing the energy of the Ising model, the optimization method comprising: controlling a temperature value indicating a temperature by gradually decreasing the temperature value according to a number of iterations of the search; performing, by an annealing unit of an annealing circuit including a plurality of unit circuits as the annealing unit and a control circuit performing control in the annealing circuit, an operation of changing a state of any one of a plurality of state variables included in an evaluation function representing an energy, calculating an amount of change in the energy represented by the evaluation function; obtaining a first total amount of change by adding a second total amount of change to the calculated amount of change; repeating a process including speculatively selecting a state variable to be changed and obtaining the first total amount of change until the changed state variables reach a predetermined number; randomly determining, according to a correlation between a threshold value and the first total amount of change, whether to adopt a state transition in which the states of the predetermined number of state variables are changed, the threshold value being calculated based on the temperature value and a random number value; when it is determined to adopt the state transition, calculating a transition energy after the state transition is performed; and when the transition energy is smaller than a previously designated minimum energy, designating the transition energy as the minimum energy.
8. The optimization method according to claim 7, further comprising: generating a read condition for determining a state variable to be selected next based on the selected state variable, wherein the process includes selecting a state variable satisfying the read condition.
9. The optimization method according to claim 8, wherein the read condition is a condition for selecting a state variable included in a specific range of state variables, the specific range being a specific range of state variables in which the state is changed.
10. The optimization method according to claim 8, wherein the read condition is a condition for selecting a state variable included in two groups of grouped state variables, the two groups of grouped state variables being two groups of state variables in which the state is changed.
11. An optimization program to be executed by an optimization device, the optimization program for performing a search of a combination of a plurality of state variables included in an evaluation function representing an energy of an Ising model, the combination minimizing the energy of the Ising model, the optimization program comprising: controlling a temperature value indicating a temperature by gradually decreasing the temperature value according to a number of iterations of the search; performing, by an annealing unit of an annealing circuit including a plurality of unit circuits as the annealing unit and a control circuit performing control in the annealing circuit, an operation of changing a state of any one of a plurality of state variables included in an evaluation function representing an energy, calculating an amount of change in the energy represented by the evaluation function; obtaining a first total amount of change by adding a second total amount of change to the calculated amount of change; repeating a process including speculatively selecting a state variable to be changed and obtaining the first total amount of change until the changed state variables reach a predetermined number; randomly determining, according to a correlation between a threshold value and the first total amount of change, whether to adopt a state transition in which the states of the predetermined number of state variables are changed, the threshold value being calculated based on the temperature value and a random number value; when it is determined to adopt the state transition, calculating a transition energy after the state transition is performed; and when the transition energy is smaller than a previously designated minimum energy, designating the transition energy as the minimum energy. changing a state of any one of a plurality of state variables included in an evaluation function representing an energy, by an annealing unit of an annealing circuit including a plurality of unit circuits as the annealing unit and a control circuit that performs control in the annealing circuit; calculating an amount of change in the energy represented by the evaluation function; obtaining a first total amount of change by adding a second total amount of change to the calculated amount of change; repeating a process including speculatively selecting a state variable to be changed and obtaining the first total amount of change until the changed state variables reach a predetermined number; randomly determining whether to adopt a state transition in which states of the predetermined number of state variables are changed, according to a correlation between a threshold value and the first total amount of change, the threshold value being calculated based on the temperature value and a random number value; when it is determined that the state transition is to be adopted, calculating a transition energy after the state transition is performed; and when the transition energy is smaller than a previously specified minimum energy, specifying the transition energy as the minimum energy.
12. The optimization program according to claim 11, further comprising: generating a read condition for determining a state variable to be selected next based on the selected state variable, wherein the process includes selecting a state variable that satisfies the read condition.
13. The optimization program according to claim 12, wherein the read condition is a condition for selecting a state variable included in a specific range of state variables, the specific range being a specific range of state variables in which states are changed.
14. The optimization program according to claim 12, wherein the read condition is a condition for selecting a state variable included in two groups of grouped state variables, the two groups of grouped state variables being two groups of state variables in which states are changed.
Citation Information
Patent Citations
Apparatus for optimizing combinatorial optimization problems
US20030144748A1
Information processing apparatus, ising device, and method for controlling information processing apparatus
US20180005114A1