Schrödinger’s Cat Experiment
Schrödinger was one of the pioneers of quantum mechanics. Whenever he worked on complex equations and concepts, he would simplify them into abstract examples. This helped him escape the annoying math notation and think in terms of realities.
One of these important examples was the cat experiment, which to the best of my knowledge has become banal. Nevertheless, I think I could abstract it even more with Python for people who speak the language of computers. When Schrödinger talked about cats, he probably had something like the following creature in mind. Since he was remarkably intelligent, he didn’t fit into the norms of society (probably!).
He pondered what would happen if we left a cat with a device that has a 50 percent probability of killing it inside a sealed box, so we cannot see what is happening inside. After an hour or so, you are in a state of confusion about whether the cat is dead or alive. The cat is in a state that physicists refer to as superposition.
import random
class Cat:
def __init__(self):
self.location = "room"
self.status = None
def put_into_box(self):
self.location = "box"
self.determinte_status()
def determinte_status(self):
self.status = random.choice(["alive", "dead"])
def status(self):
return self.status