Quantum error correction and spacetime