I've often used "quantum leaping" as a splainin for recasting certain characters in Toobworld. The technology will continue beyond the life of Dr. Sam Beckett to the point where some private enterprise in the Future would set up 'Quantum Leap' vacation getaways for the Rich. (This splains the four different Harry Mortons in 'The George Burns And Gracie Allen Show' - at least three of them were willing to pay the price in order to be up close and personal with comedy legends.)
But before that, further testing had to be done on Dr. Beckett's research to work out the kinks and ensure the safety of the leaper and of the timeline. The first problem to be solved was the random nature of the leaps. Those future researchers were able to pinpoint the location, the time period, and the designated "leapee". But to do so they had to set up controlled areas in which to experiment. Test locations were chosen all over America in which quantum leapers could choose a leapee and then learn more about life "back then". Towns like Woodbridge, Henderson, Somerset, Rosehill, Monticello, Port Charles, Llanview, Corinth, Bay City, Salem, Oakdale, Pine Valley, and Genoa City were chose to be those "Petrie dishes" in which to conduct the experiments. (And yes, I know I spelled it wrong. I spelled it toobishly!)
Sometimes citizens in those towns were targeted to be replaced by leapers several times over, up to nine times in one instance! (And this would splain away so many recastaways in soap operas. And when most future scientists were able to expand the reach back into the Past, we can assume recastaways and "double vision" characters in wild wild West towns like North Fork, New Mexico, were also quantum leapers.
So that's my long-way-round introduction to the following video....
The only downside to the 'Quantum Leap' splainin is that we'll probably never get to see it happen outside of a 'Quantum Leap' reunion movie or a sequel. (NO remakes!) When it comes to its "use" in other TV shows, we only see the recastaway after-effects.
But this could be the closest we ever get where it happened in the scene, just right off-screen. We got to see the before and after effects not only the same episode, but the same scene.
The fellow who uploaded this clip from 'The Andy Griffith Show' said it was more than just the two men having their hats on near the end; they were supposedly totally different actors playing the roles of the treasury agents when Opie walked in. And I have no reason to doubt him.
O'Bviously they didn't have a shift change in those moments ("Goodnight, Sam." "Goodnight, Ralph.") - there wasn't enough time, and besides, Barney would have said something to them during the change-over.
But he never would have noticed a 'Quantum Leap'!