Giter VIP home page Giter VIP logo

pyqmagen's Introduction

PyQMagen - a Python package for thermal data analysis of quantum magnets

The Python version of QMagen provides a highly customizable package for the analysis of thermal data of quantum magnets. Featuring Bayesian optimizer for the fitting loss, and combined with an ED solver, the PyQMagen is a computational light package that can analyze high temperature thermal data.

Installation

Firstly, please cd to your customized path

cd user_customized_path

The QMagen package can then be installed locally via following commands:

git clone https://github.com/QMagen/PyQMagen.git
cd PyQMagen

Dependencies

If you are new to Python, we strongly recommended to use anaconda or miniconda to configure your environment. They can be found here.

After installing conda, you can create and activate a separate virtual environment via

conda create -n qmagen

Then you can install the PyQMagen package and its dependencies into the qmagen environment with

conda activate qmagen
pip install -e .

if you don't have pip installed by default, run
conda install pip or conda install python should fix the issue


Demo

After installation, the PyQMagen package can be imported in Python environment via

import qmagen

for example, let's see how to calculate the simulated thermal data of a uniform Heisenberg spin-chain of 8 spins

import numpy as np
from qmagen import solver
from qmagen.models import chain

# create a spin-chain model with 8 spins
mymodel = chain.UniformSpinChain(l=8)

# get the interactions with coupling strength J=1
interactions = mymodel.generate_interactions(J=1)

# create a ED solver
mysolver = solver.EDSolver(size=mymodel.l) 

# calculate the thermal data with ED solver with generated interactions
thermal_data = mysolver.forward(interactions, T=np.linspace(0.1, 10, 100))

Tutorial

For more detailed usage guide, we provide a tutorial in jupyter notebook

You can run the tutorial by

# if you don't have jupyter installed
conda install jupyter notebook

jupyter-notebook tutorial/introduction.ipynb

Future updates

In the short future, following features will be updated:

  • Large-scale 1D solver - LTRG
  • Animation for the optimization process
  • More templates for spin-models

Also we are working hard to bring even more exciting features in PyQMagen, including

  • Large-scale 2D solver - XTRG
  • Neural network based thermal analysis

Maintainer


Cite us

@article{QMagen2020,
  title={Learning Effective Spin Hamiltonian of Quantum Magnet},
  author={Sizhuo Yu, Yuan Gao, Bin-Bin Chen and Wei Li},
  journal={arXiv preprint arXiv:2011.12282},
  year={2020}
}

pyqmagen's People

Contributors

realbunbun avatar yusizhuo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.