# \#itensors

**URL:** https://discourse.julialang.org/tag/itensors/672.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [API design help: Wrapping ITensorMPS structs and extending it to my package](https://discourse.julialang.org/t/api-design-help-wrapping-itensormps-structs-and-extending-it-to-my-package/139164)

<div class="topic-metadata">

**Author:** [@Gautameshwar](https://discourse.julialang.org/u/Gautameshwar)\
**Replies:** 2\
**Last updated:** [September 4, 2026, 2:36am UTC](https://discourse.julialang.org/t/api-design-help-wrapping-itensormps-structs-and-extending-it-to-my-package/139164 "2026-09-04T02:36:12Z")

</div>

Hi Julia community! I am currently developing a package, ProcessTensors.jl, that uses an MPS/MPO architecture to construct process tensors and simulate non-Markovian quantum dynamics. I built this package on top of the …

---

## [QILaplace.jl: tensor-network Fourier/Laplace transforms (looking for packaging & docs feedback)](https://discourse.julialang.org/t/qilaplace-jl-tensor-network-fourier-laplace-transforms-looking-for-packaging-docs-feedback/135335)

<div class="topic-metadata">

**Author:** [@Gautameshwar](https://discourse.julialang.org/u/Gautameshwar)\
**Replies:** 1\
**Last updated:** [February 4, 2026, 8:34pm UTC](https://discourse.julialang.org/t/qilaplace-jl-tensor-network-fourier-laplace-transforms-looking-for-packaging-docs-feedback/135335 "2026-02-04T20:34:57Z")

</div>

Hi Julia Community, I am a third-year PhD student with around two years of experience coding in Julia. This is my first time creating and releasing a Julia package, and I’d really love to get feedback from more experien…

---

## [Truncation error in ITensors SVD](https://discourse.julialang.org/t/truncation-error-in-itensors-svd/134559)

<div class="topic-metadata">

**Author:** [@diffeqslvr](https://discourse.julialang.org/u/diffeqslvr)\
**Replies:** 2\
**Last updated:** [December 19, 2025, 10:14pm UTC](https://discourse.julialang.org/t/truncation-error-in-itensors-svd/134559 "2025-12-19T22:14:05Z")

</div>

I am trying to understand the truncation error when performing an SVD using ITensors. According to ITensor Examples · ITensors.jl, the truncation error is defined as sum\_{discarded n} lambda\_n^2 / sum\_{n} lambda\_n^2, whe…

---

## [Taking ITensor Gradients](https://discourse.julialang.org/t/taking-itensor-gradients/132906)

<div class="topic-metadata">

**Author:** [@oskar-novak](https://discourse.julialang.org/u/oskar-novak)\
**Replies:** 1\
**Last updated:** [October 7, 2025, 12:22am UTC](https://discourse.julialang.org/t/taking-itensor-gradients/132906 "2025-10-07T00:22:57Z")

</div>

As someone relatively new to using ITensor, is there a straightforward way to integrate ITensor with an auto-differentiation library, such as Zygote.jl?

---

## [How to compute the bipartite entanglement entropy with the first site as the subsystem us orthogonalize？？](https://discourse.julialang.org/t/how-to-compute-the-bipartite-entanglement-entropy-with-the-first-site-as-the-subsystem-us-orthogonalize/107509)

<div class="topic-metadata">

**Author:** [@zipeilee](https://discourse.julialang.org/u/zipeilee)\
**Replies:** 3\
**Last updated:** [December 13, 2023, 3:17am UTC](https://discourse.julialang.org/t/how-to-compute-the-bipartite-entanglement-entropy-with-the-first-site-as-the-subsystem-us-orthogonalize/107509 "2023-12-13T03:17:54Z")

</div>

I’m new to tensor networks. I understand that for an MPS state in the form of orthogonalization, the bipartite entanglement entropy of a subsystem is center site’s singular spectrum. I’ve found useful code on ITensors.jl…

---

## [Drop Length 1 Index in ITensors](https://discourse.julialang.org/t/drop-length-1-index-in-itensors/106305)

<div class="topic-metadata">

**Author:** [@AlexanderNenninger](https://discourse.julialang.org/u/AlexanderNenninger)\
**Replies:** 3\
**Last updated:** [November 18, 2023, 8:07pm UTC](https://discourse.julialang.org/t/drop-length-1-index-in-itensors/106305 "2023-11-18T20:07:42Z")

</div>

What’s the canonical way to drop length 1 Indices in ITensors? Specifically, I for tensor train algorithms, it is convenient to have order-3 tensors on both ends, but with the first and last index being of length 1. Is t…

---

## [How to define a TT-cross implementation using ITensors without usage of for loops](https://discourse.julialang.org/t/how-to-define-a-tt-cross-implementation-using-itensors-without-usage-of-for-loops/105472)

<div class="topic-metadata">

**Author:** [@matinator](https://discourse.julialang.org/u/matinator)\
**Replies:** 0\
**Last updated:** [October 27, 2023, 8:58am UTC](https://discourse.julialang.org/t/how-to-define-a-tt-cross-implementation-using-itensors-without-usage-of-for-loops/105472 "2023-10-27T08:58:03Z")

</div>

Hello everyone I was trying to define the following ket state from a paper which has the following equation: where \\varphi is a complex valued function, the only way I was able to produce this is by the usage of the …

---

## [Using an ITensors sysimage when starting the Julia REPL in VS Code?](https://discourse.julialang.org/t/using-an-itensors-sysimage-when-starting-the-julia-repl-in-vs-code/98625)

<div class="topic-metadata">

**Author:** [@Ludwig\_Hruza](https://discourse.julialang.org/u/Ludwig_Hruza)\
**Replies:** 8\
**Last updated:** [October 19, 2023, 6:58am UTC](https://discourse.julialang.org/t/using-an-itensors-sysimage-when-starting-the-julia-repl-in-vs-code/98625 "2023-10-19T06:58:43Z")

</div>

Hi, I am using the library ITensors, which suggests on its website (Running ITensor and Julia Codes · ITensors.jl) to generate a sysimage for faster startup times julia\> using ITensors; ITensors.compile() In a terminal…

---

## [Overloading a function within a loop](https://discourse.julialang.org/t/overloading-a-function-within-a-loop/102615)

<div class="topic-metadata">

**Author:** [@Daniel1](https://discourse.julialang.org/u/Daniel1)\
**Replies:** 1\
**Last updated:** [August 8, 2023, 8:35pm UTC](https://discourse.julialang.org/t/overloading-a-function-within-a-loop/102615 "2023-08-08T20:35:19Z")

</div>

This question is closely related to the package iTensors, but it is really a Julia programming question, no knowledge of the package is needed. I need to overload a function provided by the package. The canonical way to…

---

## [ITensor type definition for function input argument](https://discourse.julialang.org/t/itensor-type-definition-for-function-input-argument/100340)

<div class="topic-metadata">

**Author:** [@8me](https://discourse.julialang.org/u/8me)\
**Replies:** 3\
**Last updated:** [June 15, 2023, 10:18am UTC](https://discourse.julialang.org/t/itensor-type-definition-for-function-input-argument/100340 "2023-06-15T10:18:20Z")

</div>

I want to define a function which takes two ITensor of order 1 and dim 4 as input arguments. So my question would be, what is the suggested way of doing this …

---

## [What does "surprising behaviors" in the documentation of ITensor mean?](https://discourse.julialang.org/t/what-does-surprising-behaviors-in-the-documentation-of-itensor-mean/67408)

<div class="topic-metadata">

**Author:** [@wujinq](https://discourse.julialang.org/u/wujinq)\
**Replies:** 2\
**Last updated:** [August 31, 2021, 5:09pm UTC](https://discourse.julialang.org/t/what-does-surprising-behaviors-in-the-documentation-of-itensor-mean/67408 "2021-08-31T17:09:48Z")

</div>

In this page it is said that The reason we recommend the let...end block is that code written in the Julia global scope can have some surprising behaviors. Putting your code into a let block avoids these issues. What…

---

## [Tracking DMRG progress in ITensors](https://discourse.julialang.org/t/tracking-dmrg-progress-in-itensors/66907)

<div class="topic-metadata">

**Author:** [@wujinq](https://discourse.julialang.org/u/wujinq)\
**Replies:** 1\
**Last updated:** [August 27, 2021, 4:26pm UTC](https://discourse.julialang.org/t/tracking-dmrg-progress-in-itensors/66907 "2021-08-27T16:26:10Z")

</div>

I’m using ITensors to do some DMRG calculation. When running dmrg(H, ψ\_0, sweeps), is there a way to track the progress? For example, if I want to displa a progress bar to keep an eye on the calculation, what should I do…

---

## [Solving A X = B equation with ITensor](https://discourse.julialang.org/t/solving-a-x-b-equation-with-itensor/60332)

<div class="topic-metadata">

**Author:** [@fastwave](https://discourse.julialang.org/u/fastwave)\
**Replies:** 1\
**Last updated:** [June 23, 2021, 12:30pm UTC](https://discourse.julialang.org/t/solving-a-x-b-equation-with-itensor/60332 "2021-06-23T12:30:44Z")

</div>

I am wondering of one can use ITensors to solve linear equations in the form of A X = B where all of the components are tensor networks or high order tensors in some compressed format? Or if not does anybody know a pac…
