  We study theoretically the effects of qubit inhomogeneity on the quantum
logic gate of qubit swap, which is an integral part of the operations of a
quantum computer. Our focus here is to construct a robust pulse sequence for
swap operation in the simultaneous presence of Zeeman inhomogeneity for quantum
dot trapped electron spins and the finite-time ramp-up of exchange coupling in
a double dot. We first present a geometric explanation of spin swap operation,
mapping the two-qubit operation onto a single-qubit rotation. We then show that
in this geometric picture a square-pulse-sequence can be easily designed to
perform swap in the presence of Zeeman inhomogeneity. Finally, we investigate
how finite ramp-up times for the exchange coupling $J$ negatively affect the
performance of the swap gate sequence, and show how to correct the problems
numerically.
