# sf.decompositions.williamson¶

williamson(V, tol=1e-11)[source]

Williamson decomposition of positive-definite (real) symmetric matrix.

Note that it is assumed that the symplectic form is

$\begin{split}\Omega = \begin{bmatrix}0&I\\-I&0\end{bmatrix}\end{split}$

where $$I$$ is the identity matrix and $$0$$ is the zero matrix.

Parameters
• V (array[float]) – positive definite symmetric (real) matrix

• tol (float) – the tolerance used when checking if the matrix is symmetric: $$|V-V^T| \leq$$ tol

Returns

(Db, S) where Db is a diagonal matrix

and S is a symplectic matrix such that $$V = S^T Db S$$

Return type

tuple[array,array]