Quantum simulation has emerged as a valuable arena for demonstrating and understanding the capabilities of near-term quantum computers. Quantum annealing has been used successfully in simulating a range of open quantum systems, both at equilibrium and out of equilibrium. However, in all previous experiments, annealing has been too slow to simulate a closed quantum system coherently, due to the onset of thermal effects from the environment. Here we demonstrate coherent evolution through a quantum phase transition in the paradigmatic setting of the 1D transverse-field Ising chain, using up to 2000 superconducting flux qubits in a programmable quantum annealer. In large systems we observe the quantum Kibble-Zurek mechanism with theoretically p...