Hi!
Yes, you are right. According to the convention (I think there is probably a mistake in the diagram, which I’ll fix), the inconclusive cases would be for m_det==1. I want to add one thing here and it is that you should add the post-selection argument for the measurement with the bomb, I mean m_bomb = qml.measure(0, postselect=0). We are only able to account for those cases since when the photon goes the other way (1), the bomb explodes and the experiment ends. This didn’t impact the probabilities for the first codercise, but will do for this one.
Taking this into account then, the conditional operator should be conditioned on m_det==1 and not m_bomb == 1.
Your circuit is almost complete. I hope that these two fixes will lead you to the correct answer.
1 Like