A computing method and device for solving an Ising model
By adjusting the complexity of the spin signal, the problem of fixed spin signal complexity in solving the Ising model is solved, enabling flexible and efficient solving of the Ising model in different scenarios, adapting to computational speed or accuracy requirements.
Patent Information
- Application Number
- CN202010747171.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-29
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2040-07-29
AI Technical Summary
Existing technologies, when solving the Ising model, have a fixed complexity of spin signals, which cannot simultaneously meet the requirements of computational speed and accuracy, resulting in an inability to achieve both in different application scenarios.
The computational device dynamically adjusts the complexity of the spin signal based on the problem matrix and the solution strategy, using an adaptive adjustment mode or a method to reduce complexity, to meet the requirements of computational speed or accuracy.
It enables flexible and efficient solving of the Ising model in different application scenarios, adapting to the needs of computation speed or accuracy, and improving the applicability of the solution method.
Smart Images

Figure CN114065121B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a calculation method and device for solving Ising model. BACKGROUND
[0002] The Ising model describes a complex system including a large number of spin nodes, each of which has a spin state with two values of "+1" and "-1". In the system, there is interaction between the spin nodes, and the interaction between the spin nodes can change the spin state of the spin nodes. Based on the interaction between the spin nodes, the Ising model gradually realizes the annealing process, that is, the Hamiltonian of the system gradually decreases until convergence. A combinatorial optimization problem can be transformed into an Ising model, and the parameters in the combinatorial optimization problem can be represented by spin nodes and the interaction between the spin nodes. The optimal solution of the combinatorial optimization problem is obtained by solving the Ising model.
[0003] At present, when solving the Ising model, the spin nodes in the Ising model are represented by spin signals (such as electrical signals or optical signals), a problem matrix is obtained by mathematically simulating the combinatorial optimization problem, the problem matrix can indicate the interaction between the spin signals, and the process of solving the Ising model is converted into a multiplication operation between the spin signals and the problem matrix.
[0004] However, the complexity of the spin signal is directly related to the operation speed and operation accuracy of solving the Ising model. For example, using a spin signal with high complexity to solve the Ising model can obtain a more accurate calculation result, but the operation process is more complex and the operation speed is slower. Using a spin signal with low complexity to solve the Ising model can simplify the operation process and speed up the operation, but the operation accuracy is poor and the calculation result is less accurate.
[0005] In some application scenarios, some people pay attention to the operation speed of solving the Ising model, and some people pay attention to the operation accuracy of solving the Ising model. The complexity of the spin signal in the current method for solving the Ising model is fixed, which can only meet one of the operation speed and operation accuracy requirements, and cannot be applied to various application scenarios. SUMMARY
[0006] The present application provides a calculation method and device for solving the Ising model to meet the needs of solving the Ising model in different application scenarios.
[0007] In a first aspect, an embodiment of the present application provides a calculation method for solving an Ising model, which is executed by a computing device. In the method, the computing device can first determine an adjustment mode of spin signals according to a problem matrix and a solving strategy of the problem matrix, the problem matrix being used to indicate first data to be operated on; after obtaining a first set of spin signals, the complexity of each spin signal in the first set of spin signals can be adjusted according to the adjustment mode of the spin signals, and a second set of spin signals can be output; then, the second set of spin signals and the problem matrix are used to perform operation, and a set of feedback signals is output, the set of feedback signals being used to indicate an intermediate operation result of performing Ising calculation on the first data.
[0008] After the set of feedback signals is output, the computing device can execute the above method again, that is, the computing device can determine a third set of spin signals according to the first set of spin signals and the set of feedback signals, then adjust the complexity of each spin signal in the third set of spin signals according to the adjustment mode of the spin signals, and output a fourth set of spin signals; the fourth set of spin signals and the problem matrix are used to perform operation, and another set of feedback signals is output, and the cycle is repeated until the Ising model converges.
[0009] Through the above method, when solving the Ising model, the computing device can adjust the complexity of a set of spin signals participating in operation to meet the solving strategy of the problem matrix, so that the solving manner of the Ising model is applicable to different scenarios.
[0010] In a possible implementation, the solving strategy can be to improve operation speed or to improve operation accuracy.
[0011] Through the above method, the solving manner of the Ising model can be applicable to application scenarios in which there is a demand for operation speed or operation accuracy.
[0012] In a possible implementation, when determining the adjustment mode of the spin signals according to the problem matrix and the solving strategy of the problem matrix, the computing device can first determine the number of spin signals in the first set of spin signals according to the problem matrix; then, the adjustment mode of the spin signals is determined according to the number of spin signals and the solving strategy.
[0013] Through the above method, the computing device can determine the number of spin signals in the first spin signal participating in subsequent operation according to the problem matrix, and then determine a suitable adjustment mode according to the data and the solving strategy.
[0014] In a possible implementation, when the number of spin signals is greater than the first threshold, the computing device determines the adjustment mode of the spin signals according to the number of spin signals and the solving strategy. If the solving strategy is to improve the operation speed, the computing device determines that the adjustment mode of the spin signals is to reduce the complexity of each spin signal in the first group of spin signals to the first complexity. If the solving strategy is to improve the operation precision, the computing device determines that the adjustment mode of the spin signals is to reduce the complexity of each spin signal in the first group of spin signals to the second complexity, where the first complexity is less than the second complexity.
[0015] Through the above method, in the case that the number of spin signals in the first group of spin signals is large, the complexity of the spin signals in the first group of spin signals can be adjusted to the corresponding complexity of the spin signals according to different solving strategies, so as to meet the solving strategy of the problem matrix.
[0016] In a possible implementation, when the number of spin signals is not greater than the first threshold, the computing device determines the adjustment mode of the spin signals according to the number of spin signals and the solving strategy. If the solving strategy is to improve the operation speed, the computing device determines that the adjustment mode of the spin signals is the adaptive adjustment mode, and the adaptive adjustment mode is to adjust the complexity of each spin signal in the first group of spin signals according to the spin signals in the first group of spin signals. If the solving strategy is to improve the operation precision, the computing device determines that the adjustment mode of the spin signals is to reduce the complexity of each spin signal in the first group of spin signals to the second complexity.
[0017] Through the above method, in the case that the number of spin signals in the first group of spin signals is small, the complexity of the spin signals in the first group of spin signals can be adjusted to the corresponding complexity of the spin signals according to different solving strategies, so as to meet the solving strategy of the problem matrix.
[0018] In a possible implementation, if the adjustment mode of the spin signals is the adaptive adjustment mode, the computing device adjusts the complexity of each spin signal in the received first group of spin signals according to the adjustment mode of the spin signals. First, the computing device determines the data of the spin signals in the first group of spin signals that are in the preset range of signal values. If the number of spin signals in the first group of spin signals that are in the preset range of signal values is greater than the second threshold, the complexity of each spin signal in the first group of spin signals is reduced to the first complexity. If the number of spin signals in the first group of spin signals that are in the preset range of signal values is not greater than the second threshold, the complexity of each spin signal in the first group of spin signals is reduced to the second complexity, where the first complexity is less than the second complexity.
[0019] Through the above method, the computing device can adaptively adjust the complexity of the first group of spin signals according to the distribution of the signal values of the spin signals in the first group of spin signals, so that the way of solving the Ising model is more flexible and efficient.
[0020] In a second aspect, an embodiment of the present application provides a computing device for solving an Ising model, the computing device having functions to implement behaviors of the computing device in the above method embodiments. The functions can be implemented by hardware, or by corresponding software executed by hardware. The hardware or software includes one or more modules corresponding to the above functions. The computing device includes a determining unit, an adjusting unit, and a computing unit.
[0021] The determining unit determines an adjustment mode of the spin signals according to the problem matrix and a solving strategy of the problem matrix, the problem matrix being used to indicate the first data to be computed.
[0022] The adjusting unit is configured to adjust complexity of each spin signal in the received first set of spin signals according to the adjustment mode of the spin signals, and output a second set of spin signals.
[0023] The computing unit computes using the second set of spin signals and the problem matrix, and outputs a set of feedback signals, the set of feedback signals being used to indicate an intermediate computation result of performing the Ising computation on the first data.
[0024] In a possible implementation, the solving strategy is to improve computation speed or improve computation accuracy.
[0025] In a possible implementation, when determining the adjustment mode of the spin signals according to the problem matrix and the solving strategy of the problem matrix, the determining unit can first determine a number of spin signals in the first set of spin signals according to the problem matrix, and then determine the adjustment mode of the spin signals according to the number of spin signals and the solving strategy.
[0026] In a possible implementation, when the number of spin signals is greater than a first threshold, and the determining unit determines the adjustment mode of the spin signals according to the number of spin signals and the solving strategy, if the solving strategy is to improve computation speed, the adjustment mode of the spin signals is determined to be reducing complexity of each spin signal in the first set of spin signals to a first complexity; and if the solving strategy is to improve computation accuracy, the adjustment mode of the spin signals is determined to be reducing complexity of each spin signal in the first set of spin signals to a second complexity, where the first complexity is less than the second complexity.
[0027] In one possible implementation, the number of spin signals is no greater than a first threshold. When the determining unit determines the adjustment mode of the spin signals based on the number of spin signals and the solution strategy, if the solution strategy is to improve the computation speed, the adjustment mode of the spin signals is determined to be an adaptive adjustment mode. The adaptive adjustment mode adjusts the complexity of each spin signal in the first group of spin signals according to the spin signals in the first group of spin signals. If the solution strategy is to improve the computation accuracy, the adjustment mode of the spin signals is determined to reduce the complexity of each spin signal in the first group of spin signals to a second complexity.
[0028] In one possible implementation, if the spin signal adjustment mode is an adaptive adjustment mode, when the adjustment unit adjusts the complexity of each spin signal in the received first group of spin signals according to the spin signal adjustment mode, it first determines the number of spin signals in the first group of spin signals that are within a preset range of signal values. If the number is greater than a second threshold, the complexity of each spin signal in the first group of spin signals is reduced to a first complexity. If the number of spin signals in the first group of spin signals that are within the preset range of signal values is not greater than the second threshold, the complexity of each spin signal in the first group of spin signals is reduced to a second complexity, wherein the first complexity is less than the second complexity.
[0029] Thirdly, this application also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the methods described in the first aspect and any possible implementation thereof.
[0030] Fourthly, this application also provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the methods described in the first aspect and any possible implementation thereof.
[0031] Fifthly, this application also provides a computer chip connected to a memory, the chip being used to read and execute a software program stored in the memory, performing the methods described in the first aspect and any possible implementation thereof. Attached Figure Description
[0032] Figure 1 A schematic diagram illustrating a method for solving the Ising model provided in this application;
[0033] Figure 2 This application provides a schematic diagram of a structure for implementing the multiplication operation between a spin signal and a problem matrix;
[0034] Figure 3A A schematic diagram illustrating the multiplication operation between a spin signal and a problem matrix provided in this application;
[0035] Figure 3B A schematic diagram illustrating the multiplication operation between a spin signal and a problem matrix provided in this application;
[0036] Figure 4 This is a schematic diagram of the structure of a computing device provided in this application. Detailed Implementation
[0037] This application provides a computational method for solving the Ising model. This method is executed by a computing device capable of solving the Ising model. When solving the Ising model, the computing device first determines the spin signal adjustment mode based on the problem matrix and its solution strategy. Then, based on the spin signal adjustment mode, it adjusts the complexity of each spin signal in the received first set of spin signals, outputting a second set of spin signals. After obtaining the second set of spin signals, the computing device can perform calculations using the second set of spin signals and the problem matrix, outputting a set of feedback signals. This set of feedback signals indicates the intermediate calculation results of the Ising calculation performed on the first data. The computing device can continue to use the set of feedback signals for calculations. For example, the computing device can generate a third set of spin signals based on the set of feedback signals and the first set of spin signals. Then, it can adjust the complexity of each spin signal in the third set of spin signals according to the adjustment mode of the spin signals, and output a fourth set of spin signals. The fourth set of spin signals and the problem matrix are used for calculations, and another set of feedback signals is output. This process is repeated until the Ising model converges. When the Ising model converges, the set of spin signals generated is the calculation result of the first data.
[0038] In the embodiments of this application, when solving the Ising model, the complexity of a set of spin signals involved in the calculation can be adjusted to meet the solution strategy of the problem matrix, so that the solution method of the Ising model can be applied to different scenarios.
[0039] The following, with reference to the accompanying drawings, further explains the computational method for solving the Ising model provided in this application. (See attached figures.) Figure 1 The method includes:
[0040] Step 101: The computing device first determines the adjustment mode of the spin signal based on the problem matrix and the solution strategy of the problem matrix. The problem matrix is used to indicate the first data to be calculated.
[0041] After acquiring the problem matrix, the computing device first analyzes the problem matrix. Based on the size of the problem matrix, the computing device can determine the number of spin signals in the first group of spin signals that will be used in subsequent operations on the problem matrix. The number of spin signals in the first group of spin signals is equal to the number of rows or columns of the problem matrix.
[0042] After determining the number of spin signals in the first group of spin signals, the computing device can determine the adjustment mode of the spin signals by combining the solution strategy of the problem matrix.
[0043] In the embodiments of this application, the solution strategy can be divided into two types: one is to improve the computation speed, that is, to ensure the timeliness of solving the Ising model so that the computation result can be obtained in a short time; the other is to improve the computation accuracy, that is, to ensure the accuracy of the computation result.
[0044] The embodiments of this application do not limit the method of determining the solution strategy. The solution strategy can be pre-configured or determined by the computing device according to the computing scenario. For example, if the current computing scenario explicitly indicates the time for solving the Ising model, and the time is greater than a time threshold, the computing device determines that the solution strategy is to improve computing accuracy. If the time is not greater than the time threshold, the computing device determines that the solution strategy is to improve computing speed. As another example, if the current computing scenario explicitly indicates the time for solving the Ising model, the computing device determines that the solution strategy is to improve computing speed. If the current computing scenario does not indicate the time for solving the Ising model, the computing device determines that the solution strategy is to improve computing accuracy.
[0045] The following explains how the computing device determines the spin signal adjustment mode based on the number of spin signals and the solution strategy:
[0046] (1) The number of spin signals is greater than the first threshold.
[0047] The solution strategy is to improve the computation speed, and the spin signal adjustment mode is to reduce the complexity of each spin signal in the first group of spin signals to the first complexity.
[0048] The solution strategy aims to improve computational accuracy. The spin signal adjustment mode either maintains the complexity of each spin signal in the first group or reduces the complexity of each spin signal in the first group to a second complexity. The first complexity is less than the second complexity. This application does not limit the specific values of the first threshold, the first complexity, and the second complexity; they can be set according to specific scenarios.
[0049] In this embodiment, the complexity of the spin signal is used to indicate its precision. The number of bits in the spin signal can be used as the complexity to indicate its precision. Other parameters, such as the difference between the number of bits and a specific value, can also be used as the complexity. This embodiment does not limit the method of representing the complexity of the spin signal; any method that can indicate the precision of the spin signal is applicable to this embodiment.
[0050] The complexity of each spin signal in the first group of spin signals is used as the initial complexity, which can be a relatively high complexity. For example, the number of bits for any spin signal in the first group of spin signals is 16 bits or more. The fact that any spin signal in the first group of spin signals has 16 bits means that a 16-bit array is needed to represent one spin signal in the first group of spin signals.
[0051] When the number of spin signals exceeds the first threshold, it indicates that there are too many spin signals. In order to improve the calculation speed, spin signals with lower complexity can be used to perform calculations with the problem matrix. Before performing calculations with the problem matrix, it is necessary to reduce the complexity of each spin signal in the first group of spin signals to a large extent.
[0052] In this case, the spin signal adjustment mode is to reduce the complexity of each spin signal in the first group of spin signals to a first complexity, which is lower than the initial complexity. For example, the first complexity can be 1 bit, that is, using a 1-bit array to represent a spin signal.
[0053] To improve computational accuracy, higher complexity spin signals are typically used in the computation with the problem matrix. Before performing the computation with the problem matrix, the complexity of each spin signal in the first set of spin signals can be maintained to ensure that the complexity of the spin signals participating in the subsequent computation is high. Alternatively, the complexity of each spin signal in the first set of spin signals can be reduced to a smaller extent.
[0054] If the complexity of each spin signal in the first group of spin signals is maintained or reduced to a small extent, the spin signal adjustment mode can be to reduce the complexity of each spin signal in the first group of spin signals to a second complexity, where the second complexity is equal to or less than the initial complexity, but higher than the first complexity. For example, the second complexity can be 2 bits, that is, using a 2-bit array to represent a spin signal.
[0055] (2) The number of spin signals is not greater than the first threshold.
[0056] The solution strategy is to improve the computation speed. The spin signal adjustment mode is an adaptive adjustment mode, which adjusts the complexity of each spin signal in the first group of spin signals according to the spin signals in the first group of spin signals.
[0057] The solution strategy aims to improve computational accuracy. The spin signal adjustment mode involves either reducing the complexity of each spin signal in the first group to the third complexity, or maintaining the complexity of each spin signal in the first group. The third complexity is less than the initial complexity, and the third complexity can be equal to or greater than the second complexity.
[0058] When the number of spin signals is not greater than the first threshold, it means that the number of spin signals is small. The time consumed by the operation of the problem matrix with a small number of spin signals is relatively small. In order to ensure the operation speed, the complexity of each spin signal in the first group of spin signals can be adjusted according to the spin signals.
[0059] In this case, the spin signal adjustment mode is adaptive mode, which requires adjusting the complexity of each spin signal in the first group of spin signals according to the spin signals in the first group of spin signals. The adaptive mode will be explained in step 102.
[0060] To improve computational accuracy, higher complexity spin signals are typically used in the computation with the problem matrix. Before performing the computation with the problem matrix, the complexity of each spin signal in the first set of spin signals can be maintained to ensure that the complexity of the spin signals participating in the subsequent computation is high. Alternatively, the complexity of each spin signal in the first set of spin signals can be reduced to a smaller extent.
[0061] If the complexity of each spin signal in the first group of spin signals is maintained or reduced to a small extent, the spin signal adjustment mode can be to reduce the complexity of each spin signal in the first group of spin signals to a third complexity. The third complexity is equal to or less than the initial complexity, but higher than the first complexity. For example, the third complexity can be 4 bits or 2 bits, that is, using a 4-bit or 2-bit array to represent a spin signal.
[0062] After determining the adjustment mode of the spin signal, the computing device can execute step 102 to adjust the complexity of each spin signal in the first group of spin signals.
[0063] Step 102: The computing device adjusts the complexity of each spin signal in the first set of received spin signals according to the spin signal adjustment mode, and outputs the second set of spin signals.
[0064] The following explains how the computing device adjusts the complexity of each spin signal in the first set of received spin signals and outputs the second set of spin signals under different spin signal adjustment modes:
[0065] 1. The adjustment mode of the spin signal is to reduce the complexity of each spin signal in the first group of spin signals to the first complexity.
[0066] The embodiments of this application do not limit the computing device to the method of reducing the complexity of each spin signal in the first group of spin signals to obtain the second group of spin signals. For example, the computing device can extract each spin signal in the first group of spin signals and retain only an array of a portion of the bits in each spin signal in the first group of spin signals as the second group of spin signals.
[0067] The following describes a method provided in this application embodiment for a computing device to reduce the complexity of each spin signal in a first set of spin signals to obtain a second set of spin signals.
[0068] The number of bits in the spin signal is used as the complexity of the spin signal. The first complexity is N bits. The computing device adds half of the range of spin signal values that the first complexity can represent to the spin signals in the first set of spin signals, which is half of the maximum value of the spin signal under the first complexity. N / 2-1 / 2, then within the N-bit range (0~2 N -1) Perform a saturation cutoff, i.e., greater than 2 N -1 is taken as 2 N -1, values less than 0 are set to 0, and the truncated data is then randomly rounded up and down to obtain the spin signal of the first complexity, which is also the spin signal in the second group of spin signals. T is used to represent this. j σ represents the spin signal in the second group of spin signals. j This refers to the spin signal in the first group of spin signals. The spin signal T in the second group of spin signals... j With the spin signal σ in the first group of spin signals j The relationship is as follows:
[0069] T j =[σ j +2 N / 2-1 / 2
[0070] It should be noted that after the computing device adds half of the spin signal value range that the first complexity can represent to the spin signal in the first set of spin signals, it can also adjust the generated data, such as by adding an offset to the generated data. This offset can be an empirical value or a value determined based on the performance of the computing device.
[0071] 2. The adjustment mode of the spin signal is to reduce the complexity of each spin signal in the first group of spin signals to the second or third complexity.
[0072] When the spin signal adjustment mode is to reduce the complexity of each spin signal in the first group of spin signals to the second or third complexity, the way the computing device executes step 102 is similar to the way the computing device executes step 102 when the spin signal adjustment mode is to reduce the complexity of each spin signal in the first group of spin signals to the first complexity. The difference is that the degree of reduction in the complexity of each spin signal in the first group of spin signals is different. For details, please refer to the above description.
[0073] 3. The spin signal adjustment mode is adaptive mode.
[0074] In adaptive mode, the computing device needs to analyze the state of the spin signals in the first group of spin signals and adjust the complexity of each spin signal in the first group of spin signals according to the spin signals in the first group of spin signals.
[0075] For example, the computing device can determine the number of spin signals in the first group of spin signals that fall within a preset range of signal values. The signal value of a spin signal can be understood as the specific value of the spin signal. If the spin signal is an optical signal, the signal value of the spin signal can be the amplitude of the optical signal; if the spin signal is an electrical signal, the signal value of the spin signal can be the voltage value of the electrical signal. This application embodiment does not limit the specific range indicated by the preset range of signal values. The preset range of signal values can be determined according to the application scenario or it can be an empirical value.
[0076] If the number of spin signals in the first group that are within the preset range of signal values is greater than the second threshold, the preset range of signal values is part or all of the following: the signal value is less than the first preset value, or the signal value is greater than the second preset value.
[0077] This indicates that the first group of spin signals contains a large number of spin signals within the preset signal value range. Since this is a later stage in solving the Ising model, lower complexity spin signals can be used to improve computational speed. The computing device can reduce the complexity of each spin signal in the first group to the lowest complexity level. The method by which the computing device can reduce the complexity of each spin signal in the first group to the lowest complexity level is explained above and will not be repeated here.
[0078] If the number of spin signals in the first group that fall within the preset range of signal values is not greater than the second threshold, it indicates that the number of spin signals in the first group that fall within the preset range of signal values is relatively small. This is the initial stage of solving the Ising model, and higher complexity spin signals can be used to obtain better computational results. The computing device can reduce the complexity of each spin signal in the first group to the second complexity. The method by which the computing device can reduce the complexity of each spin signal in the first group to the second complexity is similar to the method by which it can reduce the complexity of each spin signal in the first group to the first complexity; please refer to the aforementioned explanation for details, which will not be repeated here.
[0079] After obtaining the second set of spin signals, the computing device can execute step 103.
[0080] Step 103: The computing device performs calculations using the second set of spin signals and the problem matrix, and outputs a set of feedback signals. The feedback information is the intermediate calculation result of the first data.
[0081] The operation between the second set of spin signals and the problem matrix is a multiplication operation. The result of multiplying the second set of spin signals and the problem matrix is a set of feedback signals.
[0082] This application does not limit the method of obtaining a set of feedback signals by multiplying the second set of spin signals and the problem matrix. The second set of spin signals is denoted as {T1, T2, ..., T...}. j The problem matrix is } For example, the method of multiplying a second set of spin signals and a problem matrix provided in an embodiment of this application will be explained:
[0083] The matrix multiplication operation between the second set of spin signals and the problem matrix is as follows:
[0084]
[0085] Where, m i Let be the number of 0 elements in the i-th row of the problem matrix.
[0086] See Figure 2 The computing device may include multiple cascaded adders, each connected to multiple multipliers. One multiplier is used to multiply a spin signal from the second set of spin signals with an element from a column of the problem matrix. Each adder is connected to multiple multipliers to obtain the result of each multiplier operation, and the results of each multiplier are summed.
[0087] This application does not limit the number of multipliers connected to each adder or the connection method between each adder and multiplier. Figure 2In this architecture, each adder is connected to four multipliers. Three multipliers are connected to a secondary adder, which sums the results of the three multipliers. This secondary adder is connected to another multiplier via a multiplexer (MUX). Under the control of the computing device, the multiplexer can select to retrieve either the result of the secondary adder or the result of the other multiplier.
[0088] Multiple cascaded adders are connected by secondary selectors. Figure 2 In this system, a secondary selector is set after every three cascaded adders. Under the control of the computing device, the secondary selector can change the connection state between the adder before and after it.
[0089] Figure 2 The multiple cascaded adders and multipliers connected to the adders are used to perform operations on the problem matrix and the second set of spin signals. In this embodiment, based on... Figure 2 The computing device can employ the following two computational methods in the process of performing calculations on the problem matrix and the second set of spin signals, according to the aforementioned structure.
[0090] Method 1: Use a second set of spin signals with higher complexity (such as second complexity) to perform calculations with the problem matrix.
[0091] With the second set of spin signals {T1, T2, ..., T9}, the problem matrix is: For example, see the parameters input to the multiplier. Figure 3A The computing device control selector obtains the calculation result from the secondary adder. Figure 3A The first row of three cascaded adders acquires the sum of the multiplication of the second set of spin signals with the elements of the first column of the problem matrix. The computing device controls a secondary selector to disconnect the preceding and following adders. The last adder in the first row of three cascaded adders can output the sum of the multiplication of the second set of spin signals with the elements of the first column of the problem matrix. The second row of three cascaded adders acquires the sum of the multiplication of the second set of spin signals with the elements of the second column of the problem matrix. The last adder in the second row of three cascaded adders can output the sum of the multiplication of the second set of spin signals with the elements of the first column of the problem matrix. The third row of three cascaded adders acquires the sum of the multiplication of the second set of spin signals with the elements of the third column of the problem matrix. The last adder in the third row of three cascaded adders can output the sum of the multiplication of the second set of spin signals with the elements of the first column of the problem matrix. Figure 3A The diagram only shows the method for multiplying the second set of spin signals with the first three columns of the problem matrix. For the method of multiplying the second set of spin signals with the other columns of the problem matrix, please refer to [link to documentation]. Figure 3AThe difference shown lies in the different parameters input to the multiplier.
[0092] Method 2: Use a second set of spin signals with lower complexity (such as the first complexity) to perform calculations with the problem matrix.
[0093] The computing device can change the connection method of cascaded adders, so that multiple cascaded adders become multiple groups of adders, each group of adders including some of the multiple adders, and the adders in each group of adders are connected in a cascade manner.
[0094] Still taking the second set of spin signals as {T1, T2, ..., T9}, the problem matrix is: For example, see the parameters input to the multiplier. Figure 3B The computing device control selector obtains the computation result of another multiplier (i.e., a multiplier not connected to a secondary adder). Figure 3B The first row of three cascaded adders obtains the sum of the multiplications of the first three spin signals of the second set of spin signals with the first three elements of the first column of the problem matrix. The second row of three cascaded adders obtains the sum of the multiplications of the middle three spin signals of the second set of spin signals with the middle three elements of the first column of the problem matrix. The third row of three cascaded adders obtains the sum of the multiplications of the last three spin signals of the second set of spin signals with the last three elements of the first column of the problem matrix. The computing device controls a secondary selector to connect the preceding and following adders of that secondary selector. Through nine cascaded adders, the sum of the multiplications of the second set of spin signals with each element of the first column of the problem matrix can be obtained. Figure 3B The diagram only shows the method for multiplying the second set of spin signals with the first column of the problem matrix. For the method of multiplying the second set of spin signals with the other columns of the problem matrix, please refer to [link to documentation]. Figure 3B The difference shown lies in the different parameters input to the multiplier.
[0095] As mentioned above, after receiving a set of feedback signals, the computing device can continue to perform calculations. The computing device can sum the set of feedback signals and the first set of spin signals to obtain a third set of spin signals. Then, according to the adjustment mode of the spin signals, the complexity of each spin signal in the third set of spin signals is adjusted, and a fourth set of spin signals is output. The fourth set of spin signals is multiplied by the problem matrix, and another set of feedback signals is output. This process is repeated until the Ising model converges. When the Ising model converges, the resulting set of spin signals is the result of the calculation of the first data.
[0096] There are many ways to determine if the Ising model has converged. For example, a threshold for the number of operations can be set. Each set of feedback signals is considered one operation. When the number of operations reaches the threshold, the Ising model is considered converged, and the spin signal obtained from the last operation is the result of the first set of data. In other words, after each operation, it is determined whether the total number of operations has reached the threshold. If it has not, the feedback signal obtained from this operation is summed with the first set of spin signals to obtain a new set of spin signals. The complexity of this set of spin signals is then adjusted, and the adjusted spin signals are used to perform operations with the problem matrix to obtain a new set of feedback signals. If the threshold is reached, a set of spin signals is determined to have been obtained in this operation.
[0097] For example, a computing device can calculate the Hamiltonian of the Ising model, which is determined based on a set of feedback signals obtained during the calculation. If the Hamiltonian no longer decreases, it indicates that the Ising model has converged, and the calculation is stopped. The device then obtains a set of spin signals generated during the last calculation.
[0098] Based on the same inventive concept as the method embodiments, this application also provides a computing device for performing the above-described... Figure 1 The methods shown in the embodiments are similar to those described in the above embodiments and will not be repeated here. Figure 4 The computing device 400 includes a determining unit 401, an adjusting unit 402, and an arithmetic unit 403. Optionally, it may also include a spin generating unit 404.
[0099] The determining unit 401 determines the adjustment mode of the spin signal based on the problem matrix and the solution strategy of the problem matrix. The problem matrix is used to indicate the first data to be processed. The determining unit 401 can be a circuit composed of complementary metal oxide semiconductor (CMOS), such as a central processing unit, application specific integrated circuit (ASIC), field programmable gate array (FPGA), or complex programmable logic device (CPLD), or it can be other devices or a unit composed of multiple devices.
[0100] Spin generation unit 404 is used to generate the first set of spin signals. The spin generation unit can be a spin array, superconducting circuit, etc., that can generate light pulses. If the type of the first spin signal is a polaron, the spin generation unit 404 can also be a unit that can generate polarons.
[0101] The adjustment unit 402 is used to adjust the complexity of each spin signal in the first set of received spin signals according to the adjustment mode of the spin signals, and output the second set of spin signals. The adjustment module can also be a circuit composed of CMOS, such as a central processing unit, ASIC, FPGA or CPLD, or other devices or a unit composed of multiple devices.
[0102] The computation unit 403 performs calculations using the second set of spin signals and the problem matrix, and outputs a set of feedback signals. These feedback signals indicate the intermediate results of the Ising calculation performed on the first data. This application does not limit the configuration of the computation unit; for example, the structure of the computation unit may be as follows... Figure 2 As shown.
[0103] As one possible implementation strategy, the solution strategy can be to improve the computation speed or to improve the computation accuracy.
[0104] As one possible implementation, when determining the spin signal adjustment mode based on the problem matrix and the solution strategy of the problem matrix, the determining unit 401 may first determine the number of spin signals in the first group of spin signals based on the problem matrix; then, based on the number of spin signals and the solution strategy, determine the spin signal adjustment mode.
[0105] As one possible implementation, if the number of spin signals is greater than a first threshold, when determining the adjustment mode of the spin signals based on the number of spin signals and the solution strategy, if the solution strategy is to improve the calculation speed, the adjustment mode of the spin signals is determined to reduce the complexity of each spin signal in the first group of spin signals to a first complexity; if the solution strategy is to improve the calculation accuracy, the adjustment mode of the spin signals is determined to reduce the complexity of each spin signal in the first group of spin signals to a second complexity, wherein the first complexity is less than the second complexity.
[0106] As one possible implementation, the number of spin signals is no greater than a first threshold. When determining the adjustment mode of the spin signals based on the number of spin signals and the solution strategy, if the solution strategy is to improve the calculation speed, the adjustment mode of the spin signals is determined to be an adaptive adjustment mode. The adaptive adjustment mode is to adjust the complexity of each spin signal in the first group of spin signals according to the spin signals in the first group of spin signals. If the solution strategy is to improve the calculation accuracy, the adjustment mode of the spin signals is determined to reduce the complexity of each spin signal in the first group of spin signals to a second complexity.
[0107] As one possible implementation, if the spin signal adjustment mode is an adaptive adjustment mode, when the adjustment unit 402 adjusts the complexity of each spin signal in the received first group of spin signals according to the spin signal adjustment mode, it can first determine the number of spin signals in the first group of spin signals that are within the preset range of signal values; if the number of spin signals in the first group of spin signals that are within the preset range of signal values is greater than a second threshold, the complexity of each spin signal in the first group of spin signals is reduced to a first complexity; if the number of spin signals in the first group of spin signals that are within the preset range of signal values is not greater than the second threshold, the complexity of each spin signal in the first group of spin signals is reduced to a second complexity, wherein the first complexity is less than the second complexity.
[0108] It should be noted that the division of units in the embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. The functional units in the embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units.
[0109] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another, and the computer-readable storage medium can be any available medium accessible to a computer. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive (SSD).
[0110] Those skilled in the art will understand that embodiments of this application can be provided as methods or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0111] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0112] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0113] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0114] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A computational method for solving the Ising model, characterized by, The method comprises: determining an adjustment mode of a spin signal according to a problem matrix and a solution strategy of the problem matrix, wherein the spin signal is an optical signal, and a signal value of the spin signal is an amplitude of the optical signal; or the spin signal is an electrical signal, and the signal value of the spin signal is a voltage value of the electrical signal; adjusting complexity of each spin signal in a first group of received spin signals according to the adjustment mode of the spin signal, and outputting a second group of spin signals; performing operation on the second group of spin signals and the problem matrix, and outputting a group of feedback signals, wherein the group of feedback signals is used to indicate an intermediate operation result of performing Ising calculation on the first data, and the operation on the second group of spin signals and the problem matrix is implemented by using a plurality of cascaded adders.
2. The method of claim 1, wherein, The solution strategy is to improve operation speed or improve operation accuracy.
3. The method of claim 1 or 2, wherein, The method further comprises: determining a number of spin signals in the first group of spin signals according to the problem matrix; determining the adjustment mode of the spin signal according to the number of spin signals and the solution strategy.
4. The method of claim 3, wherein, The number of spin signals is greater than a first threshold value, and the adjustment mode of the spin signal is determined according to the number of spin signals and the solution strategy, and comprises: if the solution strategy is to improve operation speed, the adjustment mode of the spin signal is determined to be reducing the complexity of each spin signal in the first group of spin signals to a first complexity; or if the solution strategy is to improve operation accuracy, the adjustment mode of the spin signal is determined to be reducing the complexity of each spin signal in the first group of spin signals to a second complexity, wherein the first complexity is less than the second complexity.
5. The method of claim 3, wherein, The number of spin signals is not greater than the first threshold value, and the adjustment mode of the spin signal is determined according to the number of spin signals and the solution strategy, and comprises: if the solution strategy is to improve operation speed, the adjustment mode of the spin signal is determined to be an adaptive adjustment mode, and the adaptive adjustment mode is to adjust the complexity of each spin signal in the first group of spin signals according to the spin signal in the first group of spin signals; or if the solution strategy is to improve operation accuracy, the adjustment mode of the spin signal is determined to be reducing the complexity of each spin signal in the first group of spin signals to the second complexity.
6. The method of claim 5, wherein, If the adjustment mode of the spin signal is the adaptive adjustment mode, the complexity of each spin signal in the first group of received spin signals is adjusted according to the adjustment mode of the spin signal, and comprises: if the number of spin signals in the first group of spin signals within a preset range of signal values is greater than a second threshold value, the complexity of each spin signal in the first group of spin signals is reduced to the first complexity; or if the number of spin signals in the first group of spin signals within a preset range of signal values is not greater than the second threshold value, the complexity of each spin signal in the first group of spin signals is reduced to the second complexity. In a case where a number of spin signals in the first group of spin signals that are within the preset range of the signal value is not greater than a second threshold, the complexity of each spin signal in the first group of spin signals is reduced to a second complexity, wherein the first complexity is less than the second complexity.
7. A computing device for solving an Ising model, characterized in that, The device comprises: A determination unit is configured to determine an adjustment mode of a spin signal according to a problem matrix and a solution strategy of the problem matrix, the problem matrix being used to indicate first data to be operated, wherein the spin signal is an optical signal, and a signal value of the spin signal is an amplitude of the optical signal; or the spin signal is an electrical signal, and the signal value of the spin signal is a voltage value of the electrical signal. An adjustment unit is configured to adjust complexity of each spin signal in a first group of received spin signals according to the adjustment mode of the spin signal, and output a second group of spin signals. An operation unit is configured to perform operation on the second group of spin signals and the problem matrix, and output a group of feedback signals, the group of feedback signals being used to indicate an intermediate operation result of performing Ising calculation on the first data, wherein the operation on the second group of spin signals and the problem matrix is implemented by using a plurality of cascaded adders.
8. The computing device of claim 7, wherein, The solution strategy is to improve operation speed or improve operation accuracy.
9. The computing device of claim 7 or 8, wherein, When determining the adjustment mode of the spin signal according to the problem matrix and the solution strategy of the problem matrix, the determination unit is specifically configured to: determine a number of spin signals in the first group of spin signals according to the problem matrix; and determine the adjustment mode of the spin signal according to the number of spin signals and the solution strategy.
10. The computing device of claim 9, wherein, The number of spin signals is greater than a first threshold, and when determining the adjustment mode of the spin signal according to the number of spin signals and the solution strategy, the determination unit is specifically configured to: if the solution strategy is to improve operation speed, determine that the adjustment mode of the spin signal is to reduce the complexity of each spin signal in the first group of spin signals to a first complexity; or if the solution strategy is to improve operation accuracy, determine that the adjustment mode of the spin signal is to reduce the complexity of each spin signal in the first group of spin signals to a second complexity, wherein the first complexity is less than the second complexity.
11. The computing device of claim 9, wherein, The number of spin signals is not greater than the first threshold, and when determining the adjustment mode of the spin signal according to the number of spin signals and the solution strategy, the determination unit is specifically configured to: if the solution strategy is to improve operation speed, determine that the adjustment mode of the spin signal is an adaptive adjustment mode, the adaptive adjustment mode being to adjust the complexity of each spin signal in the first group of spin signals according to a spin signal in the first group of spin signals; or if the solution strategy is to improve operation accuracy, determine that the adjustment mode of the spin signal is to reduce the complexity of each spin signal in the first group of spin signals to a second complexity.
12. The computing device of claim 11, wherein, If the adjustment mode of the spin signal is the adaptive adjustment mode, when adjusting the complexity of each spin signal in the first group of received spin signals according to the adjustment mode of the spin signal, the adjustment unit is specifically configured to: In a case where the number of spin signals in the first group of spin signals that are within a preset range of signal values is greater than a second threshold, the complexity of each spin signal in the first group of spin signals is reduced to a first complexity; or In a case where the number of spin signals in the first group of spin signals that are within the preset range of signal values is not greater than the second threshold, the complexity of each spin signal in the first group of spin signals is reduced to a second complexity, wherein the first complexity is less than the second complexity.
Citation Information
Patent Citations
Quantum computing device of ising model
JP2015114354A
Optimization problem arithmetic method and optimization problem arithmetic apparatus
US20200089475A1