I am having trouble understanding the following step. From:
$$\operatorname{trace}\left(\sum_z |z\rangle\langle z| \rho_A |z\rangle\langle z| \times \log( \sum_z |z\rangle\langle z| \sum_x |\langle x|z \rangle |^2 \langle x | \rho_A | x \rangle)\right) \\ = \sum_z \langle z | \rho_A | z \rangle \times \log(\sum_x |\langle x|z \rangle |^2 \langle x | \rho_A | x \rangle)$$
Where $\rho_A$ is a quantum density operator, $X$ and $Z$ are quantum measurement operators, which of course would have to be hermitian. I think the line of reasoning is that those $|z\rangle$ are orthogonal to each other. So essentially it would be like
$$\operatorname{trace}(\text{diagonal matrix} \times \log(\text{another diagonal matrix}))$$ So the trace would simply be the sum of the diagonal elements. But I don't know how to argue about the orthogonality of them. What would be a good approach to go?