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 the null_MZ() and null_MZi() instead of T() matrices and corresponding nullT() and nullTi() 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 the mach_zehnder_inv unitaries needed

  • tlist: list containing [n,m,phi_int,phi_ext,n_size] of the mach_zehnder unitaries needed

  • localV: Diagonal unitary sitting sandwiched by mach_zehnder_inv’s and the mach_zehnder’s

Return type

tuple[array]