sf.decompositions.triangular_compact

triangular_compact(U, rtol=1e-12, atol=1e-12)[source]

Triangular decomposition of a unitary matrix with sMZIs and phase-shifters, as given in FIG. 2 and “The Reck Scheme” section of (arXiv:2104.0756).

Parameters

U (array) – unitary matrix

Returns

A dictionary containing the following items:

  • m: the length of the matrix

  • phi_ins: parameter of the phase-shifter at the beginning of the mode

  • sigmas: parameter of the sMZI \(\frac{(\theta_1+\theta_2)}{2}\), where \(\theta_{1,2}\) are the values of the two internal phase-shifts of sMZI

  • deltas: parameter of the sMZI \(\frac{(\theta_1-\theta_2)}{2}\), where \(\theta_{1,2}\) are the values of the two internal phase-shifts of sMZI

  • zetas: parameter of the phase-shifter at the end of the mode

Return type

dict