pygsti.tools.optools.tracedist#
- tracedist(a, b)#
Compute the trace distance between matrices.
This is given by:
D = 0.5 * Tr( sqrt{ (a-b)^dagger * (a-b) } )
- Parameters:
a (numpy array) – First matrix.
b (numpy array) – Second matrix.
- Return type:
float