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 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 sMZIzetas
: parameter of the phase-shifter at the end of the mode
- Return type
dict
code/api/strawberryfields.decompositions.triangular_compact
Download Python script
Download Notebook
View on GitHub