qit.utils.spectral_decomposition¶
- qit.utils.spectral_decomposition(A: array[complex], tol: float = 1e-08) tuple[array[float], list[array[complex]]] ¶
Spectral decomposition of a Hermitian matrix.
- Parameters
A (array[complex]) – Hermitian matrix to decompose
tol (float) – numerical tolerance
- Returns
unique eigenvalues
a
and the corresponding projectorsP
forA
, such that \(A = \sum_k a_k P_k\).- Return type
tuple[‘array[float]’, list[‘array[complex]’]]