All Projects → yomichi → SpinMonteCarlo.jl

yomichi / SpinMonteCarlo.jl

Licence: MIT license
Markov chain Monte Carlo solver for lattice spin systems implemented by Julialang

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to SpinMonteCarlo.jl

l2hmc-qcd
Application of the L2HMC algorithm to simulations in lattice QCD.
Stars: ✭ 33 (-5.71%)
Mutual labels:  monte-carlo, lattice, mcmc
IsingMonteCarlo
A program implementing Metropolis Monte Carlo for the 2D square-lattice Ising model and the spin block renormalization
Stars: ✭ 20 (-42.86%)
Mutual labels:  physics, ising-model, spin
ml
machine learning
Stars: ✭ 29 (-17.14%)
Mutual labels:  monte-carlo, mcmc
DynamicHMCExamples.jl
Examples for Bayesian inference using DynamicHMC.jl and related packages.
Stars: ✭ 33 (-5.71%)
Mutual labels:  mcmc, julialang
LatticeQCD.jl
A native Julia code for lattice QCD with dynamical fermions in 4 dimension.
Stars: ✭ 85 (+142.86%)
Mutual labels:  monte-carlo, julialang
ising-model
Python implementation of the Ising model
Stars: ✭ 37 (+5.71%)
Mutual labels:  monte-carlo, ising-model
CorBinian
CorBinian: A toolbox for modelling and simulating high-dimensional binary and count-data with correlations
Stars: ✭ 15 (-57.14%)
Mutual labels:  ising-model, mcmc
pylj
Teaching Utility for Classical Atomistic Simulation.
Stars: ✭ 23 (-34.29%)
Mutual labels:  physics, monte-carlo
MonteCarlo.jl
Classical and quantum Monte Carlo simulations in Julia
Stars: ✭ 125 (+257.14%)
Mutual labels:  physics, monte-carlo
TimeEvolvingMPO
A Python 3 package to efficiently compute non-Markovian open quantum systems.
Stars: ✭ 43 (+22.86%)
Mutual labels:  physics, quantum-physics
DynamicalBilliards.jl
An easy-to-use, modular, extendable and absurdly fast Julia package for dynamical billiards in two dimensions.
Stars: ✭ 97 (+177.14%)
Mutual labels:  physics, julialang
Berry
Berry is a simple Tiled Map Loader for Corona SDK.
Stars: ✭ 16 (-54.29%)
Mutual labels:  physics
PlutoStaticHTML.jl
Convert Pluto notebooks to HTML in automated workflows
Stars: ✭ 69 (+97.14%)
Mutual labels:  julialang
covidestim
Bayesian nowcasting with adjustment for delayed and incomplete reporting to estimate COVID-19 infections in the United States
Stars: ✭ 20 (-42.86%)
Mutual labels:  mcmc
Statistics-Notes
Personal notes on statistics with a focus on applications to experimental high energy physics
Stars: ✭ 19 (-45.71%)
Mutual labels:  physics
awesome-secure-computation
Awesome list for cryptographic secure computation paper. This repo includes *Lattice*, *DifferentialPrivacy*, *MPC* and also a comprehensive summary for top conferences.
Stars: ✭ 125 (+257.14%)
Mutual labels:  lattice
SeaPearl.jl
Julia hybrid constraint programming solver enhanced by a reinforcement learning driven search.
Stars: ✭ 119 (+240%)
Mutual labels:  julialang
pyqentangle
Quantum Entanglement in Python
Stars: ✭ 16 (-54.29%)
Mutual labels:  physics
optionmatrix
Financial Derivatives Calculator with 168+ Models (Options Calculator)
Stars: ✭ 121 (+245.71%)
Mutual labels:  monte-carlo
Learn.jl
JuliaML bundled in a convenient all-in-one toolkit.
Stars: ✭ 57 (+62.86%)
Mutual labels:  julialang

SpinMonteCarlo.jl

Docs (latest) Build status (macos/Linux) Build status (win)

Markov chain Monte Carlo solver for finite temperature problem of lattie spin system implemented by Julia language.

Install

Pkg> add SpinMonteCarlo

Simple example

The following program calculates temperature v.s. specific heat of the ferromagnetic Ising model on a 16x16 square lattice by Swendsen-Wang algorithm.

using SpinMonteCarlo
using Printf

const model = Ising
const lat = "square lattice"
const L = 16
const update = SW_update!

const Tc = 2.0/log1p(sqrt(2))
const Ts = Tc*range(0.85, stop=1.15, length=31)
const MCS = 8192
const Therm = MCS >> 3

for T in Ts
    params = Dict{String,Any}("Model"=>model, "Lattice"=>lat,
                              "L"=>L, "T"=>T, "J"=>1.0,
                              "Update Method"=>update,
                              "MCS"=>MCS, "Thermalization"=>Therm,
                             )
    result = runMC(params)
    @printf("%f %.15f %.15f\n",
            T, mean(result["Specific Heat"]), stderror(result["Specific Heat"]))
end

Implemented

Model

  • Classical spin model
    • Ising model
    • Q state Potts model
      • order parameter defined as M = (Q-1)/Q * n_1 - (1-n_1)/Q, where n_1 is the number density of q=1 spins.
    • XY model
    • Q state Clock model
    • AshkinTeller model
  • Quantum spin model
    • spin-S QuantumXXZ model
      • \mathcal{H} = \sum_{ij} [ Jz_{ij} S_i^z S_j^z + \frac{Jxy_{ij}}{2} (S_i^+ S_j^- + S_i^-S_j^+) ] - \sum_i Gamma_i S_i^x

Lattice

  • chain lattice
    • L
  • bond-alternating chain lattice
    • L
  • square lattice
    • L * W
  • triangular lattice
    • L * W
  • cubic lattice
    • L * W * H
  • fully connected graph
    • N

Update algorithm

  • Classical spin
    • local_update!
    • SW_update!
    • Wolff_update!
  • Quantum spin
    • loop_update!

Physical quantities

  • Ising, Potts
    • Magnetization
      • := < M_total/N_site >
    • |Magnetization|
      • := < |M_total/N_site| >
    • Magnetization^2
      • := < (M_total/N_site)^2 >
    • Magnetization^4
      • := < (M_total/N_site)^4 >
    • Binder Ratio
      • := "Magnetization^4")/"Magnetization^2"^2
    • Susceptibility
      • := \partial_h "Magnetization" = (N/T) * ("Magnetization^2" - "Magnetization"^2)
    • Connected Susceptibility
      • := (N_site/T) * ("Magnetization^2"- "|Magnetization|"^2)
    • Energy
      • := < E_total/N_site >
    • Energy^2
      • := < (E_total/N_site)^2 >
    • Specific Heat
      • := \partial_beta "Energy" = (N/T^2)*("Energy^2" - "Energy"^2)
  • XY, Clock
    • |Magnetization|
    • |Magnetization|^2
    • |Magnetization|^4
    • Binder Ratio
    • Susceptibility
    • Connected Susceptibility
    • Magnetization x
    • |Magnetization x|
    • Magnetization x^2
    • Magnetization x^4
    • Binder Ratio x
    • Susceptibility x
    • Connected Susceptibility x
    • Magnetization y
    • |Magnetization y|
    • Magnetization y^2
    • Magnetization y^4
    • Binder Ratio y
    • Susceptibility y
    • Connected Susceptibility y
    • Helicity Modulus x
    • Helicity Modulus y
    • Energy
    • Energy^2
    • Specific Heat
  • QuantumXXZ
    • Magnetization
      • := < \sum_i S_i^z > / Nsite
    • Magnetization^2
      • := < (\sum_i S_i^z)^2 > / Nsite^2
    • Magnetization^4
      • := < (\sum_i S_i^z)^4 > / Nsite^4
    • Binder Ratio
      • := "Magnetization^4")/"Magnetization^2"^2
    • Susceptibility
      • := \partial_h "Magnetization" = (N/T) * ("Magnetization^2" - "Magnetization"^2)
    • Energy
      • := < \mathcal{H} > / Nsite
    • Energy^2
      • := < \mathcal{H}^2 > / Nsite^2
    • Specific Heat
      • := \partial_beta "Energy" = (N/T^2)*("Energy^2" - "Energy"^2)

Future work

  • Model
    • Classical model
      • Heisenberg model
      • antiferro interaction
      • magnetic field
    • Quantum model
      • SU(N) model
  • Update Method
    • worm algorithm
  • Others
    • random number parallelization
      • NOTE: parameter parallelization can be realized simply by using @parallel for or pmap.
    • write algorithmic note
      • especially, Foutuin-Kasteleyn representaion and improved estimators

Author

Yuichi Motoyama, the University of Tokyo, 2016-

This package distributed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].