  We study the energy level crossings of the states and thermal fidelity for a
two-qubit system in the presence of a transverse and inhomogeneous magnetic
field. It is shown clearly the effects of the anisotropic factor of the
magnetic field through the contour figures of energy level crossing in two
subspaces, the isotropy subspace and anisotropy subspace. We calculate the
quantum fidelity between the ground state and the state of the system at
temperature $T$, and the results show the strong effect of the anisotropic
factor again. In addition, by making use of the transition of Yangian
generators in the tensor product space, we study the evolution of the thermal
fidelity after the transition. The potential applications of Yangian algebra,
as a switch to turn on or off the fidelity, are proposed.
