From: Andras V. <and...@ui...> - 2012-02-15 10:53:33
|
Hi Raimar, In this case, your *LazyDensityOperator* will be binary only, which means that it can be indexed with 4 indices (2 instances of *TTD_IDXTINY(2)* ). You have to copy the whole thing into a * quantumdata::Types<2>::DensityOperatorLow* . This is actually rather wasteful, because even in the case when the underlying data is just a state vector, it is treated in the same way as a full density operator. You could maybe think about a nice general solution to this problem (I have just added a tracker #3487814 on this issue). Anyway, once you have your *DensityOperatorLow*, I think you have to apply FFT on *all of its indices individually,* the FFT's sign depending on whether it is a ‘left’ or ‘right’ index. So, * blitzplusplus::vfmsi::fullRange* will not be of much use in this case, and you have to apply the more general *blitzplusplus::basi::fullRange*iteration. I think the code is something pretty much like this: // left: for_each(fullRange(rhotemp,Vector<0>()),bind(&ffTransform,_1,FFTDIR_KX)); for_each(fullRange(rhotemp,Vector<1>()),bind(&ffTransform,_1,FFTDIR_KX)); // right: for_each(fullRange(rhotemp,Vector<2>()),bind(&ffTransform,_1,FFTDIR_XK)); for_each(fullRange(rhotemp,Vector<3>()),bind(&ffTransform,_1,FFTDIR_XK)); Where *Vector* stands for *tmptools::Vector*. (This is not the only class that works with the slice iterators, because e.g. *boost::mpl::range_c*also works, but here you need this.) Keep in touch. Best regards, András |