# TraceDistanceCoherence

 Other toolboxes required TraceDistanceCoherence Computes the trace distance of coherence of a quantum state CVX L1NormCoherenceRelEntCoherenceRobustnessCoherence Coherence and incoherence no

TraceDistanceCoherence is a function that computes the trace distance of coherence of a quantum state $\rho$, defined as follows:

$C_{\text{tr}}(\rho) := \min_{D \in \mathcal{I}}\big\{ \|\rho - D\|_{\text{tr}}\big\},$

where $\mathcal{I}$ is the set of incoherent quantum states (i.e., the set of density matrices that are diagonal in the standard basis).

## Syntax

• TDC = TraceDistanceCoherence(RHO)
• [TDC,D] = TraceDistanceCoherence(RHO)

## Argument descriptions

### Input arguments

• RHO: A state (either pure or mixed) to have its trace distance of coherence computed.

### Output arguments

• TDC: The trace distance of coherence of RHO.
• D: A vector such that diag(D) is the closest incoherent state to RHO.

## Examples

### Maximally coherent states

The largest possible value of the trace distance of coherence on $d$-dimensional states is $2 - 2/d$, and is attained exactly by the "maximally coherent states": pure states whose entries all have the same absolute value.

>> d = 5;
>> v = ones(d,1)/sqrt(d); % this is a maximally coherent state
>> TraceDistanceCoherence(v)

ans =

1.6000

>> 2 - 2/d

ans =

1.6000