suppose we have a double slit and we shoot electrons throug hte slits, one at a time, we will see an interference pattern on a screen just as we see with light passing through two slits. Now suppose we placed a detector near the slits so we could find out which slit the eltron passed through, then the intereference pattern is ruined and we only see two bands on electrons on the screen. Why is this? Is it because that in order to detect which slit the electron passed through, we need to shoot a photon at the electron and as a result the photon ruins the trajectory, thus the probability wave (location where the electron will hit the screen) of the electron? Isn't an electron a charged particle? A moving particle creates a magnetic field. Suppose We measure the magnetic field right before the electron passes and then right as the electron passes we could pinpoint which slit the electron passed through. Wouldn't this work?