Prolog simulaton of quantum physics