From: miha-q <> Date: Mon, 12 Feb 2024 19:01:37 +0000 (-0500) Subject: Mon Feb 12 02:01:37 PM EST 2024 X-Git-Url: http://www.foleosoft.com/?a=commitdiff_plain;h=cb809330214fb273237b2920cc9864251f185b7a;p=QAnsel.git Mon Feb 12 02:01:37 PM EST 2024 --- diff --git a/examples/bombtester.txt b/examples/bombtester.txt index fb71f5c..c0b6bb0 100644 --- a/examples/bombtester.txt +++ b/examples/bombtester.txt @@ -1,12 +1,12 @@ qreg q[2]; -creg c[3]; +creg c[4]; //Get random bomb h q[0]; -measure q[0] -> c[0]; -if(c==1) x q[0]; +measure q[0] -> c[3]; +reset q[0]; -//10 +//10: photon entering on the upper path x q[1]; //beam splitter @@ -16,8 +16,8 @@ cx q[1], q[0]; ry(-pi/4) q[0]; cx q[0], q[1]; -//If bomb, measure and store -if(c==1) measure q[0] -> c[2]; +//Measuring bomb on the upper path +if(c[3]==1) measure q[1] -> c[2]; //beam splitter cx q[0], q[1]; @@ -30,4 +30,16 @@ cx q[0], q[1]; measure q[0] -> c[0]; measure q[1] -> c[1]; -print c; \ No newline at end of file +//ABCD +//A = the chosen bomb is a dud or live +//B = the photon took the path of the bomb (measured by the bomb, exploded!) +//C = the photon took the upper path +//D = the photon took the lower path +// +//There should be some probability of 1001 +//This means the bomb is live (which we place on the upper path), +// the photon did not take the path of the bomb (nothing detected, no explosion) +// and the CD=01 measurement outcome cannot occur for a dud bomb (only 10) +//Hence, we know the bomb is live without interacting with it. + +sample; \ No newline at end of file