a, b, Measured fringe pattern for plasma density diagnosis and the corresponding density profile along the optical axis. c–e, Longitudinal phase space of the trapped electrons and the corresponding accelerating electric field at different positions. f, Longitudinal phase space of the accelerated electrons at the exit of the plasma and the corresponding energy spectrum shown in red. s is the longitudinal position of the electron in an electron beam in the co-moving coordinate. The simulated electron beam had a peak energy of 495 MeV, charge of 25.4 pC, global energy spread of 0.67% in r.m.s. (93% of the total electrons), and normalized projected emittance of 0.23 mm mrad and 0.73 mm mrad in the horizontal and vertical directions, respectively.