quantum-exeter / SpiDy.jl

:spider: Non-Markovian stochastic SPIn (and harmonic oscillator) DYnamics.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

spidy_banner

SpiDy.jl

Stable Dev Build Status

(It is pronounced "spee-dee" 😊)

SpiDy.jl is a Julia package that solves the non-Markovian stochastic dynamics of interacting classical spin vectors and harmonic oscillator networks in contact with a dissipative environment. The methods implemented allow the user to include arbitrary memory effects and colored quantum noise spectra. In this way, SpiDy.jl provides key tools for the simulation of classical and quantum open systems including non-Markovian effects and arbitrarily strong coupling to the environment. Among the wide range of applications, some examples range from atomistic spin dynamics to ultrafast magnetism and the study of anisotropic materials. We provide the user with Julia notebooks to guide them through the various mathematical methods and help them quickly set up complex simulations.

Reference paper

This is the reference paper for a quick overview and start with the code. You might also want to cite it in case it is useful!

arXiv preprint -> https://arxiv.org/abs/2310.03008

Online documentation

Check the online documentation at this link.

Install Julia

If you are new to Julia, here is how to install it.

If you are a Windows/Mac user, download Julia here and run the installer. On Mac, drag-and-drop the app to the Applications.

If you are a Linux user, just open a terminal and use your package manager, e.g. on Debian-based distros run "sudo apt-get install julia", on RedHat-based distros run "sudo dnf install julia".

Install SpiDy

Start Julia and enter in Pkg REPL mode by pressing ] then run the following,

add SpiDy

NB: the entire installation of SpiDy and its dependencies takes about 5 minutes on a bare-bones Julia environment.

Run SpiDy

To run the code,

  • save run_dynamics.jl and run_steadystate.jl in your preferred location (open the link -> right click on the page -> save as... should work to save the file)
  • open the terminal or command line
  • run the following command,
julia "path-to-your-file"/run_dynamics.jl

where "path-to-your-file" is the one where you saved your file. Replace run_dynamics.jl with run_steadystate.jl to run the one of your choice.

This last command will run the code and save plots/datafile of the chosen run. CONGRATS, you have just run SpiDy for the first time!

NB: the code can exploit parallel computation. To do this, run your files as

julia -t 6 "path-to-your-file"/run_dynamics.jl

where you want to replace "6" with the number of threads that you wish to use. As a general idea, you do not want to use more than 80% of the number of threads you have available in your machine, e.g. if you have a 4-core CPU, you are likely to have 8 threads and you may want to run the parallelization as indicated above.

Repo structure

  • .github/workflows: contains the yml file to build the documentation and commit on the gh-pages branch
  • docs: contains the logos, make.jl and index.md for the generation of documentation
  • runs: contains run_*.jl files which can be used as a template to run the code
  • src: contains the source code
  • starthere: contains an ipynb notebook written in Julia which walks you through bits and pieces of the code with explanatory plots (the notebook is evolving over time but always ready to use)

About

:spider: Non-Markovian stochastic SPIn (and harmonic oscillator) DYnamics.

License:GNU General Public License v3.0


Languages

Language:Julia 89.9%Language:TeX 10.1%