Lean, informalized

Nielsen & Chuang · Chapter 9, Distance measures for quantum information · p. 400

Exercise 9.2 - The classical trace distance of two coins is the gap between their probabilities of heads

Trace distance of two distributions on two outcomes.

Hover over a blue or green term in the text, or a node in the graph, to find it in the other. Select it to read its declaration both in Lean and in words.

The Exercise

A coin lands heads with probability pp and tails with probability 1−p1-p. A second coin lands heads with probability qq and tails with probability 1−q1-q. The exercise is to show that the trace distance between the two distributions (p,1−p)(p, 1-p) and (q,1−q)(q, 1-q) is |p−q||p-q|.✦

The Classical Trace Distance

The classical trace distance D(px,qx)D(p_x, q_x) of two real functions pxp_x and qxq_x on a finite set of outcomes xx, such as two probability distributions, is half the sum over the outcomes of the absolute differences of their values: D(px,qx)=12∑x|px−qx|.D(p_x, q_x) = \frac{1}{2} \sum_x |p_x - q_x| .(1)✦

The Claim

On a set of two outcomes the sum in (1) has two terms, |p−q||p-q| and |(1−p)−(1−q)||(1-p)-(1-q)|, and they are equal.

Theorem 1. Let pp and qq be real numbers. Then the functions (p,1−p)(p, 1-p) and (q,1−q)(q, 1-q) on two outcomes satisfy D((p,1−p),(q,1−q))=|p−q|.D\bigl((p, 1-p), (q, 1-q)\bigr) = |p - q| .(2)✦

What Is Checked

The claim is stated over the classical trace distance (1), taken on a set of two outcomes and evaluated at (p,1−p)(p, 1-p) and (q,1−q)(q, 1-q). The identity (2) holds for all real pp and qq, including those outside [0,1][0,1], where the two pairs are not probability distributions.