I have two $n \times n$ Hermitian matrices $A$ and $B$. No matter the basis, the diagonal entries of $A$ and $B$ are always the same. Specifically, I mean that if I pick a basis I will observe that the diagonals of $A$ and $B$ are identical and if I perform a unitary transform $U$ the diagonals of the transformed matrices will still be the equivalent.
Is it then true that $A$ and $B$ are the same matrix, i.e. $A_{i,j} = B_{i,j}$ for any $i,j = 1,...,n$?