Entangling photons by means of the nonlinear response of quantum wells to an ultrashort pulse