Code Monkey home page Code Monkey logo

cdmrg's Introduction

cDMRG

cDMRG enables the application of the Density-Matrix Renormalization Group (DMRG) to continuous quantum systems by spatial partitioning into segments with continuous basis functions. It is based on arXiv:2108.05366 and distinct from cMPS. The code is written for bosons with contact interactions trapped in a box with a sinusoidal potential, divided into segments of equal width.

Installation

In order to get this code running on your machine follow these steps.

Prerequisites

Build

  • Clone this repository on you machine.
  • Update DIR in Makefile such that it points to the ITensor directory.
  • Build binaries:
    make build
  • Among other files you should find cDMRG executable that will be used by the front-end Mathematica script, which are described below.

Code Structure

cDMRG consists of two main modules:

  • DMRG Module using the ITensor library
  • Input Module written in Mathematica

DMRG Module

The DMRG module consists of the following files:

  • cDMRG.cc - main block
  • cio.h, cio.cc - input/output
  • readvec.h, readvec.cc - reading vectors
  • cSite.h - site set
  • cDMRGeps.h - DMRG sweeps
  • localmpoproj.h - Hamiltonian MPOs

Input Module

The DMRG module is called by the Mathematica package cDMRG_input.m, which generates the necessary inputs (local basis and operators) for DMRG. A separate documentation of cDMRG_input.m is provided in the notebook cDMRG_input_documentation.nb. The package can be modified by changing the notebook cDMRG_input.nb and saving it as a package .m.

IDs / Stored Inputs

Parameters specifying the local basis, DMRG sweeps, and what results to save are stored in basistable.m, epstable.m, and savetable.m in the Parameters directory, with unique integer pointers that act as IDs. One can add more entries using a text editor or using the function storenewparam in cDMRG_inputIDgen.nb.

How to Use

Store/find Input IDs

Use the notebook cDMRG_inputIDgen.nb to (1) specify parameters for the local basis, DMRG parameters, and what results to save, (2) check if these are already stored as inputs and find their IDs; if not, create new IDs.

Run the Program

Call the program from the command line as

math -noprompt -run '<<cDMRG_input.m' N gamma Nwell V0 M basisid epsid saveid &

where

  • N - int number of particles
  • gamma - float dimensionless interaction strength
  • Nwell - float number of potential minima
  • V0 - float potential depth in units of recoil
  • M - int number of segments
  • basisid - int ID for basis parameters
  • epsid - int ID for DMRG parameters
  • saveid - int ID for save parameters

For instance a short calculation can be initiated by

math -noprompt -run '<<cDMRG_input.m' 4 10 4 1 8 1 1 1 &

The results are stored in the directory Runs.

Visualize Outputs

Results from a sample run are stored in the Runs directory and illustrated with plots in the notebook cDMRG_example_output.nb.

Basis Splitting

Codes for splitting a segment at an arbitrary point, and calculating the bipartite entanglement are provided in the notebook cDMRG_basis_splitting.nb. An example is given using the output MPS stored in Runs.

cdmrg's People

Contributors

anton-buyskikh avatar shovan-physics 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.