From: miha-q <> Date: Fri, 16 Aug 2024 00:00:55 +0000 (-0400) Subject: Thu Aug 15 08:00:55 PM EDT 2024 X-Git-Url: http://www.foleosoft.com/?a=commitdiff_plain;h=cc70ec1632761b60d31206b5900b26a1740439dc;p=QAnsel.git Thu Aug 15 08:00:55 PM EDT 2024 --- diff --git a/src/bytecode.c b/src/bytecode.c index e9b9552..5cb6a86 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -778,6 +778,7 @@ void qansel_born(QAnselContext* ctx, cpx_mtx_t* stateVector, int PC, int qubitCo r -= psisquared_sorted[j]; if (j == qubitCountPow2 - 1) { + while (psisquared_sorted[j] <= 0) j++; stats[j]++; //printf("%i _/\n", j); }