SciPost logo

SciPost Submission Page

Efficient numerical simulations with Tensor Networks: Tensor Network Python (TeNPy)

by Johannes Hauschild, Frank Pollmann

This Submission thread is now published as

Submission summary

Authors (as Contributors): Johannes Hauschild · Frank Pollmann
Submission information
Arxiv Link: (pdf)
Date accepted: 2018-09-27
Date submitted: 2018-08-30 02:00
Submitted by: Hauschild, Johannes
Submitted to: SciPost Physics Lecture Notes
Ontological classification
Academic field: Physics
  • Condensed Matter Physics - Theory
Approach: Computational


Tensor product state (TPS) based methods are powerful tools to efficiently simulate quantum many-body systems in and out of equilibrium. In particular, the one-dimensional matrix-product (MPS) formalism is by now an established tool in condensed matter theory and quantum chemistry. In these lecture notes, we combine a compact review of basic TPS concepts with the introduction of a versatile tensor library for Python (TeNPy) []. As concrete examples, we consider the MPS based time-evolving block decimation and the density matrix renormalization group algorithm. Moreover, we provide a practical guide on how to implement abelian symmetries (e.g., a particle number conservation) to accelerate tensor operations.

Published as SciPost Phys. Lect. Notes 5 (2018)

Author comments upon resubmission

Dear Editor,

we thank you for communicating the reports and are grateful for having recieved such detailed and positive reviews. We have carfully considered the comments and requested changes of the referees and would like to address their main points in the following.

First Report:

1) We believe that the $\Gamma$-$\Lambda$ notation is very useful from a pedagogical point of view to understand the canonical form. In particular it provides a simple understanding of the relations between the left, right, and mixed canonical form--as it allows to read off the Schmidt decomposition of $|\psi\rangle$ at each bond at the same time. We are aware that using the $\Gamma$ matrices in the code leads to numerical instabilities. However, we consider these instabilities as a minor detail of the implementation, less important than understanding the overall concepts of TEBD and DMRG. To the best of our knowlege, the trick for the TEBD used by Urbanek and Soldan was originially introduced by Hastings in 2009 (our Ref. 59), which we referenced in the paragraph before the TEBD example code (Of course, the trick is used in the TeNPy implementation)

2) The goal of the lecture notes is to provide an accessible introduction for the newcommers to the field. We feel that explaining too many details about the different parameters in these notes will lead to unnecessary confusions, and instead refer to the documentation for that, which will be kept up to date with the implementation. We extended the discussion of 2DMRG vs 1DMRG sligthly (now before the example code to have it closer to the algorithm) and added a sentence about the extrapolation $\chi \rightarrow \infty$ in the conclusion.

Second Report:

  1. Actually, we did shortly comment on non-abelian symmetries in the footnote on page 25. To make it more prominent, we moved it into the main text right before section 5.1 in the revised script.

  2. These lecture notes introduces the TeNPy library, which is what the title is focused on. We called the library TeNPy, because it will most contain codes on 2D tensor networks in future versions. While we only discuss the 1D MPS methods as examples of general tensor networks, the chapter 5 on abelian symmetries applies to tensor networks in 2D as well. The abstract clearly says what we discuss, so we feel that the title is justified.

  3. We have included a paragraph on the performance of the TeNPy library at the end of the conclusions. High performance is only a secondary goal of the library, and in comparison to other C++ libraries like ITensor only reached for simluations involing large bond dimensions. Yet, we hope and believe that the TenPy library proves useful to the community due to its accessibility and flexibility -- in particular also for the audience targeted by these lecture notes. Moreover, we hope that we can still optimize a few parts of the library in future versions to increase its performance, which would render a detailed benchmark in these lecture notes out of date.

List of changes

* We followed most of the requested changes of the referees as detailed above and in the first replies to the reports 1 and 2.
* Corrected the figure reference between eqs. (28-29).
* Corrected indices in eqs. (31-32).
* Changed the sign for the field-term in the Hamlitonian (34) to follow the usual convention.
Adjusted the following eqs. (36-37) and the example code accordingly.
* Added a comment that 'hz' can be given as an numpy array for site dependent fields in the model example code on page 16.
* Adjusted the typesetting of the code examples.
* Adjusted example codes to use double quotes for strings throughout.
* Corrected Ref. [9].
* Added Refs. [33, 61, 64, 67, 69].
* Corrected further minor typos.

Reports on this Submission

Anonymous Report 2 on 2018-9-13 (Invited Report)


The authors have properly addressed the concerns from my previous review. Therefore I think that the paper is ready for publication.

  • validity: -
  • significance: -
  • originality: -
  • clarity: -
  • formatting: -
  • grammar: -

Report 1 by Claudius Hubig on 2018-9-12 (Invited Report)

  • Cite as: Claudius Hubig, Report on arXiv:1805.00055v2, delivered 2018-09-12, doi: 10.21468/SciPost.Report.578


5. Compared to the first version, the description of DMRG and TEBD is more complete and now adequately summarises the current state of the art together with pointers to further reading.

Points 1. through 4. carry over from the first version of the paper.


While I still believe that the Γ-Λ notation is suboptimal in practical applications, I understand the authors position regarding its higher pedagogical value and agree with this assessment. The authors have additionally introduced pointers towards further reading regarding TEBD and DMRG implementations and methods and have implemented other minor problems/typos found in the first version.

In the updated lecture notes, I found two more minor issues; these, however, do not detract from the overall quality of the notes. I hence suggest publication of the updated lecture notes.

Requested changes

The authors may wish to consider the following two points:

1. On page 4, Section 1, last paragraph: "review of the basics MPS and TPS based" should read "review of the basic MPS and TPS based"

2. I am confused by footnote 2 on pg. 11: First, it may make more sense to move it to the TEBD chapter as it deals primarily with TEBD; second, regardless of whether Schmidt values at other bonds are preserved or not during a truncation, a local truncation can change the energy of the state and third, the canonical form can easily be reinstated during a TEBD calculation and hence loss of this form can not be the sole reason TEBD does not preserve the energy. May I suggest deleting the footnote and moving its last sentence about TDVP to the TEBD chapter? E.g. in the paragraph after Eq. 32, one may add a sentence that TEBD does not necessarily preserve the energy due to its evolve-then-truncate approach and that an alternative exists in the form of TDVP.

  • validity: high
  • significance: high
  • originality: high
  • clarity: top
  • formatting: perfect
  • grammar: perfect

Login to report or comment