Coder Social home page Coder Social logo

mphysproject's Introduction

MPhysProject

mphysproject's People

Watchers

 avatar

mphysproject's Issues

Possible Optimization Issue with np.einsum

To multiply two lattices I am currently using np.einsum('ijkl,ijlm->ijkm',A,B). Apparently this is slower than using np.matmul(A,B) directly. The performance does not change much but it does improve particularly for big lattices and large N. I will consider updating this. It may be more important later so I will leave this open for now.

Correlation Length Analysis

Currently, the only method that is working to compute the Correlation length of the system is calculating the Wall to Wall correlation:
$$G_{ww}(t)\propto \sum_{t_0} \sum_p \sum_q ReTr[U(t_0,p)\ U^\dagger (t+t_0,q)]$$
Where $U(x) = U(t,x_1)$ is an SU(N) matrix in the fundamental representation.
Then $G_{ww}(t)/G_{ww}(0)$ is fitted into a cosh like model:
$$\frac{\cosh\left(\frac{t-\frac{L}{2}}{\xi_{ww}}\right)-1}{\cosh\left(\frac{\frac{L}{2}}{\xi_{ww}}\right)-1}$$
An alternative method is to calculate the correlation through the second moment correlation length. We start by defining $G(x-y) = \frac{1}{N}ReTr[U(x)\ U^\dagger (y)]$ where $x = (x_1,x_2)$ and $y = (y_1,y_2)$. Then $G(x) = G(x-0) = \frac{1}{N}ReTr[U(x)\ U^\dagger (0)]$. The second-moment correlation length is defined as:
$$\xi_G^2 = \frac{1}{4\sin^2(\frac{\pi}{L})}\left(\frac{\tilde{G}[0,0]}{\tilde{G}[0,1]}-1\right)$$
Where $\tilde G[k_1,k_2] = F[G(x)]; x = (x_1,x_2)$
This method is currently not working as the value obtained from $\xi_G$ contains an imaginary part. The origin of this is not clear, it is possible that running the simulation for a larger number of configurations will solve the issue.

GPU optimization

The current version of the code uses Numpy to perform all the matrix calculations. Numpy does not automatically use the GPU resources of the computer in which the code is running. It would be interesting to study the effect of switching to Pythorch or to Cupy to use the GPU of the school computer (Nvidia T4), which should significantly speed up the computations.

Fourier Acceleration

Fourier Acceleration needs to be implemented for the $SU(N) \times SU(N)$ Chiral model in two dimensions.

Testing

The project currently has a test suite comprising only 7 tests which were mainly used to ensure that the matrix_routines file is working properly as the whole code is dependent on it. However, given the importance of this Python file for the project as a whole the test suite should be expanded. Additionally, some methods have been added to the file since the last unit test was created so there are methods that currently don't have any tests.
Some tests should be created for the other Chiral files and possibly for other files.

Cold Start

The Current version of the code initializes the field to the identity field (having the identity for all the sites in the lattice). This initial configuration proves to be highly inefficient since it is reasonably hard for the algorithm to find an initial configuration to move away from the identity, which results in problems in the calibration procedure.
A better option would be to initially run the HMC algorithm without the Metropolis step to accept any configuration generated for a determined number of steps and then running it with the metropolis step. This essentially creates a Hot Start which is already tailored to by the Dynamics of the System.

Generalize Algorithm for SU(N)

The current implementation of the algorithm works for N = 2,3,4. It would be good to generalize it for arbitrary N. That involves making an algorithm to create the generators of SU(N) and to unitarize the matrices of the group

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.