**Disclaimer.** This is a cross-post from math.SE where I asked a variant of this question two days ago which has been positively received but not has not received any answers.

Let $A$ be a complex Hermitian $n\times n$ matrix and define the matrix $B$ to be the entrywise absolute value of $A$, i.e., $B_{ab}=\lvert A_{ab}\rvert$. Furthermore suppose that $B$ has only one eigenvalue of multiplicity one with maximal modulus $\lvert \lambda\rvert=\lVert B\rVert$ (here $\lVert \cdot\rVert$ denotes the induced matrix norm from the Euclidean norm on $\mathbb C^n$). For definiteness suppose that $\lambda>0$ is an eigenvalue of multiplicity one, $Bx=\lambda x$, $\lVert B\lVert=\lambda$ and that all remaining eigenvalues of $B$ are contained in, say, $[-(1-\delta)\lVert B\rVert,(1-\delta)\lVert B\rVert]$ for some fixed positive $\delta$.

It is obvious that $\lVert A\rVert\le \lVert B\rVert$. I now first want to consider the extreme case when $\lVert A\rVert=\lVert B\lVert$. It follows that $A$ has an normalized eigenvector $y$ of eigenvalue $\pm\lambda$, $Ay=\pm\lambda y$ and we can compute \begin{align*} \lambda=\lvert\pm\lambda\rvert =\lvert\langle y, Ay\rangle\rvert= \Big\lvert\sum_{ab}\overline{y_a} A_{ab}y_b\Big\rvert\le \sum_{ab} \lvert y_a\rvert B_{ab} \lvert y_b\rvert =\langle\lvert y\rvert,B \lvert y\rvert\rangle\le \lambda =\langle x,Bx\rangle.\end{align*} In particular, it follows that $\lvert y\rvert =x$.

Now I am interested in how this can be made quantitative. For example, if $\lVert A\rVert \ge (1-\epsilon)\lVert B\rVert$, is it true that $\lVert \lvert y\rvert -x\rVert\le C \epsilon$ for some universal constant $C$ depending on the spectral gap of $B$? I think the above argument can be made quantitative to give $$\lVert \lvert y\rvert -x\rVert\le 2\sqrt{\frac{\epsilon}{\delta}},$$ where $\delta$ is the spectral gap of $B$ in the sense that $\big\lVert B\rvert_{x^\perp}\big\rVert\le (1-\delta)\lVert B\rVert$. I have the strong suspicion (supported by various numerical experiments) that the square-root bound in terms of $\epsilon$ is not optimal but that there is rather a linear bound.

I could imagine that
$$ \lVert A\rVert=\lVert B\rVert\quad\text{if and only if}\quad A_{ab}=e^{i(\phi_a-\phi_b)} B_{ab}$$
for some $\phi\in\mathbb R^n$. (The *if* part is obvious because $x e^{i\phi}$ is an eigenvector of $A$ with eigenvalue $\lambda$)