Geometric phase for adiabatic evolutions of general quantum states