You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Informations
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:qiskit-aer/src/simulators/matrix_product_state/svd.cpp
Line 203 in 582407a
k
had a big value, something like 210310 whilesize
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.
The text was updated successfully, but these errors were encountered: