Quantum Organic Photochemistry. IV. The Photoisomerization of Diimide and Azoalkanes