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 matrixphi_ins
: parameter of the phase-shifter at the beginning of the modesigmas
: parameter of the sMZI \(\frac{(\theta_1+\theta_2)}{2}\), where \(\theta_{1,2}\) are the values of the two internal phase-shifts of sMZIdeltas
: parameter of the sMZI \(\frac{(\theta_1-\theta_2)}{2}\), where \(\theta_{1,2}\) are the values of the two internal phase-shifts of sMZIphi_edges
: parameters of the edge phase shiftersphi_outs
: parameter of the phase-shifter at the end of the mode
- Return type
dict
code/api/strawberryfields.decompositions.rectangular_compact
Download Python script
Download Notebook
View on GitHub