Wanna draw thermal samples? Does your Hilbert space have untapped classical subsectors? Then you've come to the right place!
This repo contains code to perform Markov Chain Monte Carlo over the Falikov-Kimball model for the publication "One-dimensional long-range Falikov-Kimball model: Thermal phase transition and disorder-free localization" available in PRB or on the arXiv. I provide the code here as a record of what was done, it's likely not reproducable without extra help but if you wish to know more please get in touch.
The code exploits two special properties of this model and would work well on other models with either property:
- The model contains a classical degree of freedom (in this case S_i) and a quantum degree of freedom (c_i) such that when the classical degree of freedom is fixed the model is quadratic in c_i or otherwise easy to solve.
- The model contains entirely classical terms like J_ij S_i S_j
Property 1 allows the MCMC to define a walk over the classical states of the system and solve the quantum system at each point, effectively factoring the classical subspace out of the full Hilbert space.
Property 2 allows for an optimisation where the standard Metropolis-Hastings alogorithm is modified to compute the classical terms first, perform a probabalistic accept/reject step, and only on acceptance compute the quantum terms, saving upto 90% computation time in our model.
Also includes code for submission to cluster systems (PBS and SLURM) and analysis of the results, such as computing energy-resolved Inverse Participation Ratios.
A phase diagram for the above model showing the Charge Denisity Wave phase where the spins order antiferromagnetically, the gapped Mott Insulator phase and the gapless Anderson Insulator phase.
- Clone the repo
git clone https://github.com/TomHodson/FKMC cd FKMC
- setup an environment using conda or venv
conda env create -f environment.yml conda activate FKMC
or
python3 -m venv .venv
source .venv/bin/activate # or `.venv\Scripts\activate.bat` if you're using Windows
python -m pip install -U pip
python -m pip install -U -r requirements.txt
Install the FKMC package
sh pip install --editable .
- (Optional) Install a git filter to prevent cell output from showing up underversion control
nbstripout --install
A typical use would be to:
- Create a notebook for a simulation e.g batchscripts/gap_opening_U-5_logarithmic.ipynb
- Submit that simulation to the cluster using the helper script at batchscripts/submit.py This would likely require modification for other cluster setups. The script will create a directory for the simulation at ~/HPC_data with subdirectories containing the logs and data. e.g
./batchscripts/submit.py