# sf.decompositions.triangular¶

triangular(V, tol=1e-11)[source]

Triangular decomposition of a unitary matrix due to Reck et al.

See [26] for more details and [23] for details on notation.

Parameters
• V (array[complex]) – unitary matrix of size n_size

• tol (float) – the tolerance used when checking if the matrix is unitary: $$|VV^\dagger-I| \leq$$ tol

Returns

returns a tuple of the form (tlist,np.diag(localV), None)

where:

• tlist: list containing [n,m,theta,phi,n_size] of the T unitaries needed

• localV: Diagonal unitary applied at the beginning of circuit

Return type

tuple[array]