]> foleosoft.com Git - QAnsel.git/commitdiff
Mon Feb 12 11:55:56 AM EST 2024
authormiha-q <>
Mon, 12 Feb 2024 16:55:56 +0000 (11:55 -0500)
committermiha-q <>
Mon, 12 Feb 2024 16:55:56 +0000 (11:55 -0500)
src/QAnsel.c

index f2a81ecf6803d7be50227bb097d75b31d2050201..e2ce18feb8c6ce67eadf72fa5662a5a193b7ff60 100644 (file)
@@ -1295,7 +1295,7 @@ void process(int argc, char** argv)
                        qansel_run(qubitCount, bitCount, instr, bitVect, instrLen, doDisplay);
                        memcpy(instr, dat, instrLen * sizeof(QInstr));
                        uint16_t stat = 0;
-                       for (uint8_t j = 0; j < bitCount; j++)
+                       for (int8_t j = bitCount - 1; j >= 0; j--)
                        {
                                stat = (stat << 1) | bitVect[j];
                        }