# Solving A X = B equation with ITensor

**URL:** <https://discourse.julialang.org/t/solving-a-x-b-equation-with-itensor/60332>\
**Category:** Numerics\
**Tags:** itensors\
**Created:** [April 30, 2021, 5:01pm UTC](https://discourse.julialang.org/t/solving-a-x-b-equation-with-itensor/60332 "2021-04-30T17:01:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fastwave](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fastwave/32/14725_2.png) [@fastwave](https://discourse.julialang.org/u/fastwave)\
**Post date:** [April 30, 2021, 5:01pm UTC](https://discourse.julialang.org/t/solving-a-x-b-equation-with-itensor/60332/1 "2021-04-30T17:01:21Z")

</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 package that does that?

My tensors represent high order polynomials of large number of variables, hence they a symmetric. This needs some compressed format, so tensor networks, tensor train or H-tucker are the candidates. I need some machinery that can substitute polynomials into each other, multiply them and then solve these multi-linear equations.

Many thanks…

---

<div class="post-metadata">

**Author:** ![mtfishman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mtfishman/32/30755_2.png) [@mtfishman](https://discourse.julialang.org/u/mtfishman)\
**Post date:** [June 23, 2021, 12:30pm UTC](https://discourse.julialang.org/t/solving-a-x-b-equation-with-itensor/60332/2 "2021-06-23T12:30:44Z")

</div>

Developer of ITensor here. Sorry for the late response, I don’t check Julia discourse for ITensor questions as often as I should. You can also post questions on the ITensor support forum ([ITensor Support Q&A](http://itensor.org/support/)) which we check more often.

I would recommend using KrylovKit’s linsolve function in conjunction with ITensors.jl. You can find some minimal examples of that here: [ITensors.jl/examples/krylov\_methods/gmres at main · ITensor/ITensors.jl · GitHub](https://github.com/ITensor/ITensors.jl/tree/main/examples/krylov_methods/gmres)

If this doesn’t cover your use case please let us know.
