For two Hermitian operators
Equivalenty, if
With this in mind, let us build a function that calculates the trace distance.
Fill in the code to calculate the trace distance between two operators.
The function np.linalg.eigvals
may be helpful.
To interact with codercises, please switch to a larger screen size.
Learning Objectives: