shuaigroup / Renormalizer

Quantum dynamics package based on tensor network states
https://shuaigroup.github.io/Renormalizer/
Apache License 2.0
52 stars 16 forks source link
ab-initio chemistry dmrg dynamics electron-phonon gpu matrix-product-states mobility physics python quantum quantum-dynamics spectra temperature tensor-networks tree-tensor-networks

logo

CircleCI codecov pypi doc

Renormalizer is a Python based tensor network package with a special focus on electron-phonon quantum dynamics.

Installation

pip install renormalizer

For users who are not familiar with python, please check out the step-by-step installation guide.

Features

Documentation

Please check out the official documentation and the examples.

Quickstart

from renormalizer import Mps, Mpo, Op, Model, BasisHalfSpin

# a two-spin system. 0 and 1 denote the label of the spin
basis = [BasisHalfSpin(0), BasisHalfSpin(1)]
# the Hamiltonian has two terms, \sigma^+_0 \sigma^-_1 + \sigma^+_1 \sigma^-_0
ham_terms = Op("sigma_+ sigma_-", [0, 1]) + Op("sigma_+ sigma_-", [1, 0])
# build our model
model = Model(basis, ham_terms)
# the initial state: the 0th spin at the [0, 1] state
# the 1th spin will by default at the [1, 0] state
mps = Mps.hartree_product_state(model, condition={0:[0, 1]})
# the Hamiltonian
mpo = Mpo(model)
# the operator to calculation expectation
z_op = Mpo(model, Op("Z", 0))
# perform the time evolution
for i in range(10):
    mps = mps.evolve(mpo, 0.05)
    print(mps.expectation(z_op))

Notice

Renormalizer relies on linear algebra libraries such as OpenBLAS or MKL for matrix operations. These libraries by default parallel over as many CPU cores as possible. However, we have found empirically that for calculations carried out in Renormalizer such parallelism has limited efficiency. More specifically, the computational wall time hardly decrease if more than 4 cores are used (see this paper).

[!IMPORTANT]
We highly recommend limiting the number of parallel CPU cores to 4 for large scale calculations and 1 for small scale tests

To do this, set the environment variable before running Python

export RENO_NUM_THREADS=1

which sets all environment variables for underlying linear algebra libraries, such as MKL_NUM_THREADS.

[!IMPORTANT]
After importing NumPy or Renormalizer, setting the environment variables will have no effect.

In fact, limiting the cores was once the default behavior of Renormalizer. It is later changed in this PR because Renormalizer is sometimes imported as a utility package.

Useful links

Papers published using Renormalizer

  1. Liqi Zhou, Xing Gao, Zhigang Shuai, A stochastic Schrödinger equation and matrix product state approach to carrier transport in organic semiconductors with nonlocal electron–phonon interaction J. Chem. Phys., 2024, 161, 084118.
  2. Weitang Li, Jiajun Ren, Hengrui Yang,; Haobin Wang, Zhigang Shuai, Optimal tree tensor network operators for tensor network simulations: Applications to open quantum systems. J. Chem. Phys., 2024, 161*, 054116.
  3. Zirui Sheng, Tong Jiang, Weitang Li, and Zhigang Shuai, TD-DMRG Study of Exciton Dynamics with both Thermal and Static Disorders for Fenna-Matthews-Olson Complex. J. Chem. Theory Comput., 2024, 20, 6470−6484.
  4. Yufei Ge, Weitang Li, Jiajun Ren, and Zhigang Shuai, Roles of nonlocal electron-phonon coupling on the electrical conductivity and Seebeck coefficient: A time-dependent DMRG study. Phys. Rev. B, 2024, 110*, 035201.
  5. Qi Sun, Jiajun Ren, Qian Peng, and Zhigang Shuai, Heterofission Mechanism for Pure Organic Room Temperature Phosphorescence. Adv. Optical Mater.*, 2023, 2301769.
  6. Hengrui Yang, Weitang Li, Jiajun Ren, and Zhigang Shuai, Time-Dependent Density Matrix Renormalization Group Method for Quantum Transport with Phonon Coupling in Molecular Junction. J. Chem. Theory Comput., 2023, 19*, 6070-6081.
  7. Weitang Li, Jonathan Allcock, Lixue Cheng, Shi-Xin Zhang, Yu-Qin Chen, Jonathan P. Mailoa, Zhigang Shuai, and Shengyu Zhang, TenCirChem: An Efficient Quantum Computational Chemistry Package for the NISQ Era. J. Chem. Theory Comput., 2023, 19, 3966−3981.
  8. Yuanheng Wang, Jiajun Ren & Zhigang Shuai, Minimizing non-radiative decay in molecular aggregates through control of excitonic coupling. Nature Communications, 2023, 14, 5056.
  9. Weitang Li, Jiajun Ren, Sainan Huai, Tianqi Cai, Zhigang Shuai, and Shengyu Zhang, Efficient quantum simulation of electron-phonon systems by variational basis state encoder. Phys. Rev. Research, 2023, 5, 023046.
  10. Tong Jiang, Jiajun Ren, and Zhigang Shuai, Unified Definition of Exciton Coherence Length for Exciton−Phonon Coupled Molecular Aggregates. J. Phys. Chem. Lett., 2023, 14*, 4541−4547.
  11. Yufei Ge, Weitang Li, Jiajun Ren, and Zhigang Shuai, Computational Method for Evaluating the Thermoelectric Power Factor for Organic Materials Modeled by the Holstein Model: A Time-Dependent Density Matrix Renormalization Group Formalism. J. Chem. Theory Comput., 2022, 18*, 6437-6446.
  12. Yuanheng Wang, Jiajun Ren, Weitang Li, and Zhigang Shuai, Hybrid Quantum-Classical Boson Sampling Algorithm for Molecular Vibrationally Resolved Electronic Spectroscopy with Duschinsky Rotation and Anharmonicity. J. Phys. Chem. Lett., 2022, 13*, 6391−6399.
  13. Weitang Li, Jiajun Ren, Hengrui Yang and Zhigang Shuai, On the fly swapping algorithm for ordering of degrees of freedom in density matrix renormalization group. J. Phys.: Condens. Matter., 2022, 34*, 254003.
  14. Xing Gao, Jiajun Ren, Alexander Eisfeld, and Zhigang Shuai, Non-Markovian stochastic Schrödinger equation: Matrix-product-state approach to the hierarchy of pure states. PHYSICAL REVIEW A, 2022, 105*, L030202.
  15. Jiajun Ren, Weitang Li, Tong Jiang, Yuanheng Wang, Zhigang Shuai, Time-dependent density matrix renormalization group method for quantum dynamics in complex systems. WIREs Comput Mol Sci., 2022, e1614.
  16. Jia-jun Ren, Yuan-heng Wang, Wei-tang Li, Tong Jiang, Zhi-gang Shuai, Time-Dependent Density Matrix Renormalization Group Coupled with n-Mode Representation Potentials for the Excited State Radiationless Decay Rate: Formalism and Application to Azulene. Chinese Journal of Chemical Physics, 2021, 34(5)*, 565-582.
  17. Tong Jiang, Jiajun Ren, and Zhigang Shuai, Chebyshev Matrix Product States with Canonical Orthogonalization for Spectral Functions of Many-Body Systems. J. Phys. Chem. Lett., 2021, 12, 9344−9352.
  18. Weitang Li, Jiajun Ren, Zhigang Shuai, A general charge transport picture for organic semiconductors with nonlocal electron-phonon couplings. Nature Communications, 2021, 12*, 4260.
  19. Yuanheng Wang, Jiajun Ren, and Zhigang Shuai, Evaluating the anharmonicity contributions to the molecular excited state internal conversion rates with finite temperature TD-DMRG. J. Chem. Phys., 2021, 154, 214109.
  20. Jiajun Ren, Weitang Li, Tong Jiang, and Zhigang Shuai, A general automatic method for optimal construction of matrix product operators using bipartite graph theory. J. Chem. Phys., 2020, 153*, 084118.
  21. Weitang Li, Jiajun Ren, and Zhigang Shuai, Finite-Temperature TD-DMRG for the Carrier Mobility of Organic Semiconductors. J. Phys. Chem. Lett., 2020, 11*, 4930−4936.
  22. Tong Jiang, Weitang Li, Jiajun Ren, and Zhigang Shuai, Finite Temperature Dynamical Density Matrix Renormalization Group for Spectroscopy in Frequency Domain. J. Phys. Chem. Lett., 2020, 11, 3761−3768.
  23. Weitang Li, Jiajun Ren, and Zhigang Shuai, Numerical assessment for accuracy and GPU acceleration of TD-DMRG time evolution schemes. J. Chem. Phys., 2020, 152*, 024127.
  24. Jiajun Ren, Zhigang Shuai, and Garnet Kin-Lic Chan, Time-Dependent Density Matrix Renormalization Group Algorithms for Nearly Exact Absorption and Fluorescence Spectra of Molecular Aggregates at Both Zero and Finite Temperature. J. Chem. Theory Comput., 2018, 14, 5027-5039.