-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: Invalid simulator requested: custatevec_fp32 #1096
Comments
Can you confirm that you have the necessary CUDA runtime libraries installed? |
I regularly use WSL for cuda-quantum development and am able to use the GPU backends. To verify that it can work for you, would you be willing to try it in the Docker images? If so, here is something worth trying: docker pull nvcr.io/nvidia/cuda-quantum:0.5.0
container=$(docker run -itd --gpus all nvcr.io/nvidia/cuda-quantum:0.5.0)
docker exec -it $container bash
# Run this command from within container, should produce something like `{ 0:491 1:509 }`
python3 examples/python/intro.py
# Outside container, cleanup
docker stop $container
docker rm $container You will need the |
@sirgeorgesawcon I think the problem is that some libraries that the
Please give this a try and let me know if it works for you. We probably need a better error message if this is indeed the problem you're experiencing. Similar commands could be done to get the Python portion of CUDA Quantum running in a WSL environment, too, but you may need to uninstall and reinstall the cuda-quantum Python wheel after installing the libcublas (and others) packages. |
Hi @bmhowe23 , Thanks, the above, the method works on google colab, although on my local device I'm facing the issue of The file gets downloaded, but even if I do
It gives the error:
But nvm, I'll experiment on google colab. Thanks for helping out. |
Thanks, @sirgeorgesawcon. PR #1152, which will be incorporated into our upcoming 0.7.0 release, will gracefully fall back on a CPU-based simulator if any GPU driver/package issues are encountered, so thanks for reporting this issue. I'll close this issue, but feel free to open another one if you encounter any other issues. |
I encountered the same issue on my local device. I followed the quick start. When I tried: import cudaq
cudaq.set_target("nvidia") it raised And after several attempts, I resolved it by: sudo apt-get --yes install cuquantum This resolved the problem for me. Hope that it will help others encountering the same issue. |
I have encountered this many times while trying to get the installation working on Nvidia Grace Hopper. It’s working with the following environment variables set but it is a non trivial install:
|
Required prerequisites
Describe the bug
Since
cuda-quantum
is only available for Linux OS, I tried using it on Google Colab.For CPU runtime, I ran the code:
It installed perfectly.
Then running the code
Also gave the desired output.
But when I changed the runtime to GPU, and installed the
cuda-quantum
again. This time running the codegave me this error:
The full error being
It's evident that it's failing to import
pycudaq
in the__init__.py
file, which isThe error is in line 28
and this only arises when you are using an actual GPU runtime,
Steps to reproduce the bug
Step 1
Step 2
Make sure this is done in a GPU runtime, or with a machine with GPU.
Expected behavior
It should not show any error.
Is this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
Suggestions
No response
The text was updated successfully, but these errors were encountered: