The quantum delayed-choice experiment of Tang et al. [Nature Photonics 6 (2012) 600] is simulated on the level of individual events without making reference to concepts of quantum theory or without solving a wave equation. The simulation results are in excellent agreement with the quantum theoretical predictions of this experiment. The implication of the work presented in the present paper is that the experiment of Tang et al. can be explained in terms of cause-and-effect processes in an event-by-event manner.
With a Python code, this paper generated all results for MZI.
Basically it followed event based sequences to achieve the result.