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

index bafa11f79551c2417016ca1cffca595f249bf122..0e6918de1fdad0ba9d8d26a227169730fceeff9e 100644 (file)
@@ -755,10 +755,6 @@ void qansel_born(QAnselContext* ctx, cpx_mtx_t* stateVector, int PC, int qubitCo
                }
                //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++)
index bb9a78d1be41cf3667276483e2ef933131d414fd..02cf5b419839fb314f51fcd3d28a357f0d648710 100644 (file)
@@ -132,11 +132,11 @@ void qansel_quantis_chunk(unsigned char** chunk)
     *chunk = malloc(QANSEL_QUANTIS_CHUNK_SIZE);
     FILE* f = fopen("/dev/qrandom0", "r");
     unsigned char c = fgetc(f);
-    while (c == 0x00) c = fgetc(f) - 1;
-    (*chunk)[0] = c;
+    while (c == 0x00) c = fgetc(f);
+    (*chunk)[0] = c & rand();
     for (int i = 0; i < QANSEL_QUANTIS_CHUNK_SIZE - 1; i++)
     {
-        (*chunk)[i + 1] = fgetc(f) - 1;
+        (*chunk)[i + 1] = fgetc(f) & rand();
     }
     fclose(f);
 }
\ No newline at end of file