Interactive visualisation for teaching a quantum double slit experiment

In teaching quantum physics, visualisation is a useful tool to improve students’ understanding of phenomena from the quantum realm. The double slit experiment has shown itself to be a good simple enough example where all important quantum concepts such as wave-particle duality, superposition, or measurement meet in a nice way. Compiling advantages of existing visualizations, we present a new simple web-based interactive interface visualising the double slit experiment with electrons suitable for high school level. Guidelines for using the visualization in classroom are also provided. Teachers and students would be able to conduct this experiment by themselves and explore behaviour of quantum objects step-by-step, following a path outlined by Richard Feynman in his famous lectures.


Introduction
The double slit experiment has been described by Richard Feynman as the one "which has in it the heart of quantum mechanics" and which "in reality, contains the only mystery" [1].It has been also voted to be the "the most beautiful experiment in physics" [2].In the experiment, classical bullets, water waves and electrons are send to the screen trough a double slit.The wave nature of quantum objects is revealed here in the interference pattern, caused by the superposition of multiple possibilities.The particle nature of quantum objects can be seen in electrons arriving to the screen in lumps, so that the interference pattern consists of single electron traces.The effect of quantum measurement (withdrawing the "which path information" by the detector) is declared by destroying the interference.Although originally, it was only a thought experiment, it has been performed physically in a set-up very similar to the one described by Feynman, see e.g.[3,4].
Thought experiments are a valuable and meaningful part of physics teaching [5], which has been reported to have positive effect in high school teaching (in this case in general relativity, see [6,7]).Mainly, they can drive the peer discussions [8], which are also successfully used in quantum physics teaching [9].Albeit a nice experiment providing a good opportunity to address the important concepts of quantum physics (such as its probabilistic nature, superposition, measurement or wave-particle duality), tackling with these concepts remains a demanding challenge for students and teachers to overcome.
As the research has shown, computer simulations and visualisations are a helpful tool in physics teaching [10,11], which holds even more for quantum physics [12].It has been also shown in [12] that the interactivity of visualization supports students' engagement with the content they are learning, and it helps understanding the cause-and-effect-relations.
1.1.Overview of existing visualisations, simulations, and teaching sequences The literature search was based on the review of available learning multimedia in quantum physics by Mason et.al.[13], and the search in the World of Science database with the key words quantum AND double slit experiment OR teaching OR simulation OR visualization, refined to categories Education: Educational Research and Education: Scientific Disciplines.
Among the largest databases of physics simulations and visualisations highly rated in [13] (QuVis, PhET, Physlet Quantum Physics, Quantum Lab, Spin Physics, Falstad Quantum, Quantum Mechanic, Excited States and Photons), only the PhET collection contains a simulation of the quantum double slit experiment (Quantum Waves Interference [14]).In addition to this listing, three similar simulations [15, 16,17] showing electron interference were found.There were also found five teaching sequences aimed on the double slit experiment ( [18,19,20,21,22]), two of which used custom developed visualizations, which were not included in [13].In the following, the visualization tools [14,23,15,16,17] found in the literature search are described and compared.For brief comparison of their main features, see Table 1 and Figure 1.
Surprisingly, only two of the found visualizations ( [14,23]) represent the full quantum double slit experiment, which depicts the interference pattern as well as the pattern obtained under the effect of a detector.The other visualizations show the wave nature of quantum objects only, paying no attention to the phenomenon of quantum measurement, which is important for teaching quantum physics.
The PhET simulation Quantum Wave Interference [14] is aimed at undergraduate level.It focuses on visualizing what happens between the source and the screen, and the real or imaginary part of a wave function of a travelling particle can be displayed.At the expense of the wave visualization, the screen area is relatively small.There are multiple modes of sending particles to the screen: a high intensity of particle beam producing a (nearly) continuous pattern on the screen, or a single-particle-at-a-time mode, which forms a discrete pattern.The rich and easy-handle controls panel allows changing parameters of the experiment such as slits width and distance, wavelength, type and mass of particles, presence of a detector, blocking slits, etc.This simulation is web based, which is a great advantage, regarding recommendations from [13].
Similarly, there are many controls for the experimental settings in the QuILT simulation [23], including a detector represented by a light bulb, which makes the simulation highly interactive.The simulation was developed within the Quantum Interactive Learning Tutorial [18] dedicated to upper-level undergraduate students.It provides a detailed representation of the double slit experiment, displaying the scales and measures, and using the full Young double slit diffraction description.Additionally, a theoretical intensity function and a histogram can be displayed on the screen of QuILT.Unlike the other visualizations, it uses various perspective views of the whole apparatus with particle source, detector, and a screen.
On the contrary, the other three visualizations by Compadre Open Source Physics (OSP) [15], Easy Javascript Simulations (EJSS) [16], and Dualism [17] display a screen only (with an exception of EJSS, which shows also hypothetical particle trajectories).They provide the basic options of blocking slits and controlling the electron beam, which enables the user to observe the electron interference, with no means to employ a detector.Therefore, they cannot be used for demonstrating the whole picture of a quantum object.
Concerning the teaching sequences using visualizations of the double slit experiment, they are mostly aimed at the high school or even lower level, except the QuILT [18] which is designed for the university level.The teaching sequence QuILT uses the formalism of wave functions and probability density, and its objective is to help students making connections between the which path information, the presence or absence of interference, and the probability density, as well as to predict the qualitative features of the pattern formed on the screen.It also focuses on how the intensity of light used for detecting the which path information affects the interference pattern.
In the teaching sequences developed by Fanaro [19], and Choudhary and Blair [20], the Feynman path integral approach is used to describe interference and wave nature of quantum objects.Choudhary and Blair focus on explaining the basic optics phenomena (such as refraction or interference) by means of a hands-on activity with wheels, suitable even for middle school students.In the sequence by Fanaro, students were familiarized with the wave-like behaviour of electrons at first via the visualization tool Double Slit Experiment from [18].In the next part of the sequence, the electron interference was explained in terms of the "sum of all alternatives formulation" [19].For this purpose, the new visualization Modellus was developed.However, the software could not be found on its address indicated in [19], nor elsewhere.
Another high school teaching sequence [22], developed within the ReleQuant project [24], used the video Dr.Quantum [25] instead of a simulation.Based on this video, students were supposed to discuss about the experiment with a peer in a small role play interview of a scientist and a journalist.
Finally, Meyer [21] developed a teaching sequence investigating mainly the wave properties of light by means of the Young double slit experiment, but particle nature of light is also discussed.For introducing the behaviour of waves, the simulation of a ripple tank by [26] was used.This sequence is dedicated to undergraduate students with non-science major, and could be used also for high school level.

Implications for further development
In this section, the features of the described visualizations are discussed from the point of view of teaching the double slit experiment on a high school level, and implications for development of a new visualization are drawn.The main features discussed are interactive controllable parameters, the way of visualization, and representations of intensity or probability density of particles arriving at the screen.Regarding interactivity, any controllable parameter of the experiment is valuable, as stated in [10,11], but it should not distract from the key points of the learning content.At the high school level, I see the key points in making connections between the presence or absence of interference and the detector.Therefore, the important interactive controls should be opening and blocking slits, and turning on and off the detector.To make a connection between the wave and particle nature of electrons, also the wavelength and slit distance parameters can be changed.From this point of view, only the first two visualizations [14,23] would be suitable, as they enable the option of a detector.However, being designed for a university lever course, they provide more controls than necessary on an introductory level, which might be distracting.The other effects (such as the wave function visualization, the detailed structure of the diffraction pattern affected by slit width, tunable detector, which interacts only with a fraction of particles, and others) can be left for later after the students grasp the basic concepts.
The graphical design of the visualizations and the representation of the intensity of arriving particles vary from a simplistic screen to the complex visualization of a travelling wave (see Figures 1a-1d).At the first encounter with the double slit experiment, I think it is more important to see its results on the screen than visualizing what happens in between.Therefore, the screen is an important part of the apparatus, which can be clearly seen in all of the visualizations, except [14], where the screen is very small.
For the purpose of teaching the double slit experiment at high school level, it would be beneficial to have a tool for visualizing the qualitative addition of the probability density functions obtained from different settings of the experiment, as described in [1].This could be done for example by comparing the intensity of the pattern on the screen.This is possible in the QuILT simulation [23] when handling the controls accurately.Unfortunately, the screen of the PhET simulation [14] is too small to demonstrate this effect clearly, even though it also provides a possibility of capturing the screen.The other visualizations do not provide this option at all.
The last but not least feature of the visualizations is their ease of using in the classroom.The programs run on a computer can be used successfully as long as students have easy access to computers, which might not be true at all schools.The great advantage of web based simulations is their accessibility through mobile devices, which are now a part of students' everyday life.From the set of found visualizations, only [14] and [16] are web based.
None of the found visualizations fully fits all the features necessary for the purpose of high school teaching of the double sit experiment discussed above.Therefore, there is a need for a new tool which would combine the advantages of the already existing ones.Based on the features of the existing visualizations, a list of criteria for developing the new visualization suitable for high school level was created.The new visualization of the double slit experiment should be: • Web based (to be easily accessible from mobile devices) • Allowing a detector (to show the full picture of quantum nature) • Interactive but not distracting (having only the necessary controls) • Simplified (no wave functions, diffraction, ...) • Able to demonstrate qualitative addition of probability densities (by overlapping patterns on the screen)

Results: Developed visualization tool
In this section, the new visualization of the double slit experiment is presented in its initial phase of development.It is available from http://fyzweb.cz/materialy/kvantovka/Double_ slit_experiment.html.Further, an outline of its possible usage in the classroom is provided.However, it has not been tested with students yet, which will be the objective of further research.

Description of the visualization
The new visualization was developed based on the list of features important for high school teaching of the double slit experiment, which is described in the previous section.Its main advantage is that it provides a picture of both wave and particle nature of quantum objects.
Students can explore matter waves and electron interference, as well as the particle behaviour under the effect of quantum measurement.Furthermore, patterns on the screen can be overlapped, displayed with different colours and compared to demonstrate that the interference pattern is not just the sum of two single slit patterns, which is true in case of employing The graphical representation of the experiment has adapted the simple appearance of simulations OSP, EJSS, Dualism, and displays only the screen of the experiment, to make it clearly visible even for class demonstrations (see Figure 2).The experiment allows sending particles either one by one, or one hundred particles at once, to build the discrete pattern faster.For the interference pattern, the diffraction effect was neglected and only the Young interference on the double slit was considered, as described further in section 2.2.For simplicity, the scales of the experiment are not displayed.In addition to the screen, there is an optional panel above, where the histogram of the relative frequency of arriving particles is plotted, together with the theoretical probability density function, which corresponds to the intensity of the pattern formed on the screen.
The controls panel allows changing the slit distance and the wavelength of electrons, while their corresponding energy is displayed below.The slits can be blocked or opened by pressing buttons, and a detector can be turned on or off.Combining these slits and detector controls, there are three main set-ups of the double slit experiment: In the first one, both slits are open and the interference pattern is observed.In the second set-up, one of the slits is blocked, and no interference is present.In the third variant of the experiment, both slits are open and a detector is present to extract the "which path information" about the particles, which yields no interference either.
To demonstrate the qualitative addition of probability densities, there is an option of overlapping the patterns on the screen formed under different experimental setting.For this purpose, the colour of particle traces can be changed to help recognizing, which experimental setting they came from.

Physics behind the simulation
Developing an instructive visualization is always about the balance between the physical reality, and an idealization neglecting or highlighting certain phenomena.In the following, the physics behind the simulation is discussed, together with the simplifications used in the visualization.

The interference pattern
Firstly, let us describe the case when both slits are opened and no detector is present.Particles of the wavelength λ are sent through two identical slits of width d with the offset b, which are placed at the distance L from the screen.As the distance to the screen is much greater than the wavelength, the Fraunhoffer far-field view can be applied.This allows us to use an approximation of sin α ≈ x L , where x is the position of the point at the screen, and α is the angle between the optical axis and the ray from the slits to that point at the screen.This far-field limit is justifiable, because even the real experimental set-up with electrons allows observations in such a plane, see [3,4].The intensity of fringes at the screen is described by the function1 which is given by the product of two terms.The cosine term describes the Young double slit interference, where the slits are considered to be infinitesimally narrow, The term with sine corresponds to the diffraction on a single slit of width d, The overall intensity is plotted in Figure 5, the two corresponding terms are in Figures 3 and 4.
For simplicity, only the Young double slit interference was considered in the simulation, neglecting the diffraction effects.Although this approximation holds only for the area close to the middle of the screen, for the case where the slit distance is much greater than the slit width, this area can be reasonably wide, spanning all over the real screen.I considered it easier for the students and teachers not to elaborate on the details of the interference pattern deeper at this point, in order to be able to concentrate on other quantum mechanical phenomena, as even the pre-service and in-service teachers might have difficulties with the diffraction and interference phenomena [5].

One slit pattern approximated by the Gaussian peak
In such set-up of the experiment, where the detector is present, or one of the slits is blocked, it would bring us to the case of diffraction on a single slit described in the previous section.In an approximation, it is possible to substitute the diffraction pattern (3) by the Gaussian curve which approximates the central maximum, as shown in Figure 6.
Here, I decided to exaggerate the position and the width of the Gaussian peak, to be easily recognizable (see e.g. Figure 8a).In reality, the side shift of the peak would be too small to be visible, and its width would be stretched all over the screen.The dependence on wavelength of the approximated diffraction pattern has also been neglected, as it would be difficult to explain this phenomenon without going back to the diffraction theory.

Technical implementation
The applet was implemented using Python and the Python library Bokeh [27] combined with Javascript for creating interactive visualisations for web browsers in html5.In the following, the technical aspects of the applet implementation are described briefly.The full code is available from (http://fyzweb.cz/materialy/kvantovka/).

Generating points from probability distributions
For displaying particle traces on the screen, the x and y coordinates of the points were generated from the following probability distributions: The y-coordinate of the point is taken from the uniform probability distribution; the x coordinates probability distributions are given by the intensity functions described in the section 2.2.For such distributions, custom random generators were implemented.The normal distribution generator was implemented using the Box-Müller transform [28], where the values laying out of the screen were abandoned.The generator for Young interference was implemented via numerical calculation of the inverse cumulative distribution function, according to the function (2).

Normalisation of theoretical probability density function and histogram
When sending particles from one distribution only, both the theoretical probability density function and the histogram are normalized to one at the length of the screen.If new particles from a different distribution are added on top of those already present on the screen, the histogram remains normed to one, meanwhile the probability density function shows the prediction for the new set-up, and initially, it is normed to one.When new particles are added, it renormalizes to the actual number of the newly added particles.

Results: Guidelines for using the visualization in classroom
Here, the guidelines for usage of the visualization in a classroom are suggested.However, the visualization itself has not been tested with students yet, and further piloting is needed.The classroom activity could have the following parts, which are described below: (1) Behaviour of classical objects (bullets and water waves) (2) Double slit experiment with electrons (3) Intermezzo: Single slit patterns (4) Double slit experiment with electrons and a detector

Behaviour of classical objects (bullets and water waves)
To understand the behaviour of quantum objects such as electrons, students would remember or explore the features of classical objects at first.They would be asked to draw their prediction of the double slit experiment result if it was done with a) classical bullets or marbles, and b) water waves.Student's predictions can be justified e.g. by spraying paint in spray through a double slit cut in piece of cardboard (see Figure 7), and by watching a video with water waves [29].

Experiment with electrons
Once equipped with the experience of bullets and waves, students will perform the experiment with electrons.The following series of tasks and questions may be used to get familiar with the interface and controls panel of the visualization.It can be either used for work in pairs or groups or as the whole class activity guided by the teacher.The faster learners could explore also the histogram panel and probability density.
• Send a few electrons to the screen.Can you predict where the next electron will arrive?
• Send a large ensemble of electrons.Can you tell at which regions the next electron is more likely to arrive than to others?• Describe what similarities and differences there are between the pattern on the screen obtained with electrons and the classical objects from previous experiments.
• Explain what the light blue graph above the screen shows.
• In the bottom part of the controls panel, check the option "Show theoretical probability density."What could be the relation between the dark blue line and the light blue graph?
A takeaway from this part would be firstly, observing the probabilistic nature of electron behaviour (we are not able to predict the position of a single electron, but from a large ensemble of electrons, we can extract the probability distribution).Secondly, it would be the fact that electrons arrive to the screen in lumps like classical particles.And thirdly, it would be the similarity of the interference pattern, which is, unlike the continuous case of waves, composed from single electron traces.

Intermezzo: One slit experiments with electrons
In this step between the experiments without and with the detector, students would look more closely on what pattern would be obtained, when one slit is blocked.Students can draw their prediction for such a set-up and justify it using the simulation.

Double slit with electrons and a detector
Here we get to the heart of the experiment.Students would use a detector to distinguish which slit the electron went through.They would be asked to figure out, how the observed pattern is influenced by the detector knowing the information which slit each electron passed through.To make the connection of this observation with superposition, it is possible to use the simulation to elaborate on the question "Is it true that each electron went 'either' through slit 1 or through slit 2?" outlined by Feynman in his lectures [1].Instead of adding the functions of probability densities, the patterns on the screen can be overlapped and compared qualitatively.For this purpose, the colour of particle traces can be changed to distinguish, which experiment thy came from.The series of Figures 8a-8b shows an example of such a comparison.
Here, the key point would be that when electrons are observed, there is no superposition, and we can sort the electrons into two columns according to which slit they went through like we could do it with classical bullets.The resulting pattern on the screen would be the same, as if we simply summed up the patterns from individual slits.When electrons are not observed, there is an interference pattern, which is not only the sum of the individual slit patterns.In this case, we cannot sort the electrons by the slit they used, and we must admit that they must behave in a more complicated way.This strange behaviour of "not being able to decide which slit was used if not both" is called a superposition.

Limitations, further work
In this paper, only a preliminary phase of the visualization tool development was presented.However, even at this point, it is a tool we consider usable in the classroom.Nevertheless, it will undergo further development at least in two directions: piloting the visualization with students and its further technical development.
The visualization will be incorporated into the teaching sequence for high school level aimed on the double slit experiment and related quantum physics concepts, and it will be tested with students.A part of this sequence will be e.g. a real experiment with light (using LASER) and other activities presented in section 3.
Concerning the technical development, there will be added an option for turning on and off the diffraction effect for the teachers to decide whether they want to go into the experiment in its full complexity or whether they want to stay on the lower level, not dealing with diffraction at all.This will also allow the comparison with the real LASER experiment with light.It is also planned to broaden the visualization with two other modes: the simulation of classical bullets and water waves.In the case of classical bullets, it may be possible to familiarize students  with the Gaussian distribution of scattering on the slits enough, so there might be no need for the exaggeration of the single slit diffraction Gaussian position and width, as discussed in the section 2.2.2.

Conclusion
We have given an overview of visualizations of the quantum double slit experiment, finding that only two of the five visualizations ( [14,23]) depict both the wave and particle properties of quantum objects, i.e. enable an option of quantum measurement.The other visualizations show only the interference pattern, or a single slit diffraction pattern, and therefore, they are not suitable for demonstrating the whole picture of quantum behaviour.None of the found visualizations fully fits all the features necessary for the purpose of high school teaching of the double sit experiment, such as appropriate simplicity and ease of usage on mobile devices.For this purpose, a new web based visualization was developed based on the advantages of the existing visualizations, and an outline of its possible usage in the classroom is provided.It provides a simple interface with a screen and controls for sending particles, blocking slits, turning on a detector, or changing wavelength and slit distance.Its main advantage is demonstrating a picture of both wave and particle nature of quantum objects.It also provides the option of overlapping particle traces from different experimental set-ups as a tool for qualitative addition of the probability density.

Figure 1 :
Figure 1: Visualizations of the double slit experiment found in the literature search.

Figure 2 :
Figure 2: Visualization of the double slit experiment with electrons.

Figure 5 :
Figure 5: Young interference with diffraction on a double slit (purple line), diffraction on a single slit (blue dashed line).
(a) Cardboard double slit experiment.(b) Spray trace on the screen.

Figure 7 :
Figure 7: Double slit experiment with bullets represented by water droplets.
(a) Individual slits (blue and green traces).(b) Double slit interference pattern (red) overlapped with individual slits traces (blue and green).(c)Individual slits traces (blue and green) overlapped with double slit trace with a detector (red).

Figure 8 :
Figure 8: Examples of using the visualization for qualitative addition of probability densities, and comparison of the double slit experiment with and without a detector.