Distinguishability

Distinguishability is a function that computes the maximum probability of distinguishing two or more quantum states. That is, this function computes the maximum probability of winning the following game: You are given a complete description of a set of $k$ quantum states $\rho_1, \ldots, \rho_k$, and then are given one of those $k$ states, and asked to determine (via quantum measurement) which state was given to you.

Syntax

 * DIST = Distinguishability(X)
 * DIST = Distinguishability(X,P)
 * [DIST,MEAS] = Distinguishability(X,P)

Input arguments

 * X: The quantum states to be distinguished. X can either be a cell containing 2 or more density matrices, or X can be a matrix whose columns are pure vector states.
 * P (optional, default [1/k, 1/k, ..., 1/k]</tt>, where k</tt> is the number of quantum states): A vector whose j-th entry is the probability that the state $\rho_j$ is given to you in the game described above. All entries must be non-negative, and the entries of this vector must sum to 1.

Output arguments

 * DIST</tt>: The maximum probability of distinguishing the states specified by X</tt>.
 * MEAS</tt> (optional): A cell containing optimal measurement operators that distinguish the states specified by X</tt> with probability DIST</tt>.

Orthogonal states can be perfectly distinguished
Any number of quantum states can be perfectly distinguished (i.e., distinguished with probability 1) if they are mutually orthogonal. The following code generates a random $6\times 6$ unitary matrix (i.e., a matrix with orthogonal pure states as columns) and verifies that those pure states are perfectly distinguishable:

Two states
The maximum probability of distinguishing two quantum states $\rho$ and $\sigma$ is exactly $\frac{1}{2} + \frac{1}{4}\|\rho - \sigma\|_1$, where $\|\cdot\|_1$ is the trace norm. We can verify this in a special case as follows:

Three or more states
We can also compute the maximum probability of distinguishing three or more states, but no simple formula is known in this case.