{"id":24739522,"url":"https://github.com/davidace/xdmrgpp","last_synced_at":"2025-10-10T08:30:50.867Z","repository":{"id":37270643,"uuid":"98307786","full_name":"DavidAce/xDMRGpp","owner":"DavidAce","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-02T20:43:51.000Z","size":118684,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-05T09:40:47.107Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DavidAce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-07-25T13:14:21.000Z","updated_at":"2025-08-29T15:08:10.000Z","dependencies_parsed_at":"2025-09-05T09:40:19.781Z","dependency_job_id":null,"html_url":"https://github.com/DavidAce/xDMRGpp","commit_stats":null,"previous_names":["davidace/xdmrgpp"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/DavidAce/xDMRGpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidAce%2FxDMRGpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidAce%2FxDMRGpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidAce%2FxDMRGpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidAce%2FxDMRGpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidAce","download_url":"https://codeload.github.com/DavidAce/xDMRGpp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidAce%2FxDMRGpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003299,"owners_count":26083555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-27T22:59:50.441Z","updated_at":"2025-10-10T08:30:45.827Z","avatar_url":"https://github.com/DavidAce.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Ubuntu 22.04](https://github.com/DavidAce/DMRG/actions/workflows/ubuntu-22.04.yml/badge.svg)](https://github.com/DavidAce/DMRG/actions/workflows/ubuntu-22.04.yml)\n[![Ubuntu 24.04](https://github.com/DavidAce/DMRG/actions/workflows/ubuntu-24.04.yml/badge.svg)](https://github.com/DavidAce/DMRG/actions/workflows/ubuntu-22.04.yml)\n[![codecov](https://codecov.io/gh/DavidAce/DMRG/branch/master/graph/badge.svg?token=9YE72CJ522)](https://codecov.io/gh/DavidAce/DMRG)\n# DMRG++\n\n---\n\n# Introduction\n\n[Density matrix renormalization group](https://en.wikipedia.org/wiki/Density_matrix_renormalization_group) (DMRG) is a\nvariational technique used to study quantum systems. DMRG works by iteratively optimizing a trial wave function in the\nform of a [Matrix Product State](https://en.wikipedia.org/wiki/Matrix_product_states) (MPS), until obtaining an\neigenstate of the system with high precision.\n\nDMRG++ includes 4 algorithms for finding eigenstates of 1D quantum spin chains:\n\n- ***x*DMRG:** *Excited state* DMRG. Finds highly excited eigenstates of finite systems.\n- ***f*DMRG:** *finite* DMRG. Finds the groundstate of finite systems.\n- ***i*DMRG:** *infinite* DMRG. Finds the groundstate of infinite translationally invariant systems.\n- ***i*TEBD:** *Imaginary Time Evolving Block Decimation*. Finds the ground state of infinite translationally\n  invariant systems from a quench in imaginary time.\n\nOne additional algorithm is included to study the dynamics in the Many-body Localized phase:\n\n- ***f*LBIT:** *Finite* l-BIT. Time evolution on a finite system in the basis of local integrals of motion (l-bits).\n\n\n## Documentation\n\nFor more information on using DMRG++, visit\n\nhttps://kth-dmrg.readthedocs.io/en/latest/\n\n### Working Notes (in construction)\n\nSee the [working notes](https://github.com/DavidAce/Notebooks/blob/master/DMRG%2B%2B/DMRG%2B%2B.pdf) for a more\ntheoretical background of this implementation.\n\n\n---\n\n# Usage\n\n## Input Configuration File\n\nThe default input configuration file `input/input.cfg` sets simulation properties, such as algorithm, system size and\nprecision.\n`DMRG++` takes a custom input file from command-line arguments, e.g. `./DMRG++ -c path/to/file.cfg`.  \n\n## Output Data File\n\nAfter execution the results are stored a binary file in HDF5 format. Its location is specified in the configuration\nfile `input/input.cfg`. By default, the output file is `output/output.h5`, which will contain values like the final\nenergies, entanglement entropies, and optionally the final state in MPS form.\n\nTo view the data you can use any hdf5-viewer, such as HDFCompass or HDFViewer.\n\n## Model Hamiltonians\n\nThese model Hamiltonians of 1D quantum systems are included:\n\n- `ModelType::ising_sdual`: The Self-dual transverse-field Ising model.\n- `ModelType::ising_tf_rf`: The Transverse-field Ising model with random on-site field.\n- `ModelType::lbit`: The l-bit Hamiltonian, used to describe a many-body localized phase\n  in terms of its local integrals of motion (the l-bits).\n\nThe Hamiltonians are implemented as *Matrix Product Operators* (MPO), located under `source/tensors/model`. The model\ntype is selected using the input configuration file in `input/input.cfg`, with the option `settings::model::model_type`.\nTo add another model, one currently has to implement a new MPO and derive from `class_mpo_site` just like the existing\nmodels.\n\n\n---\n\n# Installation\n\n\n## Requirements\n\nThe following software is required to build the project:\n\n- C++20 compiler (tested with gcc-12 and up and clang-18)\n- CMake version \u003e= 3.24 to use presets.\n\nIn addition, conan version 2 is recommended for dependency installation. \nWhen using conan, you will need:\n\n`conan remote add conan-dmrg https://neumann.theophys.kth.se.org/artifactory/api/conan/conan-dmrg`\n\nto obtain some custom dependencies such as h5pp (dev) and arpack++ (see dependencies below).\n\n## Quick start\n\n- `git clone git@github.com:DavidAce/DMRG.git` and `cd DMRG`\n- Configure `cmake --preset \u003cpreset\u003e` (see available presets with `cmake --list-presets`)\n- Build with `cmake --build --preset \u003cpreset\u003e`\n- Modify `input/input.config` to configure a simulation.\n- Run with `./build/\u003cpreset\u003e/DMRG++ -c input/input.cfg`.\n- Find generated data in `output/output.h5`.\n\nSome presets, with `conan` in their name, can use the \n[CMake Dependency Provider](https://cmake.org/cmake/help/latest/guide/using-dependencies/index.html#dependency-providers)\nmechanism to let CMake call conan to install all the dependencies automatically.\n\n\n## Dependencies\n\n- Some BLAS, LAPACK and Lapacke implementation. Choose either [FlexiBLAS](https://www.mpi-magdeburg.mpg.de/projects/flexiblas) with reference Lapacke,  [Intel MKL](https://software.intel.com/en-us/mkl)\n  or [OpenBLAS](https://github.com/xianyi/OpenBLAS). Use the [`BLA_VENDOR`](https://cmake.org/cmake/help/latest/module/FindBLAS.html) mechanism to guide CMake. to OpenBLAS can be built by conan. \n- [**Eigen**](http://eigen.tuxfamily.org) for tensor and matrix and linear algebra (tested with version \u003e= 3.3).\n- [**Arpack**](https://github.com/opencollab/arpack-ng) Eigenvalue solver based on Fortran. Note that this in turn\n  requires LAPACK and BLAS libraries, both of which are included in OpenBLAS.\n- [**Arpackpp**](https://github.com/m-reuter/eigsolver_properties) C++ frontend for Arpack.\n- [**primme**](https://github.com/primme/primme) Eigenvalue solver. Complements Arpack.\n- [**h5pp**](https://github.com/DavidAce/h5pp) a wrapper for HDF5. Includes [HDF5](https://www.hdfgroup.org/solutions/hdf5/), [spdlog](https://github.com/gabime/spdlog)\n  and [fmt](https://github.com/fmtlib/fmt).\n- [**CLI11**](https://github.com/CLIUtils/CLI11) input argument parser\n- [**Backward-cpp**](https://github.com/bombela/backward-cpp) pretty stack trace printer.\n\n\n## Automatic Dependency Installation\n\nThe CMake flag `DMRG_PACKAGE_MANAGER` controls the automated behavior for finding or installing dependencies. It can\ntake one of these strings:\n\n| Option               | Description                                                                                         |\n|----------------------|-----------------------------------------------------------------------------------------------------|\n| `find` **(default)** | Use CMake's `find_package`  to find dependencies. (Use this with the CMake Presets labeled `conan`) |\n| `cmake¹`             | Use CMake to download and install dependencies during configure.                                    |\n|                      |                                                                                                     |\n\n\n## CMake Options\n\nThis project takes several flags in the form `cmake [-DOPTIONS=var] ../ `:\n\n| Var                       | Default                       | Description                                                                         |\n|---------------------------|-------------------------------|-------------------------------------------------------------------------------------|\n| `DMRG_PACKAGE_MANAGER`    | `find`                        | Handle dependencies, `find` or `cmake`                                              |\n| `DMRG_ENABLE_TBLIS`       | `OFF`                         | Use faster [tblis](https://github.com/devinamatthews/tblis) for tensor contractions |\n| `DMRG_ENABLE_TESTS`       | `OFF`                         | Enable unit testing with ctest                                                      |\n| `DMRG_ENABLE_DOCS`        | `OFF`                         | Build documentation                                                                 |\n| `DMRG_ENABLE_COVERAGE`    | `OFF`                         | Enable test coverage                                                                |\n| `DMRG_BUILD_EXAMPLES`     | `OFF`                         | Build examples                                                                      |\n| `DMRG_BUILD_TOOLS`        | `OFF`                         | Build additional binaries under `./tools` for postprocessing (e.g. dmrg-meld)       |\n| `DMRG_DEPS_INSTALL_DIR`   | `CMAKE_INSTALL_PREFIX`        | Install directory for dependencies                                                  |\n| `DMRG_DEPS_BUILD_DIR`     | `CMAKE_BINARY_DIR/dmrg-build` | Build directory for dependencies                                                    |\n| `DMRG_PREFIX_ADD_PKGNAME` | `OFF`                         | Install dependencies into CMAKE_INSTALL_PREFIX/\u003cPackageName\u003e                        |\n| `DMRG_CMAKE_DEBUG`        | `OFF`                         | Extra information during CMake configuration                                        |\n| `EIGEN_USE_THREADS`       | `ON`                          | Use STL threads to parallelize Eigen::Tensor (honors OMP_NUM_THREADS at runtime)    |\n| `COMPILER_ENABLE_ASAN`    | `OFF`                         | Enable runtime address sanitizer -fsanitize=address                                 |\n| `COMPILER_ENABLE_USAN`    | `OFF`                         | Enable undefined behavior sanitizer -fsanitize=undefined                            |\n| `COMPILER_ENABLE_LTO`     | `OFF`                         | Enable link time optimization                                                       |\n| `COMPILER_ENABLE_PCH`     | `OFF`                         | Enable precompiled headers to speed up compilation                                  |\n| `COMPILER_ENABLE_CCACHE`  | `OFF`                         | Enable ccache to speed up compilation                                               |\n\n\nIn addition, variables such\nas [`\u003cPackageName\u003e_ROOT`](https://cmake.org/cmake/help/latest/variable/PackageName_ROOT.html)\nand [`\u003cPackageName\u003e_DIR`](https://cmake.org/cmake/help/latest/command/find_package.html) can be set to help guide\nCMake's `find_package` calls:\n\n\n---\n\n# Contact Information\nFor questions about DMRG++ email David Aceituno aceituno `\u003cat\u003e` kth.se, or create a new [issue](https://github.com/DavidAce/DMRG/issues) or [discussion](https://github.com/DavidAce/DMRG/discussion).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidace%2Fxdmrgpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidace%2Fxdmrgpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidace%2Fxdmrgpp/lists"}