Changing numerical precision of quantum objects in qutip #1618
Replies: 2 comments
-
It isn't possible at the moment in version 4.x - there's too much low-level C code that explicitly expects Would a compile-time switch work for your applications? This would be easier to manage, although I guess our external BLAS and MKL calls would become marginally trickier (not an unsolvable problem, for sure). When I wrote the switch for integer widths, I did wonder at the time if we could template out the whole code and generate both meaningful sizes (4-byte and 8-byte ints) at compile time, and switch at runtime. The hard bit is really that Cython doesn't have templated classes, and even if it did, it would be very tricky to manage the interaction of different data widths, so we just left it as a compile-time switch. |
Beta Was this translation helpful? Give feedback.
-
There is no guarantee that lower precision equals faster performance. It would save on memory however. |
Beta Was this translation helpful? Give feedback.
-
Hello,
Consider the evolution of a time-dependent hamiltonian. Is it possible to change the numerical precision of quantum objects in qutip to say
complex64
orcomplex32
(my understanding is that currently we usecomplex128
)?It might be useful to have lower precision for certain applications that benefit from increased speed for some tradeoff in precision
Beta Was this translation helpful? Give feedback.
All reactions