Table of Contents
Fetching ...

Grover's algorithm is an approximation of imaginary-time evolution

Yudai Suzuki, Marek Gluza, Jeongrak Son, Bi Hong Tiang, Nelly H. Y. Ng, Zoë Holmes

TL;DR

The paper reveals that Grover's unstructured search is a product-formula approximation of imaginary-time evolution (ITE) on the unitary group, equivalently a Riemannian gradient flow on a two-dimensional geodesic in CP^{N-1}. By linking Grover iterations to ITE for projector Hamiltonians, it unifies Grover, amplitude amplification, oblivious amplitude amplification, and fixed-point quantum search within a single geometric-thermodynamic framework, aided by a QSP perspective. It derives the original pi, pi/3, and a new pi/2 variant from geodesic and step-size analyses, and shows fixed-point search can be implemented via QSP without exact knowledge of E0. The work highlights the role of geometry and thermodynamics in quantum algorithm design, providing a principled route to new primitives and subroutines by exploiting ITE trajectories and geodesics on the unitary manifold.

Abstract

We reveal the power of Grover's algorithm from thermodynamic and geometric perspectives by showing that it is a product formula approximation of imaginary-time evolution (ITE), a Riemannian gradient flow on the special unitary group. This ITE formulation provides a unified perspective on Grover's algorithm, its variants and extensions to widely used quantum subroutines including amplitude amplification and oblivious amplitude amplification. Specifically, the framework explains the choice of angles in the original Grover's algorithm and $π/3$-algorithm. It also motivates a new $π/2$-algorithm, for cases a modest failure probability is acceptable, that converges faster than the $π/3$-algorithm without overshooting. Our analysis further provides a link between ITE and quantum signal processing, which yields a new implementation of the fixed-point quantum search algorithm. Moreover, the ITE formulation can systematically reproduce widely-used subroutines in modern quantum algorithms, such as (oblivious) amplitude amplification. These results collectively establish a deeper understanding of Grover's algorithm and suggest a potential role for thermodynamics and geometry in quantum algorithm design.

Grover's algorithm is an approximation of imaginary-time evolution

TL;DR

The paper reveals that Grover's unstructured search is a product-formula approximation of imaginary-time evolution (ITE) on the unitary group, equivalently a Riemannian gradient flow on a two-dimensional geodesic in CP^{N-1}. By linking Grover iterations to ITE for projector Hamiltonians, it unifies Grover, amplitude amplification, oblivious amplitude amplification, and fixed-point quantum search within a single geometric-thermodynamic framework, aided by a QSP perspective. It derives the original pi, pi/3, and a new pi/2 variant from geodesic and step-size analyses, and shows fixed-point search can be implemented via QSP without exact knowledge of E0. The work highlights the role of geometry and thermodynamics in quantum algorithm design, providing a principled route to new primitives and subroutines by exploiting ITE trajectories and geodesics on the unitary manifold.

Abstract

We reveal the power of Grover's algorithm from thermodynamic and geometric perspectives by showing that it is a product formula approximation of imaginary-time evolution (ITE), a Riemannian gradient flow on the special unitary group. This ITE formulation provides a unified perspective on Grover's algorithm, its variants and extensions to widely used quantum subroutines including amplitude amplification and oblivious amplitude amplification. Specifically, the framework explains the choice of angles in the original Grover's algorithm and -algorithm. It also motivates a new -algorithm, for cases a modest failure probability is acceptable, that converges faster than the -algorithm without overshooting. Our analysis further provides a link between ITE and quantum signal processing, which yields a new implementation of the fixed-point quantum search algorithm. Moreover, the ITE formulation can systematically reproduce widely-used subroutines in modern quantum algorithms, such as (oblivious) amplitude amplification. These results collectively establish a deeper understanding of Grover's algorithm and suggest a potential role for thermodynamics and geometry in quantum algorithm design.

Paper Structure

This paper contains 16 sections, 9 theorems, 75 equations, 4 figures.

Key Result

Lemma 1

Given the projector Hamiltonian $\hat{H}_f$ in Eq. eq:projector and the initial state in Eq. eq:init, the ITE state converges to the solution state in Eq. eq:solution as $\tau\to\infty$, i.e., with the normalization factor $\|e^{\tau \hat{H}_{f}}\ket{\psi_0}\|_2=\sqrt{\braket{\psi_{0}|e^{2\tau \hat{H}_{f}}|\psi_{0}}}$.

Figures (4)

  • Figure 1: Geometrical picture of the unstructured search by Grover's algorithm. We demonstrate that Grover’s algorithm can be viewed as a product formula approximation of Imaginary-Time Evolution (ITE), which corresponds to the steepest descent direction, $\text{grad }f$, of a least-squares cost $f$ on the special unitary group. Moreover, we find that ITE and its first-order approximation trace the shortest path (i.e., a geodesic) between the initial state $\ket{\psi_{0}}$ and the solution state $\ket{\psi^{*}}$. Accordingly, Grover’s algorithm can be understood as a product formula approximation of the geodesic.
  • Figure 2: Summary of our work. We show that ITE provides a unified perspective on Grover's algorithm, its variants, and extensions to other quantum algorithms. To this end, we demonstrate that Grover's algorithm can be viewed as an approximation of ITE through Lemmas \ref{['lem:solvability']} and \ref{['lem:equiv_DBR_ITE']} and Corollary \ref{['lem:ITE_to_Grover']}. We then provide rationales behind the choices of angles for existing methods from the ITE perspective (Theorems \ref{['thm:justification_orig_Grover']} and \ref{['thm:qsp_formula_ITE']}, and Proposition \ref{['prop:pi/3_alg']}). Furthermore, we extend this framework to (oblivious) amplitude amplification in Theorem \ref{['prop:ite_oaa']}.
  • Figure 3: Two conditions that characterize the Riemannian gradient. The Riemannian gradient is uniquely characterized by two conditions: (a) the tangency condition and (b) the compatibility condition.
  • Figure 4: Schematic view of a geodesic on the Bloch sphere. Given two pure states $\ket{\phi}, \ket{\psi} \in \mathbb{C}^2$, the geodesic in the complex projective space equipped with the Fubini–Study metric traces a great circle on the Bloch sphere. Here, $\ket{\psi^\perp}$ denotes a state orthogonal to $\ket{\psi}$, i.e., $\braket{\psi | \psi^\perp} = 0$. More generally, in $\mathbb{C}P^{N-1}$, the geodesic always lies within a two-dimensional subspace spanned by two quantum states.

Theorems & Definitions (10)

  • Lemma 1: ITE solves the unstructured search problem
  • Lemma 2: Equivalence of ITE and commutator flow for projector Hamiltonians
  • Corollary 3: Grover's algorithm is an approximation of ITE
  • Theorem 4: Original Grover's algorithm
  • Proposition 5: ITE formulation for the $\pi/3$-algorithm and the maximal step size with monotonic convergence
  • Theorem 6: ITE formulation provides a fixed-point search via a QSP framework
  • Theorem 7: OAA is an approximation of ITE
  • Lemma C.1: ITE solves the unstructured search problem
  • proof
  • Lemma C.2: [ITE can be realized by its first-order approximation] Let $\hat{H}_{f}$ be the projector Hamiltonian in Eq. \ref{['app_eq:projector']}. Then, for any ITE evolution time $\tau$, there exists a time duration $s_{\tau}$ such that $\frac{e^{\tau \hat{H}_f}\ket{\psi_0}}{\|e^{\tau \hat{H}_f}\ket{\psi_0}\|} =e^{s_\tau[ \hat{H}_f,\psi_{0}]}\ket{\psi_0}$ for any $\tau$. Our proof fundamentally relies on Lemma B.3 in Ref. suzuki2025double, which we restate below for completeness: Let $x,y\in \mathbb R$ and $(x,y)\neq (0,0)$. Define the parameter s = -\frac{\mathrm{sgn}(y)}{\sqrt{V_{\Psi}}} \mathrm{arccos} \left(\frac{x+yE_{\Psi} }{\|(xI+y H)\ket{\Psi}\|} \right), with $E_{\Psi}=\braket{\Psi|\hat{H}|\Psi}$ and $V_{\Psi}=\braket{\Psi|(\hat{H}-E_{\Psi})^2|\Psi}=\braket{\Psi|\hat{H}^2|\Psi}-E_{\Psi}^2$, given a state vector $\ket{\Psi}$ and an arbitrary Hermitian matrix $\hat{H}$. Then, \frac{(xI+y \hat{H})\ket{\Psi} }{\|(xI+y \hat{H})\ket{\Psi}\|} = (a(s)I + b(s)H)\ket \Psi=e^{s[\ket{\Psi}\bra{\Psi}, \hat{H}]} \ket \Psi\ , where $a(s),b(s)$ are real-valued coefficients given by a(s)= \frac{ E_\Psi }{\sqrt{V_{\Psi}}}\sin\left(s \sqrt{V_{\Psi}}\right) + \cos\left(s \sqrt{V_{\Psi}}\right),b(s)= - \frac{1}{\sqrt{V_{\Psi}}} \sin\left(s \sqrt{V_{\Psi}}\right)\ . Considering a specific case of Lemma \ref{['prop any linear polynomial synthesis']}, we have $\frac{(I+c\hat{H})\ket{\Psi}}{\|(I+c\hat{H})\ket{\Psi}\|} = e^{s[ \hat{H}, |\Psi\rangle\langle\Psi|]}\ket{\Psi}\ $ when $s = \frac{1}{\sqrt{V_{\Psi}}}\mathrm{arccos} \left(\frac{1+cE_{\Psi} }{\|(I+c H)\ket{\Psi}\|} \right)$ for $c>0$. In our case, we consider the projector $\hat{H}=\hat{H}_{f}$ and the initial state $\ket{\Psi}=\ket{\psi_0}$ defined in Eq. \ref{['app_eq:init']}. Using the equality shown in Eq. \ref{['eq:poject_ite_equivalence']}, the ITE state in Eq. \ref{['app_eq:ITE_state_for_Grover']} can be simplified to $\frac{e^{\tau \hat{H}_{f}}\ket{\psi_0}}{\|e^{\tau \hat{H}_{f}}\ket{\psi_0}\|} = \frac{(I+(e^{\tau}-1)\hat{H}_{f})\ket{\psi_0}}{\|(I+(e^{\tau}-1)\hat{H}_{f})\ket{\psi_0}\|} \equiv \frac{(I+c\hat{H})\ket{\Psi}}{\|(I+c\hat{H})\ket{\Psi}\|}$ with $c=e^{\tau}-1$, suggesting that the existence of the time duration $s_\tau$ such that the ITE state for unstructured search can be realized by the exponential of commutators in Eq. \ref{['eq:equivalence_DBR_linear_poly']}, since $e^{\tau}-1>0$ for any $\tau>0$. More concretely, using the time duration $s_{\tau} = \frac{1}{\sqrt{E_{0}(1-E_{0})}}\mathrm{arccos} \left(\frac{1+(e^{\tau}-1)E_{0} }{\sqrt{1+(e^{2\tau}-1)E_{0}}} \right)$ with $E_{0}=\braket{\psi_{0}|\hat{H}|\psi_0}$ and $V_{0}=\braket{\psi_{0}|\hat{H}^2|\psi_0}-E_{0}=E_{0}(1-E_{0})$, the equality in Eq. \ref{['app_eq:ite_dbr_equiv']} holds for any $\tau$. Additionally, we investigate how the imaginary time $\tau$ relates to the corresponding time duration $s_{\tau}$, to gain insights into the trajectories of the ITE and its first-order approximation. By computing the derivative of Eq. \ref{['eq:duration_ite']}, we have $\frac{d s_{\tau}}{d \tau}= \underbrace{\frac{1}{\sqrt{E_{0}(1-E_{0})}}}_a \cdot \underbrace{\left(\frac{-1}{\sqrt{1-\left(\frac{1+(e^{\tau}-1)E_{0} }{\sqrt{1+(e^{2\tau}-1)E_{0}}} \right)^2}}\right)}_b \cdot \underbrace{\frac{d}{d \tau}\left(\frac{1+(e^{\tau}-1)E_{0} }{\sqrt{1+(e^{2\tau}-1)E_{0}}} \right)}_{c},=abc,$ where we use the equality $d(\arccos(x))/dx=-1/\sqrt{1-x^2}$. Since $E_{0}$ ranges from 0 to 1, $ab$ is always negative for $\tau>0$. As for the term $c$, we can obtain $\frac{d}{d \tau}\left(\frac{1+(e^{\tau}-1)E_{0} }{\sqrt{1+(e^{2\tau}-1)E_{0}}} \right)= \frac{e^{\tau}E_{0}\left(\sqrt{1+(e^{2\tau}-1)E_{0}}\right)-\left(1+(e^{\tau}-1)E_{0}\right)\frac{e^{2\tau}E_{0}}{\sqrt{1+(e^{2\tau}-1)E_{0}}}}{1+(e^{2\tau}-1)E_{0}}= \frac{E_{0}e^{\tau}\left(1+(e^{2\tau}-1)E_{0}\right)-E_{0}e^{2\tau}\left(1+(e^{\tau}-1)E_{0}\right)}{\left(1+(e^{2\tau}-1)E_{0}\right)^{3/2}}= \frac{-E_{0}e^{\tau}(1-E_{0})(e^{\tau}-1)}{\left(1+(e^{2\tau}-1)E_{0}\right)^{3/2}} \le 0.$ Consequently, combining the above results, the derivative of the time duration is non-negative, i.e., $ds_{\tau}/d\tau\ge0$ for all $\tau \ge 0$. Note that $s_{\tau}=0$ when $\tau=0$. Thus, $s_{\tau}$ is increasing from $0$ and reaches a plateau for a large value of $\tau$ (as $\lim_{\tau\to\infty}ds_{\tau}/d\tau=0$). This suggests that the time duration $s_{\tau}$ increases with $\tau$, but eventually saturates, reflecting a deviation between the ITE and its first-order approximation; the latter overshoots the ITE trajectory. We here exploit the ITE formulation for unstructured search to examine its geometric structure by considering the complex projective space $\mathbb{C}P^{N-1}$ as a manifold. This space is the set of equivalence classes of non-zero vectors in $\mathbb{C}^{N}$, where $\ket{\psi}\sim \lambda \ket{\psi}$ for $\lambda \in \mathbb{C}\setminus\{0\}$. It naturally arises in quantum mechanics, since pure states are defined only up to a global phase bengtsson2017geometry. Equipped with the Fubini–Study metric anandan1990geometrybengtsson2017geometrymukunda1993quantum, the distance between two normalized states $\ket{\psi}$ and $\ket{\phi}$ on the manifold is defined as $d_{\mathrm{FS}}(\ket{\psi},\ket{\phi}) = \arccos(|\braket{\psi|\phi}|).$ The geodesic, which locally minimizes this distance, lies in the two-dimensional subspace spanned by the two states. For instance, given orthonormal states $\ket{\phi_1}$ and $\ket{\phi_2}$, the geodesic is parameterized as $\ket{\phi(t)}=\cos(t)\ket{\phi_1} + \sin(t)\ket{\phi_2}$. With this geometric foundation, we show that the ITE trajectory follows the geodesic. Let $\hat{H}_{f}$ be the projector in Eq. \ref{['app_eq:projector']} and $\ket{\psi_{0}}$ be the initial state defined in Eq. \ref{['app_eq:init']}. Define the orthonormal state $\ket{\psi_{0}^{\perp}}= \frac{\hat{H}_{f}-E_{0}I}{\sqrt{E_{0}(1-E_{0})}} \ket{\psi_{0}}$ such that $\braket{\psi_{0}|\psi_{0}^{\perp}}=0$, where $E_{0}=\braket{\psi_{0}|\hat{H}_{f}|\psi_{0}}=M/N$. Then, the ITE state in Eq. \ref{['eq:dbr']} for a time duration $s$ is given by $\ket{\psi_{s}} = \cos(s\sqrt{V_{0}}) \ket{\psi_{0}} + \sin(s\sqrt{V_{0}}) \ket{\psi_{0}^{\perp}},$ where $E_0 = \braket{\psi_0|\hat{H}_f|\psi_0} = M/N$ and $V_{0}=\braket{\psi_{0}|(\hat{H}_{f}-E_{0})^2|\psi_{0}}=E_{0}(1-E_{0})$. Since Eq. \ref{['app_eq: psi s']} can realize the solution state $\ket{\psi^{*}}$ when $s^{*}=\arccos(\sqrt{E_{0}})/\sqrt{V_{0}},$ ITE follows the trajectory of the geodesic on $\mathbb{C}\mathcal{P}^{N-1}$. We first show that the ITE dynamics can be expressed as Eq. \ref{['app_eq: psi s']}. We here utilize the proof shown in Lemma 1 of Ref. suzuki2025double. The exponential of the commutator $\hat{W}_{\hat{H}}\equiv[\hat{H}, |\Psi\rangle\langle\Psi|]$ for an arbitrary Hermitian matrix $\hat{H}$ and a state vector $\ket{\Psi}$ can be expressed as $e^{s\hat{W}_{\hat{H}}} = \sum_{k=0}^\infty\frac{s^k}{k!} \hat{W}_{\hat{H}}^k.$ Since $\hat{W}_{\hat{H}} \ket{\Psi} =\hat{H}\ket{\Psi} - E_{\Psi}\ket{\Psi}$ and $\hat{W}_{\hat{H}}^2 \ket{\Psi} = \hat{W}_{\hat{H}}\hat{H}\ket{\Psi} - E_\Psi\hat{W}_{\hat{H}} \ket{\Psi}= E_{\Psi}\hat{H}\ket{\Psi} - \bra\Psi \hat{H}^2\ket\Psi\ket\Psi - E_{\Psi}\hat{H}\ket{\Psi} + E_{\Psi}^2 \ket{\Psi} = - V_{\Psi}\ket{\Psi}$ with $E_{\Psi}=\braket{\Psi|\hat{H}|\Psi}$ and $V_{\Psi}=\braket{\Psi|(\hat{H}-E_{\Psi})^2|\Psi}=\braket{\Psi|\hat{H}^2|\Psi}-E_{\Psi}^2$, any even power of the commutator $\hat{W}_{\hat{H}}$ acting on the state $\ket\Psi$ gives \hat{W}_{\hat{H}}^{2k}\ket{\Psi} = (-V_{\Psi})^k\ket{\Psi}\ . Similarly, we have $\hat{W}_{\hat{H}}^{2k+1}\ket{\Psi} = (-V_{\Psi})^k \hat{W}_{\hat{H}}\ket{\Psi}$ for any odd power. Therefore, separating the odd and even terms leads to a weighted sum of $\ket{\Psi}$ and $\hat{W}_{\hat{H}}\ket{\Psi}$ with coefficients expressed by sine and cosine functions as $e^{s\hat{W}_{\hat{H}}}\ket{\Psi} = \cos\left(s\sqrt{V_{\Psi}}\right)\ket{\Psi} + \sin\left(s\sqrt{V_{\Psi}}\right)\frac{\hat{W}_{\hat{H}}}{\sqrt{V_{\Psi}}}\ket{\Psi} \ .$ In our case, we consider $\hat{H}=\hat{H}_{f}$ and $\ket{\Psi}=\ket{\psi_{0}}$ with $E_{0}=\braket{\psi_{0}|\hat{H}_{f}|\psi_{0}}$ and $V_{0}=\braket{\psi_{0}|(\hat{H}_{f}-E_{0})^2|\psi_{0}}=E_{0}(1-E_{0})$. Thus Eq. \ref{['eq:general_dbr_expression']} is re-expressed as $e^{s[\hat{H}_{f},\psi_{0}]}\ket{\psi_0}= \cos\left(s\sqrt{V_{0}}\right)\ket{\psi_{0}} + \sin\left(s\sqrt{V_{0}}\right)\frac{[\hat{H}_{f}, |\psi_{0}\rangle\langle\psi_{0}|]}{\sqrt{V_{0}}}\ket{\psi_{0}}= \cos\left(s\sqrt{V_{0}}\right)\ket{\psi_{0}} + \sin\left(s\sqrt{V_{0}}\right)\ket{\psi_{0}^{\perp}}.$ Next, we verify that there exists a time duration $s$ such that the ITE state $\ket{\psi_{s}}$ results in the solution state of Eq. \ref{['app_eq:solution']}. By expressing Eq. \ref{['eq: app_eq: psi s derivation']} solely in terms of $\ket{\psi_{0}}$ and substituting $V_{0}=E_{0}(1-E_{0})$, we have $\ket{\psi_{s}} = \left(\left(-\frac{E_{0}}{\sqrt{E_{0}(1-E_{0})}}\sin\left(s\sqrt{V_{0}}\right)+\cos\left(s\sqrt{V_{0}}\right)\right)I+ \sin\left(s\sqrt{V_{0}}\right)\frac{\hat{H}_{f}}{\sqrt{E_{0}(1-E_{0})}} \right) \ket{\psi_{0}}.$ Note that the solution state can be written as $\ket{\psi^{*}}=\hat{H}_f\ket{\psi_{0}}/\sqrt{E_{0}}$. Thus, by solving -\frac{E_{0}}{\sqrt{E_{0}(1-E_{0})}}\sin\left(s\sqrt{V_{0}}\right)+\cos\left(s\sqrt{V_{0}}\right)= 0,\frac{\sin\left(s\sqrt{V_{0}}\right)}{\sqrt{E_{0}(1-E_{0})}}= \frac{1}{\sqrt{E_{0}}}, i.e., computing \ref{['app_eq:eq_coef_id']} $+$ \ref{['app_eq:eq_coef_H']} $\times$ $E_{0}$, we obtain $s^{*}=\arccos(\sqrt{E_{0}})/\sqrt{V_{0}}$. These results suggest that ITE dynamics in Eq. \ref{['eq:dbr']} describes a great circle connecting the initial and the solution states. Note that ITE for a general Hamiltonian follows the steepest descent direction with respect to a least-squares cost function gluza_DB_QITE_2024mcmahon2025equating, whereas geodesics are defined independently of any cost functions. Nevertheless, Theorem \ref{['app_thm:geodesic_DBR']} shows that, when the Hamiltonian is a projector, the ITE trajectory coincides with the geodesic on $\mathbb{C}P^{N-1}$. This observation sharpens the two-dimensional picture used in earlier analyses of Grover’s algorithm. Studies such as Refs. nielsen2010quantumyoder2014fixedli2024revisiting consider the span of $\{\ket{\psi^{*}}, \ket{\psi^{*}_{\perp}}\}$ with $\ket{\psi^{*}_{\perp}}=(\hat{H}_{f}-I)\ket{\psi_{0}}/\sqrt{1-E_{0}}$, and the great circle arising from that span matches ours. However, those analyses do not explain why the algorithm should remain confined to the subspace, since their argument only applies when $\alpha_{k}=\beta_{k}=\pi$; this interpretation cannot be applied to the $\pi/3$ algorithm and fixed-point quantum search. Our result shows that this plane naturally arises as the trajectory of ITE and provides a dynamical viewpoint that applies beyond the specific setting. We also note that the time duration $s^{*}$ in Eq. \ref{['eq:opt_s']} attains the quantum speed limit margolus1998maximummandelstam1991uncertainty, i.e., the minimum time required for one state to reach the target state under a given dynamics. This highlights that ITE for unstructured search saturates a fundamental limit on how fast a physical process can transform quantum states. From a broader perspective, this result might provide a direct connection between the efficiency of quantum algorithms and fundamental physical limits on information processing lloyd2000ultimate. Next, we connect the geometric ITE perspective to the query complexity of Grover's algorithm bennett1997strengthsbeals1998tightzalka1999grovernielsen2010quantum. Ref. nielsen2006quantum shows that analyzing geodesics provides a potential framework for understanding the difficulty of implementing quantum algorithms. Specifically, the geodesic length on a Riemannian manifold determines the number of elementary gates required to realize a target unitary operation. Inspired by Ref. nielsen2006quantum, we confirm that the query complexity of Grover's algorithm is determined by the geodesic length of ITE. This link also underlies the ability to achieve the optimal query complexity. Given a projector Hamiltonian $\hat{H}_f$, consider the ITE evolution generated by the operator $e^{s^* [\hat{H}_f, \psi_0]}$, where the optimal time $s^*$ of Eq. \ref{['app_eq:opt_s']} ensures that ITE reaches the solution state $\ket{\psi_{s^*}} = \ket{\psi^*}$. Then, there exists a Grover iteration $\prod_{k=1}^{\mathcal{N}}G(\alpha_k,\beta_k)$ satisfying $\left\|e^{s^{*}[\hat{H}_{f},\psi_{0}]}-(-1)^{\mathcal{N}}\prod_{k=1}^{\mathcal{N}}G(\alpha_k,\beta_k)\right\|_{\text{op}} \le \epsilon,$ for the operator norm $\|\cdot\|_{\text{op}}$ and any $\epsilon \in (0,2)$, using the number of queries $\mathcal{N} \in \mathcal{O} \left(\frac{1}{\epsilon^2|\pi/2-d_{\mathrm{FS}}|}\right)$ where $d_{\mathrm{FS}}\equiv d_{\mathrm{FS}}(\ket{\psi_{0}},\ket{\psi^{*}})$ is the geodesic length between the initial and solution states. Consider the Grover iterations $\prod_{k=1}^{\mathcal{N}}G(\alpha_k,\beta_k)$ with angles $\alpha_{2k}=\beta_{2k}=-\alpha_{2k-1}=-\beta_{2k-1}=\sqrt{2s^{*}/\mathcal{N}}$. Note that this set of angles are given by the simple approximation of the exponential of commutators using the group commutator and fragmentation; see App. \ref{['app:product_formula']} for the detail. Without loss of generality, we also assume $\mathcal{N}$ is even; for odd $\mathcal{N}$, setting the last angles as $\alpha_{\mathcal{N}}=\beta_{\mathcal{N}}=0$ reduces to the situation of the even case with one additional (i.e., constant) query. Then, the error bound of Eq. \ref{['app_eq:norm_grover']} is rewritten as $\left\|e^{s^{*}[\hat{H}_{f},\ket{\psi_{0}}\bra{\psi_{0}}]}-\left(e^{i\sqrt{2s^{*}/\mathcal{N}}\ket{\psi_{0}}\bra{\psi_{0}}}e^{i\sqrt{2s^{*}/\mathcal{N}}\hat{H}_{f}}e^{-i\sqrt{2s^{*}/\mathcal{N}}\ket{\psi_{0}}\bra{\psi_{0}}}e^{-i\sqrt{2s^{*}/\mathcal{N}}\hat{H}_{f}}\right)^{\mathcal{N}/2}\right\|_{\text{op}} \le \epsilon,$ where $\|\cdot\|_{\text{op}}$ represents the operator norm. The upper bound of Eq. \ref{['eq:norm_of_implementation']} is given by $\left\|e^{s^{*}[\hat{H}_{f},\ket{\psi_{0}}\bra{\psi_{0}}]}-\left(e^{i\sqrt{2s^{*}/\mathcal{N}}\ket{\psi_{0}}\bra{\psi_{0}}}e^{i\sqrt{2s^{*}/\mathcal{N}}\hat{H}_{f}}e^{-i\sqrt{2s^{*}/\mathcal{N}}\ket{\psi_{0}}\bra{\psi_{0}}}e^{-i\sqrt{2s^{*}/\mathcal{N}}\hat{H}_{f}}\right)^{\mathcal{N}/2}\right\|_{\text{op}}\le \frac{\mathcal{N}}{2} \left\|e^{\frac{2s^{*}}{\mathcal{N}}[\hat{H}_{f},\ket{\psi_{0}}\bra{\psi_{0}}]}-e^{i\sqrt{2s^{*}/\mathcal{N}}\ket{\psi_{0}}\bra{\psi_{0}}}e^{i\sqrt{2s^{*}/\mathcal{N}}\hat{H}_{f}}e^{-i\sqrt{2s^{*}/\mathcal{N}}\ket{\psi_{0}}\bra{\psi_{0}}}e^{-i\sqrt{2s^{*}/\mathcal{N}}\hat{H}_{f}}\right\|_{\text{op}}\le \frac{\mathcal{N}}{2} \left(\frac{2s^{*}}{\mathcal{N}}\right)^{\frac{3}{2}} ( \left\|[\hat{H}_{f}, [\hat{H}_{f}, \ket{\psi_{0}}\bra{\psi_{0}}]]\right\|_{\text{op}} + \left\|[\ket{\psi_{0}}\bra{\psi_{0}}, [\ket{\psi_{0}}\bra{\psi_{0}}, \hat{H}_{f}]] \right\|_{\text{op}}).$ In the first equality, we apply the telescoping followed by the triangle inequality $\mathcal{N}/2$ times utilizing the fact that $e^{\frac{2s^{*}}{\mathcal{N}}[\hat{H}_{f},\ket{\psi_{0}}\bra{\psi_{0}}]}$ and $e^{i\sqrt{2s^{*}/\mathcal{N}}\ket{\psi_{0}}\bra{\psi_{0}}}e^{i\sqrt{2s^{*}/\mathcal{N}}\hat{H}_{f}}e^{-i\sqrt{2s^{*}/\mathcal{N}}\ket{\psi_{0}}\bra{\psi_{0}}}e^{-i\sqrt{2s^{*}/\mathcal{N}}\hat{H}_{f}}$ are unitary. Lastly, we use the inequality proved in Ref. double_bracket2024; $\left\| e^{i\sqrt{s}\Psi}e^{i\sqrt{s}\hat{H}} e^{-i\sqrt{s}\Psi} e^{-i\sqrt{s}\hat{H}}- e^{s[\hat{H},\Psi]} \right\|_{\text{op}}\leq s^{3/2} ( \|[\hat{H}, [\hat{H}, \Psi]]\|_{\text{op}} + \|[\Psi, [\Psi, \hat{H}]] \|_{\text{op}})$ for the density matrix representation of a pure state $\Psi=\ket{\Psi}\bra{\Psi}$, an arbitrary Hermitian matrix $\hat{H}$ and $s\ge0$. Note that $[\hat{H}_{f}, [\hat{H}_{f}, \ket{\psi_{0}}\bra{\psi_{0}}]]= [\hat{H}_{f},\hat{H}_{f}\ket{\psi_{0}}\bra{\psi_{0}}-\ket{\psi_{0}}\bra{\psi_{0}}\hat{H}_{f}]= \hat{H}_{f}\ket{\psi_{0}}\bra{\psi_{0}}-2 \hat{H}_{f}\ket{\psi_{0}}\bra{\psi_{0}}\hat{H}_{f} + \ket{\psi_{0}}\bra{\psi_{0}}\hat{H}_{f},$ as $\hat{H}_{f}$ is a projector, i.e., $\hat{H}_{f}^{2}=\hat{H}_{f}$. Since the Hilbert-Schmidt norm $\|\cdot\|_{\text{HS}}$ always upper bounds the operator norm, we obtain $\left\|[\hat{H}_{f}, [\hat{H}_{f}, \ket{\psi_{0}}\bra{\psi_{0}}]]\right\|_{\text{op}}\le \left\|[\hat{H}_{f}, [\hat{H}_{f}, \ket{\psi_{0}}\bra{\psi_{0}}]]\right\|_{\text{HS}}\le \left\|\hat{H}_{f}\ket{\psi_{0}}\bra{\psi_{0}}-2 \hat{H}_{f}\ket{\psi_{0}}\bra{\psi_{0}}\hat{H}_{f} + \ket{\psi_{0}}\bra{\psi_{0}}\hat{H}_{f}\right\|_{\text{HS}} = \sqrt{2V_{0}}.$ Similarly, as $[\ket{\psi_{0}}\bra{\psi_{0}}, [\ket{\psi_{0}}\bra{\psi_{0}}, \hat{H}_{f}]]= [\ket{\psi_{0}}\bra{\psi_{0}}, \ket{\psi_{0}}\bra{\psi_{0}}\hat{H}_{f}-\hat{H}_{f}\ket{\psi_{0}}\bra{\psi_{0}}]= \hat{H}_{f}\ket{\psi_{0}}\bra{\psi_{0}}-2 E_{0}\ket{\psi_{0}}\bra{\psi_{0}} + \ket{\psi_{0}}\bra{\psi_{0}}\hat{H}_{f},$ we also have $\left\|[\ket{\psi_{0}}\bra{\psi_{0}}, [\ket{\psi_{0}}\bra{\psi_{0}}, \hat{H}_{f}]] \right\|_{\text{op}}\le \sqrt{2V_{0}}$. Consequently, Eq. \ref{['eq:query_deriv_mid_1']} can be further bounded as follows; $\frac{\mathcal{N}}{2} \left(\frac{2s^{*}}{\mathcal{N}}\right)^{\frac{3}{2}} ( \left\|\left[\hat{H}_{f}, [\hat{H}_{f}, \ket{\psi_{0}}\bra{\psi_{0}}] \right]\right\|_{\text{op}} + \left\|\left[\ket{\psi_{0}}\bra{\psi_{0}}, [\ket{\psi_{0}}\bra{\psi_{0}}, \hat{H}_{f}] \right] \right\|_{\text{op}})\le \frac{\mathcal{N}}{2} \left(\frac{2s^{*}}{\mathcal{N}}\right)^{\frac{3}{2}} \cdot 2\sqrt{2}\sqrt{V_{0}}= 4\frac{\sqrt{V_{0}}{s^{*}}^{3/2}}{\mathcal{N}^{1/2}}\le 2\pi \left(\frac{s^{*}}{\mathcal{N}}\right)^{1/2}.$ In the last inequality, we use the relation $s^{*} = \arccos(\sqrt{E_{0}})/\sqrt{V_{0}}$, which implies $\sqrt{V_{0}}s^{*} = \arccos(\sqrt{E_{0}}) \le \pi/2$ since $0\le\sqrt{E_{0}}\le 1$. Now, we relate the upper bound to the geodesic length on the complex projective manifold with respect to the Fubini-Study metric; $d_{\mathrm{FS}} = \arccos{\left(\left|\braket{\psi_{0}|\psi^{*}}\right|\right)} = \arccos{\left(\sqrt{E_{0}}\right)}.$ Indeed, using the geodesic length in Eq. \ref{['app_eq_geodesic_length']}, the optimal time duration can be expressed as $s^{*}= \arccos(\sqrt{E_{0}})/\sqrt{V_{0}}= \frac{d_{\mathrm{FS}}}{\cos{(d_{\mathrm{FS}})}\sin{(d_{\mathrm{FS}})}} = \frac{1}{\text{sinc }(2d_{\mathrm{FS}})},$ with $\text{sinc }(x)=\sin(x)/x$. Here, from the definition of $d_{FS}$ in Eq. \ref{['app_eq_geodesic_length']}, we utilize the identities $\cos(d_{FS})=\sqrt{E_{0}}$ and $\sin(d_{FS})=\sqrt{1-E_{0}}$ to rewrite $V_{0}=E_{0}(1-E_{0})$. Then we have $\frac{1}{\text{sinc }(2x)} \le \frac{2}{|\pi/2-x|}$ for $0\le x\le \pi/2$. Thus, the upper bound of Eq. \ref{['eq:query_deriv_mid_2']} is further given by $2\pi \left(\frac{s^{*}}{\mathcal{N}}\right)^{1/2} \le 2\sqrt{2}\pi \left(\frac{1}{\mathcal{N}|\pi/2-d_{\mathrm{FS}}|}\right)^{1/2}.$ As a result, to achieve the error $\epsilon$, it suffices to have $\mathcal{N} = \left\lceil \frac{(2\sqrt{2}\pi)^2}{\epsilon^2}\frac{1}{|\pi/2-d_{\mathrm{FS}}|} \right\rceil.$ Theorem \ref{['app_thm:geodesic_complexity']} shows that the number of queries is determined by the geodesic length. Here, the angles $\{(\alpha_{k},\beta_{k})\}_{k=1}^{\mathcal{N}}$ for the Grover iteration are obtained by a simple product formula approximation of ITE. Note that $d_{\mathrm{FS}}$ ranges over $[0,\pi/2]$ and increases with decreasing overlap between the states. This implies that larger distances in the complex projective manifold lead to higher query complexities. Additionally, $d_{\mathrm{FS}}$ aligns with the geodesic length on the special unitary group equipped with a bi-invariant metric up to a multiplicative factor, and hence a similar result could hold in this setting. The geodesic between two unitary operators $U,V$ on the special unitary group lewis2025geodesic is given by $e^{i\Gamma t}$ for $t\in[0,1]$ with $\Gamma = -i\log(U^{\dagger}V).$ Accordingly, the geodesic length is expressed as $\| \log(U^{\dagger}V) \|_{\text{HS}}$. In the context of unstructured search, we are interested in two unitary operators $I$ and $e^{s^{*}[\hat{H}_{f},|\psi_{0}\rangle\langle\psi_{0}|]}$ with $s^{*}$ of Eq. \ref{['app_eq:opt_s']}, since actions of these operators on $\ket{\psi_{0}}$ yield the initial and the solution states, respectively i.e., $\ket{\psi_{0}}=I\ket{\psi_{0}}$ and $\ket{\psi^{*}}=e^{s^{*}[\hat{H}_{f},|\psi_{0}\rangle\langle\psi_{0}|]}\ket{\psi_{0}}$. Thus, the geodesic length on the manifold is given by $\| \log(e^{s^{*}[\hat{H}_{f},|\psi_{0}\rangle\langle\psi_{0}|]}) \|_{\text{HS}} = s^{*}\|[\hat{H}_{f},|\psi_{0}\rangle\langle\psi_{0}|]\|_{\text{HS}} = \arccos{(\sqrt{E_{0}})}/\sqrt{V_{0}} \cdot \sqrt{2V_{0}} = \sqrt{2}\arccos{(\sqrt{E_{0}})} = \sqrt{2}d_{\mathrm{FS}}.$ We further confirm this scaling is optimal in $N$, even though the Grover iteration is a simple product formula approximation of ITE. From Eq. \ref{['eq:query_deriv_mid_2']}, we can further bound the left-hand side of Eq. \ref{['eq:norm_of_implementation']} by providing an explicit upper bound on $s$. Since we have $s^{*} =\frac{1}{\text{sinc }(2d_{FS})} \le \frac{2}{|\pi/2-d_{\mathrm{FS}}|}=\frac{2}{\arcsin(\sqrt{E_{0}})} \le \frac{2}{\sqrt{E_{0}}},$ we obtain $\frac{(2\sqrt{2}\pi)^2}{\epsilon^2}\frac{1}{\sqrt{E_{0}}} \le \mathcal{N}.$ We remind that $E_{0}=M/N$. Hence, Eq. \ref{['app_eq:optimality']} indicates that the approach also achieves the quadratic speed-up. We remark that our query complexity might not be the best in practice; for instance, Refs. long2001GroverRoy2022Grover present specific angle sets that could achieve zero error $\epsilon=0$ with improved multiplicative factor for $\sqrt{N}$. However, our main point is to show that the observation from Ref. nielsen2006quantum can also be applied to unstructured search -- i.e., the geodesic length determines the efficiency of the quantum algorithm. For clarity, we restate Theorem \ref{['thm:justification_orig_Grover']} in the main text. The original Grover's algorithm generates the state $\ket{\psi_{s_{\tau}}}$ in Eq. \ref{['eq:dbr']}; that is, there exists a parameter $s(\mathcal{N})$ such that (-1)^{\mathcal{N}}G(\pi,\pi)^{\mathcal{N}}\ket{\psi_{0}} = e^{s(\mathcal{N})[ \hat{H}_f,\psi_{0}]}\ket{\psi_0}. Moreover, the original Grover algorithm maximizes the fidelity of the first iteration. That is, within the first order approximations in Eq. \ref{['eq:group_commutator']}, corresponding to $\mathcal{N}=2$, the fidelity $F_{2}=|\braket{\psi^{*}|\prod_{k=1}^{2}G(\alpha_k,\beta_k)|\psi_{0}}|^2$ is maximized when $\alpha_k=\beta_k=\pi$, provided $E_{0}\le 1/8$, e.g., when $M\ll N$. We first show that the original Grover algorithm with $\mathcal{N}$ iteration, where the angles are fixed to $\alpha_k=\beta_{k}=\pi$, realizes the ITE dynamics for a suitable step size $s(\mathcal{N})$ up to a global phase. Namely, we prove that there exists $s(\mathcal{N})$ such that $(-1)^{\mathcal{N}}G(\pi,\pi)^{\mathcal{N}}\ket{\psi_{0}} = e^{s(\mathcal{N})[\hat{H}_f, \psi_{0}]} \ket{\psi_{0}}.$ The statement is provided by induction on $\mathcal{N}$. Base case: $\mathcal{N}=1$. For one Grover iteration, we have $G(\pi,\pi)\ket{\psi_{0}}= (I-2\psi_{0})(I-2\hat{H}_f)\ket{\psi_{0}}= (I - 2\psi_{0} -2\hat{H}_f + 4\psi_{0} \hat{H}_f )\ket{\psi_{0}}= (4E_{0}-1)\ket{\psi_{0}} - 2\hat{H}_f\ket{\psi_{0}} ,$ where we use $\psi_{0} \hat{H}_f\ket{\psi_{0}} = \braket{\psi_{0}|\hat{H}_f|\psi_{0}}\ket{\psi_{0}}=E_{0}\ket{\psi_{0}}$. On the other hand, the ITE trajectory starting from $\ket{\psi_0}$ takes the form $\ket{\psi_{s}} = \left(\left(-\frac{E_{0}}{\sqrt{V_0}}\sin\left(s\sqrt{V_{0}}\right)+\cos\left(s\sqrt{V_{0}}\right)\right)I+ \sin\left(s\sqrt{V_{0}}\right)\frac{\hat{H}_{f}}{\sqrt{V_{0}}} \right) \ket{\psi_{0}},$ where $V_{0}=E_{0}(1-E_{0})$, as shown in Eq. \ref{['app_eq:full_desc_1st_app_ITE']}. Thus, matching coefficients of $I$ and $\hat{H}_f$ gives -\frac{E_{0}}{\sqrt{V_0}}\sin\left(s(1)\sqrt{V_{0}}\right)+\cos\left(s(1)\sqrt{V_{0}}\right)= 4E_{0}-1,\frac{\sin\left(s(1)\sqrt{V_{0}}\right)}{\sqrt{V_0}}= - 2. By computing \ref{['app_eq:N=1_coef_I']} $+$ \ref{['app_eq:N=1_coef_H']} $\times$ $E_{0}$, we obtain $\cos\left(s_1\sqrt{V_{0}}\right) = 2E_{0}-1$. Since $\sin\left(s(1)\sqrt{V_{0}}\right)$ is negative from Eq. \ref{['app_eq:N=1_coef_H']}, a valid solution is $s(1)= \frac{1}{\sqrt{V_{0}}}\left(2\pi- \arccos(2E_{0}-1)\right).$ Therefore, Eq. \ref{['app_eq:grover_ite_relation']} holds for $\mathcal{N}=1$.Inductive step. Assume that for some $k\ge2$, there exists $s(k-1)$ such that $G(\pi,\pi)^{k-1}\ket{\psi_{0}} = e^{s(k-1)[\hat{H}_f, \psi_{0}]} \ket{\psi_{0}}.$ That is, Eq. \ref{['eq:full_form_ite_approx']} indicates that the state can be written as $\ket{\psi_{k-1}}:= G(\pi,\pi)^{k-1}\ket{\psi_{0}} = (aI+b\hat{H}_f)\ket{\psi_{0}}$ with real coefficients $a,b\in \mathbb{R}$. Also, the normalization condition, i.e., $|\braket{\psi_{k-1}|\psi_{k-1}}|=1$, gives $a^2+2ab E_{0} + b^2=1$. Applying one additional Grover iteration yields $G(\pi,\pi)\ket{\psi_{k}}= (I-2\psi_{0})(I-2\hat{H}_f)\ket{\psi_{k}}= (I - 2\psi_{0} -2\hat{H}_f + 4\psi_{0} \hat{H}_f ) (aI+b\hat{H}_{f})\ket{\psi_{0}}= (-a+2(2a+b)E_{0})\ket{\psi_{0}} - (2a+b)\hat{H}_f\ket{\psi_{0}}.$ Then, comparing again with Eq. \ref{['eq:full_form_ite_approx']} leads to -\frac{E_{0}}{\sqrt{V_0}}\sin\left(s(k)\sqrt{V_{0}}\right)+\cos\left(s(k)\sqrt{V_{0}}\right)= -a+2(2a+b)E_{0},\frac{\sin\left(s(k)\sqrt{V_{0}}\right)}{\sqrt{V_0}}= - (2a+b) . By computing \ref{['app_eq:N=k-1_coef_I']} $+$ \ref{['app_eq:N=k-1_coef_H']} $\times$ $E_{0}$, we obtain \cos\left(s(k)\sqrt{V_{0}}\right)= -a+(2a+b)E_{0},\sin\left(s(k)\sqrt{V_{0}}\right)= - (2a+b)\sqrt{E_{0}(1-E_{0})}. It remains to show that the right-hand sides define a valid sine-cosine pair. Indeed, $\left(-a+(2a+b)E_{0}\right)^2 + \left( - (2a+b)\sqrt{E_{0}(1-E_{0})}\right)^2= a^2 -2a(2a+b)E_{0} + (2a+b)^2E_{0}^2 + (2a+b)^2 E_{0}(1-E_{0})= a^2 + (2a+b)bE_{0}=1,$ where we used the normalization condition in the last line. Since $a,b$ are real coefficients, the right-hand sides of Eqs. \ref{['app_eq:N=k-1_coef_I_2']} and \ref{['app_eq:N=k-1_coef_H_2']} are also real. Together with Eq. \ref{['app_eq:normalization_N=k-1']}, this implies that the right-hand sides of Eqs. \ref{['app_eq:N=k-1_coef_I_2']} and \ref{['app_eq:N=k-1_coef_H_2']} lie within the range $[-1,1]$. Consequently, this indicates that there exist $s(k)$ satisfying $G(\pi,\pi)^{k}\ket{\psi_{0}} = e^{s(k)[\hat{H}_f, \psi_{0}]} \ket{\psi_{0}}.$ By induction, the statement holds for all $\mathcal{N}$. Next, we show that, under the first-order group commutator approximation of the exponential of a commutator, choosing $\alpha_k=\beta_k=\pi$ is optimal when the initial energy $E_0$ is small. We recall the group commutator approximation of the exponential of commutator: $e^{s[\hat{H}_f,\psi_{0}]}= \underbrace{e^{i\sqrt{s}\psi_{0}}e^{i\sqrt{s}\hat{H}_f}e^{-i\sqrt{s}\psi_{0}}e^{-i\sqrt{s}\hat{H}_f}}_{:=\mathcal{P}(\sqrt{s})} + \mathcal{O}(s^{3/2}).$ To determine the maximal effective step size, we consider the energy $E(\sqrt{s}):=\braket{\psi_{0}|\mathcal{P}^{\dagger}(\sqrt{s}) \hat{H}_{f} \mathcal{P}(\sqrt{s})|\psi_{0}}$, which quantifies the improvement of the state under the approximate ITE. For any projector $\Psi$, we obtain $e^{i\theta\Psi}=I+c_{\theta}\Psi$ with $c_{\theta}=e^{i\theta}-1$. Using this identity, the state after applying the operator $\mathcal{P}(\theta)$ reads $\mathcal{P}(\theta)\ket{\psi_{0}}= (I+c_{\theta}\psi_{0})(I+c_{\theta}\hat{H}_{f})(I+c^{*}_{\theta}\psi_{0})(I+c^{*}_{\theta}\hat{H}_{f}) \ket{\psi_{0}}= \Bigl( I + (c_{\theta}+c^{*}_{\theta})(\hat{H_{f}} + \psi_{0}) + c_{\theta}c^{*}_{\theta} (\hat{H}_{f}^{2} + \psi_{0}^{2}) + (c^{2}_{\theta}+{c^{*}_{\theta}}^2+c_{\theta}c^{*}_{\theta} ) \psi_{0}\hat{H}_{f} + c_{\theta} c^{*}_{\theta} \hat{H}_{f}\psi_{0}\qquad \quad + c^{2}_{\theta} c^{*}_{\theta} (\psi_{0}\hat{H}_{f}^2 + \psi_{0}\hat{H}_{f}\psi_{0}) + c_{\theta} {c^{*}_{\theta}}^{2} (\psi_{0}^2\hat{H}_{f} + \hat{H}_{f}\psi_{0}\hat{H}_{f}) + c^{2}_{\theta} {c^{*}_{\theta}}^2 \psi_{0}\hat{H}_{f}\psi_{0}\hat{H}_{f})\Bigr) \ket{\psi_{0}}= \Bigl( 1+(c_{\theta}+c^{*}_{\theta}+c_{\theta}c^{*}_{\theta})+(c_{\theta}^2+{c^{*}}^2_{\theta}+c_{\theta}c^{*}_{\theta})E_{0} + c_{\theta}c^{*}_{\theta}E_{0}(2c_{\theta} + c^{*}_{\theta} + E_{0}c_{\theta}c^{*}_{\theta}) \Bigr) \ket{\psi_{0}}\quad + \Bigl( (c_{\theta}+c^{*}_{\theta}+c_{\theta}c^{*}_{\theta}) + c_{\theta}c^{*}_{\theta}(1+E_{0}c^{*}_{\theta})\Bigr) \hat{H}_{f} \ket{\psi_{0}}= (1+(c_{\theta}^2+{c^{*}}^2_{\theta}+c_{\theta}c^{*}_{\theta})E_{0}+c_{\theta}c^{*}_{\theta}E_{0}(2c_{\theta} + c^{*}_{\theta} + E_{0}c_{\theta}c^{*}_{\theta})) \ket{\psi_{0}} + (c_{\theta}c^{*}_{\theta}(1+E_{0}c^{*}_{\theta}) ) \hat{H}_{f} \ket{\psi_{0}},$ where we introduce $\hat{H}_{f}^2=\hat{H}_{f}$, $\psi_{0}^2=\psi_{0}$ and $E_{0}=\braket{\psi_{0}|\hat{H}_{f}|\psi_{0}}$ in the last equality. Also, we utilize $c_{\theta}+c^{*}_{\theta}+c_{\theta}c^{*}_{\theta}=0$ by showing c_{\theta}c^{*}_{\theta}= (e^{i\theta}-1)(e^{-i\theta}-1) = 2-2\cos(\theta),c_{\theta}+c^{*}_{\theta}= (e^{i\theta}-1)+(e^{-i\theta}-1) =-2+ 2\cos(\theta). With the above form, the energy can be rewritten as $\braket{\psi_{0}|\mathcal{P}^{\dagger}(\theta) \hat{H}_{f} \mathcal{P}(\theta)|\psi_{0}}= \left(C^{I}_\theta\ket{\psi_{0}} + C^{\hat{H}_{f}}_\theta\hat{H}_{f}\ket{\psi_{0}}\right)^{\dagger} \hat{H}_{f} \left(C^{I}_\theta\ket{\psi_{0}} + C^{\hat{H}_{f}}_\theta\hat{H}_{f}\ket{\psi_{0}}\right)= E_{0} \left|C^{I}_\theta+C^{\hat{H}_{f}}_\theta\right|^2:= E_{0} g(\theta)^2,$ where we define $C^{I}_\theta =1+(c_{\theta}^2+{c^{*}}^2_{\theta}+c_{\theta}c^{*}_{\theta})E_{0}+c_{\theta} c^{*}_{\theta}E_{0}(2c_{\theta} + c^{*}_{\theta} + E_{0}c_{\theta}c^{*}_{\theta})$, $C^{\hat{H}_{f}}_{\theta}=c_{\theta}c^{*}_{\theta}(1+E_{0}c^{*}_{\theta})$ and $g(\theta)= |C^{I}_{\theta}+C^{\hat{H}_{f}}_{\theta}|$. Since $E_{0}\in(0,1$, the value of $\theta$ that maximizes $g(\theta)$ corresponds to the optimal step size. The function $g(\theta)$ can be simplified further: $g(\theta)=\left|C^{I}_{\theta}+C^{\hat{H}_{f}}_{\theta}\right|= | 1+(c_{\theta}^2+{c^{*}}^2_{\theta}+c_{\theta}c^{*}_{\theta})E_{0}+c_{\theta}c^{*}_{\theta}E_{0}(2c_{\theta} + c^{*}_{\theta} + E_{0}c_{\theta}c^{*}_{\theta}) + c_{\theta}c^{*}_{\theta}(1+E_{0}c^{*}_{\theta}) |= |1+ c_{\theta}c^{*}_{\theta} + c_{\theta}c^{*}_{\theta}E_{0}(2(c_{\theta} + c^{*}_{\theta}) + E_{0}c_{\theta}c^{*}_{\theta}) + (c_{\theta}^2+{c^{*}}^2_{\theta}+c_{\theta}c^{*}_{\theta})E_{0} |= |1+2(1-\cos(\theta)) + 2(1-\cos(\theta))E_{0}(-4(1-\cos(\theta)) + 2E_{0}(1-\cos(\theta))) + 2(1-2\cos(\theta))(1-\cos(\theta))E_{0} |,$ where we use $c_{\theta}^2+{c^{*}}^2_{\theta}+c_{\theta}c^{*}_{\theta}= (e^{i\theta}-1)^2 +(e^{-i\theta}-1)^2 + (e^{i\theta}-1)(e^{-i\theta}-1)= 2\cos(2\theta) + 4-\cos(\theta)= 4\cos^2(\theta) -6\cos(\theta) + 2= 2(1-2\cos(\theta))(1-\cos(\theta)).$ Now, define $X=1-\cos(\theta)\in [0,2]$. Then, we have $g(X)= |1+2X + 2E_{0}X(-4X+2E_{0}X) + 2E_{0}X(2X-1) |= |1+2(1-E_{0})X - 4E_{0}(1-E_{0})X^2 |= \left|- 4E_{0}(1-E_{0})\left(X-\frac{1}{4E_{0}} \right)^2 + \left(1 + \frac{1-E_{0}}{4E_{0}} \right) \right|.$ Since $g(X)$ is a quadratic function in $X$, the maximum of $g(X)$ occurs either at the edges $X=0,2$ or at the stationary point $X=1/4E_{0}$. Evaluating these gives $g(0)=1, \,\, g(2)=|16E_{0}^2 -20E_{0} + 5|, \,\, g(1/4E_{0})= 1 + \frac{1-E_{0}}{4E_{0}}.$ Since $X\in[0,2]$, we analyze the maximum case by case. As a result, we obtain If $1/4E_{0}\le2$, i.e., $E_{0}\ge 1/8$, the optimal choice is $X=1/4E_{0}(2-E_{0})$, corresponding to $\theta = \arccos(1-1/4E_{0}).$If $0<E_{0}\le1/8$, the stationary point exceeds the interval, and the best choice is the boundary $X=2$, i.e., $\theta=\pi.$ This concludes the proof. We here also provide a justification for why this strategy works even in the worst-case scenario, where the marked fraction is exponentially small. Note that this situation is equivalent to the case where the solution state is far from the initial state. From out result, the unstructured search problem can be recast as achieving a small $\epsilon$ for $\left\|e^{s^{*}[\hat{H}_f,\psi_{0}]}\ket{\psi_{0}} - \mathcal{P}(\sqrt{s})\ket{\psi_{0}}\right\| \le \epsilon,$ with $s^{*}=\arccos(\sqrt{E_{0}})/\sqrt{V_{0}}$. Then, we have $\left\|e^{s^{*}[\hat{H}_f,\psi_{0}]}\ket{\psi_{0}} - \mathcal{P}(s)\ket{\psi_{0}}\right\|\le \left\|e^{s^{*}[\hat{H}_f,\psi_{0}]}\ket{\psi_{0}} - e^{s[\hat{H}_f,\psi_{0}]}\ket{\psi_{0}}\right\| + \left\|e^{s^{*}[\hat{H}_f,\psi_{0}]}\ket{\psi_{0}} - \mathcal{P}(s)\ket{\psi_{0}}\right\|\le |s^{*}-s|\|[\hat{H}_f,\psi_{0}]\|_{\text{HS}} + s^{3/2} ( \|[\hat{H}, [\hat{H}, \Psi]]\|_{\text{op}} + \|[\Psi, [\Psi, \hat{H}]] \|_{\text{op}})\le \sqrt{2}\left(\left|\frac{\pi}{2}-s\sqrt{V_{0}}\right|\right) + 2\sqrt{2V_{0}} s^{3/2},$ where we use the triangle inequality in the first line and apply $|e^{iG}-e^{iG'}|_{\text{op}}\le \|G-G'\|_{\text{op}}$ and Eq. \ref{['eq:GCI_compilation']} in the second line. In the last line, we use $\|[\hat{H}_f,\psi_{0}]\|_{\text{HS}} \le \sqrt{2V_{0}}$ together with Eq. \ref{['app_eq:norm_bound_1']}, followed by $\arccos(\sqrt{E_{0}}) \le \pi/2$. This inequality shows that, when $M$ is small (i.e., $V_0 = \Theta(1/N)$), the second term is negligible. Therefore minimizing the first term, which corresponds to maximizing $s$, contributes to the error reduction. This justifies the choice of $\sqrt{s}=\pi$ in in the original Grover’s algorithm in the worst-case scenario. On the other hand, when $M$ is comparable to the number of total items $N$, the second term becomes non-negligible, and the first term can also grow large. This corresponds to the overshooting phenomenon. Consequently, the same choice of $s$ is no longer optimal in this regime. We restate the result for $\pi/3$ algorithm for clarity.