User:Fermigone/sandbox

Alternate methods to find the critical temperature
The square lattice Ising model can be solved analytically to obtain the critical temperature, as seen above. However, for more complex 2D configurations like the triangular lattice, or problems of greater interest in modern condensed matter, such as disordered or topological phases, the problem of finding the critical temperature becomes intractable and must be solved numerically. Traditionally this is performed using Monte Carlo methods, For a certain temperature T, over several million iterations, simulations converge to a steady state. One can then calculate various properties of the model like magnetization, specific heat from the Monte Carlo samples. In recent years, machine learning models have been used heavily in the study of condensed matter systems to learn properties of the underlying model. While these methods do not provide a quantitative understanding of the physics like Monte Carlo methods, they are very useful in searching for patterns in intractable systems that they may not even have been trained to learn from. As a proof of concept, one can find the critical temperature of the square lattice Ising model using Supervised learning. Training and testing datasets can be created by generating 2D matrices of N² spins using the Metropolis–Hastings algorithm, where one samples the Boltzmann distribution to generate energetically favorable configurations of spins starting from a randomly generated initial sample. One can then obtain high and low temperature Ising states, on which a simple Artificial neural network can be trained to perform binary classification. Even a shallow network of only 100 hidden neurons is capable of producing a 90% accuracy in classifying high versus low temperature states. The output layer of the network can then be obtained for each temperature that was sampled, and the crossing point of the high and low temperature predications can be used to find the critical temperature of the system. In the plots below we demonstrate this for lattices of size N = 10, 20, 30 and 40. While the accuracy is pretty high at temperature extremes, the network is more confused near the critical temperature, signaling the phase transition in the system. This method can then be tested on other models like the triangular lattice to obtain their critical temperatures with high accuracy as well.