From: miha-q <> Date: Fri, 16 Aug 2024 00:01:54 +0000 (-0400) Subject: Thu Aug 15 08:01:54 PM EDT 2024 X-Git-Url: http://www.foleosoft.com/?a=commitdiff_plain;h=532c36d9d74c667cc20535cbcdc2d9edaec24e40;p=QAnsel.git Thu Aug 15 08:01:54 PM EDT 2024 --- diff --git a/src/bytecode.c b/src/bytecode.c index 5cb6a86..76635db 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -778,7 +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++; + while (psisquared_sorted[j] <= 0) j--; stats[j]++; //printf("%i _/\n", j); }