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
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];
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