Quantum mechanics of space and time