How to impose real wavefunction?

Hi there,

For system with time reversal symmetry, we know that the ground state can be set real. How to implement it in Itensor Julia? How much advantage can one gain in terms of memory and computation time?

Thank you in advance!

Best,
Simon

Hi Simon,
It’s a good set of questions. If your Hamiltonian is real-valued, then ITensor’s DMRG and other codes will keep your wavefunction real-valued.

(The rest of my answer below only refers to the case where I’m assuming your Hamiltonian is complex-valued. Otherwise see above.)

Imposing the wavefunction to be real can give memory and speed benefits. Operations with complex numbers can definitely be slower, both because of the overhead of having to multiply the real and complex parts, but also because complex linear algebra is also not often as optimized as real linear algebra at a low level (even though it could be in principle – here I’m talking like at the BLAS or LAPACK level below ITensor).

I just checked and unfortunately right now for a complex-valued our DMRG code doesn’t detect when the wavefunction can be assumed real, even if that’s possible in the space of solutions. It just returns a complex-valued wavefunction with a zero imaginary part in the case I tried.

One thing I could do is guide you on how to modify our DMRG code – it would probably be a very slight modification only – to check in the “solver” step of DMRG whether the imaginary part is zero then only return the real part from the solver. You could then do some timings with this modification turned on and off to see how much of a difference it makes.

There’s a strong possibility, though, that it might not make too big of a difference in the end because the Hamiltonian would still be be complex, so inside the inner solver loop of DMRG that takes most of the computational time, the tensors would have to be complex so the workload would still be dominated by complex matrix multiplications.

Let me know if that answers your question & if you’re interested in trying the code modification to see if it might help. But if the algorithm is DMRG and your Hamiltonian is complex-valued I doubt it will make a large difference.

Thank you so much Miles. It answered my question!

1 Like