int maxi = -1;
for (int j = 0; j < qubitCountPow2; j++)
{
- if (psisquared[j] > max)
+ if (psisquared[j] >= max)
{
max = psisquared[j];
maxi = j;
}
//for (int i = 0; i < qubitCountPow2; i++) printf("]%i -> %i: %f[\n", rsorting[i], sorting[i], psisquared_sorted[i]);
free(psisquared);
+ for (int i = 0; i < qubitCountPow2; i++)
+ {
+ printf("]%f[\n", psisquared_sorted[i]);
+ }
unsigned short *stats = malloc(sizeof(unsigned short) * qubitCountPow2);
for (int i = 0; i < qubitCountPow2; i++) stats[i] = 0;
for (int i = 0; i < (ctx->bsampling_shots); i++)