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 simulator with low limits can crash #2290

Open
aromanro opened this issue Jan 16, 2025 · 0 comments
Open

MPS simulator with low limits can crash #2290

aromanro opened this issue Jan 16, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@aromanro
Copy link
Contributor

aromanro commented Jan 16, 2025

Informations

  • Qiskit Aer version: Latest development version.
  • Python version: Doesn't matter, the issue was noticed by using qiskit aer from c++
  • Operating system: Windows 11, but it's probably present on all available

What is the current behavior?

It's not a big issue, as it's avoidable, but anyway, I thought I should report it.
Setting a big value for the singular values threshold can crash the MPS simulator.

Steps to reproduce the problem

I caught this accidentally by generating and executing random circuits (over 100 gates) on a MPS simulator with 50 qubits, with drastic limits set (something like 15 for max bond dimension and 0.05 for truncation threshold), so it's probably not very easy to reproduce...

A crash that I managed to reproduce happened in csvd, more precisely on this line:


k had a big value, something like 210310 while size was 4.

A had 4 rows and 0 columns for this case, my guess is that due of the big truncation value somehow along the way one of the dimensions gets 0 and that is the source of the issues.

The problem seems to be generated by the too big truncation threshold, if I set it to a lower value, I cannot reproduce the issue anymore.

What is the expected behavior?

Not crashing, obviously.

Suggested solutions

Probably matrices shouldn't be truncated down to 0 dimension(s), if 0 is obtained it should be changed to 1 or something like that, but this is a wild guess.

@aromanro aromanro added the bug Something isn't working label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant