# TEBD with GPU - error with eigen

**URL:** https://itensor.discourse.group/t/tebd-with-gpu-error-with-eigen/1266
**Category:** ITensor Julia Questions
**Tags:** julia
**Created:** [November 4, 2023, 5:44pm UTC](https://itensor.discourse.group/t/tebd-with-gpu-error-with-eigen/1266 "2023-11-04T17:44:54Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![kmp5](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/kmp5/32/251_2.png) [@kmp5](https://itensor.discourse.group/u/kmp5)
#### Post date: [November 6, 2023, 2:23am UTC](https://itensor.discourse.group/t/tebd-with-gpu-error-with-eigen/1266/8 "2023-11-06T02:23:35Z")

</div>

Hi all! I did a little digging into the problem and what happens is during the `apply(gates_even_offdiag, psi)` in the first iterations with a precision of `Float32` an eigenvalue call is made on an extremely ill conditioned matrix and as a result `CUDA.jl` returns an eigen spectrum of all `NaN` values. In my testing I catch this problem and convert the matrix into `Floa64` and compute the eigenvalue again, there are too many eigenvalues to print (1053 of them) but I can say the condition number of this matrix is 1.91e27. As Matt said there is much to learn about how and when we can use single precision numbers in ITensors/physics algorithms and how we design algorithms around their performance enhancements on GPU. Thanks for sending this interesting issue!

---

_[View the full topic](https://itensor.discourse.group/t/tebd-with-gpu-error-with-eigen/1266)._
