  Starting from a general wave function described on a set of spins/qubits, we
propose several quantum algorithms to extract the components of this state on
eigenstates of the total spin ${\bf S}^2$ and its azimuthal projection $S_z$.
The method plays the role of total spin projection and gives access to the
amplitudes of the initial state on a total spin basis. The different algorithms
have various degrees of sophistication depending on the requested tasks. They
can either solely project onto the subspace with good total spin or completely
uplift the degeneracy in this subspace. After each measurement, the state
collapses to one of the spin eigenstates that could be used for
post-processing. For this reason, we call the method Total Quantum Spin
filtering (TQSf). Possible applications ranging from many-body physics to
random number generators are discussed.
