Primordial gravitational waves from excited states