Coder Social home page Coder Social logo

f-koehler / mpskit Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 266 KB

C++17 toolkit to study the static properties of discrete quantum systems.

License: MIT License

CMake 5.78% C++ 87.61% Makefile 6.06% Shell 0.56%
bose-hubbard dmrg ising-model ising-model-2d matrix-product-states mps

mpskit's Introduction

mpskit

Repository on GitHub CI GitHub GitHub top language

mpskit is a toolkit to facilitate the investigation of discrete quantum systems (e.g. lattice models of spins and bosons) in one and two dimensions. It employs the ITensor library for matrix product and tensor network states as well as the density matrix renormalization group (DMRG) algorithm to compute eigenstates. The library allows to easily implement new systems and to compute relevant observables (expectation values, local operators, correlations, โ€ฆ). Results are stored in an efficient and portable HDF5 file format that can be read by many programming languages/tools for further analysis. Input parameters are passed via JSON files which are human-readable plain text files.

I tried to implement time-evolving block decimation (TEBD) to compute the time-evolution but could not quite get it to work with the C++ version of ITensor. However, I got it to work with the Julia version of ITensor, ITensor.jl and you can use my project MPSToolkit.jl for that.

Available Models

1D Spin Systems

Transverse-Field Ising Model

$$ H=\sum\limits_{i=1}^{L-1}\left( J\sigma_{i}^{z}\sigma_{i+1}^{z} \right) +\sum\limits_{i=1}^{L}\left( h_x\sigma_{i}^{x} +h_z\sigma_{i}^{z} \right) $$

Long-Range Transverse-Field Ising Model

$$ H=\sum\limits_{i=1}^{L-1}\sum\limits_{j=1}^{i}\left( \frac{J}{{|i-j|}^{\alpha}}\sigma_{i}^{z}\sigma_{i+1}^{z} \right) +\sum\limits_{i=1}^{L}\left( h_x\sigma_{i}^{x} +h_z\sigma_{i}^{z} \right) $$

with an optional cutoff radius for the interaction.

Heisenberg Model

$$ H=\sum\limits_{i=1}^{L-1}\left( J_x\sigma_{i}^{x}\sigma_{i+1}^{x} +J_y\sigma_{i}^{y}\sigma_{i+1}^{y} +J_z\sigma_{i}^{z}\sigma_{i+1}^{z} \right) +\sum\limits_{i=1}^{L}\left( h_x\sigma_{i}^{x} +h_y\sigma_{i}^{y} +h_z\sigma_{i}^{z} \right) $$

Long-Range Disordered XY Spin Glass

1D Bosonic Systems

Bose-Hubbard Model (1D)

$$ H=-J\sum\limits_{i=1}^{L-1}\left( b_{i}^{\dagger}b_{i+1} +b_{i+1}^{\dagger}b_{i} \right) +\frac{U}{2}\sum\limits_{i=1}^{L} n_i(n_i-1) $$

A new model can be added by adding it to the models source folder (take inspiration from transverse_ising_1d.hpp, transverse_ising_1d.cpp, etc.). Afterwards it has to be registered in the model registry (see registry.cpp).

Dependencies

  • cmake
  • gcc>=8 or clang>=6
  • boost
  • hdf5

Compilation

Compilation of the project is an easy two-step process.

1. Configure the project

Run

cmake -B build -DCMAKE_BUILD_TYPE=Release

from the project directory to create a build/ directory. You can specify the C++ compiler by setting the CXX environment variable, e.g. export CXX=clang++, before invoking the CMake command.

If you are developing based on this you might want to create a Debug build for testing instead (not recommended for actual simulation due to reduced performance). In order to achieve this replace the CMake command above with

cmake -B build -DCMAKE_BUILD_TYPE=Debug

2. Compile the code

After step one just run

cmake --build build

to compile the code. The build/ folder will then contain the mpskit executable.

Running the program

You can consult mpskit --help to see the command line options this programs has to offer.

mpskit's People

Contributors

f-koehler avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

mpskit's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • actions/checkout v4

  • Check this box to trigger a request for Renovate to run again on this repository

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.