Hacker News new | comments | ask | show | jobs | submit login
A GPU-Accelerated Quantum Computer Simulator (github.com)
68 points by adamisntdead 9 months ago | hide | past | web | favorite | 13 comments



Since 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.


Well the author seems to have written a similar program in Python prior to this Rust version: https://github.com/adamisntdead/QuSimPy


There's also an archived C++ version of the project https://github.com/QCGPU/qcgpu-cpp


Thanks for sharing this


> 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. :(


It’s currently slated for landing in nightly towards the end of the year and probably stabilizing early next year.


The original HN title didn't include the "in Rust" part.

It's funny how as soon as that gets added it gets more attention ;)


The 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.


Hello, 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!


It originally didn't include it in the HN title, then it did, and now it has gone away again :-)


The 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.


I wrote a little about why rust below!


this is like writing a PS4 emulator for Gameboy.




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: