The Takagi decomposition is a special case of the singular value decomposition for symmetric matrices. More exactly:
Let $U$ be a symmetric matrix, then Takagi tells us there is a unitary $V$ such that $U = VDV^T$ (with $D>0$ diagonal).
My question is basically: how to construct this $V$? Preferably I am looking for the `easiest'/most straight-forward way (which probably won't be the most efficient way!)
Note: For the case I am interested in, $U$ is in fact unitary (in which case Takagi gives $U = VV^T$). I'm happy to specialize to that special case if that makes the algorithm easier.
There is this 2012 paper outlining a strategy to decompose a symmetric unitary matrix $A$ into $A = VV^T$. Interestingly, Ikramov notes that
Luckily there is such a finite algorithm in case $A$ is unitary, as he outlines in his paper.
I transcribed it to Python and I'm including the code here in case it can be of help to anyone: