pygsti.tools.optools.jtracedist#
- jtracedist(a, b, mx_basis='pp')#
Compute the Jamiolkowski trace distance between operation matrices.
This is given by:
D = 0.5 * Tr( sqrt{ (J(a)-J(b))^2 } )
where J(.) is the Jamiolkowski isomorphism map that maps a operation matrix to it’s corresponding Choi Matrix.
- Parameters:
a (numpy array) – First matrix.
b (numpy array) – Second matrix.
mx_basis ({'std', 'gm', 'pp', 'qt'} or Basis object) – The source and destination basis, respectively. Allowed values are Matrix-unit (std), Gell-Mann (gm), Pauli-product (pp), and Qutrit (qt) (or a custom basis object).
- Return type:
float