There are several questions on the unitarity of the S matrix, but unfortunately non of them answers directly the following question.
The S matrix is unitary and that can be proven by the fact that the probability to end up in any final state is unity. In the case of non-Abelian QFT if no ghosts are present in the theory, the S matrix unitarity is violated. This was first shown by Feynman. I don't really understand how one can see this.
If we would consider the two particle states $\langle p_3,p_4|$ and $|p_1,p_2 \rangle$ the S matrix equation reads. $$ 2\text{Im}\langle p_3,p_4|R|p_1,p_2 \rangle =\sum_n \langle p_3,p_4|R|n \rangle \langle p_1,p_2|R|n \rangle ^* $$
Using $R=(2\pi)^4\delta(p_f-p_i)$ we obtain explicitly
$$ 2Im \langle p_3,p_4|R|p_1,p_2 \rangle =\frac{1}{(2\pi)^2}\sum_n\int\frac{d^3k_1}{W_1}\int\frac{d^3k_1}{W_1}\dots \int\frac{d^3k_n}{W_n} \times \\ \times \delta^4(p_1+p_2-k_1-k_2 \dots -k_n) \times \langle p_3,p_4|T|k_1,k_2, \dots ,k_n\rangle\langle p_1,p_2|T|k_1,k_2, \dots ,k_n\rangle^* $$
This is coming from the book of Ryder.
Anyway, translated to diagrams this looks in the following way
Now we come to the $g^4$ diagrams $q\overline{q}\to q\overline{q}$. Denoting the amplitude of the process $q\overline{q}\to$ with $B$ we have $$ 2ImA=\sum BB^{\dagger} $$ All diagrams contributing to the $g^4$ process $q\overline{q}\to q\overline{q}$ are
Here the amplitude $B$ is expressed by the following diagrams
I don't understand how exactly the Faddeev-Popov ghosts save unitary. If no ghosts were present in the $g^4$ process one diagram will be missing from the sum, namely the last one form above. But we shall still have $2ImA=\sum_{n-1} BB^{\dagger}$. I understand why ghosts are needed to avoid double counting of equivalent fields generated by the gauge transformation, but I really have troubles understanding how ghosts affect unitarity. I would appreciate your help. Thanks.