# Algorithm for truncated SVD and eigendecomposition

**URL:** <https://itensor.discourse.group/t/algorithm-for-truncated-svd-and-eigendecomposition/2437>\
**Category:** ITensor Julia Questions\
**Created:** [July 9, 2025, 4:02am UTC](https://itensor.discourse.group/t/algorithm-for-truncated-svd-and-eigendecomposition/2437 "2025-07-09T04:02:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZhouGD2000](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/zhougd2000/32/669_2.png) [@ZhouGD2000](https://itensor.discourse.group/u/ZhouGD2000)\
**Post date:** [July 9, 2025, 4:02am UTC](https://itensor.discourse.group/t/algorithm-for-truncated-svd-and-eigendecomposition/2437/1 "2025-07-09T04:02:09Z")

</div>

Hi,  
I read the code in NDTensors/src/linealgebra and it seems that the default ways to truncate or factorize an ITensor use the LinearAlgebra.eigen or use “qr\_iteration”/“recursive”/“divide\_and\_conquer” algorithm written by the authors, where the full spectrum is obtained and then the unwanted eigenvalues/singular values are discarded. I wonder if ITensor supports directly obtaining several largest/smallest eigenvalues/singular using, e.g. KrylovKit.jl or RandomizedSVD.  
Besides, will this be stable and faster for computation used in DMRG (e.g. when factorizing the two-site tensors)?

---

<div class="post-metadata">

**Author:** ![miles](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/miles/32/6_2.png) [@miles](https://itensor.discourse.group/u/miles)\
**Post date:** [July 10, 2025, 2:20pm UTC](https://itensor.discourse.group/t/algorithm-for-truncated-svd-and-eigendecomposition/2437/2 "2025-07-10T14:20:42Z")

</div>

Glad you are reading through the code. ITensor doesn’t currently offer randomized SVD (RSVD) as a backend for our `factorize` or `svd` functions, but it would be a sensible thing to offer. It could definitely lead to better performance in algorithms that are either dominated by factorizations or which have a large sub-leading part that involves factorizations. Also RSVD might have better performance on GPU. So it’s something we want to add. I’m less sure about the KrylovKit based SVD backend, but we could certainly wrap it and try it out.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/itensor/original/1X/d3072b13e047cd06df7f3981547c0917d940dfa4.png) [@system](https://itensor.discourse.group/u/system)\
**Post date:** [July 20, 2025, 2:21pm UTC](https://itensor.discourse.group/t/algorithm-for-truncated-svd-and-eigendecomposition/2437/3 "2025-07-20T14:21:18Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
