15 ms·
A GPU-Accelerated Quantum Computer Simulator
- keldaris 8y agoSince the project literally has "Rust" in the title, I'm curious - do the authors view Rust as being particularly suited to this kind of project? From a quick glance it looks like the heavy computational work is done in OpenCL kernels. Typically, such projects are either written in Python / some other flexible high level language for the easy metaprogramming or C++ if a high performance CPU fallback or tight CUDA integration is desired. I've tried out Rust in the past, but decided against using it for my own computational projects because it didn't seem to offer any significant advantages for this type of work and I didn't enjoy the extra hurdles it imposed. It'd be interesting to hear an opposing view from other computational scientists.
- cbHXBY1D 8y agoThe original HN title didn't include the "in Rust" part. It's funny how as soon as that gets added it gets more attention ;)
- keldaris 8y agoThe HN title still doesn't include it, so I certainly didn't open it because of it. The GitHub repository, however, includes it in the project name, so I thought my question was not inappropriate. I'm certainly not out to disparage Rust in any way, merely looking to compare my experiences with other computational researchers. While language choice is in many ways subjective and we should all pick the ones we like, I've learned a lot in the past from discussions about the subject.
- cbHXBY1D 8y agoIt originally didn't include it in the HN title, then it did, and now it has gone away again :-)
- adamisntdead 8y agoHello, author here - The choice to use rust mainly came from the fact I have more experience with it than with C++. Also, the compiler makes it really easy to write good code. This, along with really simple testing, benchmarking and the ease of adding dependencies (through crates) made it a good choice. There are almost no downsides from using rust, provided you have experience with it!
- slabity 8y agoWell the author seems to have written a similar program in Python prior to this Rust version: https://github.com/adamisntdead/QuSimPy https://github.com/adamisntdead/QuSimPy
- rbanffy 8y agoThe way Rust treats shared mutable states makes it, probably, an interesting choice for GPU-style computing. Disclaimer: I've played with Rust a tiny little bit.
- adamisntdead 8y agoI wrote a little about why rust below!
- electricslpnsld 8y ago> heavy computational work I'm pining for integer generics so we can get a library as versatile as C++'s Eigen for heavy numerical work in Rust. :(
- steveklabnik 8y agoIt’s currently slated for landing in nightly towards the end of the year and probably stabilizing early next year.
- marinated 8y agoUp up. We need more things like that
- dis-sys 8y agothis is like writing a PS4 emulator for Gameboy.