Time-resolved x-ray crystal spectrometer for multiterawatt Z -pinch spectroscopy