cirq.linalg.map_eigenvalues

Applies a function to the eigenvalues of a matrix.

Given M = sum_k a_k |v_k><v_k|.

matrix The matrix to modify with the function.
func The function to apply to the eigenvalues of the matrix.
rtol Relative threshold used when separating eigenspaces.
atol Absolute threshold used when separating eigenspaces.

The transformed matrix.