  We theoretically model a nuclear-state preparation scheme that increases the
coherence time of a two-spin qubit in a double quantum dot. The two-electron
system is tuned repeatedly across a singlet-triplet level-anticrossing with
alternating slow and rapid sweeps of an external bias voltage. Using a
Landau-Zener-Stueckelberg model, we find that in addition to a small nuclear
polarization that weakly affects the electron spin coherence, the slow sweeps
are only partially adiabatic and lead to a weak nuclear spin measurement and a
nuclear-state narrowing which prolongs the electron spin coherence. This
resolves some open problems brought up by a recent experiment [D. J. Reilly et
al., Science 321, 817 (2008).]. Based on our description of the weak
measurement, we simulate a system with up to n=200 nuclear spins per dot.
Scaling in n indicates a stronger effect for larger n.
