Efficient way to calculate the trace distance


I am trying to calculate the trace distance of two matrices, which is defined as in trace distance. I noticed that Julia provides opnorm function but it seems that this is not what I want. I wonder if there is some efficient way to calculate the norm distance besides direct diagonilization.


I think you would use norm(svdvals(Δ), 1), where Δ is the difference between the two matrices. There is also a package SchattenNorms.jl, but from a quick benchmark, it does not seem to be any faster than the implementation using built-ins.

1 Like