AssertionError for a test in `toqito/state_props/tests/test_in_separable_ball`
A unit test has been failing at random over the past few days. It passes after the failed workflow is run again.
based on a recent test failure and yesterday's discussion, the accuracy of one of the solvers does appear to be the culprit here and elsewhere. The screenshot below is related to this issue.
https://github.com/vprusso/toqito/actions/runs/9129845659/job/25105323745#step:5:3350
@vprusso I think this error is the same one I encountered here. Maybe the fix is similar to the fix for #613.
@Shivansh20128 , yes this is 100% correct, exactly the same issue. So I think your solution here would be the appropriate fix in this case. Thank you for catching this, and yes, I agree that this is the way to fix it! Thank you!
@vprusso I tried running the test in a loop iterating it 1 million times, and then I checked if any of the runs gave False. But I found that all the runs gave True, so I am not sure if this needs to be corrected. Or maybe I am looking at the wrong place. Here is what I did:
Since the above screenshot of the test error in test_in_separable_ball shows failure in rho0, I ran the first test case from the file, which is as follows-
So the test case is
np.identity(4) @ np.diag(np.array([1, 1, 1, 0])) / 3 @ np.identity(4).conj().T.
My program:
Please let me know if I am going in the right direction. Thank you!
Ah, perhaps I initially misunderstood the connection you were drawing here. I was under the impression that your comment here was in reference to the issue here.
IOW, I believe that the repeated approach will solve the document issue that sometimes arises for the error in this comment. However, indeed, the in_separable_ball is a separate problem that (I don't think) is connected. Sorry for the confusion, and hopefully that makes sense. Of course, let me know if not, @Shivansh20128 !
Ohh okay @vprusso . This issue has now been dealt with and the error is not coming anymore. I am now talking about the in_separable_ball error.
Please refer to my previous comment here and let me know if I am going in the right direction.
Ohh okay @vprusso . This issue has now been dealt with and the error is not coming anymore. I am now talking about the
in_separable_ballerror. Please refer to my previous comment here and let me know if I am going in the right direction.
Ah, okay, so if I understand what you're saying correctly (and sorry for taking this long to get here) you're saying that you're unable to replicate this issue even after running a bunch of times?
If that's the case, I wonder if we should close this issue out for now as we are unable to replicate?
Ah, okay, so if I understand what you're saying correctly (and sorry for taking this long to get here) you're saying that you're unable to replicate this issue even after running a bunch of times?
Yes, that is what I meant.
If that's the case, I wonder if we should close this issue out for now as we are unable to replicate?
Yes, I think so too, because I think it is super unlikely to happen. If didn't show up even once after running for 1000000 times, I a doubtful how the error even showed up.
Ah, okay, so if I understand what you're saying correctly (and sorry for taking this long to get here) you're saying that you're unable to replicate this issue even after running a bunch of times?
Yes, that is what I meant.
If that's the case, I wonder if we should close this issue out for now as we are unable to replicate?
Yes, I think so too, because I think it is super unlikely to happen. If didn't show up even once after running for 1000000 times, I a doubtful how the error even showed up.
Gotcha. In that case, let's go ahead and close this issue for now. If it crops back up, we'll re-open. Thanks, @Shivansh20128 !