Shovan-Physics / cDMRG

Apply DMRG to continuous systems
Apache License 2.0
12 stars 3 forks source link

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

Code Structure

cDMRG consists of two main modules:

DMRG Module

The DMRG module consists of the following files:

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

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.