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