An optical Ising computing method and system based on a dual digital micromirror device

By employing an optical ising calculation method based on dual digital micromirror devices and utilizing incoherent light cascade intensity modulation and bit-plane scanning technology, the problems of low stability and low refresh rate of existing optical ising technologies are solved, achieving high-speed and stable optical ising solutions, which are suitable for real-time calculation of large-scale dense ising models.

CN122131875APending Publication Date: 2026-06-02上海量感智能科技有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
上海量感智能科技有限公司
Filing Date
2026-02-28
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing optical ising technology relies on coherent light, has poor stability and low refresh rate, making it difficult to apply on a large scale in engineering environments, and lacks pixel-by-pixel multiplicative operation capabilities.

Method used

An optical ising calculation method based on dual digital micromirror devices (DMD) is adopted. Pixel-wise multiplication is achieved through cascaded intensity modulation of incoherent light and bit-plane scanning technology. Strict timing synchronization is performed by combining an FPGA control module to build a high-speed and stable optical ising solver.

Benefits of technology

It achieves high-speed Ising computation under incoherent light conditions, solves the stability problem of coherent optical paths, meets the real-time computation requirements of large-scale dense Ising models, and ensures the physical correctness and mathematical accuracy of the computation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122131875A_ABST
    Figure CN122131875A_ABST
Patent Text Reader

Abstract

This invention relates to an optical Ising calculation method and system based on dual digital micromirror devices (DMDs). First, the combinatorial optimization problem is mapped to an Ising model. Multiple mask vectors are constructed, and each mask vector is decomposed into multiple binary bit planes. A spin configuration matrix is ​​constructed and loaded into DMD-A. For each mask vector, its binary bit planes are sequentially loaded into DMD-B. The light intensity modulated by the two DMDs is collected and processed. The optical inner product is obtained by combining the bit-weighted components, and then the energy contribution value of the mask vector is calculated. The total Hamiltonian is obtained by summing all contributions. The energy difference is calculated by randomly flipping the spins and repeating the above steps. The probability of accepting the current flip is calculated based on the energy difference. This process is iterated until the maximum number of iterations is reached to obtain the final solution. The system is used to implement the above method. Compared with the prior art, this invention can achieve a high-speed, stable, and coherently independent optical Ising solution method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of optical computation, combinatorial optimization, and spatial light modulation and control, and in particular to an optical ising calculation method and system based on dual digital micromirror devices. Background Technology

[0002] Ising models are an important class of combinatorial optimization models, widely used to solve NP-hard problems such as graph partitioning, clustering, logical constraints, route planning, and resource scheduling. Traditional electronic computing, when solving large-scale Ising models, requires performing dense matrix operations on the interaction matrix J, with a complexity typically O(n log n). even This makes it difficult to meet the real-time computational needs of large-scale problems. To improve the solution speed, existing research has proposed the Optical Ising Machine (OIM), which constructs the Ising energy function through optical interference, optical injection locking, or optical cavity coupling, allowing the system energy to evolve naturally in the physical process. For details, see Chinese patent application CN116184739A, which provides a wavelength division multiplexing-based optical Ising model calculation method. In the optical Ising model calculation, different information is modulated onto optical signals of different wavelengths through wavelength division multiplexing technology. Although it can solve the problem that existing systems cannot simulate arbitrary Ising models, it still has the following drawbacks: 1) 1) Strong dependence on coherent interference and poor stability: Coherent optical paths need to maintain nanometer-level optical path stability and are highly sensitive to vibration, temperature drift and air disturbance, making them difficult to deploy in engineering; 2) The spatial light modulator (SLM) it uses has a low refresh rate, which cannot meet the high-iteration Ising update requirements. Common liquid crystal SLMs are usually only tens to hundreds of Hz, far lower than the kHz to MHz speed expected by Ising calculations; 3) Phase modulators are difficult to implement pixel-by-pixel multiplication operations. It should be noted that Ising construction requires pixel-by-pixel multiplication of "spin × mode vector", while SLM is based on phase modulation, which is difficult to achieve under incoherent conditions.

[0003] In summary, existing optical ising technologies suffer from problems such as reliance on coherent light, difficulty in achieving stability, limited refresh rates, or lack of bit-by-bit planar synchronization capabilities, making them difficult to apply on a large scale in engineering environments. How to solve these shortcomings is the problem that this invention aims to address. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the existing technology and provide an optical Ising calculation method and system based on dual digital micromirror devices, and to construct a high-speed, stable, and coherently independent optical Ising solution method.

[0005] The objective of this invention can be achieved through the following technical solutions: According to a first aspect of the present invention, an optical ising calculation method based on a dual digital micromirror device is provided, wherein the dual digital micromirror device includes a first digital micromirror device and a second digital micromirror device, and the method includes: S1. Map the combinatorial optimization problem to be solved to the Ising model, construct an interaction matrix based on the Ising model, construct at least two mask vectors based on the interaction matrix, construct a grayscale image for each mask vector and decompose it into multiple sets of binary bit planes; and initialize the spin configuration. S2. Generate a spin configuration matrix based on the spin configuration, and load the spin configuration matrix onto the micromirror array surface of the first digital micromirror device, so that the state of each micromirror matches the corresponding spin configuration. S3. For each mask vector, load the corresponding binary bit plane onto the second digital micromirror device one by one, and collect the light intensity after the light passes through the second digital micromirror device and the first digital micromirror device in sequence when loading the binary bit plane, and process it; combine the processed light intensity of each binary bit plane according to the bit weight to obtain the optical inner product, and calculate the energy contribution value of the corresponding mask vector based on the optical inner product. S4. Accumulate the energy contribution values ​​of all mask vectors to obtain the total Hamiltonian energy; S5. Select any element in the spin configuration that is not marked as flipped and flip it. Re-execute S2~S4 based on the flipped spin configuration, calculate the total Hamiltonian energy difference before and after the spin flip, calculate the probability of accepting the current flip based on the energy difference, if the probability is greater than the current random threshold, accept the current flip and mark the currently flipped element as flipped; otherwise, reject the current flip and mark the currently flipped element as flipped. S6. Repeat step S5 until the maximum number of iterations is reached, and use the final spin configuration matrix as the final Ising calculation result.

[0006] As a preferred technical solution, the method for constructing the mask vector is as follows: decompose the interaction matrix into multiple principal components, each of which includes an eigenvector and its corresponding eigenvalue; select at least two principal components and use their corresponding eigenvalues ​​as mask vectors.

[0007] As a preferred technical solution, the method for constructing the grayscale image is as follows: the mask vector and its transpose are multiplied by an outer product to obtain a mask matrix; the mask matrix is ​​normalized to 0-255 to generate an 8-bit grayscale image.

[0008] As a preferred technical solution, the light is emitted by an incoherent light source or a low-coherence light source.

[0009] As a preferred technical solution, the steps of modulating light using the second digital micromirror device and the first digital micromirror device include: The light is first reflected by the second digital micromirror device and modulated by the binary bit plane loaded on it to form a mask light field. The mask light field is processed and imaged on the micromirror array surface of the first digital micromirror device at a magnification of 1:1. In the first digital micromirror device, if the spin configuration corresponding to the state of the micromirror is The light imaged on the micromirror is reflected to the photodetector; if the spin configuration corresponding to the state of the micromirror is... The light rays imaged on the micromirror are then deflected to the absorption area and discarded, thus completing the modulation.

[0010] As a preferred technical solution, the method for processing the light intensity includes background light subtraction, normalization correction, and multiple sampling to obtain the average light intensity.

[0011] As a preferred technical solution, the method for calculating the optical inner product is as follows: ; in, Indicates the first The optical inner product corresponding to each mask vector; Indicates for the first A mask vector, representing the number of bits in the currently loaded two-dimensional plane; Indicates for the first A mask vector, loaded with bits The light intensity collected when in a binary plane.

[0012] As a preferred technical solution, the method for calculating the energy contribution value is as follows: ; in, Indicates the first The eigenvalues ​​corresponding to each mask vector; Indicates the first The energy contribution value corresponding to each mask vector; Indicates the first The optical inner product corresponding to each mask vector.

[0013] As a preferred technical solution, the flipping is: flipping the value of any element in the spin configuration, that is, reversing the original value. Flip the elements to The original value is Flip the elements to .

[0014] According to a second aspect of the present invention, an optical ising computing system based on dual digital micromirror devices is provided, the system comprising a first digital micromirror device, a second digital micromirror device, a 4f pixel conjugate module, an incoherent light source, a photodetector, and an FPGA control module. The FPGA control module performs the following steps: The problem to be solved is a combinatorial optimization problem mapped to the Ising model. An interaction matrix is ​​constructed based on the Ising model. At least two mask vectors are constructed based on the interaction matrix. For each mask vector, a grayscale image is constructed and decomposed into multiple sets of binary bit planes. The spin configuration is then initialized. A spin configuration matrix is ​​generated based on the spin configuration, and the spin configuration matrix is ​​loaded onto the micromirror array surface of the first digital micromirror device so that the state of each micromirror matches the corresponding spin configuration. For each mask vector, the corresponding binary bit plane is loaded onto the second digital micromirror device one by one. When loading the binary bit plane each time, the incoherent light source is controlled to send light, and the light intensity of the light collected by the photodetector is received after passing through the second digital micromirror device, the 4f pixel conjugate module and the first digital micromirror device in sequence. After processing each binary bit plane, the light intensity is combined according to the bit weight to obtain the optical inner product. The energy contribution value of the corresponding mask vector is calculated based on the optical inner product. The total Hamiltonian energy is obtained by accumulating the energy contribution values ​​of all mask vectors. Select any element in the spin configuration that is not marked as flipped and flip it. Based on the flipped spin configuration, re-execute the spin matrix loading, binary bit plane loading, and total Hamiltonian energy calculation, and calculate the total Hamiltonian energy difference before and after the spin flip. Calculate the probability of accepting the current flip based on the energy difference. If the probability is greater than the current random threshold, accept the current flip and mark the currently flipped element as flipped; otherwise, reject the current flip and mark the currently flipped element as flipped. Repeat the spin configuration element flipping step until the maximum number of iterations is reached, and use the final spin configuration matrix as the final Ising calculation result.

[0015] Compared with the prior art, the present invention has the following beneficial effects: 1) This invention provides an Ising calculation method based on a cascaded structure of dual DMDs. The core operation vector inner product of the Ising model is simulated optically. The cascaded structure of dual DMDs is completely independent of coherent interference through light intensity modulation, so that the coherent optical path is not affected by vibration or temperature drift. In addition, it can also meet the requirement of stable operation in normal environment without polarization control. Furthermore, when loading dual DMDs, it is ensured that the two are carried out synchronously, and the process of light passing through the second digital micromirror device, the first digital micromirror device and the light intensity acquisition is integrated into one, completely bypassing the PWM grayscale mechanism of the DMD. The optical energy measurement is no longer affected by subframe disturbance and the uncontrollable timing of the DMD controller.

[0016] 2) Unlike commercial DMDs, which cannot achieve precise synchronization with PDs in terms of PWM grayscale, this invention introduces bit-plane scanning technology. By precisely loading multiple independent bit planes in sequence and fixing the exposure light intensity acquisition window, it ensures precise exposure of each bit plane, fundamentally solving the timing synchronization problem and thus guaranteeing the physical correctness of optical calculations.

[0017] 3) To address the issue of low refresh rate in liquid crystal SLMs, this invention employs a high-speed DMD as the core computing unit, combined with a dual DMD × 8-bit scanning architecture. For a 1080p resolution system, it can process approximately 2 million spins at once, requiring only 8 exposures for a single inner product operation. The computing speed can reach thousands of inner products per second, far exceeding traditional electronic computing and low-speed optical solutions, thus meeting the needs of high-iteration Ising updates.

[0018] 4) This invention overcomes the limitation of phase-type modulators in achieving precise multiplicative operations under incoherent light. Specifically, utilizing the binary intensity modulation characteristics of the DMD, each mask vector is decomposed into eight binary bit planes through bit-plane decomposition and sequentially projected by the second digital micromirror device (DMD-B); the exposure of each bit plane achieves physical multiplication through the spatial light gating mechanism of the first digital micromirror device (DMD-A), i.e., the spin configuration is... The micromirror is in the ON state, reflecting the corresponding mask light to the detector; this process is equivalent to multiplying by 1. The spin configuration is... The micromirror is in the OFF state, deflecting the light to the absorption region for discarding. This process is equivalent to multiplying by 0, thus completing pixel-by-pixel spin multiplication and pixel-by-pixel intensity multiplication of the mode vector in the optical path. This not only correctly constructs the energy function of the Ising model, ensuring the mathematical accuracy of the optical calculations, but also directly provides the results through the above optical process. This avoids the need for dense matrix operations on the interaction matrix J in traditional electronic calculations when solving large-scale Ising models, which typically have a complexity of O(n log n). even The present invention addresses the problem of difficulty in meeting the real-time computational needs of large-scale problems by providing a method suitable for solving large-scale dense Ising models. Attached Figure Description

[0019] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a schematic diagram of the DMD-B loading binary bit plane of the present invention; Figure 3 This is a schematic diagram of the DMD-A spin modulation of the present invention; Figure 4 This is a schematic diagram illustrating the optical inner product calculation of the present invention; Figure 5 This is a flowchart of the total Hamiltonian energy calculation for this invention; Figure 6 This is a flowchart of the simulated annealing algorithm of the present invention; Figure 7 This is a system framework diagram of the present invention. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0021] Example 1 Existing optical Ising calculations suffer from several key problems, including reliance on coherent optical interference, lack of high speed, difficulty in large-scale expansion, and the inability of traditional commercial DMD grayscale modulation to be precisely synchronized with photoelectric detection. Furthermore, traditional Ising calculations multiply the interaction matrix element-wise with the spin configuration matrix, as shown in the following equation: ; in, Ising indicates that energy is calculated; Represents the first in the interaction matrix Line number Column elements; The first spin configuration One element; The first spin configuration The computational complexity varies due to the size of the interaction matrix and spin configuration, making it unsuitable for large-scale optimization calculations.

[0022] To address this, this invention proposes an optical ising calculation method based on dual digital micromirror devices (DMDs). This method utilizes a cascaded intensity modulation structure of incoherent light to achieve vector multiplication, bit-plane scanning to achieve mask encoding, and FPGA to achieve strict timing synchronization. This results in a high-speed, stable, and coherently independent optical ising solver. The overall process of this invention is as follows: Figure 1 As shown, optical ising calculations using a first digital micromirror device and a second digital micromirror device include the following steps: S1. Map the combinatorial optimization problem to be solved to the Ising model, construct an interaction matrix based on the Ising model, construct at least two mask vectors based on the interaction matrix, construct a grayscale image for each mask vector and decompose it into multiple sets of binary bit planes; and initialize the spin configuration.

[0023] S11. Arrange the interaction matrix as follows: Figure 2 The method shown decomposes the data into multiple principal components. Each principal component includes a feature vector and its corresponding feature value. At least two principal components are selected, and their corresponding feature components are used as mask vectors.

[0024] In this embodiment, the interaction matrix is ​​set to be split into and The two principal components, and the corresponding mask vectors they construct are... and This is to prepare data for DMD-B.

[0025] S12. Sequentially decompose the mask vectors We obtain it by performing an outer product with its transpose. The mask matrix is ​​constructed and normalized to 0-255 to form an 8-bit grayscale image, and the grayscale image is decomposed into 8 groups of binary bit planes.

[0026] S13. Randomly generate an initial spin configuration with the same length as the eigenvector. Theoretically, the element in any spin configuration can take the value of or However, when mapped to digital circuits, its value is expressed as... and Since the multiplication of -1 and 1 can be expressed as the inverse XOR logic of 0 and 1 in digital circuits, in subsequent iterations, based on this initial spin configuration, any element in the spin configuration is randomly flipped.

[0027] S2, Calculate spin configuration The outer product of itself and its transpose is used as the spin configuration matrix. The spin configuration matrix is ​​loaded onto the surface of the micromirror array of the first digital micromirror device (DMD-A), so that the state of each micromirror matches the corresponding spin configuration. Through the above operation, it is ensured that when light shines on the DMD-A, a binary optical modulation pattern corresponding to the spin configuration matrix is ​​formed.

[0028] S3. For each mask vector, load the corresponding binary bit plane onto the second digital micromirror device (DMD-B) one by one. When loading the binary bit plane, collect the light intensity after the light has been modulated by DMD-B and DMD-A in sequence, and process it. Combine the processed light intensity of each binary bit plane according to the bit weight to obtain the optical inner product. Calculate the energy contribution value of the corresponding mask vector based on the optical inner product.

[0029] S31. For each mask vector, load its corresponding 8 binary bit planes into DMD-B in bit order.

[0030] S32, optical field modulation.

[0031] S321. The light emitted by the incoherent or low-coherence light source is first reflected by the DMD-B and modulated by the binary bit plane loaded on it to form the mask light field.

[0032] S322. After the mask light field is processed by a 4f pixel conjugate module consisting of two lenses with the same focal length, it is imaged onto the micromirror array surface of DMD-A at a magnification ratio of 1:1. By utilizing the imaging characteristics of the 4f pixel conjugate module, it is ensured that the light beam emitted by each micromirror unit of DMD-B accurately covers the corresponding micromirror unit of DMD-A, thereby enabling the reflected light from the two DMDs to complete intensity multiplicative modulation at the pixel level.

[0033] In the first digital micromirror device, if the spin configuration corresponding to the state of the micromirror is The light imaged on the micromirror is reflected to the photodetector, which is equivalent to multiplying by 1; if the spin configuration corresponding to the state of the micromirror is The light rays imaged on the micromirror are deflected to the light-absorbing area and discarded, effectively multiplied by 0, thus realizing pixel-by-pixel multiplication in the optical path and completing modulation.

[0034] It can be seen that the function of DMD-A is equivalent to constructing a set of optical fields in the spatial domain. The weighted mask is used to achieve binary clipping of the mask rays by spin configuration. The process is as follows: Figure 3 As shown.

[0035] S33, Light Intensity Acquisition and Processing.

[0036] After S31~S32 is executed, PD sampling is triggered within the exposure window to collect light intensity. The collected light intensity is then subjected to background light subtraction and normalization correction. After multiple samplings, the average light intensity is taken as the final light intensity of the current binary bit plane.

[0037] S34. After processing each binary bit plane, the light intensity is combined according to the bit weight to obtain the optical inner product.

[0038] like Figure 4 As shown, the light intensity collected above is essentially the mask-spin inner product, which is the pixel-by-pixel product of the binary bit plane corresponding to the mask vector and the spin configuration, i.e., the spatial summation. Therefore, the optical inner product of the corresponding mask vector is calculated as follows: ; in, Indicates the first The optical inner product corresponding to each mask vector; Indicates for the first A mask vector, representing the number of bits in the currently loaded two-dimensional plane; Indicates for the first A mask vector, loaded with bits The light intensity collected when in a binary plane.

[0039] S35. Calculate the energy contribution value of the corresponding mask vector based on the optical inner product. The calculation process is as follows: Figure 5 As shown, its expression is: ; in, Indicates the first The eigenvalues ​​corresponding to each mask vector; Indicates the first The energy contribution value corresponding to each mask vector; Indicates the first The optical inner product corresponding to each mask vector.

[0040] Eight brightness samples are combined using bit-weighted synthesis to obtain an effective optical response. The entire process is automatically completed by the light field, which is equivalent to thousands of matrix multiplications performed by a GPU / CPU.

[0041] S4. The total Hamiltonian energy is obtained by summing the energy contributions of all mask vectors, i.e.: .

[0042] S5. Select any element in the spin configuration that is not marked as flipped and flip it. Based on the flipped spin configuration, re-execute S2~S4, calculate the total Hamiltonian energy difference before and after the spin flip, and calculate the probability of accepting the current flip based on the energy difference. If the probability is greater than the current random threshold, accept the current flip and mark the currently flipped element as flipped; otherwise, reject the current flip and mark the currently flipped element as flipped. The process is as follows. Figure 6 As shown.

[0043] It should be noted that the above-mentioned flipping refers to inverting the value of any element in the spin configuration, that is, the original value is... Flip the elements to The original value is Flip the elements to .

[0044] Step S5 is based on the simulated annealing algorithm. That is, whether spin flip is accepted or not is determined by the annealing probability judgment based on the energy difference calculated above and the temperature parameter in the simulated annealing algorithm. Random numbers are generated in the above process for probability comparison, thereby realizing hardware acceleration of the annealing process.

[0045] S6. Repeat step S5 until the maximum number of iterations is reached, and use the final spin configuration matrix as the final Ising calculation result.

[0046] Example 2 This embodiment provides an optical ising calculation system based on dual digital micromirror devices to implement the above-described method. The system includes a first digital micromirror device, a second digital micromirror device, a 4f pixel conjugate module, an incoherent light source, a photodetector, and an FPGA control module. The overall framework is described below. Figure 7 The system comprises: DMD-A for displaying the binary pattern of the spin configuration; DMD-B for loading the 8-bit binary bit plane of the mask vector, with the FPGA controlling the bit-by-bit display and exposure triggering of the binary bit plane; a 4f pixel conjugate module enabling pixel-by-pixel multiplication in the spatial domain between the two DMDs, achieving intensity modulation of the two DMDs; an incoherent light source for emitting incoherent or coherent light; a photodetector (PD / CMOS) for capturing the total light intensity of each bit plane, facilitating subsequent calculation of the optical inner product of the mask vector and the spin configuration; and an FPGA control module for managing the timing synchronization of the two DMDs and the PD / CMOS, and executing the following steps: A) Map the combinatorial optimization problem to be solved to the Ising model, construct an interaction matrix based on the Ising model, construct at least two mask vectors based on the interaction matrix, construct a grayscale image for each mask vector and decompose it into multiple sets of binary bit planes; and initialize the spin configuration.

[0047] B) Generate a spin configuration matrix based on the spin configuration, and load the spin configuration matrix onto the micromirror array surface of the first digital micromirror device so that the state of each micromirror matches the corresponding spin configuration.

[0048] C) For each mask vector, the corresponding binary bit plane is loaded onto the second digital micromirror device one by one. When loading the binary bit plane each time, the incoherent light source is controlled to send light, and the light intensity of the light collected by the photodetector is received after passing through the second digital micromirror device, the 4f pixel conjugate module and the first digital micromirror device in sequence.

[0049] In steps B) and C), the FPGA control module performs bit-by-bit synchronization control of DMD-A, DMD-B, and the photodetector. This process involves the following steps executed sequentially: 1) Bit plane loading completion detection, including mirror element latch signal or fixed delay. Since black screen or intermediate frame may be generated when DMD switches screens, this embodiment avoids capturing this waste frame by latching signal or adding a certain delay. 2) Once the DMD-B completes loading of a binary bit plane, the exposure window is triggered periodically to collect light intensity. 3) Light intensity data caching and bitwise combination, the process is detailed in step S3 of embodiment 1, and will not be repeated in this embodiment.

[0050] Execute steps D) to F) to complete the spin flip instruction and state rollback mechanism.

[0051] D) After processing the light intensity of each binary bit plane, combine the light intensity according to the bit weight to obtain the optical inner product. Calculate the energy contribution value of the corresponding mask vector based on the optical inner product. Then, sum the energy contribution values ​​of all mask vectors to obtain the total Hamiltonian energy.

[0052] E) Select any element in the spin configuration that is not marked as flipped and flip it. Based on the flipped spin configuration, re-execute the spin matrix loading, binary bit plane loading, and total Hamiltonian energy calculation, and calculate the total Hamiltonian energy difference before and after the spin flip. Calculate the probability of accepting the current flip based on the energy difference. If the probability is greater than the current random threshold, accept the current flip and mark the currently flipped element as flipped. Otherwise, reject the current flip and mark the currently flipped element as flipped.

[0053] F) Repeat the spin configuration element flipping step until the maximum number of iterations is reached, and use the final spin configuration matrix as the final Ising calculation result.

[0054] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for calculating optical ising based on a dual-digital micromirror device, characterized in that, The dual digital micromirror device includes a first digital micromirror device and a second digital micromirror device, and the method includes: S1. Map the combinatorial optimization problem to be solved to the Ising model, construct an interaction matrix based on the Ising model, construct at least two mask vectors based on the interaction matrix, construct a grayscale image for each mask vector and decompose it into multiple sets of binary bit planes; and initialize the spin configuration. S2. Generate a spin configuration matrix based on the spin configuration, and load the spin configuration matrix onto the micromirror array surface of the first digital micromirror device, so that the state of each micromirror matches the corresponding spin configuration. S3. For each mask vector, load the corresponding binary bit plane onto the second digital micromirror device one by one, and collect the light intensity after the light passes through the second digital micromirror device and the first digital micromirror device in sequence when loading the binary bit plane, and process it; combine the processed light intensity of each binary bit plane according to the bit weight to obtain the optical inner product, and calculate the energy contribution value of the corresponding mask vector based on the optical inner product. S4. Accumulate the energy contribution values ​​of all mask vectors to obtain the total Hamiltonian energy; S5. Select any element in the spin configuration that is not marked as flipped and flip it. Re-execute S2~S4 based on the flipped spin configuration, calculate the total Hamiltonian energy difference before and after the spin flip, calculate the probability of accepting the current flip based on the energy difference, if the probability is greater than the current random threshold, accept the current flip and mark the currently flipped element as flipped; otherwise, reject the current flip and mark the currently flipped element as flipped. S6. Repeat step S5 until the maximum number of iterations is reached, and use the final spin configuration matrix as the final Ising calculation result.

2. The optical ising calculation method based on a dual-digital micromirror device according to claim 1, characterized in that, The method for constructing the mask vector is as follows: the interaction matrix is ​​decomposed into multiple principal components, each of which includes an eigenvector and its corresponding eigenvalue; Select at least two principal components and use their corresponding feature components as mask vectors.

3. The optical ising calculation method based on a dual-digital micromirror device according to claim 1, characterized in that, The method for constructing the grayscale image is as follows: the mask vector and its transpose are multiplied by an outer product to obtain a mask matrix; the mask matrix is ​​normalized to 0-255 to generate an 8-bit grayscale image.

4. The optical ising calculation method based on a dual-digital micromirror device according to claim 1, characterized in that, The light is emitted by an incoherent or low-coherence light source.

5. The optical ising calculation method based on a dual-digital micromirror device according to claim 1, characterized in that, The steps of modulating light using the second digital micromirror device and the first digital micromirror device include: The light is first reflected by the second digital micromirror device and modulated by the binary bit plane loaded on it to form a mask light field. The mask light field is processed and imaged on the micromirror array surface of the first digital micromirror device at a magnification of 1:

1. In the first digital micromirror device, if the spin configuration corresponding to the state of the micromirror is as follows: The light imaged on the micromirror is reflected to the photodetector; if the spin configuration corresponding to the state of the micromirror is... The light rays imaged on the micromirror are then deflected to the absorption area and discarded, thus completing the modulation.

6. The optical ising calculation method based on a dual-digital micromirror device according to claim 1, characterized in that, The methods for processing the light intensity include background light subtraction, normalization correction, and averaging the light intensity through multiple samplings.

7. The optical ising calculation method based on a dual-digital micromirror device according to claim 1, characterized in that, The method for calculating the optical inner product is as follows: ; in, Indicates the first The optical inner product corresponding to each mask vector; Indicates for the first A mask vector, representing the number of bits in the currently loaded two-dimensional plane; Indicates for the first A mask vector, loaded with bits The light intensity collected when in a binary plane.

8. The optical ising calculation method based on a dual-digital micromirror device according to claim 1, characterized in that, The method for calculating the energy contribution value is as follows: ; in, Indicates the first The eigenvalues ​​corresponding to each mask vector; Indicates the first The energy contribution value corresponding to each mask vector; Indicates the first The optical inner product corresponding to each mask vector.

9. The optical ising calculation method based on a dual-digital micromirror device according to claim 1, characterized in that, The flipping refers to: flipping the value of any element in the spin configuration, that is, reversing the original value. Flip the elements to The original value is Flip the elements to .

10. An optical ising computing system based on a dual digital micromirror device, characterized in that, The system includes a first digital micromirror device, a second digital micromirror device, a 4f pixel conjugate module, an incoherent light source, a photodetector, and an FPGA control module; The FPGA control module performs the following steps: The problem to be solved is a combinatorial optimization problem mapped to the Ising model. An interaction matrix is ​​constructed based on the Ising model. At least two mask vectors are constructed based on the interaction matrix. For each mask vector, a grayscale image is constructed and decomposed into multiple sets of binary bit planes. And initialize the spin configuration; A spin configuration matrix is ​​generated based on the spin configuration, and the spin configuration matrix is ​​loaded onto the micromirror array surface of the first digital micromirror device so that the state of each micromirror matches the corresponding spin configuration. For each mask vector, the corresponding binary bit plane is loaded onto the second digital micromirror device one by one. When loading the binary bit plane each time, the incoherent light source is controlled to send light, and the light intensity of the light collected by the photodetector is received after passing through the second digital micromirror device, the 4f pixel conjugate module and the first digital micromirror device in sequence. After processing each binary bit plane, the light intensity is combined according to the bit weight to obtain the optical inner product. The energy contribution value of the corresponding mask vector is calculated based on the optical inner product. The total Hamiltonian energy is obtained by summing the energy contributions of all mask vectors. Select any element in the spin configuration that is not marked as flipped and flip it. Based on the flipped spin configuration, re-execute the spin matrix loading, binary bit plane loading, and total Hamiltonian energy calculation, and calculate the total Hamiltonian energy difference before and after the spin flip. Calculate the probability of accepting the current flip based on the energy difference. If the probability is greater than the current random threshold, accept the current flip and mark the currently flipped element as flipped; otherwise, reject the current flip and mark the currently flipped element as flipped. Repeat the spin configuration element flipping step until the maximum number of iterations is reached, and use the final spin configuration matrix as the final Ising calculation result.