# RobustnessCoherence

 Other toolboxes required RobustnessCoherence Computes the robustness of coherence of a quantum state CVX L1NormCoherenceRelEntCoherenceTraceDistanceCoherence Coherence and incoherence yes (convex)

RobustnessCoherence is a function that computes the robustness of coherence of a quantum state $\rho$, defined as follows [1][2]:

$C_{R}(\rho) := \min_{\tau}\left\{s \geq 0 \, \Big| \, \frac{\rho + s\tau}{1+s} \in \mathcal{I}\right\},$

where the minimization is over all density matrices $\tau$ and $\mathcal{I}$ is the set of incoherent density matrices (i.e., the set of density matrices that are diagonal in the computational basis).

## Syntax

• ROC = RobustnessCoherence(RHO)

## Argument descriptions

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

## Examples

### Pure states

If $|v\rangle$ is a pure state then its robustness of coherence and ℓ1-norm of coherence coincide:

>> v = RandomStateVector(4);
>> L1NormCoherence(v)

ans =

2.5954

>> RobustnessCoherence(v)

ans =

2.5954

### Can be used within CVX

The robustness of coherence is a convex function and can be used in the same way as any other convex function within CVX. Thus you can minimize the robustness of coherence or use the robustness of coherence in constraints of CVX optimization problems. For example, the following code minimizes the robustness of coherence over all density matrices that are within a trace distance of $1/2$ from the maximally coherent state $|v\rangle = (1,1,1,1,1)/\sqrt{5}$:

>> d = 5;
>> v = ones(d,1)/sqrt(d); % this is a maximally coherent state
>> cvx_begin sdp quiet
variable rho(5,5) hermitian;

minimize RobustnessCoherence(rho)

subject to
TraceNorm(rho - v*v') <= 0.5;
% the next two constraints force rho to be a density matrix
rho >= 0;
trace(rho) == 1;
cvx_end
cvx_optval

cvx_optval =

2.7500

>> rho

rho =

0.2000    0.1375    0.1375    0.1375    0.1375
0.1375    0.2000    0.1375    0.1375    0.1375
0.1375    0.1375    0.2000    0.1375    0.1375
0.1375    0.1375    0.1375    0.2000    0.1375
0.1375    0.1375    0.1375    0.1375    0.2000