When a quantum system, parametrized by a manifold of classical parameters, evolves along a closed path in the parameter space, its state experiences a unitary transformation, which is called a geometric phase.
In most applications of quantum computing, this parameter space is usually a set of control parameters used to drive the system. More precisely, the system's Hamiltonian depends on a set of parameters, some of them can be controlled by the experimenter to generate an evolution according to the Schrödinger equation:
$$\frac{d|\psi(t)\rangle}{dt} = \frac{1}{i\hbar} H(x(t)) |\psi(t)\rangle$$
The Hamiltonian $H(x)$ depends on the parameters (coordinates) $x$ belonging to the control manifold $\mathcal{M}$. The control of the system evolution is performed through the "driving the Hamiltonian" along the trajectories $x(t)$ by the experimenter.
An example of a space of control parameters of a quantum computing system is the parameter space of the laser pulses acting on trapped ion qubits. Here, the control parameters $x$ consist of the laser phases and exposure times.
Adiabatic phase
When the system's initial Hamiltonian has a degenerate ground state
$$ H(x(0)) |\psi_n\rangle = E_0 |\psi_n\rangle, \quad n=1, ..., N,$$
Then if we evolve the system very slowly along a closed cycle in the parameter space, specifically if
$$\langle\psi_n|\frac{dH}{dt}|\psi_n\rangle T << E_1(t)-E_0(t)$$
Where $T$ is the cycle time period and $E_1$ is the energy of the first excited state. Then, when the above adiabatic condition applies, the system evolves within the degenerate ground state subspace and its final state after the evolution cycle can be approximated by:
$$ |\Psi(T) \rangle = e^{\frac{-iET}{\hbar}} Pe^{\frac{i}{\hbar}\oint A_i(x) dx^i} |\Psi(0) \rangle, $$
The term in front of $|\Psi(0) \rangle $ is the geometric phase. Both the initial $|\Psi(0) \rangle $ and the final $|\Psi(T) \rangle $, states are combinations of the ground state vectors; $P$ denotes the time ordering operator, and $A_i$ are the matrices whose elements are given by:
$$A^{mn}_i = \langle\psi_m(t)|\frac{d}{dx^i} |\psi_n(t)\rangle $$
Where $|\psi_n(t)\rangle$ are instantaneous eigenvectors of the time varying Hamiltonian:
$$ H(x(t)) |\psi_n(t)\rangle = E_0(t) |\psi_n(t)\rangle$$,
The Lie algebra valued differential form $A_i dx^i$ is called the Wilczek-Zee non-Abelian potential. It is a non-Abelian generalization of the electromagnetic vector potential. The Wilczek-Zee potential is also a gauge potential; a change of the (computational) basis that we use for the degenerate subspace is equivalent to a gauge transformation which does not change the value of the geometric phase.
The term $e^{\frac{-iET}{\hbar}}$ is called a dynamical phase. In our case it is just a global phase which does not change the physical state. The dynamic phase in contrast to the geometric phase depends explicitly on the cycle time. If the system is rotated fast, then less dynamical phase is accumulated. The Wilczek-Zee phase in contrast depends only on the trajectory in the parameter space and not on the evolution time (as long as the evolution is not too fast to break the adiabatic theorem).
One of the major applications of the adiabatic geometric phase is in the construction of gates in holonomic quantum computers as originally proposed in the seminal paper by Rasetti and Zanardi.
non-Adiabatic phase
In quantum computation, the adiabatic condition is a burden, because it requires the controlled evolution of the system to be slow, enabling the system more time to decohere. Thus, adiabatic quantum evolution, although not excluded as a viable possibility of realizing a quantum computer, is quite constrained. But the fact is, that when the system's evolution is fast, such that the adiabatic theorem does not apply, the system still follows a unitary evolution which can be expressed by a geometric phase. However, this time, it is the responsibility of the experimenter to keep the system in the computational subspace, as the adiabatic theorem ceases to apply. In this case the final state of the system can be expressed by:
$$ |\Psi(T) \rangle = Pe^{\frac{i}{\hbar}(-\int_0^T -E(t) dt + \oint A_i(x) dx^i)} |\Psi(0) \rangle $$
This time, the Hilbert space does not need to be a degenerate ground space of a given Hamiltonian, and the energy matrix in the first term is given by:
$$E_{mn}(t) = \langle\psi_m(t)|H(t) |\psi_n(t)\rangle $$
Here, the vectors $|\psi_n(t)\rangle$ are just the (computational) basis vectors that we choose to work with.
The above geometric phase is usually referred to as the (non-Abelian version of the) Aharonov-Anandan phase.
We observe here, there is a very big complication, the dynamical phase became a matrix and it appears inside the time ordering operator. The control of dynamical phases is very complicated and depends on our precise modeling of the system and on our precise speed in controlling the system's evolution. However, there is a trick which helps very much in the non-adiabatic case: If we can control the system along a parallel transport trajectory, in which:
$$\langle \Psi(t) |\frac{d}{dt} |\Psi(t) \rangle = 0, $$
Then the dynamical phase becomes again a global phase factor and the geometric phase will be again be given in an expression similar to the Wilczek-Zee case (please see , for example, Sjöqvist).
Topological phase
As stated earlier, the geometric phase does not depend on the speed that we evolve the system in along the trajectory, but it depends on the shape of the trajectory itself. For example, in the Abelian case when the trajectory resides on a Bloch sphere, the geometric phase (a $U(1)$ phase in this case) is just the area enclosed by the trajectory. Thus, a change in the trajectory's shape introduces a change in the geometric phase.
However, when the Wilczek-Zee, or the Aharonov-Anandan potentials are flat, i.e., when the curvature
$$F_{ij}= \frac{d A_i }{dx^j} - \frac{d A_j }{dx^i} + [A_i, A_j] = 0$$
vanishes, then the geometric phase does not depend on the exact details of the trajectory, but only on its homotopy class. Thus, if we choose two trajectories enclosing the same holes in the parameter space, we obtain exactly the same geometric phase, which quite a relief, because in this case we do not need to draw exact trajectories in order to generate quantum gates. For example, in braiding two non-Abelian anyons, the geometric phase is topological, and in this case, the anyon trajectories need not to be precise as long one rotates about the other.