# iDMRG package built on ITensors.jl

**URL:** <https://itensor.discourse.group/t/idmrg-package-built-on-itensors-jl/2615>\
**Category:** General Discussion\
**Tags:** julia\
**Created:** [May 11, 2026, 5:55pm UTC](https://itensor.discourse.group/t/idmrg-package-built-on-itensors-jl/2615 "2026-05-11T17:55:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhlphy](https://avatars.discourse-cdn.com/v4/letter/z/3be4f8/32.png) [@zhlphy](https://itensor.discourse.group/u/zhlphy)\
**Post date:** [May 11, 2026, 5:55pm UTC](https://itensor.discourse.group/t/idmrg-package-built-on-itensors-jl/2615/1 "2026-05-11T17:55:52Z")

</div>

Dear all,

I notice a lot of people here are looking for iDMRG in ITensor (so do I). Recently, I have developed one built on `ITensors.jl` and `ITensorMPS.jl`:

**[iDMRG](https://github.com/liuzhaochen/iDMRG)**

It implements:

- iDMRG using MPS swapping
- VUMPS (hopefully correct – feedback is welcome)

Since I currently do not have a fully general MPO construction method (which is beyond my knowledge), I use a pragmatic approach:  
For sufficiently large finite systems, the bulk MPO constructed from ITensorMPS.jl becomes effectively translation invariant (at least in the models I have tested).  
Therefore, I extract the central MPO tensor from a finite-size system and reuse it as the infinite MPO in iDMRG.  
Environments are initialized via power iteration starting from the same finite-size MPO.

This seems to work for the models I have tested so far.

Hopefully this is useful to others.  
Any comments, tests, or suggestions are very welcome.

Best,  
Zhaochen

---

<div class="post-metadata">

**Author:** ![yangxusolidstate](https://avatars.discourse-cdn.com/v4/letter/y/90db22/32.png) [@yangxusolidstate](https://itensor.discourse.group/u/yangxusolidstate)\
**Post date:** [July 2, 2026, 4:32am UTC](https://itensor.discourse.group/t/idmrg-package-built-on-itensors-jl/2615/2 "2026-07-02T04:32:21Z")

</div>

Dear Zhaochen,

Thank you for your nice package. I developed an iDMRG package some time ago (see [GitHub - yangxucmt/iDMRG\_v0.0: A mini julia repository for idmrg · GitHub](https://github.com/yangxucmt/iDMRG_v0.0)) which might be of some interest. And I have one comment regarding the MPO construction.

In the early stages of my project, I used a similar approach, i.e., taking the central piece of the MPO generated by ITensor’s finite DMRG. This worked well for the toric code in one of my project, but it failed in another project involving the Heisenberg model with next nearest-neighbor interactions on a triangular lattice. The issue is that while the finite-state-machine construction in ITensor is translationally symmetric, ITensor may subsequently compress the MPO using MPS SVD compression algorithm, which can destroy the translational structure of the MPO.

For this reason, I think the best practice is still to construct the iMPO directly using the finite-state-machine algorithm. The algorithm is quite intuitive when spelled out on a piece of paper and is straightforward to implement. I’d be happy to explain it in more detail if you’re interested. You can also take a look at `MPO_common.jl` in my repository, where I implemented this construction. A related discussion for a finite MPO is [MPO construction and compression principles (or: how does OpSum work?) - #4 by miles](https://itensor.discourse.group/t/mpo-construction-and-compression-principles-or-how-does-opsum-work/1898/4).

Best,

Xu

---

<div class="post-metadata">

**Author:** ![zhlphy](https://avatars.discourse-cdn.com/v4/letter/z/3be4f8/32.png) [@zhlphy](https://itensor.discourse.group/u/zhlphy)\
**Post date:** [July 2, 2026, 6:39am UTC](https://itensor.discourse.group/t/idmrg-package-built-on-itensors-jl/2615/3 "2026-07-02T06:39:10Z")

</div>

Hi Xu,

Thanks for your information and comments! I agree with you on the MPO part. I should be more careful here. I’m planning to incorporate this in the coming days.

Thanks again!

Zhaochen

---

<div class="post-metadata">

**Author:** ![zhlphy](https://avatars.discourse-cdn.com/v4/letter/z/3be4f8/32.png) [@zhlphy](https://itensor.discourse.group/u/zhlphy)\
**Post date:** [July 3, 2026, 11:12am UTC](https://itensor.discourse.group/t/idmrg-package-built-on-itensors-jl/2615/4 "2026-07-03T11:12:58Z")

</div>

Hi Xu,

The MPO constructor from ITensorMPS allows you to pass keyword  
`cutoff` to [qn\_svdMPO](https://github.com/ITensor/ITensorMPS.jl/blob/main/src/opsum_to_mpo/opsum_to_mpo_qn.jl). Could you test with `cutoff = -1.0` ? That should preserve all the singular values and avoid any compression.

Thanks a lot,  
Zhaochen
