Re:Qusim.py – A toy multi-qubit quantum computer simulator w...
by ahelwer on Monday April 09, 2018 @06:18PM
(#16797475)
I've wondered - is it a common memory optimization tactic to store the individual qbit values until they become entangled and the product state cannot be factored? Or is entanglement common enough that it wouldn't be worth the overhead?
Re:Qusim.py – A toy multi-qubit quantum computer simulator w...
by adamisntdead on Monday April 09, 2018 @06:22PM
(#16797497)
It depends! If you use a lot of scratch qubits, it can be useful to use sparse vectors, but if you are going to be doing a lot of superpositions / entangling many qubits, this isn't as effective, and performance suffers a lot. Libraries such as libquantum (written in C) use sparse state vectors, whereas the QCGPU library uses dense state vectors (as it is being stored on the GPU, it doesn't really impact the performance of the computer it's being simulated on). I benchmarked it, and the rust one was way faster for everything, apart from the initialization of registers and the application of some controlled gates
A well-written version using OpenCL and written in rust is also available: http://github.com/qcgpu/qcgpu-rust if you are interested! Always looking for feedback