GateSet.
tpdist
Compute the “distance” between this gateset and the space of trace-preserving (TP) maps, defined as the sqrt of the sum-of-squared deviations among the first row of all gate matrices and the first element of all state preparations.