# find kernel space of a MPO

**URL:** https://itensor.discourse.group/t/find-kernel-space-of-a-mpo/1424
**Category:** ITensor Julia Questions
**Tags:** julia, mps, mpo
**Created:** [January 16, 2024, 3:47pm UTC](https://itensor.discourse.group/t/find-kernel-space-of-a-mpo/1424 "2024-01-16T15:47:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![funnybear](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/funnybear/32/662_2.png) [@funnybear](https://itensor.discourse.group/u/funnybear)
#### Post date: [January 16, 2024, 3:47pm UTC](https://itensor.discourse.group/t/find-kernel-space-of-a-mpo/1424/1 "2024-01-16T15:47:06Z")

</div>

I tried to find kernel space of a MPO which is density matrix of a MPS. I wonder rather than treating the MPO as a big matrix and use the regular kernel space finder ( which is very expensive) is there any tensor network trick or easier way I can do to simplify the calculation? Thanks!

---

<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: [January 17, 2024, 3:39pm UTC](https://itensor.discourse.group/t/find-kernel-space-of-a-mpo/1424/2 "2024-01-17T15:39:41Z")

</div>

We have a `linsolve` (linear solver) function in the ITensorTDVP.jl package that could be tried for this. It lets you solve problems of the form `Ax=b` where `A` is an MPO and `x` and `b` are MPS. You could try it with `b=0`. How well it might work could depend on the precise spectrum of the operator you are trying to study. (E.g. if there are many vectors in the kernel space it could be tricky to find them all; it depends.)

Here is the function `linsolve` so you can see its interface and docstring:  
[https://github.com/ITensor/ITensorTDVP.jl/blob/main/src/linsolve.jl](https://github.com/ITensor/ITensorTDVP.jl/blob/main/src/linsolve.jl)

And here is a code example (test, actually) that uses it:  
[https://github.com/ITensor/ITensorTDVP.jl/blob/main/test/test\_linsolve.jl](https://github.com/ITensor/ITensorTDVP.jl/blob/main/test/test_linsolve.jl)

---

<div class="post-metadata">

### Author: ![funnybear](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/funnybear/32/662_2.png) [@funnybear](https://itensor.discourse.group/u/funnybear)
#### Post date: [January 17, 2024, 7:58pm UTC](https://itensor.discourse.group/t/find-kernel-space-of-a-mpo/1424/4 "2024-01-17T19:58:56Z")

</div>

Thank you Miles! I will try it.
