UnitaryMatrix.closest_to

static UnitaryMatrix.closest_to(M, radixes=[])[source]

Calculate and return the closest unitary to a given matrix.

Calculate the unitary matrix U that is closest with respect to the operator norm distance to the general matrix M.

Parameters:
  • M (np.ndarray) – The matrix input.

  • radixes (Sequence[int]) – The radixes for the Unitary.

Returns:

The unitary matrix closest to M.

Return type:

(UnitaryMatrix)

References

D.M.Reich. “Characterisation and Identification of Unitary Dynamics Maps in Terms of Their Action on Density Matrices”