From: miha-q <> Date: Fri, 16 Aug 2024 00:09:56 +0000 (-0400) Subject: Thu Aug 15 08:09:56 PM EDT 2024 X-Git-Url: http://www.foleosoft.com/?a=commitdiff_plain;h=aa6e3a56323e9eccab5d0cda107fbea544d5952d;p=QAnsel.git Thu Aug 15 08:09:56 PM EDT 2024 --- diff --git a/src/bytecode.c b/src/bytecode.c index bafa11f..0e6918d 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -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++) diff --git a/src/hardware.c b/src/hardware.c index bb9a78d..02cf5b4 100644 --- a/src/hardware.c +++ b/src/hardware.c @@ -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