sf.decompositions.rectangular_MZ¶
-
rectangular_MZ
(V, tol=1e-11)[source]¶ Rectangular decomposition of a unitary matrix, with local phase shifts applied between two interferometers.
Is similar to
rectangular()
except that it uses Mach Zehnder matrices to null elements of V using thenull_MZ()
andnull_MZi()
instead ofT()
matrices and correspondingnullT()
andnullTi()
functions.- Parameters
V (array[complex]) – unitary matrix of size n_size
tol (float) – the tolerance used when checking if the matrix is unitary
- Returns
tuple of the form
(tilist, np.diag(localV), tlist)
where:tilist
: list containing[n,m,phi_int,phi_ext,n_size]
of themach_zehnder_inv
unitaries neededtlist
: list containing[n,m,phi_int,phi_ext,n_size]
of themach_zehnder
unitaries neededlocalV
: Diagonal unitary sitting sandwiched bymach_zehnder_inv
’s and themach_zehnder
’s
- Return type
tuple[array]