The microlocal Landau-Zener formula