A Monte Carlo Path Integral-Simulated Quantum Annealing Method and System Based on FPGA

By designing a general-purpose hardware architecture on an FPGA, the Monte Carlo path integral-simulated quantum annealing algorithm is implemented, which solves the problems of high resource consumption and insufficient real-time performance in the existing technology, improves the operating efficiency and speed, and meets the low latency requirements.

CN120068405BActive Publication Date: 2026-05-26XIDIAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIDIAN UNIV
Filing Date
2025-01-22
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing technologies for implementing Monte Carlo path integral-simulated quantum annealing using FPGAs suffer from high resource consumption, low flexibility, high cost, and inability to meet low latency and real-time requirements.

Method used

Design a general-purpose hardware architecture based on FPGA. By simulating a quantum annealing machine on the FPGA for path planning, and utilizing modules such as Bram storage space, random number module, potential energy term calculation module, and kinetic energy term calculation module, implement the Monte Carlo path integral-simulated quantum annealing algorithm, reduce random number transfer time, perform parallel calculation of potential energy term and kinetic energy term, and avoid getting trapped in local minima.

Benefits of technology

The efficiency of Monte Carlo path integral-simulated quantum annealing has been improved, resource consumption has been reduced, and parallel computing has increased the running speed, meeting the requirements for low latency and real-time performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120068405B_ABST
    Figure CN120068405B_ABST
Patent Text Reader

Abstract

This invention discloses a Monte Carlo path integral-simulated quantum annealing method implemented on an FPGA, primarily addressing the low runtime efficiency of existing Monte Carlo path integral-simulated quantum annealing algorithms on CPUs. The implementation scheme includes: initializing the original matrix in Bram space; generating random numbers on the FPGA to perform random operations on the original matrix to obtain a new matrix; parallel calculation of the differences in potential energy, kinetic energy, and Hamiltonian between the new and original matrices; determining whether to update the original matrix; selecting the matrix with the smallest potential energy term after the update operation as the current optimal solution; and iterating the coupling coefficients until a set number of iterations is reached to obtain the optimal solution, which is the final optimal path. This invention significantly improves runtime efficiency, reducing the runtime by 79 times compared to the traditional Monte Carlo path integral-simulated quantum annealing algorithm, and can be used for UAV route planning in scenarios with high real-time requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of physical technology and relates to a Monte Carlo path integral-simulated quantum annealing method and system, which can be used for combined optimization of drone routing planning and express delivery schemes in scenarios with high real-time requirements. Background Technology

[0002] Quantum mechanics, considered one of the most revolutionary advances of the 20th century in scientific history, has a history of over 100 years. Quantum computing, utilizing concepts from quantum mechanics, enables exponentially high-speed computation, bringing a major breakthrough to the field of computing and becoming one of the important directions for future scientific development. With the continuous deepening of exploration in the field of quantum computing, researchers have attempted to combine quantum computing with intelligent optimization algorithms, forming quantum optimization algorithms. Quantum annealing (QA) is an algorithm commonly used to solve combinatorial optimization problems. It can find a near-optimal solution to a system within a given time, utilizing the quantum tunneling effect to avoid getting trapped in local minima. Many real-world problems can be transformed into decision problems, thus reducing to combinatorial optimization tasks, such as linear programming, path optimization, and minimum and maximum value problems. With the advancement of quantum computing technology, quantum annealing has received considerable attention and research. In practical applications, it has achieved significant breakthroughs, such as planning the operating routes of 10,000 taxis for Volkswagen, solving the traffic flow optimization problem. Furthermore, quantum annealing has been successfully applied to training deep neural networks, image-based fault detection and diagnosis, and other fields.

[0003] Monte Carlo path integrals can be used to map a D-dimensional quantum system to a D+1-dimensional classical physical model, allowing the performance of the quantum annealing algorithm to be simulated on a classical computer using P copies of the classical Hamiltonian. However, even when the algorithm is implemented on a classical computer, it is difficult to meet the requirements for low latency and real-time performance. Some researchers have begun to explore hardware-based methods to accelerate the PIMC-QA algorithm, including ASICs, GPUs, and FPGAs. However, each has its own set of problems. For example, ASICs have relatively poor reconfigurability, GPUs are constrained by fixed hardware structures and have relatively low flexibility, failing to maximize algorithm efficiency, and are also relatively expensive. Indian researchers used FPGAs to accelerate the Ising model, but it lacks generalization ability for real-world combinatorial optimization problems. Japanese researchers used FPGAs to accelerate the PIMC-QA algorithm for common combinatorial optimization problems, but there are issues such as high consumption of lookup tables, triggers, and Bram storage space, and room for improvement in acceleration performance. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of the prior art by proposing a Monte Carlo path integral-simulated quantum annealing method and system based on FPGA. By designing a general hardware architecture for the PIMC-QA algorithm, the operating efficiency of Monte Carlo path integral-simulated quantum annealing can be further improved, and the resource overhead on the FPGA can be reduced.

[0005] To achieve the above objectives, the technical solution of the present invention includes:

[0006] Technical Solution 1: The Monte Carlo path integral-simulated quantum annealing method based on FPGA provided by this invention is characterized by simulating a quantum annealing machine on the FPGA for path planning, which includes:

[0007] (1) Initialize the number of replicas P and coupling coefficient in the Monte Carlo path integral-simulated quantum annealing algorithm. Set the initial number of iterations M and the position matrix d for the path integral Monte Carlo quantum annealing algorithm;

[0008] (2) Initialize P quadratic unconstrained binary optimization matrices QUBO to form the original matrix set. Stored in P BRAM1s within the FPGA;

[0009] (3) Read the original matrix set from BRAM1 Random numbers are generated using an FPGA, and these random numbers are then used to modify the original matrix set. Perform random operations to update and obtain P new QUBO matrices, forming a new matrix set. The data is stored in another P BRAM2s within the FPGA.

[0010] (4) Calculate the original matrix set respectively. With the new matrix set Potential energy term difference Difference in kinetic energy term Classic Hamiltonian difference ;

[0011] (5) The difference in the potential energy term The difference between the classical Hamiltonian and the stated classical Hamiltonian If the difference is less than 0, or if the difference is a classical Hamiltonian difference... Then use the new matrix set The corresponding matrix replaces the original The corresponding matrix in the set is selected from the updated original matrix set. The matrix that minimizes the potential energy term yields the optimal solution for the current Monte Carlo cycle. ;

[0012] (6) Update coupling coefficients Decrement the iteration count M by 1, and check if the current iteration count M is greater than 0:

[0013] If so, return to step (3);

[0014] Otherwise, the FPGA stops working and obtains the optimal path result, which is the matrix of the current iteration. .

[0015] Technical Solution 2: The present invention provides a Monte Carlo path integral-simulated quantum annealing system based on FPGA, comprising:

[0016] Bram storage space is used to store the original matrix set and the new matrix set;

[0017] The Bram space access module is used to control the read and write addresses of the Bram storage space;

[0018] The random number generator module is used to generate random numbers between 0 and N.

[0019] The random operation module performs random operations on the original matrix based on random numbers to obtain a new matrix.

[0020] The potential energy term calculation module is used to solve for the potential energy terms of the original matrix and the new matrix;

[0021] The kinetic energy term calculation module is used to solve for the kinetic energy terms of the original matrix and the new matrix;

[0022] The update decision module is used to calculate the interpolation of the potential energy term, the difference of the kinetic energy term, and the difference of the classical Hamiltonian, and to determine whether to replace the old matrix with the new matrix based on these results.

[0023] The iteration counting module is used to decrement the iteration count M by 1 after the update module has finished executing, and to determine whether the iteration count M is greater than 0: if yes, then return to the random operation module; otherwise, the FPGA stops working.

[0024] Technical Solution 3: The present invention provides an FPGA-based electronic device, including a memory, a reconfigurable logic operation unit, and a computer program running on the FPGA, characterized in that, when the program is executed on the FPGA, either Monte Carlo path integral-simulated quantum annealing as described above in Technical Solution 1 and Technical Solution 2 is implemented.

[0025] Compared with the prior art, the present invention has the following advantages:

[0026] Firstly, in technical solution 1 of this invention, random integers that meet the Monte Carlo randomness requirements are generated by FPGA, eliminating the need for other external devices to generate random numbers, which are then transmitted to FPGA via a high-speed bus. This reduces the time consumed by moving random numbers between memory locations and further improves the system's operating efficiency.

[0027] Secondly, in technical solution 1 of this invention, the potential energy difference is calculated on the FPGA. Difference in kinetic energy term Difference from the classic Hamiltonian The difference in the potential energy term The difference between the classical Hamiltonian and the stated classical Hamiltonian Compare and determine whether to use the new matrix set. The corresponding matrix replaces the original The corresponding matrix in the diagram, the above operation can avoid the optimal path result. It gets stuck in a local minimum.

[0028] Third, in technical solution 2 of this invention, all modules can run at a 200MHz clock speed. At the same time, the output of the random operation module is connected to the input of the potential energy calculation module and the kinetic energy calculation module, and the kinetic energy and potential energy are calculated in parallel, giving full play to the advantages of parallel execution. Compared with other implementation methods, this invention runs faster. Attached Figure Description

[0029] Figure 1 This is a flowchart illustrating the implementation of Embodiment 1 of the present invention;

[0030] Figure 2 yes Figure 1 A flowchart illustrating the process of generating random numbers using an FPGA;

[0031] Figure 3 This is a structural block diagram of Embodiment 2 of the present invention;

[0032] Figure 4 This is an optimized effect diagram of the present invention;

[0033] Figure 5 This is a time consumption diagram of the present invention on the FPGA. Detailed Implementation

[0034] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the example figures. Obviously, the described embodiments are merely some, not all, of the embodiments of the present invention. Other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are all within the protection scope of the present invention.

[0035] Example 1: Monte Carlo path integral-simulated quantum annealing method implemented based on FPGA.

[0036] Reference Figure 1This example is based on FPGA, specifically simulating a quantum annealing machine for path planning on an FPGA. The implementation steps include the following:

[0037] Step 1, setting initial parameters:

[0038] Set the number of replicas P, temperature T, and magnetic field strength in the Calo path integral-simulated quantum annealing algorithm. The initial number of iterations M, the maximum number of iterations Max, and the position matrix d.

[0039] This example is configured, but not limited to: P=8, T=50, Max=10000, M=10000. =480.

[0040] Step 2: Initialize the original matrix set E and calculate the coupling coefficients. .

[0041] (2.1) Set up an N-row N-column matrix with all zeros, where the rows represent the node numbers in the path planning and the columns represent the time points;

[0042] (2.2) In the current row, randomly select an integer a between 0 and N, and assign 1 to the element in the a-th column of the current row;

[0043] (2.3) Repeat step (2.2) until all rows have been selected, resulting in an original matrix s;

[0044] (2.4) Repeat (2.1) to (2.3) until all P matrices are initialized, forming the original matrix set E, and store it in the P Brams on the FPGA;

[0045] E = { },

[0046] in It is the m-th matrix in the original matrix set E, where m is an integer from 1 to P; each matrix is ​​a randomly arranged matrix of 0s and 1s.

[0047] (2.5) Calculate the coupling coefficient

[0048] .

[0049] Where T is temperature. Where P is the magnetic field strength and P is the number of copies;

[0050] Step 3: FPGA generates random numbers.

[0051] refer to Figure 2 The implementation of this step includes the following:

[0052] (3.1) Design an oscillator consisting of three NOT gates connected in series on the FPGA baseboard;

[0053] (3.2) Connect the two oscillators in pairs to form an oscillation loop. At the sampling clock time, connect the output of the first oscillator a to the input of the second oscillator b, and connect the output of the second oscillator b to the input of the first oscillator a at the same time.

[0054] (3.3) Arrange the 19 oscillating rings in the FPGA in a parallel manner, perform an XOR operation on all output results, and output single-bit data;

[0055] (3.4) Use 32 registers in the FPGA to collect single-bit data for 32 clock cycles to obtain the initial random number seed, which is used as the initial state of the m-sequence;

[0056] (3.5) Based on the primitive polynomial of the m-sequence: ,predict m-sequence values ​​after one clock cycle;

[0057] (3.6) Truncate the newly generated m sequence to low-order values. The FPGA generates random integers between 0 and N that meet the Monte Carlo randomness requirement.

[0058] Step 4: Perform random operations on the original matrix S to obtain a new matrix set. .

[0059] (4.1) Select two distinct random numbers c and f from the random numbers;

[0060] (4.2) Take a matrix from the original matrix set E, and determine whether the second random number f is odd.

[0061] If so, then the current matrix is ​​executed (4.3).

[0062] Otherwise, proceed to (4.4);

[0063] (4.3) Perform a random operation to symmetrically flip all columns between c and f;

[0064] (4.4) Perform a random operation, using c and f as row indices, and swap the positions of the two rows;

[0065] (4.5) Repeat steps (4.1) to (4.4) until all P matrices have been randomly operated on, resulting in a new matrix set. ,

[0066] = { },

[0067] in Represents the new matrix set The m-th new matrix m is an integer from 1 to P; each matrix is ​​a 0-1 matrix of size N rows and N columns arranged randomly.

[0068] Step 5: Calculate the potential energy terms of the original matrix and the new matrix and their difference.

[0069] (5.1) Calculate the potential energy term of the original matrix. :

[0070]

[0071] in, It is the element with x-coordinate i and y-coordinate j in the position matrix d, representing the distance between node i and node j;

[0072] express The element with x-coordinate i and y-coordinate k;

[0073] The transition matrix obtained by shifting left by 1 bit. Represents the transition matrix The element with x-coordinate k and y-coordinate j;

[0074] express The element with x-coordinate i and y-coordinate j;

[0075] This represents the element with the largest value in the position matrix d;

[0076] (5.2) Calculate the potential energy term of the new matrix. :

[0077]

[0078] in, The new matrix set obtained after random operations The m-th new matrix;

[0079] express Elements with x-coordinate i and y-coordinate k;

[0080] ;

[0081] for Elements with x-coordinate k and y-coordinate j;

[0082] express The element with x-coordinate i and y-coordinate j;

[0083] This represents the element with the largest value in the position matrix d.

[0084] (5.3) According to The difference in potential energy terms is obtained. :

[0085] .

[0086] Step 6: Calculate the kinetic energy terms of the original matrix and the new matrix and their difference.

[0087] (6.1) Calculate the kinetic energy term of the original matrix. :

[0088]

[0089] in, Represents the original matrix set The elements with x-coordinate i and y-coordinate j in the (m-2)th matrix;

[0090] Represents the original matrix set The element with x-coordinate i and y-coordinate j in the m-th matrix;

[0091] Represents the original matrix set The element with x-coordinate i and y-coordinate j in the (m+2)th matrix;

[0092] (6.2) Calculate the kinetic energy term of the new matrix. :

[0093]

[0094] in, This represents the (m-1)th new matrix in the new matrix set. The element with x-coordinate i and y-coordinate j;

[0095] Describes the m-th new matrix in the new matrix set. The element with x-coordinate i and y-coordinate j;

[0096] This represents the (m+1)th new matrix in the new matrix set. The element with x-coordinate i and y-coordinate j;

[0097] (6.3) According to The difference in kinetic energy term was calculated. :

[0098] .

[0099] Step 7, calculate the classical Hamiltonian difference. .

[0100] Based on the difference in kinetic energy term Difference between the potential energy term and the potential energy term Calculate the difference of classical Hamiltonians :

[0101] .

[0102] in For the number of copies, is the coupling coefficient.

[0103] Step 8, using the classic Hamiltonian difference Obtain the current optimal path result.

[0104] (8.1) According to Should we use a new matrix? Replace the old matrix :

[0105] If the difference in potential energy terms Difference from the classic Hamiltonian One of these two parameters is less than 0, or the difference between classical Hamiltonians. Then use the new matrix Replace the original matrix To obtain the currently updated matrix ;

[0106] (8.2) Update the matrix The minimum value of the matrix potential terms in the original matrix set E is compared with other unupdated matrix potential terms, and the optimal matrix for the current iteration number is selected. .

[0107] Step 9: Update the iteration count M to obtain the optimal task path.

[0108] Update magnetic field strength: ;

[0109] Update the iteration count: M = M - 1, then check if the current iteration count M is greater than 0;

[0110] If so, return to step 2;

[0111] Otherwise, the optimal matrix after the current iteration will be... As the optimal task path in path planning.

[0112] Example 2. Monte Carlo path integral-simulated quantum annealing system implemented based on FPGA

[0113] Reference Figure 3 This example includes: Bram storage space 1, Bram space access module 2, random number emission module 3, random operation module 4, potential energy term calculation module 5, kinetic energy term calculation module 6, judgment and update module 7, and iteration counting module 8. Its working principle is as follows:

[0114] The random number generator module 3 generates random integers between 0 and N. After the random operation module 4 takes two different random numbers from the random number generator module 3, it sends a request signal to the Bram space access module 2. After receiving the request signal, the Bram space access module 2 reads the original matrix set data from the Bram storage space 1 and sends it to the random operation module 4.

[0115] The random operation module 4 simultaneously inputs the new matrix set obtained into the Bram space access module 2, the potential energy term calculation module 5, and the kinetic energy term calculation module 6. The potential energy term calculation module 5 and the kinetic energy term calculation module 6 calculate the potential energy term and kinetic energy term of the new matrix and the original matrix in parallel, and complete the calculation of the kinetic energy term and the potential energy term in sequence.

[0116] The potential energy term calculation module 5 sends a start signal to the judgment and update module 7. The judgment and update module 7 then begins calculating the potential energy term interpolation, kinetic energy term difference, and classical Hamiltonian difference. Based on these results, it determines whether to replace the old matrix with the new matrix. If replacement is required, the judgment and update module 7 sends a request signal to the Bram space access module 2 to read the new matrix set from the Bram storage space 1. The corresponding matrix Replace the original matrix set The corresponding matrix S in the diagram.

[0117] After the update module 7 completes the update, the iteration counting module 8 decrements the iteration count M by 1 and checks if the iteration count M is greater than 0: if yes, it returns to the random operation module 4 to continue working; otherwise, the FPGA stops working and sets the optimal matrix after the current iteration. As the optimal task path in path planning.

[0118] Example 3: FPGA-based electronic device.

[0119] The FPGA electronic devices provided in this example include, but are not limited to, memory, reconfigurable logic units, and computer programs running on the FPGA.

[0120] The memory includes DDR, Bram, flip-flops and configuration memory SRAM commonly found in FPGAs, and is used to store data generated in the Monte Carlo path integral-simulated quantum annealing algorithm and bit stream information generated by EDA tools;

[0121] The reconfigurable logic operation unit is the underlying circuit structure in the FPGA. The EDA development tool will convert the computer program into the underlying reconfigurable logic operation unit in the FPGA to realize the functions required by the Monte Carlo path integral-simulated quantum annealing algorithm, which includes: reading data from memory; performing parallel calculations of the kinetic energy term and potential energy term of the original matrix and the new matrix; determining whether the original matrix needs to be updated; and obtaining the optimal solution matrix after iterative counting.

[0122] The computer program running on the FPGA is used to implement any one of the Monte Carlo path integral-simulated quantum annealing steps in Embodiments 1 and 2 above.

[0123] Furthermore, if the bit stream information generated by the EDA tool is stored in the Flash memory on the FPGA, the FPGA electronic device can be used as an independent device and placed separately in the edge device. The optimal solution matrix can communicate with the edge device through other high-speed buses such as PCIe, network ports and fiber optic interfaces.

[0124] The effects of this invention can be further illustrated by the following simulation results:

[0125] I. Simulation Conditions

[0126] The software platform for the simulation experiment of this invention is: Windows 11 operating system, Matlab 2018, Vivado 2018.3.

[0127] Simulation parameters: P=8, T=50, Max=10000, M=10000 =480.

[0128] II. Simulation Content

[0129] Simulation 1: Under the above simulation conditions, the method of this invention is used to simulate a quantum annealing machine on an FPGA for path planning, using the optimal matrix of each iteration. As the optimal task path, the optimal matrix The potential energy term represents the total distance of the optimal task path, and the result is as follows: Figure 4 :

[0130] from Figure 4As can be seen, the total distance of the initial optimal task path is 9300482. As the number of iterations increases, the total distance of the optimal path gradually decreases. When the number of iterations reaches MAX, the total distance of the final optimal path is reduced to 896570, which is more than 85% better than the initial optimal task path.

[0131] Simulation 2: Under the above simulation conditions, the computation time of the path integral Monte Carlo-simulated quantum annealing algorithm implemented using the method of this invention is compared with that of the traditional i5-12500h CPU. The results are as follows: Figure 5 5(a) represents the time consumed by one iteration of the path integral Monte Carlo-simulated quantum annealing algorithm on the FPGA in this invention, in microseconds; 5(b) represents the time consumed by implementing the path integral Monte Carlo-simulated quantum annealing algorithm on the CPU.

[0132] like Figure 5 As shown in (a), the process starts with the start signal and ends when the end signal goes high. Specifically, it takes 2.3025 microseconds from 6.005 to 8.3075 microseconds. It can be seen that the present invention can obtain the result of one iteration in only 2.3025 microseconds on the FPGA, that is, the final optimal path can be obtained in 2.3025 microseconds.

[0133] like Figure 5 As shown in (b), the CPU needs 1.9 seconds to obtain the final optimal path.

[0134] contrast Figure 5 As can be seen from (a) and (b) in the present invention, the path integral Monte Carlo-simulated quantum annealing algorithm implemented on FPGA reduces the running time by more than 79 times compared to CPU, which greatly improves the time efficiency of path optimization.

[0135] It should be noted that the step numbers in the specification and claims of this invention are only for the purpose of clearly describing the embodiments of this invention and facilitating understanding, and their order is not limited.

Claims

1. A Monte Carlo path integral-simulated quantum annealing method implemented based on FPGA, characterized in that, Simulating a quantum annealing machine for path planning on an FPGA includes: (1) Initialize the number of replicas P, temperature T, and magnetic field strength in the Monte Carlo path integral-simulated quantum annealing algorithm. Set the initial number of iterations M and the position matrix d for the Monte Carlo path integral-simulated quantum annealing algorithm; (2) Initialize P quadratic unconstrained binary optimization matrices QUBO to form the original matrix set. Stored in P BRAM1s within the FPGA. (3) Coupling coefficient Read the original matrix set from BRAM1 Random numbers are generated using an FPGA, and these random numbers are then used to modify the original matrix set. Perform random operations to update and obtain P new QUBO matrices, forming a new matrix set. The data is stored in another P BRAM2s within the FPGA. (4) Calculate the original matrix set respectively. With the new matrix set Potential energy term difference Difference in kinetic energy term Classic Hamiltonian difference ; (5) The difference in the potential energy term The difference between the classical Hamiltonian and the stated classical Hamiltonian Compare them; if one of the differences is less than 0, or the difference between the classical Hamiltonians... Then use the new matrix set The corresponding matrix replaces the original matrix set. The corresponding matrix in the set is selected from the updated original matrix set. The matrix that minimizes the potential energy term yields the optimal solution for the current Monte Carlo cycle. ; (6) Update coupling coefficients Decrement the iteration count M by 1, and check if the current iteration count M is greater than 0: If so, return to step (3); Otherwise, the FPGA stops working and obtains the optimal path result, which is the matrix of the current iteration. .

2. The method according to claim 1, characterized in that, In step (2), P quadratic unconstrained binary optimization matrices QUBO are initialized to form the original matrix set. Including the following: (2a) The original matrix is ​​N rows and N columns. All elements in the matrix have only two values: 0 and 1. The rows represent the node numbers in the path planning, and the columns represent the time points. (2b) In the current row, randomly select an integer a between 0 and N, and assign 1 to the element in the a-th column of the current row; (2c) Repeat (2b) until all rows have been selected to obtain a single original matrix s; (2d) Repeat (2a) to (2c) until all P matrices are initialized, forming the original matrix set. ; = { } ; in Original matrix set The m-th original matrix s is in the array, where m is an integer between 1 and P; each matrix is ​​a randomly arranged matrix of 0s and 1s.

3. The method according to claim 1, characterized in that, In step (3), the random number generation via FPGA utilizes a true random seed and an m-sequence to generate random integers between 0 and N that satisfy a uniform distribution. The implementation includes the following: (3a) Design an oscillator consisting of three NOT gates connected in series on the FPGA baseboard; (3b) Connect the two oscillators in pairs to form an oscillation loop. At the sampling clock time, connect the output of the first oscillator a to the input of the second oscillator b, and connect the output of the second oscillator b to the input of the first oscillator a at the same time. (3c) Arrange the 19 oscillating rings in the FPGA in a parallel manner, perform an XOR operation on all output results, and output single-bit data; (3d) Use 32 registers in the FPGA to collect single-bit data for 32 clock cycles to obtain the initial random number seed, which is used as the initial state of the m-sequence; (3e) Prediction m-sequence values ​​after one clock cycle; (3f) Truncate the newly generated m sequence to low-order values. The system generates a random number that meets the requirements.

4. The method according to claim 1, characterized in that, Step (3) involves using random numbers on the original matrix set. Perform random operations, including: (3g) Take two distinct random row numbers c and f in sequence, and determine whether the second random number d is odd: If so, then symmetrically flip all columns between c and f; Otherwise, the selected rows c and f will be swapped.

5. The method according to claim 1, characterized in that, The new matrix set in step (3) , = { } ; in Represents the new matrix set The m-th new matrix m is an integer from 1 to P; each matrix is ​​a 0-1 matrix of size N rows and N columns arranged randomly.

6. The method according to claim 1, characterized in that, In step (4), the original matrix set is calculated. With the new matrix set Potential energy term difference ,include: (4a) Calculate the potential energy term of the original matrix. : ; in, It is the element with x-coordinate i and y-coordinate j in the position matrix d, representing the distance between node i and node j; express The element with x-coordinate i and y-coordinate k; The transition matrix obtained by shifting left by 1 bit. Represents the transition matrix The element with x-coordinate k and y-coordinate j; express The element with x-coordinate i and y-coordinate j; This represents the element with the largest value in the position matrix d; (4b) Calculate the potential energy term of the new matrix. : ; in, The new matrix set obtained after random operations The m-th new matrix; express Elements with x-coordinate i and y-coordinate k; ; for Elements with x-coordinate k and y-coordinate j; express The element with x-coordinate i and y-coordinate j; This represents the element with the largest value in the position matrix d; (4c) According to The difference in potential energy terms is obtained. : 。 7. The method according to claim 1, characterized in that, In step (4), the original matrix set is calculated. With the new matrix set kinetic energy term difference ,include: (4d) Calculate the kinetic energy term of the original matrix. : ; in, Represents the original matrix set The element with x-coordinate i and y-coordinate j in the (m-1)th matrix; Represents the original matrix set The element with x-coordinate i and y-coordinate j in the m-th matrix; Represents the original matrix set The element with x-coordinate i and y-coordinate j in the (m+1)th matrix; (4e) Calculate the kinetic energy term of the new matrix. : ; in, Represents the new matrix set The element with x-coordinate i and y-coordinate j in the (m-1)th matrix; Represents the new matrix set The element with x-coordinate i and y-coordinate j in the m-th matrix; Represents the new matrix set The element with x-coordinate i and y-coordinate j in the (m+1)th matrix; (4f) According to The difference in kinetic energy term is obtained. : 。 8. The method according to claim 1, characterized in that: In step (3), the coupling coefficient is calculated. : ; In step (4), the difference in classical Hamiltonian is calculated. The formula is as follows: 。 9. A Monte Carlo path integral-simulated quantum annealing system for implementing the method of claim 1, comprising: Bram storage space is used to store the original matrix set and the new matrix set; The Bram space access module is used to control the read and write addresses of the Bram storage space; The random number generator module is used to generate random numbers between 0 and N. The random operation module performs random operations on the original matrix based on random numbers to obtain a new matrix. The potential energy term calculation module is used to solve for the potential energy terms of the original matrix and the new matrix; The kinetic energy term calculation module is used to solve for the kinetic energy terms of the original matrix and the new matrix; The update decision module is used to calculate the interpolation of the potential energy term, the difference of the kinetic energy term, and the difference of the classical Hamiltonian, and to determine whether to replace the old matrix with the new matrix based on these results; The iteration counting module is used to decrement the iteration count M by 1 after the update module has finished executing, and to determine whether the iteration count M is greater than 0: if it is, then return to the random operation module; Otherwise: The FPGA stops working.

10. An FPGA-based electronic device, comprising a memory, a reconfigurable logic unit, and a computer program executable on the FPGA, characterized in that, The method described in any one of claims 1 to 8 is implemented when the FPGA executes a computer program.