Solution (source code)

= Solution

Apply $V^{-1}$ to the data and phase <quantum registers>, leaving the flag <quantum ancilla> untouched. This inverse needs no extra oracle assumption: the promised dyadic <eigenvalues> give $U^{2^n}=I$, hence $U^{-1}=U^{2^n-1}$. The inverse of each <controlled unitary gate> used in $V$ can therefore be built from repeated uses of the supplied controlled-$U$, and the known <Hadamard gates> and <quantum Fourier transform> gates can be reversed. <Uncomputation> is necessary to erase the <eigenvalue> label coherently. The resulting <quantum state> is
$$
\sum_j\beta_j|u_j\rangle|0^n\rangle\left(\sqrt{1-\lambda_j^2}|0\rangle+\lambda_j|1\rangle\right).
$$
A <quantum measurement in the computational basis> of the flag followed by <postselection> on one yields
$$
\boxed{|\psi\rangle=\frac{A|b\rangle}{\|A|b\rangle\|},\qquad P_{\mathrm{success}}=\sum_j|\beta_j|^2\lambda_j^2=\|A|b\rangle\|^2.}
$$
This requires $A|b\rangle\neq0$. For a normalized input and nonnegative <eigenvalues>, the <success probability of positive quantum spectral filtering> satisfies $P_{\mathrm{success}}\geq\lambda_{\min}^2$. In the general inequality, equality holds precisely when the input is supported on the minimum-<eigenvalue> <eigenspace>. Omitting <uncomputation> and discarding the phase <quantum register> would instead leave a <mixed state> with diagonal weights proportional to $|\beta_j|^2\lambda_j^2$, rather than the desired coherent <pure state>.

\b[The printed universal nonzero-success request needs a nonkernel-input hypothesis.] An $n$-<qubit> <Hermitian operator> has $2^n$ <eigenvalues>, counted with multiplicity. All are distinct, and the printed dyadic grid contains exactly $2^n$ possible values. They therefore occupy the entire grid, including zero: this is a <multiplicity-free complete dyadic spectrum>, and $\lambda_{\min}=0$. Taking $n=1$, $A=\operatorname{diag}(0,1/2)$, and $|b\rangle=|0\rangle$ satisfies every printed spectral promise but gives $A|b\rangle=0$. No normalized output vector exists, so no algorithm can deliver it with nonzero probability.

For every input outside the <kernel>, the procedure above has $P_{\mathrm{success}}>0=\lambda_{\min}^2$, giving the requested strict bound on the meaningful domain. The corrected result is therefore exact <quantum spectral filtering> conditional on $A|b\rangle\neq0$, with the boxed probability. This does not require knowing the input <probability amplitudes> or making extra copies of an unknown <quantum state>. Arbitrarily small nonzero support outside the <kernel> gives arbitrarily small success probability, and a failed flag measurement disturbs the input; fresh independent trials cannot be assumed when only one unknown physical input is supplied.