# RelEntCoherence

 Other toolboxes required RelEntCoherence Computes the relative entropy of coherence of a quantum state none L1NormCoherenceRobustnessCoherenceTraceDistanceCoherence Coherence and incoherence no

RelEntCoherence is a function that computes the relative entropy of coherence of a quantum state $\rho$, defined as follows:

$C_{r}(\rho) := -\mathrm{Tr}\big(\rho(\log_2(\rho) - \log_2(\rho_{\text{diag}}))\big),$

where $\rho_{\text{diag}}$ is the matrix that has the same diagonal as $\rho$ but is zero elsewhere.

## Syntax

• REC = RelEntCoherence(RHO)

## Argument descriptions

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

## Examples

### Maximally coherent states

The largest possible value of the relative entropy of coherence on $d$-dimensional states is $\log_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
>> RelEntCoherence(v)

ans =

2.3219

>> log(5)/log(2)

ans =

2.3219