cirq.trace_distance_bound¶
-
cirq.trace_distance_bound(val: Any) → float[source]¶ - Returns a maximum on the trace distance between this effect’s inputand output. This method makes use of the effect’s
_trace_distance_bound_method to determine the maximum bound on the trace difference betweenbefore and after the effect.Parameters: val – The effect of which the bound should be calculated Returns: If val has a _trace_distance_bound_ method and its result is not NotImplemented, that result is returned. Otherwise, 1 is returned. Result is capped at a maximum of 1, even if the underlying function produces a result greater than 1.