1 MHz repetition rate single-frequency gain-switched Nd:YAG microchip laser