sf.decompositions.williamson

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

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

See Williamson decomposition.

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.

See https://math.stackexchange.com/questions/1171842/finding-the-symplectic-matrix-in-williamsons-theorem/2682630#2682630

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]