Time varying M^2 in Q-switched lasers