-
Notifications
You must be signed in to change notification settings - Fork 62
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
Shor example performance drop #1432
Comments
I used this example at 0.2.8 and it is fast to execute. So something has been introduced in between these two versions. |
#1039 was first included in v0.2.2. We should take the time of running it with |
Are you using the qibojit numba backend for this? If yes, could you please also add the qibojit and numba versions? You can find them using
and the |
To me it seems that the problem was introduced in that version. In particular, the following environment
is fast with qibojit (numba) and it becomes slow if I upgrade qibo to v0.2.2 (with the rest staying the same). I am not sure if it is related to #1039 in particular or some other PR first included in v0.2.2. |
First, the Shor example with the semi-classical approach, which can be executed using:
is broken because it is no longer possible (I think after #1039) to execute circuits that only contain collapse measurements using state vectors. The error says to use density matrices, however this is intractable for the typically large circuits of this example. An easy fix is to add a normal (non-collapse) measurement at the end of the circuit, which makes it fall back to repeated execution and returns
MeasurementOutcomes
(instead of full state).However, even with the above fix, the default N=15 did not finish execution within several minutes of using qibojit (numba). This is much slower than the original benchmark in #277 (comment). I also managed to roll back to qibo 0.1.6rc1 and qibojit 0.0.1 (not very trivial) and the same example runs in a few seconds so clearly something broke in between, or the last measurement I added breaks something (but this seems unlikely based on some profiling I did).
The text was updated successfully, but these errors were encountered: