-
Hi, I am using cuQuantum Appliance 22.07-Cirq to experiment with cirq + custatevec simulator. However I am having trouble getting it to run on multiple GPUs. I am using QSimOptions.gpu_mode = 2 to achieve this as explained in cuquantum docs but I only see one gpu being used thourgh nvidia-smi command, and I run out of memory for 33 qubits. here is a minimal reproducer:
I have 2 NVidia A100 gpu's on my machine and here is the output of nvidia-smi for 32 qubit case:
Am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @hthayko thank you for using the cuQuantum container! This problem is due to the fact that in Qsim the public option names do not match the keys used by
it'd be correct. Extra tips:
Hope this helps 🙂 |
Beta Was this translation helpful? Give feedback.
-
Worked like a charm. Thanks 🙏 |
Beta Was this translation helpful? Give feedback.
Hi @hthayko thank you for using the cuQuantum container! This problem is due to the fact that in Qsim the public option names do not match the keys used by
QsimSimulator
internally, see https://github.com/quantumlib/qsim/blob/11e8afadc7f03c1691c0e506b9620311b26be2d6/qsimcirq/qsim_simulator.py#L76-L101. We had to follow the Google team's convention. Therefore, if instead of passing a dict you create/pass aQSimOptions
objectit'd be correct. Extra tips:
n_subsvs
explicitlyHope this helps 🙂