Skip to content
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

MPS with cuQuantum #2168

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open

MPS with cuQuantum #2168

wants to merge 26 commits into from

Conversation

MozammilQ
Copy link

@MozammilQ MozammilQ commented Jun 6, 2024

Summary

This PR aims to add a feature of doing matrix-product-state simulation on Nvidia GPUs with cutensor of cuQuantum.

Looks like its working, and the results are correct too :)

mps-cutensor-working

Details and comments

Shows performance gains,
final

I am not super happy with the performance gains, but I think time is running out now, and I have to leave this PR here, but, I will surely get back here and do a follow up PR which will show improvements.

fixes #2112

@doichanj
Copy link
Collaborator

From 3 days I have been fighting this,

Screenshot_20240610_052824_n

Here, also the test failed here only ImportError: /tmp/tmp.pzwv2zFlTV/venv/lib/python3.12/site-packages/qiskit_aer/backends/controller_wrappers.cpython-312-x86_64-linux-gnu.so: undefined symbol: _ZN3AER21cutensor_csvd_wrapperER6matrixISt7complexIdEES4_RSt6vectorIdSaIdEES4_

After this PR I am missing Rust/cargo even more. This PR is 5% actual work and 95% fighting with this library error and that error.

Anyways, I really enjoyed this. I am looking forward to more contributions :) Thanks @doichanj :)

Because cutensor_csvd_wrapper is defined in namespace TensorNetwork calling cutensor_csvd_wrapper should be TensorNetwork::cutensor_csvd_wrapper

@doichanj
Copy link
Collaborator

It fails running with MPS method on GPU with error message as following,
ERROR TensorNet::contractor : CUTENSORNET_STATUS_INVALID_VALUE

@MozammilQ
Copy link
Author

MozammilQ commented Jun 14, 2024 via email

@MozammilQ
Copy link
Author

@doichanj , please see if this is good enough :)

and, extremely sorry, for the delay, doing any development in cloud VM, is not a good experience.

@MozammilQ
Copy link
Author

I have absolutely no idea why macOS tests are failing.
for years all OS I have known is Linux, regarding MacOS, and Windows I only know their spellings :)

@Randl
Copy link

Randl commented Jun 30, 2024

Looks like the problem is old cvxpy version, #2169 should fix it?

@MozammilQ
Copy link
Author

I have got my hands on Nvidia 3060 12 GB.
I am actively working on the PR, to solve the performance issue :)

@MozammilQ
Copy link
Author

I was using cuda 12.1
Now, it seems I can use cuda 12.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accelerate MPS simulator by using cuQuantum
3 participants