qojulia / QuantumOptics.jl

Library for the numerical simulation of closed as well as open quantum systems.
http://qojulia.org
Other
518 stars 101 forks source link

LazyTensor abnormal allocs #331

Closed Lightup1 closed 2 years ago

Lightup1 commented 2 years ago

When using LazyTensor, allocations of the time evolution solver is abnormal. What cause this? And when should we use LazyTensor? image

ChristophHotter commented 2 years ago

I think using lazy operations doesn't make much sense here.

Usually they are used for the position and momentum basis, since the FFT is really fast to convert between these two and makes operators diagonal, which speeds up the calculation. See e.g. Particle in harmonic trap potential.

The LazyTensor is normally used if you have two position and momentum spaces. This is described in the example Dynamics of a two-dimensional wavepacket hitting a Gaussian potential.

Lightup1 commented 2 years ago

OK, thanks for your help.