pygsti.
tracedist
Compute the trace distance between matrices A and B, given by:
D = 0.5 * Tr( sqrt{ (A-B)^2 } )