Method and system for realizing FPGA Isin machine based on QPSO and QGA hybrid optimization
By combining a hybrid optimization strategy of QPSO and QGA on the FPGA platform, fast global search and fine optimization are achieved, which solves the problems of low solution quality and slow convergence speed of existing FPGA Ising machines in large-scale combinatorial optimization problems, and improves the accuracy and robustness of the solution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YISI GYROMAGNETIC (JIAXING) ELECTRONICS CO LTD
- Filing Date
- 2026-02-02
- Publication Date
- 2026-05-19
AI Technical Summary
Existing FPGA Ising machines mostly use a single optimization algorithm, resulting in low solution quality or slow convergence speed in large-scale combinatorial optimization problems.
A hybrid optimization strategy based on QPSO and QGA is adopted, which combines QPSO for fast global search and QGA for fine search. Hybrid optimization is implemented through an FPGA platform, which utilizes QPSO to quickly explore the solution space and switches to QGA for fine optimization.
This improves the solution accuracy and global convergence capability of the FPGA Ising machine for large-scale combinatorial optimization problems, and significantly enhances the convergence speed and the quality of the final solution.
Smart Images

Figure CN122065668A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of Ising machine models, and specifically to an FPGA Ising machine implementation method and system based on hybrid optimization of QPSO and QGA. Background Technology
[0002] Combinatorial optimization is a core challenge in computer science, operations research, and artificial intelligence, with wide applications in areas such as logistics scheduling, financial portfolio management, power system operation optimization, and molecular design. This type of problem is typically modeled as a Quadratic Unconstrained Binary Optimization (QUBO) or Ising model, searching for the optimal solution by minimizing energy.
[0003] Traditional algorithms such as classical particle swarm optimization (PSO), genetic algorithm (GA), and simulated annealing (SA) suffer from problems such as local optima and slow convergence speed in large-scale optimization problems. Quantum-inspired algorithms, by introducing quantum state representation and quantum operator update mechanisms, significantly enhance the globality of the search and the ability to escape local optima.
[0004] Quantum Particle Swarm Optimization (QPSO): It explores the solution space quickly through quantum probability distribution and position update formula. It is characterized by simple computation and high parallelism, and is suitable for the initial global search.
[0005] Quantum Genetic Algorithm (QGA): By representing the population state through the superposition of qubits, and combining quantum rotation gates, measurement and classical genetic operators, it can finely adjust the position of the solution, thereby improving the accuracy and robustness of the solution.
[0006] Existing FPGA Ising machines mostly use a single optimization algorithm (such as Metropolis or QPSO), resulting in poor solution quality or slow convergence speed in large-scale problems. Summary of the Invention
[0007] To address the technical problems and shortcomings of existing technologies, this invention proposes a hybrid optimization strategy based on QPSO and QGA, which achieves synergy between rapid initial global search and fine-grained later optimization, enabling efficient solution of the Ising model on an FPGA platform.
[0008] To achieve the above and other related objectives, the present invention adopts the following technical solution:
[0009] An FPGA Ising machine system based on hybrid optimization of QPSO and QGA includes a host computer module, a communication interface module, an FPGA core module and a result output module connected in sequence, and the data stream is transmitted sequentially in the above modules;
[0010] The host computer module automatically converts the QUBO problem input into the host computer into an Ising Hamiltonian: Set the hybrid optimization parameters, start / stop the optimization process and monitor the progress, and visualize the energy change curve, convergence trend and final optimization results;
[0011] The communication interface module enables data exchange between the host computer module and the FPGA core module, and is responsible for transmitting Ising model parameters and optimization algorithm parameters, and sending back optimization results and energy evaluation values.
[0012] The FPGA core module includes a QPSO fast search module, a QGA fine search module, a hybrid controller, a parallel energy calculation unit, a random number generation module, and a register array. Its functions are called to optimize the solution to the problem.
[0013] The result output module returns the optimal solution and energy value obtained by the FPGA core module to the host computer for visualization.
[0014] Preferably, the FPGA core module uses the QPSO fast search module to quickly explore the global solution space using the quantum particle swarm algorithm, updates the particle positions using probability distribution, and the highly parallelized energy calculation core simultaneously evaluates the energy values of multiple particle solutions.
[0015] Through the QGA fine search module, based on the fine optimization core of the quantum genetic algorithm, the quantum rotation gate, measurement unit and genetic operator are used to accurately search in the local region, and the excellent solution in the QPSO stage is used as the initial population.
[0016] The hybrid controller monitors the convergence status of the QPSO fast search module in real time and automatically switches to the QGA fine search module for fine optimization when the threshold is reached.
[0017] Parallelization of matrix operations is achieved through a parallel energy calculation unit based on an FPGA-based DSP / logic array;
[0018] Random numbers are provided through the random number generation module;
[0019] The register array stores data such as particle swarm position, qubit probability amplitude, and global optimal solution, supporting simultaneous access by multiple modules.
[0020] Preferably, it includes the following steps:
[0021] Step 1, Initialization: The QPSO fast search module initializes the particle swarm position and velocity, and sets algorithm parameters including the maximum number of iterations, stage switching threshold, and QGA genetic operator parameters;
[0022] Step 2: The QPSO fast search module performs a fast global search: the particle swarm moves rapidly in the solution space and updates the particle positions through quantum probability distribution; the parallel energy calculation module evaluates the energy of the particle solutions in real time and updates the global optimal solution during the search process to ensure that the particle swarm converges to a better region;
[0023] Step 3, Convergence Monitoring: The hybrid controller monitors the convergence status of the QPSO phase: if the energy decrease rate is lower than the set threshold or the maximum number of iterations is reached, it is determined that the QPSO global search phase is complete;
[0024] Step 4, switch to the QGA fine search module for fine optimization: select several excellent solutions from the particle swarm in the QPSO fast search module as the initial population; enter the QGA fine search module to perform quantum genetic optimization: the quantum rotation gate updates the probability amplitude of the qubit; the measurement unit collapses the quantum state into a classical solution; the genetic operator further optimizes the local structure of the solution;
[0025] Step 5, Output the optimal solution: When the QGA fine search module converges or reaches the maximum number of iterations, output the final optimal solution and energy value; the results are returned to the host computer for visualization.
[0026] On the other hand, a method for implementing an FPGA Ising machine based on hybrid optimization of QPSO and QGA is also provided. Using the aforementioned system, the method includes the following steps:
[0027] Step 1, Initialization: The QPSO fast search module initializes the particle swarm position and velocity, and sets algorithm parameters including the maximum number of iterations, stage switching threshold, and QGA genetic operator parameters;
[0028] Step 2: The QPSO fast search module performs a fast global search: the particle swarm moves rapidly in the solution space and updates the particle positions through quantum probability distribution; the parallel energy calculation module evaluates the energy of the particle solutions in real time and updates the global optimal solution during the search process to ensure that the particle swarm converges to a better region;
[0029] Step 3, Convergence Monitoring: The hybrid controller monitors the convergence status of the QPSO phase: if the energy decrease rate is lower than the set threshold or the maximum number of iterations is reached, it is determined that the QPSO global search phase is complete;
[0030] Step 4, switch to the QGA fine search module for fine optimization: select several excellent solutions from the particle swarm in the QPSO fast search module as the initial population; enter the QGA fine search module to perform quantum genetic optimization: the quantum rotation gate updates the probability amplitude of the qubit; the measurement unit collapses the quantum state into a classical solution; the genetic operator further optimizes the local structure of the solution;
[0031] Step 5, Output the optimal solution: When the QGA fine search module converges or reaches the maximum number of iterations, output the final optimal solution and energy value; the results are returned to the host computer for visualization.
[0032] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0033] (1) Implement efficient parallelization of QPSO and QGA algorithms on FPGA to achieve two-stage hybrid optimization;
[0034] (2) Design a hybrid optimization scheduling mechanism. In the early stage, QPSO is used for fast global search, and in the later stage, it is automatically switched to QGA for fine search to improve the accuracy and robustness of the solution.
[0035] (3) Improve the solution accuracy and global convergence capability of FPGA Ising machine in large-scale combinatorial optimization problems. Utilize the parallel computing capability of FPGA to realize large-scale particle update and quantum genetic operator operation at the same time. Compared with FPGA Ising machine with single QPSO or QGA, this scheme has significant improvements in convergence speed and final solution quality.
[0036] (4) Develop host computer software to realize problem modeling, algorithm parameter scheduling, operation control and result visualization.
[0037] Other additional advantages and benefits of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0038] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0039] Figure 1 This is a schematic diagram of the system architecture of an embodiment of this application;
[0040] Figure 2 This is a flowchart of the method steps in this application.
[0041] Explanation of reference numerals for major components:
[0042] 1. Host computer module; 2. Communication interface module; 3. FPGA core module; 4. Result output module. Detailed Implementation
[0043] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings. The following specific examples illustrate the embodiments of the present invention, and those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.
[0044] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. The illustrations only show the components related to the present invention and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be changed at will, and the layout of the components may also be more complex.
[0045] It should be noted that in the description of this application, the terms "upper," "lower," "left," "right," "inner," and "outer," etc., indicating directional or positional relationships, are based on the directional or positional relationships shown in the accompanying drawings. These are merely for ease of description and do not indicate or imply that the device or element must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting the invention. Furthermore, it should be noted that in the description of this application, unless otherwise explicitly specified and limited, the terms "installed," "connected," "linked," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication between two elements. Those skilled in the art can understand the specific meaning of the above terms in the invention based on the specific circumstances.
[0046] Example:
[0047] This invention discloses an FPGA Ising machine system based on hybrid optimization of QPSO and QGA, with reference to... Figure 1 As shown, it includes a host computer module, a communication interface module, an FPGA core module, and a result output module connected in sequence, with data streams transmitted sequentially through these modules.
[0048] The host computer module sets hybrid optimization parameters, starts / stops the optimization process, and monitors progress based on the optimization problem input by the user through the graphical interface. It also visualizes the energy change curve, convergence trend, and final optimization results. The host computer module automatically converts the input QUBO problem into the Ising Hamiltonian. The symbols are used to describe the energy in a system. Below is an explanation of each symbol: H(S): This is the Hamiltonian of the system, representing the energy of the entire system.
[0049] S: Represents the state of the system, usually consisting of a set of spin variables s i Each spin can take a finite number of values, typically ±1 in the Ising model.
[0050] s i : Represents the spin variable at position i. Spin is a fundamental degree of freedom in the Ising model, typically used to simulate the atomic magnetic moment in magnetic materials.
[0051] J i,j : is the coupling coefficient or exchange integral, representing the interaction strength between spin i and spin j.
[0052] If J i,j >0, the interaction between spins tends to align them (ferromagnetism).
[0053] If J i,j <0, the interaction between spins tends to make them anti-homogeneous (antiferromagnetic).
[0054] If J i,j =0, meaning there is no direct interaction between spins.
[0055] h i : is an external magnetic field or bias field acting on spin i. It tends to align the spins (if h i >0) or against homogeneity (if h i <0) in the direction of the magnetic field.
[0056] The parameters are transmitted to the FPGA via serial port or PCIe interface. QUBO (Quadratic Unconstrained Binary Optimization) is a mathematical model used to describe combinatorial optimization problems. Its core feature is that it transforms the problem into finding the minimum value of a quadratic polynomial function, where all variables are binary (0 or 1).
[0057] The communication interface module enables data exchange between the host computer module and the FPGA core module. It is responsible for transmitting Ising model parameters and optimization algorithm parameters, and sending back optimization results and energy assessment values.
[0058] The FPGA core modules, including the QPSO fast search module, QGA fine search module, hybrid controller, parallel energy calculation unit, random number generation module, and register array, call their functions to optimize the solution of the problem;
[0059] The results output module returns the optimal solution and energy value obtained by the FPGA core module to the host computer for visualization.
[0060] The FPGA core module utilizes the QPSO fast search module to rapidly explore the global solution space using the quantum particle swarm optimization algorithm. It updates particle positions using probability distributions, and a highly parallelized energy calculation core simultaneously evaluates the energy values of multiple particle solutions. The QPSO algorithm steps are as follows:
[0061] Initialize the particle swarm:
[0062] m random permutations are generated as the initial solution (particle positions).
[0063] Calculate the energy value (path length) of each particle, and record the individual optimal pBest and the global optimal gBest.
[0064] Iterative Optimization: Step 1: Calculate the local attraction point p: p = ϕ⋅pBesti + (1−ϕ)gBest, ϕ∈[0,1] (random number); Step 2: Update particle positions using probability distribution: For permutation xi, randomly select two positions to swap (simulating a "jump" in the permutation space), the swap probability is determined by α⋅|p−xi|. For example: if p=[2,1,4,3], xi=[3,1,4,2], then swapping the 1st and 4th positions may generate a new solution [2,1,4,3]. Step 3: Calculate the energy values of all new solutions in parallel: Use the GPU to calculate the lengths of m paths in parallel, and update pBest and gBest. Termination condition: Reaching the maximum number of iterations or energy convergence.
[0065] For an example of parallelized energy computation:
[0066] Scenario: Particle swarm size m=1000, solution dimension n=20 (20 cities). Serial computation: The CPU sequentially calculates 1000 path lengths, taking approximately T seconds. Parallel computation: The 1000 particles are distributed across 1000 threads on the GPU (or processed in batches). Each thread independently calculates one path length (e.g., by accumulating distances using an adjacency matrix). The total time is reduced to T / 1000 (ideally), but in practice, it is limited by GPU bandwidth and thread synchronization.
[0067] Through the QGA fine search module, based on the fine optimization core of the quantum genetic algorithm, the quantum rotation gate, measurement unit and genetic operator are used to accurately search in the local region, and the excellent solution in the QPSO stage is used as the initial population.
[0068] The hybrid controller monitors the convergence status of the QPSO fast search module in real time and automatically switches to the QGA fine search module for fine optimization when a threshold is reached. The quantum randomness of QPSO is suitable for global search, but may get stuck in local optima; the quantum superposition state and rotation gate of QGA can achieve finer search control. The combination of the two forms a "coarse-fine" optimization framework.
[0069] The parallel energy calculation unit enables parallel matrix operations based on FPGA DSP / logic array; the random number generation module provides random numbers; and the register array stores data such as particle swarm position, qubit probability amplitude, and global optimal solution, supporting simultaneous access by multiple modules.
[0070] On the other hand, a method for implementing an FPGA Ising machine based on hybrid optimization of QPSO and QGA is also provided. Using the aforementioned system, the method includes the following steps:
[0071] Step 1, Initialization. Function: Configure algorithm parameters to provide the operational foundation for the QPSO and QGA stages.
[0072] QPSO initialization:
[0073] Particle swarm optimization: N particles are randomly generated within the solution space, each representing a candidate solution (such as a TSP path or neural network parameters). Example: To optimize a TSP problem involving 10 cities, the particle positions can be encoded as a permutation vector x of length 10. i =[c1,c2,...,c10], where c j ∈{1,2,...,10} and without repetition.
[0074] Velocity initialization: QPSO does not require classical velocity variables, but the contraction factor β of the quantum potential well needs to be set (usually 0.5~1.0) to control the range of particle movement.
[0075] Algorithm parameter settings: Global parameters:
[0076] Maximum number of iterations Tmax: Total computational budget (e.g., 1000 iterations);
[0077] Stage switching threshold ϵ: Energy decay rate threshold (e.g., 0.01 / generation), used to determine whether QPSO has converged.
[0078] QGA parameters: Population size M: The number of excellent solutions selected from QPSO (e.g., M=20); Genetic operator probabilities: Crossover probability pc=0.8, mutation probability pm=0.1; Quantum rotation gate adjustment period Trotate: The rotation angle is updated once every Trotate generation.
[0079] The QPSO fast search module initializes the particle swarm position and velocity, and sets algorithm parameters including the maximum number of iterations, stage switching threshold, and QGA genetic operator parameters.
[0080] Step 2: The QPSO fast search module performs a fast global search: the particle swarm moves rapidly in the solution space and updates the particle positions through quantum probability distribution; the parallel energy calculation module evaluates the energy of the particle solutions in real time and updates the global optimal solution during the search process to ensure that the particle swarm converges to a better region;
[0081] Step 3, Convergence Monitoring: The hybrid controller monitors the convergence status of the QPSO phase: if the energy decrease rate is lower than the set threshold or the maximum number of iterations is reached, it is determined that the QPSO global search phase is complete;
[0082] Step 4, switch to the QGA fine search module for fine optimization: select several excellent solutions from the particle swarm in the QPSO fast search module as the initial population; enter the QGA fine search module to perform quantum genetic optimization: the quantum rotation gate updates the probability amplitude of the qubit; the measurement unit collapses the quantum state into a classical solution; the genetic operator further optimizes the local structure of the solution;
[0083] Step 5, Output the optimal solution: When the QGA fine search module converges or reaches the maximum number of iterations, output the final optimal solution and energy value; the results are returned to the host computer for visualization.
[0084] In summary, this approach achieves efficient parallelization of both QPSO and QGA algorithms on FPGA, enabling two-stage hybrid optimization. A hybrid optimization scheduling mechanism is designed, initially using QPSO for fast global search, and then automatically switching to QGA for fine-grained search, improving solution accuracy and robustness. The solution accuracy and global convergence capability of the FPGA Ising machine are enhanced for large-scale combinatorial optimization problems. Leveraging the parallel computing capabilities of FPGA, large-scale particle updates and quantum genetic operator operations are simultaneously implemented. Compared to a single QPSO or QGA FPGA Ising machine, this scheme significantly improves convergence speed and final solution quality. Furthermore, host computer software is developed to implement problem modeling, algorithm parameter scheduling, runtime control, and result visualization.
[0085] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An FPGA Ising machine system based on hybrid optimization of QPSO and QGA, characterized in that, It includes a host computer module, a communication interface module, an FPGA core module, and a result output module connected in sequence, with data streams transmitted sequentially through these modules. The host computer module automatically converts the QUBO problem input into the host computer into an Ising Hamiltonian: Set the hybrid optimization parameters, start / stop the optimization process and monitor the progress, and visualize the energy change curve, convergence trend and final optimization results; The communication interface module enables data exchange between the host computer module and the FPGA core module, and is responsible for transmitting Ising model parameters and optimization algorithm parameters, and sending back optimization results and energy evaluation values. The FPGA core module includes a QPSO fast search module, a QGA fine search module, a hybrid controller, a parallel energy calculation unit, a random number generation module, and a register array. Its functions are called to optimize the solution to the problem. The result output module returns the optimal solution and energy value obtained by the FPGA core module to the host computer for visualization.
2. The FPGA Ising machine system based on hybrid optimization of QPSO and QGA according to claim 1, characterized in that, The FPGA core module uses the QPSO fast search module to quickly explore the global solution space using the quantum particle swarm algorithm, updates the particle positions using probability distribution, and the highly parallelized energy calculation core simultaneously evaluates the energy values of multiple particle solutions. Through the QGA fine search module, based on the fine optimization core of the quantum genetic algorithm, the quantum rotation gate, measurement unit and genetic operator are used to accurately search in the local region, and the excellent solution in the QPSO stage is used as the initial population. The hybrid controller monitors the convergence status of the QPSO fast search module in real time and automatically switches to the QGA fine search module for fine optimization when the threshold is reached. Parallelization of matrix operations is achieved through a parallel energy calculation unit based on FPGADSP / logic array; Random numbers are provided through the random number generation module; The register array stores data such as particle swarm position, qubit probability amplitude, and global optimal solution, supporting simultaneous access by multiple modules.
3. The FPGA Ising machine system based on hybrid optimization of QPSO and QGA according to claim 2, characterized in that, Includes the following steps: Step 1, Initialization: The QPSO fast search module initializes the particle swarm position and velocity, and sets algorithm parameters including the maximum number of iterations, stage switching threshold, and QGA genetic operator parameters; Step 2: The QPSO fast search module performs a fast global search: the particle swarm moves rapidly in the solution space and updates the particle positions through quantum probability distribution; the parallel energy calculation module evaluates the energy of the particle solutions in real time and updates the global optimal solution during the search process to ensure that the particle swarm converges to a better region; Step 3, Convergence Monitoring: The hybrid controller monitors the convergence status of the QPSO phase: if the energy decrease rate is lower than the set threshold or the maximum number of iterations is reached, it is determined that the QPSO global search phase is complete; Step 4, switch to the QGA fine search module for fine optimization: select several excellent solutions from the particle swarm in the QPSO fast search module as the initial population; enter the QGA fine search module to perform quantum genetic optimization: the quantum rotation gate updates the probability amplitude of the qubit; the measurement unit collapses the quantum state into a classical solution; the genetic operator further optimizes the local structure of the solution; Step 5, Output the optimal solution: When the QGA fine search module converges or reaches the maximum number of iterations, output the final optimal solution and energy value; the results are returned to the host computer for visualization.
4. A method for implementing an FPGA Ising machine based on hybrid optimization of QPSO and QGA, using the system described in claim 1, characterized in that, Includes the following steps: Step 1, Initialization: The QPSO fast search module initializes the particle swarm position and velocity, and sets algorithm parameters including the maximum number of iterations, stage switching threshold, and QGA genetic operator parameters; Step 2: The QPSO fast search module performs a fast global search: the particle swarm moves rapidly in the solution space and updates the particle positions through quantum probability distribution; the parallel energy calculation module evaluates the energy of the particle solutions in real time and updates the global optimal solution during the search process to ensure that the particle swarm converges to a better region; Step 3, Convergence Monitoring: The hybrid controller monitors the convergence status of the QPSO phase: if the energy decrease rate is lower than the set threshold or the maximum number of iterations is reached, it is determined that the QPSO global search phase is complete; Step 4, switch to the QGA fine search module for fine optimization: select several excellent solutions from the particle swarm in the QPSO fast search module as the initial population; enter the QGA fine search module to perform quantum genetic optimization: the quantum rotation gate updates the probability amplitude of the qubit; the measurement unit collapses the quantum state into a classical solution; the genetic operator further optimizes the local structure of the solution; Step 5, Output the optimal solution: When the QGA fine search module converges or reaches the maximum number of iterations, output the final optimal solution and energy value; the results are returned to the host computer for visualization.