  The perturbation theory is developed based on small parameters which
naturally appear in solid state quantum computation. We report the simulations
of the dynamics of quantum logic operations with a large number of qubits (up
to 1000). A nuclear spin chain is considered in which selective excitations of
spins are provided by having a uniform gradient of the external magnetic field.
Quantum logic operations are utilized by applying resonant electromagnetic
pulses. The spins interact with their nearest neighbors. We simulate the
creation of the long-distance entanglement between remote qubits in the spin
chain. Our method enables us to minimize unwanted non-resonant effects in a
controlled way. The method we use cannot simulate complicated quantum logic (a
quantum computer is required to do this), but it can be useful to test the
experimental performance of simple quantum logic operations. We show that: (a)
the probability distribution of unwanted states has a ``band'' structure, (b)
the directions of spins in typical unwanted states are highly correlated, and
(c) many of the unwanted states are high-energy states of a quantum computer (a
spin chain). Our approach can be applied to simple quantum logic gates and
fragments of quantum algorithms involving a large number of qubits.
