Trace¶
The two equally useful definitions of the trace of a square matrix \(A \in \mathbb{F}^{n \times n}\) are
\[\mbox{tr}(A) = \sum_{i=0}^{n-1} A(i,i) = \sum_{i=0}^{n-1} \lambda_i,\]
where \(\lambda_i\) is the i’th eigenvalue (counting multiplicity) of \(A\).
Clearly the former equation is easier to compute, but the latter is an important characterization.
Python API¶
TODO
C API¶
-
ElError
ElTrace_c
(ElConstMatrix_c A, complex_float* trace)¶
-
ElError
ElTrace_z
(ElConstMatrix_z A, complex_double* trace)¶
-
ElError
ElTraceDist_c
(ElConstDistMatrix_c A, complex_float* trace)¶
-
ElError
ElTraceDist_z
(ElConstDistMatrix_z A, complex_double* trace)¶