5 ms·
Libquantum – Simulation of quantum mechanics
- gliese1337 12y agoI find this particularly interesting since I had to implement a quantum simulator using Runge-Kutta numerical integration of the Schrodinger equation in school, for a computational physics class. It was fun to play with (great for making screensavers of waveforms), but I never got so far as learning how to implement quantum computing operations. There are several programming languages being developed for programming quantum computers (such as QCL[1]), but not a whole lot of awareness of them as far as I know. It'd be really neat to see an open-source QC simulator like this become the basis of a common Quantum Virtual Machine to make quantum programming more accessible to the Interested Hacker. [1] http://tph.tuwien.ac.at/~oemer/qcl.html http://tph.tuwien.ac.at/~oemer/qcl.html
- lisper 12y agoSo... what would actually happen if I used libquantum to run Shor's algorithm?
- trurl42 12y agoYou would find prime factors. What else would you expect to happen?
- lisper 12y agoLet me be a little more specific: how would the performance of finding prime factors using Shor's algorithm running on libquantum compare to classical factoring algorithms? I know it would be less efficient, but by how much? How many digits could I reasonably expect to factor in non-geologic time this way? How big a task would it be to code? Is this a reasonable experiment to try to do?
- Tyr42 12y agoI'm pretty sure it would end up being slower, if only for the overhead. But don't take my word for it, go ahead and run it. I know it's not too hard to write gates for testing with QCViewer [https://github.com/aparent/QCViewer https://github.com/aparent/QCViewer], (Linux only for the moment, I'm just going to be improving and possibly porting it to OSX)
- colanderman 12y agoIt would be exponentially less efficient, as the simulation algorithm used represents and operates on all 2^n possible quantum states of n qubits. If you know nothing about QM, imagine the classical analogue: a classical CPU simulator with exactly one (say) 32-bit register, which, instead of being represented as 32 bits, is represented as 2^32 bits, exactly one of which is set to 1; the only way to determine which bit this is is to scan the entire array.
- NamTaf 12y agoTo expand on the sibling post, you obviously won't find it in faster-than-current factorisation processes because this isn't acutally doing quantum algorithms, but rather emulating them. What it's useful for is understanding the processes. I found quantum algorithms tough to get my head around at times so this could be a valuable learning tool.
- jonbaer 12y agohttp://qcplayground.withgoogle.com/#/playground/5681717746597888 http://qcplayground.withgoogle.com/#/playground/568171774659...
- lisper 12y agoThanks!!!
- colanderman 12y agoShameless plug; a while ago I wrote a very similar library [1] using CUDA. Unlike this library, it does not allow for a sparse representation of the state vector; but for maximally entangled states it's pretty efficient (as fast as memory allows). I've tested it up to 28 qubits. But fair warning; it's very much undocumented and a toy. [1] http://hub.darcs.net/squirrel/quantum http://hub.darcs.net/squirrel/quantum
- quarterwave 12y ago“Can you give me a simple, concrete explanation of how quantum computers work?” http://michaelnielsen.org/blog/quantum-computing-for-everyone/ http://michaelnielsen.org/blog/quantum-computing-for-everyon...