From 532c36d9d74c667cc20535cbcdc2d9edaec24e40 Mon Sep 17 00:00:00 2001 From: miha-q <> Date: Thu, 15 Aug 2024 20:01:54 -0400 Subject: [PATCH] Thu Aug 15 08:01:54 PM EDT 2024 --- src/bytecode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.39.5