qsim icon indicating copy to clipboard operation
qsim copied to clipboard

qsimcirq can handle large circuit?

Open CoolMLAI opened this issue 4 months ago • 8 comments

Hi when i tried to simulate statevector, i encontered the following error.

RuntimeError: qsimcirq cannot handle 33-qubit circuits due to numpy limitations

i wonder qsimcirq can't handle large circuit.

Thanks

CoolMLAI avatar Aug 20 '25 06:08 CoolMLAI

qsim development is stopped? why no answers?

CoolMLAI avatar Aug 22 '25 02:08 CoolMLAI

qsim can handle large circuits – people have done 40+ qubits. Can you please provide more information?

  1. What version of qsim do you have installed?
  2. What version of NumPy?
  3. What platform are you running on? (Linux, Mac, Windows, Colab, ...?)

mhucka avatar Aug 24 '25 03:08 mhucka

Thanks for your reply.

I have send the detail of my current situation to your email. will you please check it out?

Thanks.

CoolMLAI avatar Aug 24 '25 13:08 CoolMLAI

Thanks. By the way, in the future, please just type your answer here instead of emailing it. That will make the answer available for other users (who may also have similar questions) and serve as a record of questions and solutions.

Here I copied the email:

What version of qsim do you have installed?

Since I am using a multi GPU, I am using cuQuantum Appliance docker container. (nvcr.io/nvidia/cuquantum-appliance:25.06-x86_64) Inside the docker, qsimcirq python package version is 0.15.0. (Not sure how to check the qsim version.)

What version of NumPy?

The Numpy version is 1.26.4 in that docker container. (docker run --rm nvcr.io/nvidia/cuquantum-appliance:25.06-x86_64 pip show numpy returns that)

What platform are you running on? (Linux, Mac, Windows, Colab, ...?)

I am running on Ubuntu 22.04. I am working with .py file, not colab.

Other people have reported problems with using > 32 qubits with NumPy 1.x, so that is likely the reason it is failing in your environment. Is there a more recent version of that Docker container available, by any chance?

mhucka avatar Aug 25 '25 02:08 mhucka

Same issue.

And no, that seems to be the latest docker. https://docs.nvidia.com/cuda/cuquantum/latest/appliance/index.html

25.06 is the latest. @mhucka

Rabbit692 avatar Aug 25 '25 03:08 Rabbit692

Hi @mhucka Thanks for your reply. Docker container what i used is the latest and i tried the others but they all use numpy 1.26.4. So could you plz let me know how i can complie the qsim in order to use multi gpu and run the code for solving the more than 33 qubits?

CoolMLAI avatar Aug 26 '25 10:08 CoolMLAI

The current instructions are out of date. I have to update them. I hope to do that this week.

mhucka avatar Aug 28 '25 06:08 mhucka

Hi @mhucka Is there any update?

CoolMLAI avatar Sep 01 '25 10:09 CoolMLAI