{"id":37065416,"url":"https://github.com/block-hczhai/block2-preview","last_synced_at":"2026-02-15T06:07:29.122Z","repository":{"id":37994790,"uuid":"346218992","full_name":"block-hczhai/block2-preview","owner":"block-hczhai","description":"Efficient parallel quantum chemistry DMRG in MPO formalism","archived":false,"fork":false,"pushed_at":"2026-01-23T21:57:38.000Z","size":68833,"stargazers_count":96,"open_issues_count":2,"forks_count":30,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-01-24T10:29:45.462Z","etag":null,"topics":["ab-initio","bose-hubbard","density-matrix-renomalization-group","dmrg","fermi-hubbard","heisenberg-model","matrix-product-states","mrci","pyscf","quantum-chemistry","tj-model"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/block-hczhai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATIONS.bib","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":"2021-03-10T03:26:07.000Z","updated_at":"2026-01-23T21:44:05.000Z","dependencies_parsed_at":"2023-12-28T06:31:55.743Z","dependency_job_id":"ea69f4a5-dd42-40b0-85b5-3712a7781701","html_url":"https://github.com/block-hczhai/block2-preview","commit_stats":{"total_commits":1050,"total_committers":10,"mean_commits":105.0,"dds":"0.18380952380952376","last_synced_commit":"2c72c16b0e4a9417811dd0a223a7445500a6e631"},"previous_names":[],"tags_count":97,"template":false,"template_full_name":null,"purl":"pkg:github/block-hczhai/block2-preview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-hczhai%2Fblock2-preview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-hczhai%2Fblock2-preview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-hczhai%2Fblock2-preview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-hczhai%2Fblock2-preview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/block-hczhai","download_url":"https://codeload.github.com/block-hczhai/block2-preview/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-hczhai%2Fblock2-preview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29471193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T05:26:30.465Z","status":"ssl_error","status_checked_at":"2026-02-15T05:26:21.858Z","response_time":118,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ab-initio","bose-hubbard","density-matrix-renomalization-group","dmrg","fermi-hubbard","heisenberg-model","matrix-product-states","mrci","pyscf","quantum-chemistry","tj-model"],"created_at":"2026-01-14T07:39:27.765Z","updated_at":"2026-02-15T06:07:29.117Z","avatar_url":"https://github.com/block-hczhai.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![Documentation Status](https://readthedocs.org/projects/block2/badge/?version=latest)](https://block2.readthedocs.io/en/latest/?badge=latest)\n[![Build Status](https://github.com/block-hczhai/block2-preview/workflows/build/badge.svg)](https://github.com/block-hczhai/block2-preview/actions/workflows/build.yml)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![PyPI version](https://badge.fury.io/py/block2.svg)](https://badge.fury.io/py/block2)\n\nblock2\n======\n\nThe block2 code provides an efficient and highly scalable\nimplementation of the Density Matrix Renormalization Group (DMRG) for quantum chemistry,\nbased on the Matrix Product Operator (MPO) formalism.\n\nThe block2 code is developed as an improved version of [StackBlock](https://sanshar.github.io/Block/),\nwhere the low-level structure of the code has been completely rewritten.\nThe block2 code is developed and maintained in Garnet Chan group at Caltech\nand Initiative for Computational Catalysis at Flatiron Institute.\n\nMain contributors:\n\n* Huanchen Zhai [@hczhai](https://github.com/hczhai): DMRG and parallelization\n* Henrik R. Larsson [@h-larsson](https://github.com/h-larsson): DMRG-MRCI/MRPT, large site, Green's function in frequency and time for finite temp.  \n* Seunghoon Lee [@seunghoonlee89](https://github.com/seunghoonlee89): Stochastic perturbative DMRG\n* Zhi-Hao Cui [@zhcui](https://github.com/zhcui): User interface\n\nIf you find this package useful for your scientific research, please cite the work as:\n\n - H. Zhai, H. R. Larsson, S. Lee, Z.-H. Cui, T. Zhu, C. Sun, L. Peng, R. Peng, K. Liao, J. Tölle, J. Yang, S. Li, and G. K.-L. Chan. Block2: A comprehensive open source framework to develop and apply state-of-the-art DMRG algorithms in electronic structure and beyond. *The Journal of Chemical Physics* **159**, 234801 (2023). doi: [10.1063/5.0180424](https://doi.org/10.1063/5.0180424)\n\nFor parallel ab initio DMRG, please cite\n\n - H. Zhai, and G. K.-L. Chan. Low communication high performance ab initio density matrix renormalization group algorithms. *The Journal of Chemical Physics* **154**, 224116 (2021). doi: [10.1063/5.0050902](https://doi.org/10.1063/5.0050902).\n\nFor large site DMRG-MRCI/MRPT, please cite\n\n - H. R. Larsson, H. Zhai, K. Gunst, and G. K.-L. Chan. Matrix product states with large sites. *Journal of Chemical Theory and Computation* **18**, 749-762 (2022). doi: [10.1021/acs.jctc.1c00957](https://doi.org/10.1021/acs.jctc.1c00957).\n\nFor DMRG with spin-orbit-coupling, please cite\n\n - H. Zhai, and G. K.-L. Chan. A comparison between the one- and two-step spin-orbit coupling approaches based on the ab initio Density Matrix Renormalization Group. *The Journal of Chemical Physics* **157**, 164108 (2022). doi: [10.1063/5.0107805](https://doi.org/10.1063/5.0107805).\n\nYou can find a bibtex file in [`CITATIONS.bib`](https://github.com/block-hczhai/block2-preview/blob/master/CITATIONS.bib).\n\nFor a list of DMRG references for methods implemented in ``block2``, see: https://block2.readthedocs.io/en/latest/user/references.html.\n\nOne can install ``block2`` using ``pip`` (note: for very new Python versions, the ``--extra-index-url`` option of ``pip`` is required, see below for installing the developement version of ``block2``):\n\n* OpenMP-only version (no MPI dependence)\n\n      pip install block2\n\n* Hybrid openMP/MPI version (requiring openMPI 5.0.x for ``block2-mpi \u003e= 0.5.3`` or 4.1.x for ``block2-mpi \u003c= 0.5.2`` and ``block2-mpi \u003c= 0.5.3rc19``)\n\n      pip install block2-mpi\n\n* Binary format is prepared via ``pip`` for python 3.8, 3.9, 3.10, 3.11, 3.12, and 3.13 with macOS (x86 and arm64, no-MPI), Linux (no-MPI/openMPI), or Windows (x86, no-MPI). If these binaries have some problems, you can use the ``--no-binary`` option of ``pip`` to force building from source (for example, ``pip install block2 --no-binary block2``).\n\n* One should only install one of ``block2`` and ``block2-mpi``. ``block2-mpi`` covers all features in ``block2``, but its dependence on mpi library can sometimes be difficult to deal with. Some guidance for resolving environment problems can be found in issue [#7](https://github.com/block-hczhai/block2-preview/issues/7) and [here](https://block2.readthedocs.io/en/latest/user/installation.html#installation-with-anaconda).\n\n* To install the most recent development version, use:\n\n      pip install block2==\u003cversion\u003e --extra-index-url=https://block-hczhai.github.io/block2-preview/pypi/\n      pip install block2-mpi==\u003cversion\u003e --extra-index-url=https://block-hczhai.github.io/block2-preview/pypi/\n\n  where ``\u003cversion\u003e`` can be some development version number like ``0.5.4rc13`` (see https://github.com/block-hczhai/block2-preview/tags for a complete list of version numbers. The letter ``p`` is not needed). To force reinstalling an updated version, you may consider ``pip`` options ``--upgrade --force-reinstall --no-deps --no-cache-dir``. For the most recent development version, binary format is prepared for python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t, 3.14, and 3.14t with macOS (arm64), Linux (x86_64 and aarch64), or Windows (x86_64) with no MPI dependence, and Linux (x86_64) with openMPI.\n\nThe detailed instructions on manual installation can be found [here](https://block2.readthedocs.io/en/latest/user/installation.html#manual-installation).\n\nTo run a DMRG calculation using the command line interface, please use the following command:\n\n    block2main dmrg.conf \u003e dmrg.out\n\nwhere ``dmrg.conf`` is the ``StackBlock`` style input file and ``dmrg.out`` contains the outputs.\nExample input files can be found [here](https://block2.readthedocs.io/en/latest/user/basic.html).\n\nFor DMRGSCF calculation, please have a look at [here](https://block2.readthedocs.io/en/latest/user/dmrg-scf.html).\n\nDocumentation: https://block2.readthedocs.io/en/latest/\n\nTutorial (Python interface): https://block2.readthedocs.io/en/latest/tutorial/qc-hamiltonians.html\n\nCustom model Hamiltonians can be supported via a Python interface: [Fermi-Hubbard](https://block2.readthedocs.io/en/latest/tutorial/hubbard.html), [Bose-Hubbard](https://block2.readthedocs.io/en/latest/tutorial/custom-hamiltonians.html#Bose-Hubbard-Model), [Hubbard-Holstein](https://block2.readthedocs.io/en/latest/tutorial/custom-hamiltonians.html#The-Hubbard-Holstein-Model), [SU(2) Heisenberg](https://block2.readthedocs.io/en/latest/tutorial/heisenberg.html), [SU(3) Heisenberg](https://block2.readthedocs.io/en/latest/tutorial/custom-hamiltonians.html#SU(3)-Heisenberg-Model), [t-J](https://block2.readthedocs.io/en/latest/tutorial/custom-hamiltonians.html#SU(2)-t-J-Model), [correlation functions](https://block2.readthedocs.io/en/latest/tutorial/custom-hamiltonians.html#Correlation-Functions).\n\nSource code: https://github.com/block-hczhai/block2-preview\n\nExample DMRG scripts for realistic systems: https://github.com/hczhai/block2-example-data/tree/master/00-HC\n\nFor a simplified implementation of ab initio DMRG, see [pyblock3](https://github.com/block-hczhai/pyblock3-preview). Data can be imported and exported between ``block2`` and ``pyblock3``, see https://github.com/block-hczhai/block2-preview/discussions/35.\n\nFeatures\n--------\n\n* State symmetry\n    * U(1) particle number symmetry\n    * SU(2) or U(1) spin symmetry (spatial orbital)\n    * No spin symmetry (general spin orbital)\n    * Abelian point group symmetry\n    * Translational (K point) / Lz symmetry\n* Sweep algorithms (1-site / 2-site / 2-site to 1-site transition)\n    * Ground-State DMRG\n        * Decomposition types: density matrix / SVD\n        * Noise types: wavefunction / density matrix / perturbative\n    * Multi-Target Excited-State DMRG\n        * State-averaged / state-specific\n    * MPS compression / addition\n    * Expectation\n    * Imaginary / real time evolution\n        * Hermitian / non-Hermitian Hamiltonian\n        * Time-step targeting method\n        * Time dependent variational principle method\n    * Green's function\n* Finite-Temperature DMRG (ancilla approach)\n    * Green's function\n    * Time evolution\n* Low-Temperature DMRG (partition function approach)\n* Particle Density Matrix (1-site / 2-site)\n    * 1PDM / 2PDM / 3PDM / 4PDM\n    * Transition 1PDM / 2PDM / 3PDM / 4PDM\n    * Spin / charge correlation\n* Quantum Chemistry MPO\n    * Normal-Complementary (NC) partition\n    * Complementary-Normal (CN) partition\n    * Conventional scheme (switch between NC and CN near the middle site)\n* Symbolic MPO simplification\n* MPS initialization using occupation number\n* Supported matrix representation of site operators\n    * Block-sparse (outer) / dense (inner)\n    * Block-sparse (outer) / elementwise-sparse (CSR, inner)\n* Fermionic MPS algebra (non-spin-adapted only)\n* Determinant/CSF coefficients of MPS\n    * Extracting Determinant/CSF coefficients from MPS\n    * Constructing MPS from Determinant/CSF coefficients\n* Multi-level parallel DMRG\n    * Parallelism over sites (2-site only)\n    * Parallelism over sum of MPOs (distributed)\n    * Parallelism over operators (distributed/shared memory)\n    * Parallelism over symmetry sectors (shared memory)\n    * Parallelism within dense matrix multiplications (MKL)\n* DMRG-CASSCF and contracted dynamic correlation\n    * DMRG-CASSCF (pyscf / openMOLCAS / forte interface)\n    * DMRG-CASSCF nuclear gradients and geometry optimization (pyscf interface, RHF reference only)\n    * DMRG-sc-NEVPT2 (pyscf interface, classical approach)\n    * DMRG-sc-MPS-NEVPT2 (pyscf interface, MPS compression approximation)\n    * DMRG-CASPT2 (openMOLCAS interface)\n    * DMRG-cu-CASPT2 (openMOLCAS interface)\n    * DMRG-MRDSRG (forte interface)\n* Stochastic perturbative DMRG\n* DMRG with Spin-Orbit Coupling (SOC)\n    * 1-step approach (full complex one-MPO and hybrid real/complex two-MPO schemes)\n    * 2-step approach\n* Uncontracted dynamic correlation\n    * DMRG Multi-Reference Configuration Interaction (MRCI) of arbitrary order\n    * DMRG Multi-Reference Averaged Quadratic Coupled Cluster (AQCC)/ Coupled Pair Functional (ACPF)\n    * DMRG NEVPT2/3/..., REPT2/3/..., MR-LCC, ...\n* Orbital Reordering\n    * Fiedler\n    * Genetic algorithm\n* MPS Transformation\n    * SU2 to SZ mapping\n    * Point group mapping\n    * Orbital basis rotation\n\nStackBlock Compatibility\n------------------------\n\nA [StackBlock 1.5](https://github.com/sanshar/StackBlock) compatible user interface can be found at `pyblock2/driver/block2main`.\nThis script can work as a replacement of the StackBlock binary, with a few limitations and some extensions.\nThe format of the input file `dmrg.conf` is identical to that of StackBlock 1.5.\nSee `docs/driver.md` and `docs/source/user/basic.rst` for detailed documentations for this interface.\nExamples using this interface can be found at `tests/driver`.\n\nInstuctions for installing the StackBlock code can be found in [here](https://block2.readthedocs.io/en/latest/user/mps-io.html#stackblock-installation). A list of precompiled binaries of StackBlock can be found in [here](https://github.com/hczhai/StackBlock/releases/tag/v1.5.3).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblock-hczhai%2Fblock2-preview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblock-hczhai%2Fblock2-preview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblock-hczhai%2Fblock2-preview/lists"}