Non Abelian structures and the geometric phase of entangled qudits