Young's double slit experiment with a single photon i am a year 12 student and as i was reading a book written by Brain Clegg, i hit a roadblock. It would be great if somone could help me out with this.
when we conduct young's double slit experiment with a single photon , it is seen that we get an interference pattern due to the probability of the photon passing through either of the slits. Now, if we were to place a detector before the slits, we would know for sure through which slit the photon would pass. In the experiment does the results still show an interference pattern even though we know the location of the photon or does it disappear? 
And is the interference pattern still produced without a detector?
Thank you
 A: A common misunderstanding is that the wavefunction describes a particle (e.g., a photon or an electron), and that interference is something that happens to a particle.
Neither is true. In fact, the square of wavefunction at a point describes probability of detection of the particle at that point.  Interference is evidence that the "probability of detection" for all points follows a wave equation.  That implies that interference can only be detected by performing a large number of identical detections, and not by performing a single detection.
A: There is no way to measure the photon without disturbing it. So the version of the double-slit experiment that you describe above has to be done with an electron, which you can measure in flight. It's typically called the "which way" experiment.
In your description above, the interference pattern disappears. What you are describing is a variant of the quantum eraser experiment. I have not been pleased with the descriptions and explanations of the experiment that I have found, but I'm told it makes sense if you look at the math.
A: With a detector you get a particle pattern, without it, you get the interference pattern. The fact you get an interference pattern with single photons is one of the most amazing things about it. It interferes only with itself.
A: It is really a technicality and misunderstanding of the experimental procedure.
In the single shot "which way" experiment the detectors (i.e. observers) are positioned right behind each of the two slits.
See illustration from Huygens Optics excellent video, below:

You can clearly see above that the probability function collapses to a single point (light spot) just behind the two slits where the two detectors are positioned and the detection in the single shot "which way" experiments is performed. They never detect  in this experiment the wave-particle at the far end distance where the screen is located and the probability wave function becomes spread out in space thus wave interference is taking place and an interference pattern is obtained at the end where the screen is located!
Then the two slit detectors results are compared with that of the far away from the slits screen detector and you get the famous misconception:
"Light behaves like a particle when observed but as a wave when not observed!!"
Which is a true statement but its context it totally misunderstood by most of the public and science media popularizers.
Photons or electrons (or even whole atoms) in the DS experiment properly done, always interfere when left to travel the distance to the detection screen. This is the wave-particle nature. Imagine the particle like a boat moving forward on still water and creating wave lines as it cuts through the water surface. The particle is not anymore a single localized moving entity but becomes a wave-particle that radiates and spreads out the wave distortion inside the environment it travels (i.e. air, full with molecules atoms and electrons or vacuum space which is not empty but full of a sea of virtual particles).
So, even in the single shot experiments of one particle at the time the laser photon for example which has a wavelength say of 600nm cannot pass through simultaneously the mm separated two slits but its radiated spread out EM waves caused inside the environment it travels, can! This radiated (spread out) wave energy is emitted behind the two slits and interferes. Thus the famous quote "the particle interferes with itself".
But what we mean by "the single photon radiates EM wave energy that spreads out into space"? What is this radiation consists of?
Answer: What most people don't understand is that a single photon travelling causes a cascade domino effect to electrons in front of it, which absorb the photon and re re-emit it to the next electrons in front and so on. Also virtual photons (i.e. the constitutes of electromagnetic flux) are generated in the process that spread around the photon constituting its radiated electromagnetic flux field which expands with time and is much larger than the photon itself.  In a rough analogy, imagine a domino pyramid that starts cascade falling from its apex (i.e single photon in analogy). Yes, there is never a single localized to a small point photon. It is always surrounded by a spreading out uniformly in space, spherical wave of virtual photons flux that passes simultaneously through both slits!

gif source credits: https://ezgif.com/resize/ezgif-3-dda0d9fc6bf7.gif
Another misconception is that the wave probability function is dictated by the photon. This is not correct, the wave probability function (all the possible paths the photon can take) is dictated by its environment it travels inside. Meaning all the matter (i.e. atoms-electrons of air and apparatus used in the experiment) which are in the way of the photon.
