Demonstration of macroscopic coherence and decoherence by adiabatic inversion, application to the SQUID