  We propose and analyze, focusing on non-adiabatic effects, a technique of
manipulating quantum spin systems based on local 'cutting' and 'stitching' of
the Heisenberg exchange coupling between the spins. This first operation is
cutting of a bond separating a single spin from a linear chain, or of two
neighboring bonds for a ring-shaped array of spins. We show that the
disconnected spin can be in the ground state with a high-fidelity even after a
non-adiabatic process. Next, we consider inverse operation of stitching these
bonds to increase the system size. We show that the optimal control algorithm
can be found by using common numerical procedures with a simple two-parametric
control function able to produce a high-fidelity cutting and stitching. These
results can be applied for manipulating ensembles of quantum dots, considered
as prospective elements for quantum information technologies, and for design of
machines based on quantum thermodynamics.
