E-Spin: A Stochastic Ising Spin Based on Electrically-Controlled MTJ for Constructing Large-Scale Ising Annealing Systems

With its unique computer paradigm, the Ising annealing machine has become an emerging research direction. The Ising annealing system is highly effective at addressing combinatorial optimization (CO) problems that are difficult for conventional computers to tackle. However, Ising spins, which comprise the Ising system, are difficult to implement in high-performance physical circuits. We propose a novel type of Ising spin based on an electrically-controlled magnetic tunnel junction (MTJ). Electrical operation imparts true randomness, great stability, precise control, compact size, and easy integration to the MTJ-based spin. In addition, simulations demonstrate that the frequency of electrically-controlled stochastic Ising spin (E-spin) is 50 times that of the thermal disturbance MTJ-based spin (p-bit). To develop a large-scale Ising annealing system, up to 64 E-spins are implemented. Our Ising annealing system demonstrates factorization of integers up to 264 with a temporal complexity of around O(n). The proposed E-spin shows superiority in constructing large-scale Ising annealing systems and solving CO problems.


Introduction
Combinatorial optimization problems have long been a tangled mess for conventional computers. With the scale of the problem increasing, the consumption of time and hardware resources increases exponentially. Heuristic search techniques, such as the simulated annealing algorithm, have been utilized to search for a solution within a limited time. However, their search effectiveness remains unsatisfactory. It is anticipated that quantum annealing [1,2] would surpass the calculating limit of conventional computers. However, the quantity of Q-bits, the requisite cryogenic environment, and the decoherence generated by the environment's interface severely restrict the system's scalability.
Ising annealing was offered as an alternative scenario between classical computing and quantum computing. Ising annealing is a novel non-von Neumann computing architecture that specializes in CO problems [3][4][5][6]. There have been numerous proposals to construct Ising systems with physical entities, including superconductive qubits [7] and degenerate optical parametric oscillators (DOPOs) [3,[8][9][10][11]. However, the above methods are hampered by their integration complexity and stringent working conditions. Other methods, such as complementary metal-oxide-semiconductor (CMOS) circuits [12][13][14] and LC oscillators [5], are constrained by circuit area. New devices such as insulator-to-metal phase transition nano oscillators (IMT-NOs) [15] and nano-magnet (p-bit) [16] have been investigated as Ising spins. When manufactured on a wide scale, discrepancies caused by device instability and process variation remain a hurdle. Due to the low computer capability, only 10-bit integer factorization was supported [16]. Therefore, a novel type of Ising spins that are easy to integrate and an efficient Ising annealing algorithm is urgently required.
The spin-transfer torque magnetic tunnel junctions (STT-MTJs) possess the property of stochastic switching [18][19][20], and their switching probability is dependent on the applied current. According to prior research [21][22][23], the switching characteristics of STT-MRAM can be roughly seen as a sigmoidal function of the current magnitude. The schematic diagram of MTJ's switching probability is depicted in Figure 1b, and it is written as follows: where τ 0 , t, ∆, I, and I c0 are respectively the attempt time, the duration time of the current pulse, the thermal stability parameter, the applied current, and the critical switching current at 0 K. While t and I are variables that can be changed after fabrication, parameter τ 0 , ∆, and I c0 are process-related parameters and cannot be altered. Applying various current pulses of suitable amplitude and length allows us to change the switching probability [22,24]. The construction of the Double-MTJ employed in this work is depicted in a. MgO makes up the tunnel barrier and the cap layer, while CoFeB makes up the free layer. The additional CoFeB/MgO interface raises the energy barrier of STT-MTJ [25].
The process of operation is shown in c. First, we must perform the "reset" operation, which involves forcing the MTJ into a low resistance state by applying a strong reverse pulse. We call this state the 'initial state'. After that, to set the probability of MTJ in a high resistance state as the desired probability , we must deliver the proper pulse according to (1). This process is called the 'excite' operation. A probability sequence with a p probability of a high voltage level is created by carrying out the reset and excite operations in order, then reading the resistance of the MTJ after each excite operation. The pulse given to the MTJ during excite operation determines the probability of a high voltage level in the probability sequence.  The construction of the Double-MTJ employed in this work is depicted in Figure 1a. MgO makes up the tunnel barrier and the cap layer, while CoFeB makes up the free layer. The additional CoFeB/MgO interface raises the energy barrier of STT-MTJ [25].
The process of operation is shown in Figure 1c. First, we must perform the "reset" operation, which involves forcing the MTJ into a low resistance state by applying a strong reverse pulse. We call this state the 'initial state'. After that, to set the probability of MTJ in a high resistance state as the desired probability p, we must deliver the proper pulse according to (1). This process is called the 'excite' operation. A probability sequence with a p probability of a high voltage level is created by carrying out the reset and excite operations in order, then reading the resistance of the MTJ after each excite operation. The pulse given to the MTJ during excite operation determines the probability of a high voltage level in the probability sequence.

Schematic Diagram, Operation Paradigm, and Simulation of the E-Spin
The proposed E-spin was constructed based on the stochastic STT-MTJ, shown in Figure 2a. The n-type metal-oxide-semiconductor (NMOS) transistor is a current source that supplies the electrically-controlled stochastic STT-MTJ with an appropriate amount of current. Depending on the direction and amount of current passing through it, the STT- The n-type metal-oxide-semiconductor (NMOS) transistor is a current source that supplies the electrically-controlled stochastic STT-MTJ with an appropriate amount of current. Depending on the direction and amount of current passing through it, the STT-MTJ may change its state (high or low resistance), altering the voltage of INP. Assuming that the high-resistance MTJ corresponds to V I NP = V I NP−low and the lowresistance MTJ corresponds to V I NP = V I NP−high , then the voltage of reference INN is set to (V I NP−low + V I NP−high )/2. The comparator compares the difference between INN and reference INP and output 1 (0) to distinguish the high (low) resistance state of stochastic MTJ.
The circuit's current direction is depicted in Figure 2b Figure 2c as the stack structure of the MTJ's arrangement. Figure 2d shows the operation paradigm applied to the E-spin. In a single cycle, there are three operational modes: reset, excite, and read. The input of the E-spin (V W L ) is sufficiently large during the reset period to supply enough current to reset the MTJ to a low resistance state. The direction of the current flowing through the MTJ is reversed during the excite period. As illustrated in Figure 2e,f, a larger V W L corresponds to a higher probability of switching to a high resistance state, in accordance with (1). The comparator, which senses the voltage variation caused by the fluctuation of the MTJ state during the read period, reads out the probability of E-spin.
The output of the ith stochastic MTJ (m i ) is refreshed during the read period according to: where input I i and output m i can be represented as: r is a random number with range [0, 1]. δ(x) is the sigmoidal function, and ϑ(x) is the unit step function. As a result, the time-averaged output of the E-spin coincides with the sigmoidal curve, as shown in Figure 2f. Table 1 shows the characteristics of three MTJ-based random sources, including the spin dice, thermal disturbance MTJ-based spin (p-bit) [16], and our E-spin. For the spin dice, P sw was set to the fixed value of 50%, while we used the entire domain of the sigmoidal function (see Figure 1) in our design, which broadens the range of its applications.

Advantages of the E-Spin
The temperature, which is determined by the surroundings and operating conditions, has a direct impact on the switching frequency for thermal disturbance MTJ (p-bit) [16]. However, the E-spin, based on Double-MTJ and having a greater thermal stability factor ∆ [25], could counteract the probability skew brought on by temperature variation. Because of this, our proposed electrical operation to adjust probability has better stability. By precisely controlling the current, the dependability and accuracy of the E-spin are considerably enhanced. Additionally, Double-MTJ arrays can be incorporated thanks to the scalability of spin-torque switching, offering significant prospects for novel spintronicsbased large-scale integrated circuits [25].

Endurance of the E-Spin
According to the spin operation modes mentioned in Figure 2, repetitive reset, excite, and read operations are required during work. Consequently, the endurance analysis of the spin is required.
In the existing non-volatile memories, the endurance of MRAM is an obvious advantage compared to RRAM and PCRAM. The endurance of STT-MTJ with multiple CoFeB/MgO interfaces could theoretically reach up to 10 15 ∼ 10 16 , which is higher than traditional MTJ [25]. Constructing spins using such STT-MTJ could reach over three years of lifetime at the working frequency of 10 MHz~100 MHz, satisfying the needs of most usage scenarios. Figure 3 shows the lifetime of such an STT-MTJ at various working frequencies.
If the MTJ has an endurance of 1 × 10 15 , it can operate at the frequency of 10 MHz for 3.17 years. The endurance can be increased even more if the SOT-MRAM is included [27]. Because the current is not passed directly through the MTJ in SOT-MRAM, the MTJ is clearly protected, increasing the endurance to almost infinite levels.

Endurance of the E-Spin
According to the spin operation modes mentioned in , repetitive reset, excite, and read operations are required during work. Consequently, the endurance analysis of the spin is required.
In the existing non-volatile memories, the endurance of MRAM is an obvious advantage compared to RRAM and PCRAM. The endurance of STT-MTJ with multiple CoFeB/MgO interfaces could theoretically reach up to 10 15~1 0 16 , which is higher than traditional MTJ [25]. Constructing spins using such STT-MTJ could reach over three years of lifetime at the working frequency of 10 MHz~100 MHz, satisfying the needs of most usage scenarios. shows the lifetime of such an STT-MTJ at various working frequencies.
If the MTJ has an endurance of 1 × 10 15 , it can operate at the frequency of 10 MHz for 3.17 years. The endurance can be increased even more if the SOT-MRAM is included [27]. Because the current is not passed directly through the MTJ in SOT-MRAM, the MTJ is clearly protected, increasing the endurance to almost infinite levels.

Steps of Ising Annealing System Solving CO Problems
The Ising system is composed of Ising spins and their interconnections. The Hamiltonian of the Ising system is: where spin σ , ∈ {+1, −1}, and , ℎ , are the coupling parameter between spins and , the magnitude of the external magnetic field, and the Bohr magneton, respectively.
By mapping the task function into the Ising Hamiltonian and mapping the best answer to the lowest value of the acquired Ising Hamiltonian, the task can be transformed into searching for the lowest energy state of the Ising system. After the annealing procedure, the system energy will gradually descend and reach the low energy state. At this point, a workable solution is discovered.

Steps of Ising Annealing System Solving CO Problems
The Ising system is composed of Ising spins and their interconnections. The Hamiltonian of the Ising system is: where spin σ i,j ∈ {+1, −1}, and J ij , h j , µ are the coupling parameter between spins i and j, the magnitude of the external magnetic field, and the Bohr magneton, respectively. By mapping the task function into the Ising Hamiltonian and mapping the best answer to the lowest value of the acquired Ising Hamiltonian, the task can be transformed into searching for the lowest energy state of the Ising system. After the annealing procedure, the system energy will gradually descend and reach the low energy state. At this point, a workable solution is discovered.

Mapping Integer Factorization Problem to Ising Annealing System
An illustration of the combinatorial optimization problem is the integer factorization problem. The integer factorization problem, which is still challenging for traditional computers, is now widely used in the RSA (Rivest-Shamir-Adleman) encryption technique.
According to [28], the Ising Hamiltonian (or system energy, cost function) of the integer factorization problem is: where X, Y, and F are odd integers. X and Y can be represented in binary form as: with x 0 = y 0 = 1. P and Q donate the number of bits needed to represent X and Y. Suppose F is an N-bit integer. Then we have: We use E-spins to represent each bit of X and Y. The LSBs (least significant bits) of X and Y are fixed to '1'; then, only P − 1 and Q − 1 E-spins are needed to represent X and Y, respectively. Then we have: Since the two variables X and Y are discrete, H is a discontinuous function. Figure 4 demonstrates an example of the energy distribution of the system H = (X × Y − F i ) 2 . Here, F i = 45,431. It can be inferred from the picture that there are lots of local minimums along the hyperbola : (X × Y − F) 2 = 0.

Mapping Integer Factorization Problem to Ising Annealing System
An illustration of the combinatorial optimization problem is the integer factorization problem. The integer factorization problem, which is still challenging for traditional computers, is now widely used in the RSA (Rivest-Shamir-Adleman) encryption technique.
According to [28], the Ising Hamiltonian (or system energy, cost function) of the integer factorization problem is: where , , and are odd integers. and can be represented in binary form as: with 0 = 0 = 1. and donate the number of bits needed to represent and . Suppose F is an -bit integer. Then we have: We use E-spins to represent each bit of and . The LSBs (least significant bits) of and are fixed to '1'; then, only − 1 and − 1 E-spins are needed to represent and , respectively. Then we have: Since the two variables and Y are discrete, H is a discontinuous function. demonstrates an example of the energy distribution of the system = ( × − ) 2 . Here, F = 45431. It can be inferred from the picture that there are lots of local minimums along the hyperbola ℓ: (X × Y − F) 2 = 0.  The integer factorization problem differs from other combinational problems in that the former requires the optimal solution, whilst the latter just requires a good enough response. In other words, the output answer must meet higher standards because it will not be legitimate if the product of two factors does not exactly equal the number F. Figure 5 demonstrates the flowchart of the proposed QFactor, a stochastic Ising annealing algorithm. The first step is problem mapping. Section 3.2 has shown the procedure of mapping the integer factorization problem to the problem of finding out the minimum value of the discrete function H = (X × Y − F) 2 .

Stochastic Ising Annealing Algorithm Based on E-Spin
The integer factorization problem differs from other combinational problems in that the former requires the optimal solution, whilst the latter just requires a good enough response. In other words, the output answer must meet higher standards because it will not be legitimate if the product of two factors does not exactly equal the number F.

Stochastic Ising Annealing Algorithm Based on E-Spin
demonstrates the flowchart of the proposed QFactor, a stochastic Ising annealing algorithm. The first step is problem mapping. Section 3.2 has shown the procedure of mapping the integer factorization problem to the problem of finding out the minimum value of the discrete function = ( × − ) 2 . Making the non-continuous function into a continuous function is one of the effective ways to address discrete optimization problems since it speeds up the process of convergence to the local minimum. Therefore, in the second step, the discrete function was transformed into its continuous function form ′ = ( ′ × ′ − ) 2 , where ′ and ′ are continuous variables. The problem was converted to obtaining the minimum value of the continuous function ′ .
In the third step, gradient descent was employed to reach the local minimum, as deep learning algorithms do in neural networks. Variable ′ and ′ are updated by ′ = ′ + • ′ ′ and ′ = ′ + • ′ ′ , where parameter is the stride length. Fourthly, the continuous variable ′ and ′ are approximated as integers ′′ and ′′.
Lastly, verify that is equal to 0. = 0 indicates that we have arrived at the right answer.
If ≠ 0, then we must use the subsequent stages to discover a different solution: • Map and to the corresponding spin and using Equations (7) and (8).

•
If the calculated or equals value "1", the MUX outputs to the corresponding . Then, the E-spin provides a strong likelihood of an output value "1". The is the parameter that can be adjusted. In this experiment, we set to be around 0.95 Making the non-continuous function into a continuous function is one of the effective ways to address discrete optimization problems since it speeds up the process of convergence to the local minimum. Therefore, in the second step, the discrete function H was transformed into its continuous function form H = (X × Y − F) 2 , where X and Y are continuous variables. The problem was converted to obtaining the minimum value of the continuous function H .
In the third step, gradient descent was employed to reach the local minimum, as deep learning algorithms do in neural networks. Variable X and Y are updated by X = X + λ· ∂H ∂X and Y = Y + λ· ∂H ∂Y , where parameter λ is the stride length. Fourthly, the continuous variable X and Y are approximated as integers X and Y . Lastly, verify that H is equal to 0. H = 0 indicates that we have arrived at the right answer.
If H = 0, then we must use the subsequent stages to discover a different solution: • Map X and Y to the corresponding spin x i and y i using Equations (7) and (8).

•
If the calculated x i or y i equals value "1", the MUX outputs V H to the corresponding I i . Then, the E-spin provides a strong likelihood of an output value "1". The V H is the parameter that can be adjusted. In this experiment, we set V H to be around 0.95 V and V L to be 0.55 V. The random flips of E-spin do not frequently occur, so the gradient descent procedure is dominant in most cases. • Accordingly, if x i or y i equals '0', the MUX outputs V L to the corresponding E-spin I i .
Then the E-spin provides a high probability of output value "0".
Repeat step 2 to step 5 until the correct solution is found.

The Overall Diagram of the Proposed Ising Annealing System
The overall diagram of the proposed Ising annealing system is shown in Figure 6. The gradient-descent-based Ising annealing algorithm (QFactor) supplies an input signal for the E-spins through multiplexers (MUXs). If x i (or y i ) equals '1', then the input of E-spin equals V H . Otherwise, if x i (or y i ) equals '0', then the input of E-spin equals V L . Stochastic E-spins generate the sequenced stochastic bit streams according to the MUXs' output voltage (V H or V L ).

V and
to be 0.55 V. The random flips of E-spin do not frequently occur, so the gradient descent procedure is dominant in most cases. • Accordingly, if or equals '0', the MUX outputs to the corresponding Espin . Then the E-spin provides a high probability of output value "0".
Repeat step 2 to step 5 until the correct solution is found.

The Overall Diagram of the Proposed Ising Annealing System
The overall diagram of the proposed Ising annealing system is shown in . The gradient-descent-based Ising annealing algorithm (QFactor) supplies an input signal for the Espins through multiplexers (MUXs). If (or ) equals '1', then the input of E-spin equals . Otherwise, if (or ) equals '0', then the input of E-spin equals . Stochastic Espins generate the sequenced stochastic bit streams according to the MUXs' output voltage ( or ). The key to obtaining a better solution for an Ising annealing system is jumping out of the local optimal solution. Therefore, randomness is required in the annealing procedure to escape the local minimum. A significant difference between QFactor and other Ising annealing algorithms is the production of randomness. The QFactor algorithm fully utilizes the stochastic nature of E-spin, negating the need to use another randomness as the motivation of the annealing procedure.

Ising annealing
In addition, QFactor employs randomness differently than traditional heuristic search algorithms, such as simulated annealing, which selects a random number of and for the following annealing cycle. While and are denoted in QFactor as = ∑ 2 −1 =1 + 1 and = ∑ 2 − +1 −2 = + 1, which means that any random flip of will deviate X by the length of 2 .
Except for Ising annealing algorithms and heuristic search algorithms, there are other traditional methods to solve integer factorization problems, such as numerical calculation algorithms. The General Number Field Sieve (GNFS) method is the most effective numerical computation algorithm for solving the integer factorization problem at present. However, because of the operation's complexity, hardware optimization is challenging. The key to obtaining a better solution for an Ising annealing system is jumping out of the local optimal solution. Therefore, randomness is required in the annealing procedure to escape the local minimum. A significant difference between QFactor and other Ising annealing algorithms is the production of randomness. The QFactor algorithm fully utilizes the stochastic nature of E-spin, negating the need to use another randomness as the motivation of the annealing procedure.
In addition, QFactor employs randomness differently than traditional heuristic search algorithms, such as simulated annealing, which selects a random number of X and Y for the following annealing cycle. While X and Y are denoted in QFactor as X = ∑ P−1 n=1 2 n m n + 1 and Y = ∑ N−2 n=P 2 n−P+1 m n + 1, which means that any random flip of x i will deviate X by the length of 2 i x i .
Except for Ising annealing algorithms and heuristic search algorithms, there are other traditional methods to solve integer factorization problems, such as numerical calculation algorithms. The General Number Field Sieve (GNFS) method is the most effective numerical computation algorithm for solving the integer factorization problem at present. However, because of the operation's complexity, hardware optimization is challenging. Nevertheless, GNFS is a specific algorithm for a single purpose. The QFactor algorithm provides an easy-to-implement way to solve more general discrete optimization problems. Figure 7a,b show the hardware simulation waveform of factoring 24-bit integers 14019841 and 14166761 using Vivado circuit simulator software. The entire system is simulated using all-digital circuitry for the convenience of larger-scale simulation. The behavior of the E-spin is simulated by the CMOS-based stochastic Ising spin. The 2-way digital MUXs, instead of the analog MUXs in Figure 6, select the input of E-spins. shows the averaged cycles needed by the simulated annealing algorithm [12], Isin annealing algorithm [16], trial division [29], and the QFactor to factor integers with n b widths. The performance of the simulated annealing algorithm was evaluated by map ping the factorization optimization problem into the minimum energy state, carrying ou The schematic view of the CMOS-based stochastic Ising spin is shown in Figure 7c. To better simulate the true-randomness property of the E-spin, we use 32-bit LFSR in our simulation because the 32-bit LFSR counter has a repetition time of up to (2 32 −1) clock periods. We used the high 16 bits of the 32-bit LFSR, which helps to reduce the overall hardware complexity and simulation time. The piecewise linear approximation module approximates the sigmoidal function using 16-segment polylines. The behavior of the MTJ-based E-spin described in Equation (2) is the same as the CMOS-based stochastic Ising spin. Figure 7d shows the schematic view and circuitry of 2-way digital MUXs. During the annealing process, it is proper to reach a balance between gradient descent and random exploration. Therefore, the value of the 4-bit parameter a in Figure 7d is 4 to 6. Suppose that a equals 5, the probability that an E-spin changes its state is 1 1+e 5 = 0.0067. The probability that at least one E-spin changes its state in the 22 E-spin system is 1 − (1 − 0.0067) 22 = 0.1373, which indicates that there is a 13.7 percent chance that the E-spins will randomly choose another solution. The value of λ is the other hyperparameter to determine the appropriate stride length for X and Y , which is closely related to the bit width n. In this experiment, λ is roughly 6.5 × 10 −16 when n equals 24. a and λ are the only two hyperparameters used in the QFactor, and there is no need to adjust them when factoring different integers with the same n.

Examples of Factoring Integers
Since the LSB of the two factors X and Y is 1, only 22 E-spins are needed. Whenever the system energy H = (X × Y − F) 2 equals 0, the 'success' signal is high. At this time, a successful factorization is reached.

Comparations for Simulated Annealing, Trial Division, and Ising
Annealing Algorithm Figure 8 shows the averaged cycles needed by the simulated annealing algorithm [12], Ising annealing algorithm [16], trial division [29], and the QFactor to factor integers with n bit widths. The performance of the simulated annealing algorithm was evaluated by mapping the factorization optimization problem into the minimum energy state, carrying out the pseudo-annealing procedure, and selecting the optimal sets of parameters in our trial. Accordingly, the performance of the Ising annealing algorithm was evaluated through our recurrence of the code. The trial division algorithm traverses all numbers from 2 to √ n until a factor is discovered. The four algorithms were tested using the exact integers. All values on the graph were tested more than five times. Accordingly, the performance of the Ising annealing algorithm was evaluated through our recurrence of the code. The trial division algorithm traverses all numbers from 2 to √ until a factor is discovered. The four algorithms were tested using the exact integers.
All values on the graph were tested more than five times. For instance, the averaged number of cycles needed to factor 32-bit integers using the simulated annealing, Ising annealing, and trial division methods, respectively, is 5 × 10 5 , 5 × 10 3 , and 33 times greater than the QFactor. Additionally, the QFactor further extended its advantage as the integer bit width increased, remarkably outperforming other stochas- For instance, the averaged number of cycles needed to factor 32-bit integers using the simulated annealing, Ising annealing, and trial division methods, respectively, is 5 × 10 5 , 5 × 10 3 , and 33 times greater than the QFactor. Additionally, the QFactor further extended its advantage as the integer bit width increased, remarkably outperforming other stochastic algorithms.
As the integer bit width (n) increases linearly, the size of the search space expands at the rate of 2 n . However, Figure 8 shows that the required cycles of the QFactor only grow at the rate of 2 √ n , which not only shortens annealing cycles but also remarkably outperforms other stochastic algorithms. The required cycles of trial division increase at the rate of 2 √ n as well. The QFactor only employs the multiply operation, in contrast to the trial division method's use of divide operations. The hardware complexity of the divide operation is much higher than the multiply operation, especially as the problem's size increases. Therefore, implementing the trial division method in hardware is much more complicated than implementing the QFactor.

Analysis Results of the E-Spin
There are several technology roadmaps to implement the stochastic Ising spin. The CMOS-based stochastic Ising spin uses LFSR to build a pseudo-random-number-generator (PRNG). The thermal disturbance MTJ-based spin (p-bit) utilizes thermal-controlled unstable MTJ to realize a true-random-number-generator (TRNG). Figure 9 shows the layout view of a single CMOS-based stochastic Ising spin and a single MTJ-based E-spin. The area of the CMOS-based stochastic Ising spin is 3546 µm 2 . The CMOS-based stochastic Ising spin's power is 142.6 µW at the frequency of 333 MHz, according to the results provided by the Design Compiler.  Voltage Drop (mV) 1 Switching Probability [0,144) 0% The MTJ is simulated by a Verilog-A model with 7.425 KΩ high resistance and 2.75 KΩ low resistance. The Verilog-A model is used to simulate the behavior of MTJ under various voltages, which is shown in Table 2. The current-time simulation of the E-spin is shown in Figure 10. The applied WL, BL, and SL voltages are shown in Figure 2d. In this illustration, V W L,excite = 0.75 V. Reference voltage V I NN is 250 mV. VSS2, VSS3, and VSS1 are the total current under reset, excite, and read operation modes. The reset, excite, and read operations of the stochastic MTJ last 5 ns, 5 ns, and 10 ns, respectively, with currents of 323.55 µA, 131.60 µA, 51.86 µA. Power consumption data (see Table 2) are calculated by multiplying the time-averaged current and VDD (1.1 V).    The primary shortage of LFSR is that it is not a truly random source. The random number generated by an n-bit LFSR will loop for a maximum of 2 cycles. That mean the size of LFSR must be sufficient to simulate the characteristics of a truly random sourc There are some applications that LFSR is incapable of, such as encrypted communicatio and Monte Carlo simulation.
The primary defect of thermal disturbance MTJ is the intricate voltage offset opera tion requirement for each bit, which restricts the application in large-scale issues.
The proposed E-spin outperforms the p-bits in stability, speed, and large-scale int gration. Firstly, the E-spin adapts the electrical operation, which helps in precise contro  Table 3 lists the critical indicators of the three stochastic Ising spins. The primary shortage of LFSR is that it is not a truly random source. The random number generated by an n-bit LFSR will loop for a maximum of 2 n cycles. That means the size of LFSR must be sufficient to simulate the characteristics of a truly random source. There are some applications that LFSR is incapable of, such as encrypted communication and Monte Carlo simulation.
The primary defect of thermal disturbance MTJ is the intricate voltage offset operation requirement for each bit, which restricts the application in large-scale issues.
The proposed E-spin outperforms the p-bits in stability, speed, and large-scale integration. Firstly, the E-spin adapts the electrical operation, which helps in precise control. Meanwhile, the p-bit uses the thermal-disturbance-controlled MTJ, the frequency of which is influenced by the operating temperature. As a result, the frequency of p-bit is unpredictable, which could cause problems if interconnected with other modules. Additionally, the p-bit is in demand of the voltage offset for each bit. As a result, building an array out of p-bits is challenging.
Secondly, the electrical operation also permits the E-spin to operate with a high frequency. The minimum pulse width of the read/write operation is 2 ns. The frequency of the E-spin could reach higher than 50 MHz. In comparison, the frequency of p-bit is less than 1 MHz. The working frequency of the E-spin is considerably higher.
Lastly, the E-spin could easily integrate with logic circuits. We demonstrate the fabrication of 64 E-spins with logic circuits under the 40 nm technology node, which shows great potential in large-scale integration. Nevertheless, ref [16] only demonstrates eight p-bits, which are selectively chosen from discrete devices. Additionally, the working conditions of each p-bit have to be carefully adjusted. The peripheral circuits for adjusting p-bit working conditions are a considerable expense when manufactured on a large scale.

Conclusions
This paper proposes a stochastic Ising spin (E-spin) based on the electrically-controlled STT-MTJ. The probabilistic Ising annealing algorithm (QFactor) is based on the E-spins. The E-spin has true randomness, excellent stability, fine control, high frequency, compact size, and is simple to integrate thanks to its electrical operation. Using the gradient descent algorithm and E-spins to escape the local minimum is a novel approach to solving optimization problems. The E-spin achieved 50 times the frequency of p-bit. Up to 64 E-spins are implemented to construct a large-scale Ising annealing system. Factorization of integers up to 2 64 is demonstrated using our Ising annealing system, with a time complexity of roughly O √ n . This work shows the enormous application potential of the electrically-controlled STT-MTJ, which is also instructive for further research on new computing paradigms.