  We make use of an inhomogeneous electrostatic dipole field to impart a
quantum-state-dependent deflection to a pulsed beam of OCS molecules, and show
that those molecules residing in the absolute ground state, $X ^1\Sigma^+$,
$\ket{00^00}$, J=0, can be separated out by selecting the most deflected part
of the molecular beam. Past the deflector, we irradiate the molecular beam by a
linearly polarized pulsed nonresonant laser beam that impulsively aligns the
OCS molecules. Their alignment, monitored via velocity-map imaging, is measured
as a function of time, and the time dependence of the alignment is used to
determine the quantum state composition of the beam. We find significant
enhancements of the alignment (\costhetasqtd $= 0.84$) and of state purity ($>
92$%) for a state-selected, deflected beam compared with an undeflected beam.
