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 neededlocalV
: Diagonal unitary applied at the beginning of circuit
- returns a tuple of the form
- Return type
tuple[array]
code/api/strawberryfields.decompositions.triangular
Download Python script
Download Notebook
View on GitHub