]> foleosoft.com Git - QAnsel.git/commitdiff
Thu Aug 15 08:00:55 PM EDT 2024
authormiha-q <>
Fri, 16 Aug 2024 00:00:55 +0000 (20:00 -0400)
committermiha-q <>
Fri, 16 Aug 2024 00:00:55 +0000 (20:00 -0400)
src/bytecode.c

index e9b95522aefc580ca079b2b09513922a28113db5..5cb6a8608fe83288b8b8a32692d18f9e82110485 100644 (file)
@@ -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);
                                }