The trace distance is given by $T(\rho, \sigma) = (1/2)|\rho-\sigma|_1$ where $|\cdot|_1$ is the Schatten 1-norm (as correctly indicated in the docs).
In the implementation, however, a call is made to numpy.linalg.norm(rho - sigma, 1), which uses the matrix norm induced by the vector 1-norm (i.e., the maximum absolute column sum).
Instead the implementation should call numpy.linalg.norm(rho - sigma, 'nuc') to compute the nuclear norm (synonymous with the Schatten 1-norm).
The trace distance is given by $T(\rho, \sigma) = (1/2)|\rho-\sigma|_1$ where $|\cdot|_1$ is the Schatten 1-norm (as correctly indicated in the docs).
In the implementation, however, a call is made to
numpy.linalg.norm(rho - sigma, 1)
, which uses the matrix norm induced by the vector 1-norm (i.e., the maximum absolute column sum).Instead the implementation should call
numpy.linalg.norm(rho - sigma, 'nuc')
to compute the nuclear norm (synonymous with the Schatten 1-norm).