RelEntCoherence

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.

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.