sf.decompositions.rectangular_compact

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

Rectangular decomposition of a unitary with sMZIs and phase-shifters, as given in FIG. 3+4 and “The Clements 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

  • phi_edges: parameters of the edge phase shifters

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

Return type

dict