Solution (source code)

= Solution

The <Bogoliubov transformation> and its <Hermitian conjugate> read
$$
a=uc+vd^\dagger,\quad a^\dagger=uc^\dagger+vd,
\qquad
b=-vc^\dagger+ud,\quad b^\dagger=-vc+ud^\dagger.
$$
Using the <canonical anticommutation relations> of $c,d$, the nonzero same-mode <anticommutators> are
$$
\{a,a^\dagger\}=u^2\{c,c^\dagger\}+v^2\{d^\dagger,d\}=u^2+v^2,
\qquad
\{b,b^\dagger\}=u^2+v^2.
$$
The equal-type <anticommutators> satisfy $\{a,a\}=\{b,b\}=0$, since every contributing equal-type or mixed-mode <anticommutator> of $c,d$ vanishes. The potentially nontrivial cross term cancels:
$$
\{a,b\}=-uv\{c,c^\dagger\}+uv\{d^\dagger,d\}
=-uv+uv=0.
$$
Also $\{a,b^\dagger\}=0$, and the other cross relations follow by <Hermitian conjugation>. Therefore the necessary and sufficient condition is
$$
\boxed{u^2+v^2=1.}
$$
The real transformation <matrix> is then an <orthogonal matrix>, with inverse
$$
\boxed{c=ua-vb^\dagger,\qquad d=va^\dagger+ub.}
$$
This preservation of the <canonical anticommutation relations> makes it a canonical <Bogoliubov transformation>.