From: miha-q <> Date: Sat, 3 Aug 2024 23:53:42 +0000 (-0400) Subject: Sat Aug 3 07:53:42 PM EDT 2024 X-Git-Url: http://www.foleosoft.com/?a=commitdiff_plain;h=89a0525d117e39e651837b2e81f5fd0e9400ff08;p=QAnsel.git Sat Aug 3 07:53:42 PM EDT 2024 --- diff --git a/examples/ghz.txt b/examples/ghz.txt index 1736457..5872d9e 100644 --- a/examples/ghz.txt +++ b/examples/ghz.txt @@ -1,9 +1,4 @@ -qreg q[3]; -h q[0]; -cx q[0], q[1]; -sdg q[1]; -sdg q[2]; -h q[0]; -h q[1]; -h q[2]; -sample q; \ No newline at end of file +qreg q[1]; +rx(pi/3) q[0]; + +born q; \ No newline at end of file diff --git a/src/bytecode.c b/src/bytecode.c index 4cf466f..e892ccb 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -1489,9 +1489,9 @@ void qansel_run(QAnselContext* ctx, unsigned char* program, int programSize, int switch (instr) { case QANSEL_INSTRUCTION_RX: - f0 = M_PI / 2; + f0 = qansel_get_float(program, PC + 2); f1 = -M_PI / 2; - f2 = qansel_get_float(program, PC + 2) - (M_PI / 2); + f2 = M_PI / 2; break; case QANSEL_INSTRUCTION_RY: case QANSEL_INSTRUCTION_U1: @@ -1554,6 +1554,7 @@ void qansel_run(QAnselContext* ctx, unsigned char* program, int programSize, int case QANSEL_INSTRUCTION_BORN: a0 = program[PC + 1]; qansel_born(ctx, &stateVector, PC, qubitCount, a0, 0); + break; case QANSEL_INSTRUCTION_BSAMPLE: a0 = program[PC + 1]; qansel_born(ctx, &stateVector, PC, qubitCount, a0, 1); diff --git a/src/favicon.ico b/src/favicon.ico new file mode 100644 index 0000000..e33686d Binary files /dev/null and b/src/favicon.ico differ diff --git a/src/index.html b/src/index.html index 2584723..a7bc52c 100644 --- a/src/index.html +++ b/src/index.html @@ -1,4 +1,6 @@ +
+