sf.decompositions.bloch_messiah¶

bloch_messiah(S, tol=1e-10, rounding=9)[source]

Bloch-Messiah decomposition of a symplectic matrix.

Decomposes a symplectic matrix into two symplectic unitaries and squeezing transformation. It automatically sorts the squeezers so that they respect the canonical symplectic form.

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.

As in the Takagi decomposition, the singular values of N are considered equal if they are equal after np.round(values, rounding).

If S is a passive transformation, then return the S as the first passive transformation, and set the the squeezing and second unitary matrices to identity. This choice is not unique.

Parameters
• S (array[float]) – symplectic matrix

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

• rounding (int) – the number of decimal places to use when rounding the singular values

Returns

Returns the tuple (ut1, st1, vt1). ut1 and vt1 are symplectic orthogonal,

and st1 is diagonal and of the form $$= \text{diag}(s1,\dots,s_n, 1/s_1,\dots,1/s_n)$$ such that $$S = ut1 st1 v1$$

Return type

tuple[array]