From: miha-q <> Date: Tue, 19 Mar 2024 22:46:53 +0000 (-0400) Subject: Tue Mar 19 06:46:53 PM EDT 2024 X-Git-Url: http://www.foleosoft.com/?a=commitdiff_plain;h=cba105fbd5140f7aba24d54b611c0f045e1d305d;p=QAnsel.git Tue Mar 19 06:46:53 PM EDT 2024 --- diff --git a/examples/bb84.txt b/examples/bb84.txt index 29acc29..60a44b3 100644 --- a/examples/bb84.txt +++ b/examples/bb84.txt @@ -1,7 +1,26 @@ qreg q[2]; creg c[1]; +//Alice sends two bits 00 h q[0]; h q[1]; -density q[0]; \ No newline at end of file +//Eve tries to measure the first +measure q[0] -> c[0]; + +//Bob applies the gate before measuring +h q[0]; +h q[1]; + +//The first should now be random noise +// while the second unmeasured one +// should be 0 +born; + +//In a full BB84 Alice would randomly +// apply the gate or not apply the +// gate so Eve would have to guess +// and would inevitably end up +// turning the transferred bits +// into random noise whenever there +// is a wrong guess. \ No newline at end of file