Solution (source code)

= Solution

Take the rank-one <orthogonal projections> $P_i=|\phi_i\rangle\langle\phi_i|$. Their <pinching map> gives
$$
\mathcal P(\rho)=\sum_iP_i\rho P_i
=\sum_i\langle\phi_i|\rho|\phi_i\rangle\,|\phi_i\rangle\langle\phi_i|=\rho_d.
$$
This has exactly the specified diagonal entries and no off-diagonal entries. Applying the <entropy increase under nonselective projective measurement> proved in part (c) therefore gives
$$
\boxed{S(\rho)\leq S(\rho_d).}
$$
Writing $q_i=\langle\phi_i|\rho|\phi_i\rangle$, the output <Von Neumann entropy> is the <Shannon entropy> $S(\rho_d)=-\sum_iq_i\log q_i$. Equality holds precisely when $\rho$ was already diagonal in this basis.