Maxwell Fitzsimmons¹, Mohamed Serry¹, Meenu Kumari²,³, and Jun Liu¹
¹University of Waterloo, Waterloo, Ontario N2L 3G1, Canada
²Digital Technologies, National Research Council Canada, Ottawa, Ontario, Canada
³Institute for Quantum Computing, University of Waterloo, Ontario N2L 3G1, Canada
Determining whether every trajectory of the linear system x˙=Ax converges to zero—or, equivalently, whether A is Hurwitz stable—is a fundamental problem in control theory. It arises, for example, in verifying the stability of feedback controllers and state observers, as well as of linearized dynamical models. In this work, we study the quantum query complexity of deciding whether a matrix A∈Cn×n is Hurwitz stable, given an exact normalized block-encoding of A. The query complexity is characterized in terms of the system dimension n and a supplied lower bound 0<ν≤ωA on the imaginary-axis distance ωA:=mint∈Rσmin(A−itI), where σmin(A) is the smallest singular value of A. We prove a query-complexity lower bound of Ω(n/ν), which holds even when A is restricted to be real and diagonal. For general matrices with nonzero ωA, we encode an approximation of the right-half-plane spectral projector sign+(A):=(I+sign(A))/2 as a block of a matrix inverse, where A is Hurwitz if and only if the projector is zero. To test this, we produce a quantum algorithm which determines if a (β,b,1/(4n))-block-encoded projector matrix (like sign+(A)) is zero or not; for constant success probability, it has complexity Θ(βn).
When the zero test is applied to specific approximations of sign+(A), this yields an upper bound of O(nν−2log(n/ν)) queries in the general case, and O(nν−1logn) when A is Hermitian or normal. The latter upper bound matches the lower bound up to a logarithmic factor. Thus the dimension dependence of quantum Hurwitz testing is nearly optimal, while the remaining factor in the non-normal case isolates an open conditioning gap.
1 Introduction
Do all trajectories of a dynamical system converge to zero from every initial condition? For the continuous-time linear system
Jun Liu: j.liu@uwaterloo.ca the answer is affirmative exactly when every eigenvalue of A lies in the open left half-plane. In this case, A is said to be Hurwitz stable, or simply Hurwitz. Verifying Hurwitz stability is a fundamental task that appears consistently in systems and control. A feedback gain matrix K stabilizes the linear control system x˙=Aˉx+Bu under the state-feedback law u=Kx precisely when the closed-loop matrix Aˉ+BK is Hurwitz. Also, for the system x˙=Aˉx with measurement y=Cx, a proposed observer gain matrix L in xˉ˙=Aˉxˉ+L(y−Cxˉ) ensures that the estimation error x−xˉ converges to zero precisely when Aˉ−LC is Hurwitz [1]. Furthermore, verifying Hurwitz stability is central to the local analysis of nonlinear systems. For a nonlinear system x˙=f(x) with an equilibrium f(x⋆)=0, the eigenvalues of the Jacobian Df(x⋆) determine the local asymptotic stability of x⋆ whenever the equilibrium is hyperbolic [1]. In this work, we focus on the decision problem of verifying asymptotic stability: whether A, or Df(x⋆) at an equilibrium x⋆, is Hurwitz.
Quantum algorithms for analyzing dynamical systems, such as those modeled by differential equations, typically encode a solution over a finite time horizon. Stability can improve the complexity of such simulations and may even permit time fast-forwarding [2]. Hurwitz testing poses a different question: it produces a qualitative decision that applies to every initial condition, without requiring the preparation or simulation of a particular trajectory. We ask:
How many queries to a block-encoding of matrix A are necessary and sufficient to decide whether A is Hurwitz?
We answer this question given a known lower bound, or a promise, ν>0 on the imaginary-axis distance
ωA:=t∈Rminσmin(A−itI).
Our results apply to arbitrary matrices A, including nonnormal and nondiagonalizable matrices.
1.1 Main results, algorithmic strategy, and scope
To determine asymptotic stability without explicitly inspecting the eigenvalues of A, our algorithms use the spectral projector onto the right-half-plane invariant subspace. Define the scalar sign by
projects onto the direct sum of the generalized eigenspaces associated with eigenvalues in the open right half-plane. Therefore,
A is Hurwitz⟺sign+(A)=0.
Input oracle and setting
Upper bound
Lower bound
Comparison
Supplied (β,b,ϵ+)-block-encoding UP of sign+(A), with b≥1 and β+ϵ+≥1
O(βn)Corollary 3.1
Ω(βn)Theorem 2
Optimal dependence on n and β.
Oracle: UP
Normal A (including Hermitian A)
O(νnlogn)
Ω(νn)
Bounds match up to a factor logn.
Oracle: UA
Theorem 5
Theorem 1
General A (possibly non-normal)
O(ν2nlogνn)
Ω(νn)
A factor 1/ν remains between the bounds, apart from logarithms.
Oracle: UA
Theorem 4
Theorem 1
Conventions. Here n≥2, A has no purely imaginary eigenvalues, and the failure probability is at most 1/3. Queries are to the indicated oracle or its adjoint; controlled calls also count as one query.
Supplied projector. In the first row, 0≤ϵ+≤1/(4n). If b=0 or β+ϵ+<1, the optimal query count is 0.
Input matrix. In the last two rows, UA is an exact (1,a,0)-block-encoding of A, ∥A∥≤1, and a known 0<ν≤ωA is supplied after the input reduction. These lower bounds already hold for real diagonal A with a=1.
Table 1: Worst-case oracle-query bounds for Hurwitz decision with success probability at least 2/3.
Thus, the decision problem reduces to testing whether a block-encoded idempotent is zero. By Proposition 1, we may assume without loss of generality that A is encoded exactly; that is, the input oracle UA is a (1,a,0)-block-encoding of A. The main results on the query complexity of deciding Hurwitz stability are summarized in Table 1, which are given in terms of the system dimension n and the lower bound ν on the imaginary-axis distance ωA. Most notably, Theorem 1 establishes the lower bound
Ω(n/ν),
which holds even when A is restricted to be real and diagonal. For constant success probability and general A, we prove the upper bound (Theorem 4)
O(nν−2log(n/ν)),
whereas, for Hermitian or normal A, we prove the upper bound (Theorem 5)
O(nν−1logn).
The latter matches the lower bound up to a logarithmic factor. Thus, the dimension dependence of quantum Hurwitz-stability testing is nearly optimal. For general nonnormal matrices, an additional factor of ν−1 remains between the upper and lower bounds; whether this dependence on 1/ν is necessary is an open question.
The upper bounds are obtained in two steps. First, assuming access to a (β,b,ϵ+)-block encoding of the projector sign+(A), we establish the sharp query-complexity bound
Θ(βn);
see Corollary 3.1. The algorithm uses amplitude estimation to decide whether this projector is the zero matrix. For non-normal matrices, the projector block encoding is constructed using a Padé approximation implemented through a structured matrix inverse; see
Appendix B. The advantage of Padé-based construction over alternative implementations of matrix functions is outside the scope of this work.
The remainder of this paper is organized as follows. Section 1.2 discusses related work. Section 2 introduces the decision problem and access model. Section 3 establishes the query-complexity lower bounds. Section 4 analyzes the determination of stability given a block encoding of the spectral projector. Section 5 provides an end-to-end query-complexity analysis for our algorithm which decides if a given matrix is Hurwitz. Section 6 discusses the implications and limitations of the results, and Section 7 concludes the paper.
1.2 Related work
For a Hurwitz matrix, ωA is its complex, unstructured stability radius [3]. It captures perturbation sensitivity that an eigenvalue gap alone does not describe for non-normal matrices [4]. The comparisons below concern the guarantees obtainable from normalized block-encoding access and a supplied margin ν≤ωA.
1.2.1 Quantum stability testing and eigenvalue estimation
Kolada and Stefański test stability through roots of generalized characteristic equations, including those arising from fractional-order systems [5]. They map the right half-plane to the unit disc and use phase samples on a triangular mesh to identify candidate edges, combining Grover search, quantum counting and local refinement. Their O(P) bound concerns the initial candidate-edge search over P mesh edges [5, Section II.B]. The required mesh size and the cost of implementing its oracle from a matrix block-encoding are not bounded in terms of n and ν; consequently, that search estimate does not give a matrix-query bound under our promise.
For block-encoded matrices, Zhang et al. estimate an eigenvalue closest to a prescribed line [6, Problem 1]. This also gives a route to stability testing: when ∥A∥≤1, the distance of an eigenvalue λ to the line Rez=2 is 2−Reλ, so a closest eigenvalue has largest real part. Lin and Shang use ground-energy estimation for Hermitian matrices constructed from A−μI and explicitly propose searching the right half-plane to test stability [7, Section 5].
Both eigensolver analyses use eigenvector or Jordan-basis conditioning to infer eigen-value locations from small singular values of shifted matrices. Their costs also depend on prepared-state overlap and, for defective matrices, Jordan-block sizes; Lin and Shang also state a spectral-gap assumption for the shifted Hermitian problems, which appears only in their eigenvector-preparation bound [7, Section 4 and Theorem 3]. Generic initialization can supply overlap at a dimension-dependent cost, but the conditioning dependence remains. Even the best-conditioned eigenvector basis can become arbitrarily ill-conditioned at fixed dimension while ωA stays bounded away from zero (Section 6.1). Thus their stated estimation bounds do not directly yield a uniform bound in n and ν alone. Our decision bound in Table 1 remains uniform on these families, distinguishing the guarantees under a common matrix-access model.
Zhang, Wu and Yuan instead extract eigenvalues from a signal with a small number of spectral components. Their stability application requires an eigenvalue with largest real part to contribute detectably to that signal [8, Appendix E.2]. Their estimates therefore rest on sparsity, visibility and separation promises about a prepared state; our decision bound requires no such state.
1.2.2 Quantum query bounds and spectral counting
Lin and Shang identify query lower bounds as future work [7, Section 7]. Zhang et al. prove BQP-completeness for a guided decision problem distinguishing nearly real from detectably complex spectra [6, Problem 2]. Zhang, Wu and Yuan discuss precision optimality through Heisenberg-limited scaling [8, Appendix D.4.1]. These results do not provide quantitative quantum query lower bounds for stability under our margin promise. Our lower bounds in Table 1 complement these algorithmic and hardness results by quantifying the joint dimension and margin dependence of the stability decision. Because every eigenvalue satisfies ∣ℜλ∣≥ωA≥ν under the promise, estimating the spectral abscissa to accuracy below ν decides stability, so the Ω(n/ν) bound applies equally to that estimation task when no guiding state is supplied.
For normal A, the eigenvalues of H=(A+A†)/2 are the real parts of those of A, reducing Hurwitz testing to an extremal Hermitian eigenvalue decision. Kerzner et al. obtain O~(n/ϵ) queries for extremal-eigenvalue estimation to additive accuracy ϵ with normalized sparse-matrix access [9]. Mande and de Wolf establish upper and lower bounds with the same dimension and inverse-precision dependence, up to logarithmic factors, for extremal eigenphase estimation with unitary access [10]. These bounds require no supplied guiding state and establish the scaling recovered by our normal-matrix bounds. Mande and de Wolf's lower bounds use fractional search. Our matrix and idempotent lower bounds instantiate the same obstruction for block-encoding oracles using the hybrid method of [11]. Jeffery and Witteveen remove an overlap-dependent logarithmic overhead for eigenphase-threshold testing [12, Corollary 4.1]; its possible use here is discussed in Remark 1.
Futamura, Ye and Sakurai use contour approximations of spectral projectors and measured norms to estimate Hermitian eigenvalue counts [13]. Zero testing asks only whether the spectral subspace is empty, but our idempotent formulation also permits oblique projectors and approximate block-encodings. Under the stated approximation promise, Theorems 2 and 3 give matching dimension and normalization dependence at fixed failure probability.
1.2.3 Matrix-function constructions
Matrix-sign methods for separating invariant subspaces are classical [14, 15]. Quantum constructions include polynomial eigenvalue transformations [16], block-encodings of rational sums of shifted inverses [17], matrix-sign embeddings [18], and Riesz or oblique spectral projectors [19, 20]. Our upper-bound proof combines a spectral-projector approximation with amplitude estimation [21], tracking normalization, approximation error and construction cost under ν≤ωA. We use the direct Padé realization in Appendix B, whose normalization and query cost are stated in terms of ν, to make this accounting explicit, including circuit costs; we claim neither novelty of the matrix-sign construction nor an improvement over the cited alternatives.
2 Problem formulation and access model
We write N for the positive integers. For vectors, ∥⋅∥ is the Euclidean norm; for matrices, it is the induced operator norm. For A∈Cn×n, write A† for its conjugate transpose, spec(A) for its spectrum, σmin(A) and σmax(A) for its extremal singular values, and ∥A∥F=tr(A†A) for its Frobenius norm. Quantum states are unit vectors in finite-dimensional complex inner-product spaces. We use bra-ket notation and tensor products for joint registers; identities on unaffected registers are implicit.
Definition 1 (Block-encoding). Let A∈Cn×n, α>0, ϵ≥0, and a∈N∪{0}. A unitary U∈Cn2a×n2a is an (α,a,ϵ)-block-encoding of A if
∥A−α(⟨0a∣⊗In)U(∣0a⟩⊗In)∥≤ϵ.
The encoding is exact when ϵ=0. If a=0 we adopt the convention that ⟨0a∣⊗In=In.
This is the block-encoding convention of [22]; in particular, ϵ measures error in A, rather than in A/α. The input model supplies the indicated block-encoding oracle, its adjoint, and their controlled versions. Each application counts as one query. Controlled access is an assumption on the supplied oracle. The dimension, encoding parameters, and other classical parameters specified in a result are known. The initial state and non-oracle operations may depend on these parameters, but not on the unknown matrix. Ancillary registers and intermediate measurements are allowed. Query complexity is the maximum number of oracle calls over admissible inputs and measurement outcomes. Costs of implementing the input oracle are separate from this count. We interpret logarithmic factors in asymptotic bounds as being at least one.
A matrix is Hurwitz if every eigenvalue has negative real part. Equivalently, every solution of x˙=Ax converges to zero. We first introduce the general Hurwitz decision problem and then motivate a modified version in which a lower bound ν on the imaginary-axis distance ωA is provided.
Problem 1 (Hurwitz decision problem). Given A∈Cn×n with no eigenvalues on the imaginary axis, determine whether A is Hurwitz.
We remark that the assumption of A having no purely imaginary eigenvalues is necessary, provided we subscribe to type-II computability theory. For under this theory when n=1 the problem (allowing purely imaginary eigenvalues) is famously undecidable, since determination that a real number equals zero or not is undecidable.
For A∈Cn×n, recall the definition of the imaginary-axis distance
ωA=t∈Rminσmin(A−itI).
The minimum exists because the function being minimized is continuous and is at least ∣t∣−∥A∥. The distance to a singular matrix gives
ωA=inf{∥E∥:spec(A+E)∩iR=∅}.
Thus ωA>0 exactly when A has no purely imaginary eigenvalues. When A is Hurwitz, ωA is its complex, unstructured stability radius [3]; for a general A, it measures distance to an imaginary-axis eigenvalue, not necessarily distance to the boundary of the Hurwitz-stable set. Moreover,
ωA≤σmin(A),ωA≤λ∈spec(A)min∣ℜλ∣.
If A is normal, meaning AA†=A†A, then rightmost quantities are equal. For non-normal matrices, the inequalities can be strict.
The matrices An=−In/n illustrate why a quantitative promise ν is needed for uniform query bounds: they are Hurwitz, but ωAn=1/n→0. We study the following problem with a supplied lower bound on ωA.
Problem 2 (Hurwitz decision problem with known gap). Given A∈Cn×n and a known ν>0 satisfying ν≤ωA, determine whether A is Hurwitz.
The following proposition allows us to consider (1,a,0)-block-encodings of the input matrix A without losing generality for problem 2.
Proposition 1 (Robustness of input block-encodings; see the proof in Appendix A). Let A∈Cn×n have no purely imaginary eigenvalues. Let U be an (α,a,ϵ)-block-encoding of A, where ϵ≥0, and define
AU=(⟨0a∣⊗In)U(∣0a⟩⊗In).
Then U is an exact (1,a,0)-block-encoding of AU, and the following hold.
ωAU≥αωA−ϵ.
If ϵ<ωA, then AU has no purely imaginary eigenvalues, and sign(A) and sign(AU) are similar. Thus, they have the same number of eigenvalues with positive and negative real part. In particular,
A is Hurwitz⟺AU is Hurwitz.
Suppose a≥1. For every ω>0 with ϵ≥ω, there exist matrices B,C∈Cn×n and a unitary V such that B is Hurwitz, C has an eigenvalue with positive real part, ωB=ωC=ω, and V is an (α,a,ϵ)-block-encoding of both B and C. Thus, when ϵ≥ω, a block-encoding and its parameters need not determine whether the encoded matrix is Hurwitz, even when the margin ω is known.
Item 3 of this proposition means that there is a maximum allowable error associated with the block encoding for a quantum algorithm, which takes a block-encoding and its parameters as input, to solve problem 2. And when that allowable error is achieved, there is no effective difference associated with using A or the approximation AU—for deciding Hurwitzness. Henceforth, we will assume that UA is a (1,a,0)-block-encoding of A.
3 Lower complexity bounds
The following lemma, whose proof is given in Appendix C, provides a basis for the complexity lower bounds in this paper.
Lemma 1 (Lower bound for search with weak unitary oracles). Let n,d∈N, let V0,V1∈Cd×d be unitary, and set
η=∥V1−V0∥>0.
Write 0 for the all-zero bit string in {0,1}n and ej for the bit string whose only nonzero entry is its j-th entry. For x∈{0,e1,…,en}, define
Ux=k=1∑nVxk⊗∣k⟩⟨k∣,
where xk denotes the k-th bit of the string x, so that Vxk∈{V0,V1}, and ∣1⟩,…,∣n⟩ are the standard basis vectors of the index register Cn.
For every fixed δ∈(0,1/2), any quantum algorithm that, given query access to Ux and Ux†, including controlled applications, distinguishes
x=0fromx∈{e1,…,en}
with probability at least 1−δ on every allowed input requires
Ω(ηn)
queries in the worst case. The implied constant depends only on δ. The algorithm may depend on the parameters defining the oracle family and on any other classical data that are the same for every x in that family.
We argue now that the n complexity is necessary for problem 2.
Theorem 1. Let
Dn,ν={A=diag(a1,…,an)∈Rn×n:ν≤∣aj∣≤1},0<ν≤1.
Any quantum algorithm which, given query access to an exact (1,a,0)-block-encoding of an unknown A∈Dn,ν, decides with constant success probability above 0.5 whether A is Hurwitz has worst-case query complexity
Ω(νn).
This lower bound already holds for a=1.
Proof. For x∈{0,e1,…,en}, define
Ax=νdiag(2x1−1,…,2xn−1).
Then ∥Ax∥=ωAx=ν, while A0 is Hurwitz and each Aej is not Hurwitz. For t∈[−1,1], let
R(t)=(t1−t21−t2−t).
Take V0=R(−ν) and V1=R(ν) in Lemma 1, where η=∥V1−V0∥=2ν. The corresponding oracle is Ux=∑k=1nVxk⊗∣k⟩⟨k∣, which is an exact (1,1,0)-block-encoding of Ax. By Lemma 1, for every fixed δ∈(0,1/2), the worst-case query complexity is Ω(νn).
4 Determining stability using the block-encoding of sign+(A)
The right-half-plane spectral projector sign+(A) is idempotent. A matrix P is idempotent if P2=P. It follows that P=0 or ∥P∥≥1, when P is idempotent. As mentioned before, A is Hurwitz iff sign+(A)=0. So determining if a given idempotent matrix is zero or not is crucial. In this section, we analyze the query complexity of determining whether an idempotent matrix is zero, given a block encoding of that matrix. We then extend this result to decide Hurwitz stability from a block encoding of the matrix sign function.
The supplied block-encoding parameters can themselves determine whether an idempotent is zero. The following result characterizes these edge cases and gives a lower bound outside of them.
Theorem 2 (Zero-testing block-encoded idempotents). Let n∈N, b∈N∪{0}, β>0, ϵ∈[0,0.5) and δ∈(0,1/2). Suppose that an unknown idempotent P∈Cn×n is supplied through a (β,b,ϵ)-block-encoding UP. An idempotent in Cn×n is called admissible if it admits a block-encoding with these same parameters. The following hold.
Both P=0 and P=0 occur among admissible idempotents if and only if
b≥1andβ+ϵ≥1.
Let T be the optimal worst-case number of queries to UP and UP† required to decide whether P=0, with success probability at least 1−δ for every admissible P and every such encoding UP. The parameters n,β,b,ϵ,δ are given to the algorithm, and controlled queries are allowed. For fixed δ,
T={Ω(βn),0,b≥1andβ+ϵ≥1,otherwise.
The implied constant depends only on δ. The lower bound already holds for b=1 and for diagonal orthogonal projectors of rank zero or one.
In the zero-query cases, every admissible P equals 0 if β+ϵ<1, and equals In if b=0 and β+ϵ≥1.
Proof. Write
B=(⟨0b∣⊗In)UP(∣0b⟩⊗In).
Since B is a compression of a unitary, ∥B∥≤1. If P=0, idempotence implies that P has an eigenvalue equal to 1, so
1≤∥P∥≤∥P−βB∥+β∥B∥≤ϵ+β.
Hence β+ϵ<1 forces P=0.
Suppose next that b=0 and β+ϵ≥1. Then B=UP and since ϵ<0.5, β≥1−ϵ>ϵ. If a unit vector ∣v⟩ satisfies P∣v⟩=0, then
β=∥βUP∣v⟩∥=∥(P−βUP)∣v⟩∥≤ϵ,
a contradiction. Thus P is invertible, and P2=P implies P=In. This completes the ⟹ case for item 1, and proves the zero-query assertion in item 2.
Now fix b,β with b≥1 and β+ϵ≥1. Set
s=min{1,β−1}.
Then 0<s≤1. The quantity ∣1−βs∣ is 0 for β≥1, and equals 1−β≤ϵ otherwise. Hence, ∣1−βs∣≤ϵ.
For 0≤t≤1, define the unitary
R(t)=(t1−t21−t2−t),
and set
Vℓ=I2b−1⊗R(sℓ),ℓ∈{0,1}.
As in Lemma 1, let 0 be the all-zero bit string and ej the bit string whose only nonzero entry is its j-th entry. For x∈{0,e1,…,en}, define
Px=k=1∑nxk∣k⟩⟨k∣,Ux=k=1∑nVxk⊗∣k⟩⟨k∣.
Each Px is a diagonal orthogonal projector of rank zero or one, so ∥Px∥≤1. Each Ux is unitary, and
(⟨0b∣⊗In)Ux(∣0b⟩⊗In)=sPx.
Consequently,
∥Px−βsPx∥=∣1−βs∣∥Px∥≤ϵ.
Thus every Ux is a (β,b,ϵ)-block-encoding of Px, with the same supplied parameters. Since P0=0 and Pej=0, this also proves the converse in item 1.
Finally, tensoring with an identity does not change the operator norm, so
Deciding whether Px=0 distinguishes x=0 from x∈{e1,…,en}. All known parameters are fixed across this family, so Lemma 1 applies. Since 0<η≤2s, it gives
T=Ω(sn)=Ω(max{1,β}n)=Ω(βn).
This proves item 2.
In general, the scaling parameter β, in the above theorem, can be arbitrarily large even for n=2. For example, consider a matrix P similar to ∣0⟩⟨0∣, but with nearly colinear eigenvectors: v1=∣0⟩ and v2=(1−γ)∣0⟩+γ∣1⟩, for γ>0. Then, for Pv1=v1 and Pv2=0,
∥P∥=γγ2+(1−γ)2=Θ(γ1)
as γ→0+.
In the next result, we provide an algorithm which solves the zero testing idempotent problem of Theorem 2, when a sufficiently accurate block encoding of the idempotent is given. Under this assumption, the algorithm achieves the lower bound from Theorem 2.
Theorem 3. Let δ∈(0,0.5). Suppose that UP is a (β,b,ϵ+)-block-encoding of an idempotent matrix P∈Cn×n, where ϵ+≤4n1. There is a quantum algorithm that determines whether P is zero with success probability at least 1−δ on every admissible input. Let Q denote its worst-case number of queries to UP and UP†. Then
Q=O(βnlog(1/δ)).
Moreover, for fixed δ, this algorithm has optimal worst-case query complexity up to constant factors, with
Q={Θ(βn)0β+ϵ+≥1andb≥1otherwise.
Proof. Let P~=(⟨0b∣⊗I⟩UP(∣0b⟩⊗I) and we know that ∥P−βP~∥≤ϵ+.
The quantum algorithm proceeds like so:
If β+ϵ+<1 output P is zero and halt. If b=0 and β+ϵ+≥1 output P is not zero and halt.
Prepare
0b⟩∣ϕ⟩,∣ϕ⟩=n1j=1∑n∣j⟩∣j⟩.
Apply UP to the block-encoding ancillas and the first system register, obtaining the normalized state
∣Ψ⟩=(UP⊗In)0b⟩∣ϕ⟩.
Use amplitude estimation with the good subspace defined by the block-encoding ancillas being in ∣0b⟩, and denote the resulting estimate by p~.
Carry out steps 2–4 a total of r independent times, with r odd and chosen below. Denote the median of the estimates by p^m.
Let T=16β2n9−42. If p^m>T then, output P is not zero, otherwise output zero.
Note P2=P. By the final assertion of item 2 of Theorem 2, block-encoding parameters of: (1) β+ϵ+<1 means P=0 or (2) b=0 and β+ϵ+≥1 means P=In. These cases are caught by the first step of the algorithm and require no queries to UP and UP†, so Q=0 in these cases. Therefore, we assume β+ϵ+≥1 and b≥1 for the remainder of the proof.
One sees T<16β2n4. We may assume that T<16β2n4<1, as otherwise β≤21 which implies ∥P∥≤β+ϵ+≤43<1. This contradicts β+ϵ+≥1. Thus, we assume that T<1 below.
Projecting ∣Ψ⟩ into the good subspace gives
(∣0b⟩⟨0b∣⊗In2)∣Ψ⟩=∣0b⟩⊗(P~⊗In)∣ϕ⟩.
The probability of measuring the good subspace, that is ancilla qubits corresponding to ∣0b⟩, is
Now we bound the quantity ∥P∥F2. Since P is idempotent it is diagonalizable with eigenvalues 0 or 1. Thus, the trace of P corresponds to its rank. Using the trace inner product for matrices and the fact P2=P we see that
By using amplitude estimation [21, Theorem 12], we can get an estimate of p, say p~, which satisfies
∣p~−p∣≤2πMp(1−p)+M2π2(3)
with probability greater than π28 using O(M) applications of UP and UP†. For the following deductions, suppose that Equation (3) holds. Let μ=2(2−1)a0 and pick M to be the least integer with M>πμ−1 (so M=O(βn)) then note p(1−p)≤p. We can see that
If P is not zero, p≥a1≥a0>μ and using the lower bound in Equation (4) then,
T=(9−42)a02=(a1−μ)2−2μ2≤(p−μ)2−2μ2<p~.
Taking the contrapositive, we get p~≤T implies P is zero.
If P is zero, p≤a0 and using the upper bound yields,
p~<(p+μ)2≤(a0+μ)2=(9−42)a02=T
It follows that p~≥T implies P is not zero.
Specifically with probability at least π28, if p~≤T then P must be zero and if p~>T then P is not zero.
Run this estimation procedure independently an odd number r of times and take the median of the resulting estimates. Return not zero if the median exceeds T, and zero otherwise. The decision is correct whenever more than half of the estimates satisfy Equation (3). Hoeffding's inequality [23] therefore gives
Pr(incorrectdecision)≤exp[−2r(π28−21)2].
Choose the smallest odd r for which this bound is at most δ. Then r=O(log(1/δ)), and the total query count is
O(Mr)=O(βnlog(1/δ)).
For the lower bound, we apply item 2 of Theorem 2.
We can now apply the preceding result to decide Hurwitz stability, given a block encoding of the spectral projector.
Corollary 3.1. Suppose that no eigenvalue of A∈Cn×n is purely imaginary. Let δ∈(0,0.5). Suppose that UP is a (β,b,ϵ+)-block-encoding of sign+(A), where ϵ+≤4n1.
There is a quantum algorithm that determines whether A is Hurwitz with success probability at least 1−δ. Let Q denote its worst-case number of queries to UP and UP†. Then
Q=O(βnlog(1/δ)).
Moreover, for fixed δ, this algorithm has optimal worst-case query complexity up to constant factors, with
Q={Θ(βn)0β+ϵ+≥1andb≥1,otherwise.
Proof. Apply the algorithm in Theorem 3 to P=sign+(A), and output Hurwitz if and only if it determines that P = 0.
We discuss how β might depend on ωA (or not) in Section 6.3.
5 Determining stability using the block-encoding of A
Corollary 3.1 assumes access to the block-encoding of sign+(A), rather than of A. Our algorithmic pipeline is: A→sign+(A)→Hurwitz Decision. Corollary 3.1 provides optimal complexity for the 2nd step, but the first step still needs to be done. In Appendix B we introduce a method of producing an accurate block-encoding of sign+(A), which culminates with Theorem 8. The results of this section are simple and direct applications of Corollary 3.1 and Theorem 8.
Theorem 4. Suppose that A∈Cn×n has ∥A∥≤1 and no eigenvalue of A is purely imaginary. Assume that ν∈(0,ωA] is known and let δ∈(0,0.5). Let UA be a (1,a,0)-block-encoding of A.
There is a quantum algorithm that decides whether A is Hurwitz, with success probability at least 1−δ, using
O(ν2nlog(νn)log(δ1))
calls to UA and UA†.
Proof. Set ϵ+=1/(4n). If Theorem 8 is used to produce the block encoding of P=sign+(A) with error ϵ+ and ν≤ωA is known then, β=O(ν−1) and sign+(A) uses O(ν−1log(ν−1ϵ+−1))=O(ν−1log(n/ν)) calls to the block encoding of A. Applying the amplitude estimation procedure from Corollary 3.1 would use O(βnlog(δ−1)) calls to UP and UP†. Therefore, the total complexity is
Theorem 5 (When A is Hermitian or normal). Suppose that A∈Cn×n has ∥A∥≤1 and no eigenvalue of A is purely imaginary. Let δ∈(0,0.5). Assume that ν∈(0,ωA] is known and that A is Hermitian or normal. Let UA be a (1,a,0)-block-encoding of A.
For every ϵ+∈(0,1], there is a (1,a+3,ϵ+)-block-encoding of sign+(A). And when ϵ+=4n1 the algorithm from Corollary 3.1 uses
O(νnlog(n)log(δ1))
calls to UA and UA† and succeeds with probability at least 1−δ.
Proof. As a technical detail, just because we know that A is normal/Hermitian doesn't mean that AU=(⟨0a∣⊗I)U(∣0a⟩⊗I) is normal/Hermitian. So we first argue that we can WLOG assume that AU is a Hermitian matrix.
Let U be an (α,a,ϵ)-block-encoding of a normal matrix A∈Cn×n, with a known ϵ<ν≤ωA. Let H(A)=0.5(A+A†) be the Hermitian part of A. Using LCU to approximately construct H(A) gives us a (1,a+1,0)-block-encoding of H(AU), using one controlled query each to U and U†. Since A is normal,
Since H(AU) is Hermitian, we can assume below that we are given access to a (1,a+1,0)-block-encoding of a Hermitian matrix. The lower bound becomes ν~. When UA is a (1,a,0)-block-encoding of A (as the statement of this theorem assumes) then, ν=ν~. Therefore, even when a normal/Hermitian A is inexactly encoded (but still accurate enough, again see Proposition 1) we can still assume that A is Hermitian and exactly encoded.
We use [22, Lemma 25 & Theorem 26] to form a (1,(a+1)+1,ϵ+)-block-encoding of sign(A). We can do this by picking their δ=ν. Applying the two-term LCU construction [22, Lemma 52] to I and this block-encoding of sign(A), with coefficients 1/2,1/2, gives a (1,a+3,ϵ+/2)-block-encoding of sign+(A). It uses one controlled application of the sign block-encoding and two Hadamard gates. By Corollary 3.1 we get
O(nlog(δ1)×ν1log(n))=O(νnlog(n)log(δ1))
calls to UA and UA†.
The improvement in complexity for Theorem 5 (normal/Hermitian A) over Theorem 4 (non-normal A) is partly due to mathematics, not implementation. Suppose that UP is a (β,b,ϵ+)-block-encoding of sign+(A). In the general case β=1 is not always possible since sign+(A) might be an oblique projector; so, for an exact encoding, 1<∥sign+(A)∥≤β is possible. In contrast, when B is Hermitian and sign+(B)=0, one has ∥sign+(B)∥=1, because the eigenvectors are orthogonal. Worst case scaling for ∥sign+(A)∥ in terms of ωA is given in Section 6.3.
Remark 1 (Possible improvement for normal matrices). The factor logn in Theorem 5 may be removable using the eigenphase-threshold algorithm of [12, Corollary 4.1]. For normal A, the Hermitian matrix H=(A+A†)/2 has eigenvalues equal to the real parts of those of A, so A is Hurwitz if and only if λmax(H)<0. At constant failure probability, their algorithm uses O((γΔ)−1) unitary queries, where Δ is the promised phase separation and γ is the amplitude overlap with the relevant spectral subspace. A maximally entangled input supplies amplitude at least n−1/2 in every nonzero eigenspace of H⊗In. A suitable reduction preserving this overlap up to a constant factor, with phase separation Θ(ν) and O(1) queries to UA per unitary query, would therefore yield an O(n/ν) decision bound, matching Theorem 1. Constructing this reduction in our access model, including satisfying their eigenphase-window promise, requires a separate algorithmic development, which we do not pursue here.
6 Parameter dependence and extensions
6.1 ωA and eigenvector conditioning
For a diagonalizable matrix A=VDV−1, the columns of V form an eigenvector basis and the diagonal entries of D are the corresponding eigenvalues. The condition number κ2(V)=∥V∥∥V−1∥ measures the sensitivity of this change of basis to perturbations and enters the eigenvalue-estimation query bounds of [6, 7].
To see why ωA does not control this condition number, consider, for 0<ε≤1,
Aε=41(−201−2−ε),∥Aε∥≤∥Aε∥F≤414<1.
Its Hermitian part satisfies (Aε+Aε†)/2⪯−3I/8, which gives σmin(Aε−itI)≥3/8 for every t∈R and hence ωAε≥3/8. The eigenvalues −1/2 and −(2+ε)/4 have respective eigendirections (1,0)⊤ and (1,−ε)⊤, which approach one another as ε↓0. Let Vε have any nonzero eigenvectors in these directions as its columns, in that order. The projector onto the first eigenspace along the second is
Vε(1000)Vε−1=(10ε−10).
Its norm is at most κ2(Vε), so
κ2(Vε)≥1+ε−2⟶∞(ε↓0).
Thus every eigenvector basis becomes ill-conditioned, regardless of column scaling, while n=2 and the margin lower bound ν=3/8 remain fixed.
6.2 Dependence of ωA on dimension n
From the above results we can see that quantum algorithms still see dependence on ωA−1. This motivates some discussion on ωA−1. A natural question to ask is: does ωA−1 scale with the dimension of the matrix A? This question is too imprecise to answer, but by examining specific classes of matrices with a probability measure we can shed light on the topic.
Proposition 2. (See the proof in Appendix D) Let n∈N have n≥2. Consider real diagonal matrices A=diag(aj)j=1n where each aj is chosen independently and uniformly at random from the interval [−1,1]. Then,
Thus, at least 68% of matrices in this random family satisfy 1/(5n)≤ωA≤2/n. Moreover, E[1/ωA]=∞, so an average-case analysis based directly on this reciprocal is not informative. Taking ν=Θ(n−1) in the oracle family of, e.g., Theorem 1 gives a worst-case lower bound of Ω(n3/2) queries. This is notably worse than classically determining if the matrix is Hurwitz for the same class. Which in the worst case is Θ(n) sign bit checks. This apparent contradiction is an artifact of the access model in Theorem 1; oracle access to the block-encoding of UA and UA† is not classically analogous to having access to the sign bits.
6.3 Dependence of the normalization factor β
In Theorem 3 and Corollary 3.1, the query complexities depend on the normalization or scaling parameter β. The scaling parameter β (which is often proportional to ∥sign+(A)∥) may depend poorly on ωA, even for n=2 and ∥A∥=1. For example, let 0<γ≤1 and consider
A=(0γ10).
Then ∥A∥=1, and A has eigenvalues ±γ, so
sign+(A)=21(I+γA)=21(1γ1/2γ−1/21).
One can show that ωA=γ. One can also see that
∥sign+(A)∥=2γ1+γ=2ωA1+ωA=Θ(ωA−1/2)as γ→0+.
On the other hand, β (and ∥sign+(A)∥) can also be independent of ωA. When −A is Hurwitz, sign+(A)=I. So a (1,0,0)-block-encoding of sign+(A) is available when A=ωI for all ω>0.
In the next result, whose proof is given in Appendix E, we provide worst-case bounds on the norm of the projector, in terms of a fixed ωA. We then explore the ramifications of such bounds on the previously derived complexity bounds.
Theorem 6. Fix n≥2. For every matrix A∈Cn×n with ∥A∥≤1 and no purely imaginary eigenvalues we have
∥sign+(A)∥≤O(ωA−(n−1)/n).
Moreover, there are such matrices with ∥sign+(A)∥=Θ(ωA−(n−1)/n).
Now, let us fix n≥2. Let A∈Cn×n have ∥A∥≤1, no purely imaginary eigenvalues and let ν∈(0,ωA]. Let δ∈(0,1/2). Let UP be a (β,b,0)-block encoding of sign+(A), with β=max{1,∥sign+(A)∥}. It follows that β=∥sign+(A)∥ whenever sign+(A)=0.
A consequence of Theorem 6 is that the query bound supplied by Corollary 3.1 is at worst
O(nν−(n−1)/nlog(δ1))
queries to UP (the block encoding of sign+(A)) and UP†. Note that, herein, we do not account for the query complexity associated with computing the projector sign+(A). That being said, Theorem 6 does suggest that (O(ν−(n−1)/n),b,ϵ+)-block-encodings of sign+(A) are possible as opposed to the (O(ν−1),b,ϵ+)-block-encoding supplied by Theorem 8.
7 Conclusions and future work
We have established upper and lower query bounds for deciding Hurwitz stability from a block-encoding and a known lower bound 0<ν≤ωA. For constant success probability, the worst-case lower bound is Ω(n/ν), already for real diagonal matrices. Our algorithm matches this bound up to logarithmic factors for normal matrices and uses O~(n/ν2) queries for general matrices. For a supplied encoding of sign+(A) with normalization β, zero testing has optimal query complexity Θ(βn) under the stated accuracy condition, whenever both decision outcomes are admissible.
The main open question is whether the additional factor 1/ν in the general-matrix upper bound is necessary. Our sharp fixed-dimensional bounds on ∥sign+(A)∥ quantify the normalization required by exact projector encodings. Whether these bounds can be exploited in a more efficient construction, or whether a direct stability test can improve the query complexity, remains open. Stronger lower bounds for non-normal inputs would also help determine the optimal dependence on the stability margin.
Author contributions
M.F. was responsible for the writing, the main premise, and all mathematical details. M.S. verified and refined several mathematical details, helped organize the presentation of the results, and contributed to the writing and revision of the manuscript. M.K. contributed to the conception and proposal of the project as co-Principal Investigator, provided supervision, and reviewed the manuscript. J.L. conceptualized the project, developed preliminary versions of Corollary 3.1 and Theorem 1, and contributed to the writing of the manuscript. All authors reviewed and approved the final manuscript.
ChatGPT (OpenAI) and Claude (Anthropic) were used to assist with drafting and revising text, LaTeX formatting, literature searches, and the development and checking of mathematical arguments. The authors take full responsibility for the final manuscript, including its references and mathematical results.
Acknowledgments
This work was supported by the National Research Council of Canada (NRC) through the Applied Quantum Computing (AQC) Challenge program under project AQC-318. J.L. also acknowledges the support of the Natural Sciences and Engineering Research Council of Canada (NSERC) and the Canada Research Chairs program.
Data availability
No new data were created or analysed in this study.
[2] David Jennings, Matteo Lostaglio, Robert B. Lowrie, Sam Pallister, and Andrew T. Sornborger. "The cost of solving linear differential equations on a quantum computer: Fast-forwarding to explicit resource counts". Quantum 8, 1553 (2024).
[3] Diederich Hinrichsen and Anthony J. Pritchard. "Stability radii of linear systems". Systems & Control Letters 7, 1–10 (1986).
[4] Lloyd N. Trefethen, Anne E. Trefethen, Satish C. Reddy, and Tobin A. Driscoll. "Hydrodynamic stability without eigenvalues". Science 261, 578–584 (1993).
[5] Michal Kolada and Tomasz P. Stefański. "Test of system stability on quantum computer". In 2025 29th International Conference on Methods and Models in Automation and Robotics (MMAR). Pages 278–283. (2025).
[7] Honghong Lin and Yun Shang. "Quantum eigensolver for non-normal matrices via ground state energy estimation" (2026). arXiv:2502.18119.
[8] Yukun Zhang, Yusen Wu, and Xiao Yuan. "Heisenberg-limited quantum eigenvalue estimation for non-normal matrices" (2025). arXiv:2510.19651.
[9] Alex Kerzner, Vlad Gheorghiu, Michele Mosca, Thomas Guilbaud, Federico Carminati, Fabio Fracas, and Luca Dellantonio. "A square-root speedup for finding the smallest eigenvalue". Quantum Science and Technology 9, 045025 (2024).
[10] Nikhil S. Mande and Ronald de Wolf. "Tight bounds for quantum phase estimation and related problems". Quantum 10, 2140 (2026).
[11] Charles H. Bennett, Ethan Bernstein, Gilles Brassard, and Umesh Vazirani. "Strengths and weaknesses of quantum computing". SIAM Journal on Computing 26, 1510–1523 (1997).
[12] Stacey Jeffery and Freek Witteveen. "Optimal quantum algorithm for ground-state energy estimation with a guiding state" (2026). arXiv:2608.24494.
[13] Yasunori Futamura, Xiucai Ye, and Tetsuya Sakurai. "Contour integral-based quantum algorithm for estimating matrix eigenvalue density" (2021). arXiv:2112.05395.
[14] J. D. Roberts. "Linear model reduction and solution of the algebraic Riccati equation by use of the sign function". International Journal of Control 32, 677–687 (1980).
[15] Nicholas J. Higham. "Functions of matrices: Theory and computation". Society for Industrial and Applied Mathematics. (2008).
[16] Guang Hao Low and Yuan Su. "Quantum eigenvalue processing". SIAM Journal on Computing 55, 135–215 (2026).
[17] Souichi Takahira, Asuka Ohashi, Tomohiro Sogabe, and Tsuyoshi S. Usuda. "Quantum algorithms based on the block-encoding framework for matrix functions by contour integrals". Quantum Information and Computation 22, 965–979 (2022).
[18] Yanqiao Wang and Jin-Peng Liu. "Sign embedding quantum algorithms for matrix equations and matrix functions" (2026). arXiv:2604.25333.
[19] Pablo Rodenas-Ruiz, Andrew Zhao, and Joonho Lee. "Quantum solvers for nonlinear matrix equations in quantum chemistry" (2026). arXiv:2605.16189.
[20] Alexander M. Dalzell and Yuan Su. "Quantum oblique eigenprojection" (2026). arXiv:2609.40254.
[21] Gilles Brassard, Peter Høyer, Michele Mosca, and Alain Tapp. "Quantum amplitude amplification and estimation". In Quantum Computation and Information. Volume 305 of Contemporary Mathematics, pages 53–74. American Mathematical Society (2002).
[22] András Gilyén, Yuan Su, Guang Hao Low, and Nathan Wiebe. "Quantum singular value transformation and beyond: exponential improvements for quantum matrix arithmetics". In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing. Pages 193–204. New York, NY, USA (2019). Association for Computing Machinery. arXiv:1806.01838.
[23] Wassily Hoeffding. "Probability inequalities for sums of bounded random variables". Journal of the American Statistical Association 58, 13–30 (1963).
[24] Charles Kenney and Alan J. Laub. "Rational iterative methods for the matrix sign function". SIAM Journal on Matrix Analysis and Applications 12, 273–291 (1991).
[25] Andreas Frommer, Karsten Kahl, and Manuel Tsolakis. "Matrix functions via linear systems built from continued fractions" (2021). arXiv:2109.03527.
[26] Javier Pérez and María C. Quintana. "Linearizations of rational matrices from general representations". Linear Algebra and its Applications 647, 89–126 (2022).
[27] Vivien Vandaele. "Asymptotically optimal quantum circuits for comparators and incrementers" (2026). arXiv:2603.12917.
[28] Junhong Nie, Wei Zi, and Xiaoming Sun. "Quantum circuit for multi-qubit Toffoli gate with optimal resource" (2024). arXiv:2402.05053.
[29] Ronald de Wolf. "Quantum computing: Lecture notes" (2026). arXiv:1907.09415.
[30] Aleksandrs Belovs. "Variations on quantum adversary" (2015). arXiv:1504.06943.
A Proof of Proposition 1
The exact block-encoding assertion follows from the definition.
For item 2, first recall that ωB=0 if and only if B has a purely imaginary eigenvalue. Indeed, the minimum defining ωB is attained, since t↦σmin(B−itIn) is continuous and
σmin(B−itIn)≥∣t∣−∥B∥⟶∞as∣t∣⟶∞.
The minimum is zero precisely when B−itIn is singular for some t∈R.
Suppose ϵ<ωA, and consider
Bs=A+s(αAU−A),s∈[0,1].
The same singular-value estimate gives
ωBs≥ωA−sϵ>0(s∈[0,1]).
Thus no Bs has a purely imaginary eigenvalue. Since Bs depends continuously on s, its eigenvalues can be followed continuously along this interval, counting algebraic multiplicities. If an eigenvalue moved from one open half-plane to the other, its real part would vanish at some intermediate parameter value. This would give a purely imaginary eigenvalue of Bs, a contradiction. Therefore the numbers of eigenvalues in the two open half-planes remain constant along the path.
As B0=A, B1=αAU, and α>0, these counts agree for A and AU. Their sign matrices are diagonalizable with the same multiplicities of +1 and -1, so they are similar. The Hurwitz equivalence follows.
For item 3, set
B=−ωIn,C=ωIn,V=(0110)⊗In2a−1.
The matrix V is unitary and its encoded block is zero. Hence
∥B−α0∥=∥C−α0∥=ω≤ϵ.
Thus V is an (α,a,ϵ)-block-encoding of both matrices. Moreover, ωB=ωC=ω, while B is Hurwitz and every eigenvalue of C has positive real part. The same block-encoding and parameters are therefore compatible with both Hurwitz and non-Hurwitz matrices having the same positive gap.
B Quantum algorithm for computing matrix sign
The matrix sign function has many formulae, such as:
where r∈N, see [15, Theorem 5.9] and [24]. One can see that Equation (8) looks like a discretization of Equation (6). Strictly speaking we are actually interested in sign+(A)=0.5(I+sign(A)). Define
gr+(x)=21(1+gr(x))=(1+x)r+(1−x)r(1+x)r(9)
as an approximation of sign+(A). The roots of the denominator, pr(z)=(1+z)r+(1−z)r lie on the imaginary axis. Indeed, if pr(z)=0, then ∣1+z∣=∣1−z∣, which implies ℜ(z)=0. It follows that, if A has no purely imaginary eigenvalues, then gr(A),gr+(A) are well defined.
For normal matrices, scalar approximation bounds give matrix norm error bounds directly. We next establish bounds that also apply to non-normal matrices.
Theorem 7. Suppose that ∥A∥≤1 and no eigenvalue of A is purely imaginary. Let ω=min{σmin(A−itI):t∈R}. Let r∈N. Let η∈(0,ω) and R>1.
The following hold:
For z∈C with ∣z∣≤R and ∣ℜ(z)∣≥η, let sη,R=(1+2η+R21−2η+R2)0.5. Note sη,R<1. Then,
So we need only bound these integrals for the result. Due to symmetry a bound for the Γ+ integral is also a bound for the Γ− one. So we only need to bound the former:
So the lower bound on r, for ϵ accuracy, in item 3 of Theorem 7 applies to approximating sign+(A) with gr+(A).
For the remainder of the section we develop a (to our knowledge) novel method of approximating gr+(A) and thus sign+(A). Other works, such as [18], work by approximating an integral form such as Equation (5). Alternatively, in [19] they approximate sign+(A) by approximating Cauchy's integral formula. The typical approach to approximating these kinds of integrals for this (see for example [17]) is: 1. Invert one or more matrices, to form the matrix inverses in the integrand. 2. Do LCU, to get a sum which approximates the integral. If the second step is done with little care, the scaling parameter of the resulting block-encoding might depend poorly on the number of quadrature points, and become unacceptably large.
Our idea was to attempt to avoid the second step entirely—by careful construction of the matrix which is inverted. This actually has some basis in the classical literature, see [25, 26]. Given a non-linear almost everywhere holomorphic function f:C→C, one can often find a continued fraction representation of f. Truncating the continued fraction gives a rational approximation, say pN(z), to f. In turn pN(A) can be read off the inverse of
L=j=0∑ℓT(j)⊗Aj
where the T(j) are tridiagonal and found from the continued fraction. Again see [25] for the details. Assuming the condition number of L and ℓ are small, such an approach seems amenable to block-encoding.
Although gr is based off of continued fractions for sign, our particular construction for L isn't. It's based off geometric series identities.
We remark that we were unable to completely eliminate the need for doing LCU. However, when it is done outside of the quantum singular value transformation (QSVT), it is done O(1) times.
In the following proposition, we define a useful and well conditioned L.
Proposition 3. Let ℓ∈N and r=2ℓ, define Sr∈Rr×r by
Sr=j=0∑r−2∣j+1⟩⟨j∣−∣0⟩⟨r−1∣.(12)
Let A∈Cn×n have no purely imaginary eigenvalues and define A−=0.5(I−A) and A+=0.5(I+A).
Now that we have established that Lr is useful, we can explore how to form a block-encoding of it.
Lemma 2 (Block-encoding of Lr). Let UA be a (1,a,0)-block-encoding of A∈Cn×n, and let r=2ℓ, where ℓ∈N. Define
A±=2In±A,Lr=Ir⊗A++Sr⊗A−.
Then,
Define
DS=∣0⟩⟨0∣⊗Ir+∣1⟩⟨1∣⊗Sr.
The unitaries DS and DS† can each be implemented exactly using O(ℓ) elementary gates and one reusable work qubit.
One can construct a (2,a+1,0)-block-encoding UL of Lr; its adjoint UL† block-encodes Lr†. Each application of UL (UL†) uses one application of DS (DS†), one controlled application of UA (UA†), and three Hadamard gates. Note ∥A∥≤1, so ∥Lr∥≤2, by Proposition 3.
The operator DC is the singly controlled incrementer on an ℓ-qubit register. By [27, Corollary 7], it has an exact O(ℓ)-gate implementation using one work qubit whose initial state may be arbitrary and which is restored at the end.
Since r=2ℓ, we have
Rr=Ir−21ℓ⟩⟨1ℓ,
and hence
DR=I2r−2∣1⟩⟨1∣⊗1ℓ⟩⟨1ℓ.
Thus DR is the phase gate conditioned on all ℓ+1 qubits being in the state ∣1⟩. Conjugating one of these qubits by Hadamard gates reduces its implementation to an ℓ-controlled X gate. By [28, Corollary 3], this also has an exact O(ℓ)-gate implementation using one reusable work qubit. The same work qubit can be used successively for DR and DC. Therefore DS=DCDR uses O(ℓ) gates. Reversing this circuit gives an implementation of DS† with the same cost.
For item 2, let c be a selector qubit, let J denote the ℓ-qubit index register, let B denote the a block-encoding ancillas of UA, and let X denote the system register on which A acts. Define
H=21(111−1),Hc=H⊗IJBX,
so that Hc applies a Hadamard gate to c and acts as the identity on every other register. Also define
CA=(∣0⟩⟨0∣)c⊗IJBX+(∣1⟩⟨1∣)c⊗(Ir⊗UA).
This is the controlled application of UA, with the index register left unchanged. When used on all four registers, DS is implicitly tensored with IBX.
Set
UL=HcDSHcCAHc.
A high level circuit diagram of UL is given in Figure 1.
Figure 1: Circuit for UL=HcDSHcCAHc. Here c is the selector qubit, J is the ℓ-qubit index register, B contains the a block-encoding ancillas of UA, and X is the system register. Taking the ∣0⟩c∣0a⟩B matrix element gives Lr/2.
Relative to the computational basis of c, the three relevant unitaries have the operator-block representations
The displayed construction contains one DS, one controlled application of UA, and three Hadamard gates. Reversing the circuit gives the corresponding resource count for UL†.
B.1 QSVT inversion
Proposition 4 (QSVT inversion). Let UB be an exact (β,b,0)-block-encoding of an invertible matrix B. Suppose that a number η>0 is known such that
η≤σmin(B)andη≤2β.
Then, for every
0<ϵ≤min{1,2β−1},
one can construct a
(η2,b+1,ϵ)
block-encoding of B−1. The construction uses
O(ηβlog(ηϵ2))
total queries to UB,UB†.
Let d denote this query count. In addition, the QSVT circuit uses O(d) one-qubit phase gates and O(d) projector-controlled NOT gates. For a standard block-encoding, these controlled gates can be decomposed into
O(d(b+1))
bounded-arity elementary gates using one reusable dirty work qubit.
Proof. Set
T:=βB,δ:=βη.
Thus UB is an exact (1,b,0)-block-encoding of T, and
σmin(T)≥δ,0<δ≤21.
Define
ϵQSVT:=2ηϵ.
Since ϵ≤2β−1,
ϵQSVT=2ηϵ≤βη=δ.
By the singular-value inversion result of [22, Theorem 41], QSVT applied to T produces, using one additional signal qubit, a unitary whose encoded block W satisfies
W−2δT−1≤ϵQSVT.
Since T−1=βB−1,
2δT−1=2βηβB−1=2ηB−1.
Consequently,
B−1−η2W≤η2ϵQSVT=ϵ.
Conjugating the additional signal qubit by Hadamard gates converts the ∣+⟩-projected block in [22, Theorem 41] into a standard ∣0⟩-projected block. Hence the resulting unitary is a (2/η,b+1,ϵ)-block-encoding of B−1.
The polynomial degree, and therefore the number of applications of UB and UB†, is
O(δ−1log(ϵQSVT−1))=O(ηβlog(ηϵ2)).
Let d denote the above query count. In addition, for the gate count, [22, Theorem 41] uses O(d) controlled operations associated with the input and output projectors. These are b-controlled NOTs, up to negative-control X gates. They cost O(b) elementary gates each using one dirty ancilla by [28, Corollary 3].
B.2 Projector construction complexity
Combining the previous two results gives the following complexity bounds for block-encoding an approximation to sign+(A).
Theorem 8. Suppose that ∥A∥≤1 and no eigenvalue of A is purely imaginary. Let ω=min{σmin(A−itI):t∈R}, ν∈(0,ω], and UA be a (1,a,0)-block-encoding of A. Let r=2ℓ, ℓ∈N. The following hold:
For all ϵinv∈(0,1], we can construct a(ν25,2a+ℓ+3,ϵinv)-block-encoding of gr+(A) which uses d=O(ν1log(νϵinv1)) queries of UA and UA†, and uses an additional O(d(ℓ+a)) elementary gates.
For all ϵ+∈(0,1], we can pick
r=2ℓ=O(ν1log(νϵ+1))
to construct a(ν25,2a+ℓ+3,ϵ+)-block-encoding of sign+(A) which uses
d=O(ν1log(νϵ+1))
queries of UA and UA†, and uses an additional O(d(log(d)+a)) elementary gates.
Proof. Item 1: Lemma 2 gives us unitary UL which is a (2,a+1,0)-block-encoding of Lr. Using ν∈(0,ω], recalling that ω,∥A∥≤1 and item 3 of Proposition 3 we get
σmin(Lr)≥1+(ω+∥A∥)2ω≥1+(1+1)2ω=5ω≥5ν.
Using this lower bound, we can apply Proposition 4 to Lr. Here η=ν/5, β=2, and η≤5−0.5≤β/2. Since ϵinv≤1≤2/β, Proposition 4 gives a (25/ν,a+2,ϵinv)-block-encoding of Lr−1. This costs d=O(ν1log(νϵinv1)) applications of UL,UL† and O(d(a+1)) elementary gates. By Lemma 2, applications of UL (UL†) cost 1 application of UA (UA†) for a total of d calls to UA,UA†. By the same result, applying UL or UL† also costs O(ℓ) elementary gates, so the total elementary gate cost is O(d(ℓ+a)).
To get a block encoding of gr+(A) we seek to apply item 2 of Proposition 3:
gr+(A)=(⟨0ℓ⊗In)Lr−1(0ℓ⟩⊗A+),
where A+=0.5(I+A). We therefore, want to multiply Lr−1 by C=Ir⊗A+. Since
C=21(Ir⊗In)+21(Ir⊗A),
[22, Lemma 52], applied with coefficient vector (1/2,1/2), gives an exact (1,a+1,0)-block-encoding of C. It uses one controlled application of UA and two Hadamard gates. Forming the product Lr−1C, results in a ((1)25/ν,a+2+a+1,ϵinv)-block-encoding thereof, [22, Lemma 53]. This does not use any additional gate resources.
Finally, regarding the ℓ-qubit index register as an additional block-encoding register and projecting it onto 0ℓ⟩ gives a (25/ν,2a+3+ℓ,ϵinv)-block-encoding of gr+(A).
Item 2 follows from item 1 of this theorem with ϵinv=0.5ϵ+ and item 3 of Theorem 7 with ϵ=ϵ+. Since ν≤ω, the sufficient lower bound in (11) with ω replaced by ν is no smaller. Choosing r to be the least power of two above this bound changes it by at most a factor of two. Thus we can pick r=2ℓ=O(ν1log(νϵ+1)) so that
ϵ+≥∥sign(A)−gr(A)∥=2∥sign+(A)−gr+(A)∥
Hence, if V is the (β,b,ϵinv)-block-encoding of gr+(A) and g~=β(⟨0b∣⊗I)V(∣0b⟩⊗I), we have
The gate costs remain the same as in item 1, but here ℓ=O(log(d)), since we have chosen r=O(d).
The parameter r is a direct proxy to the number of quadrature points of the integral Equation (6) (via Equation (8)). We see that our approximate block-encoding scaling parameter is independent of r. One may expect such dependence with naive LCU approaches to computing the sum Equation (8). Practically this means higher accuracy requires no trade off in measurement probabilities. For fixed inversion accuracy, the query bound in item 1 of Theorem 8 is independent of r; the additional gate bound depends on r through ℓ=log2r. Higher target accuracy also increases the query bound through the required inversion accuracy.
C Proof of Lemma 1
This proof is a step-by-step form of the hybrid argument of Bennett et al. [11, proof of Theorem 3.3], retaining the size η of the local oracle difference. The usual phase-oracle case is discussed in [29, Exercise 11.12]. For a general framework of lower bounds for unitary oracles, including inverse and controlled access, see [30, Section 2 and Theorem 37].
Let T be the worst-case number of queries. We prove the lower bound even when one query may coherently choose between doing nothing, applying Ux, and applying Ux†. Specifically, use the state space
H=C3⊗Cd⊗Cn⊗A,
whose factors represent the query selector, the local state acted on by V0 or V1, the index register, and an arbitrary ancillary space A, respectively. The enlarged query operator on H is
Ux=(∣0⟩⟨0∣⊗Idn+∣1⟩⟨1∣⊗Ux+∣2⟩⟨2∣⊗Ux†)⊗IA.
Here ∣0⟩,∣1⟩,∣2⟩ belong to the selector register C3. By preparing the selector register appropriately, one application of Ux can implement the identity, Ux, or Ux†, including their controlled forms. Therefore, counting each application of Ux as one query gives at least as much oracle access as the model in the statement.
By keeping random choices and intermediate measurement outcomes in ancillary registers, all measurements can be deferred until the end [29, Exercise 2.8]. Branches that finish early select the identity block in subsequent queries. The computation therefore has the form
∣ϕt(x)⟩=UxWt∣ϕt−1(x)⟩,t=1,…,T,(13)
where W1,…,WT are unitaries on H independent of the unknown input x, and ∣ϕ0(x)⟩=∣ϕ0⟩ is the same initial unit vector for every x. Thus ∣ϕt(x)⟩ denotes the state immediately after query t. Any unitary after the last query is absorbed into the final measurement.
For j=1,…,n, define the orthogonal projection
Πj=I3⊗Id⊗∣j⟩⟨j∣⊗IA.
It retains exactly the components whose index register equals ∣j⟩, without restricting any other register. Set
pt,j=∥ΠjWt∣ϕt−1(0)⟩∥2.
This is the probability of obtaining index j if the index register were measured immediately before query t in the execution with input 0; no such measurement is performed. Since ∑j=1nΠj=I and the projections are mutually orthogonal,
j=1∑npt,j=1.
The inputs 0 and ej differ only at coordinate j, so
Uej−U0=(V1−V0)⊗∣j⟩⟨j∣.
The same identity holds for their adjoints after replacing V1−V0 by V1†−V0†. Since both differences have norm η, the block structure of Ux gives
Uej−U0=(Uej−U0)Πj,∥Uej−U0∥=η.
Consequently,
∥(Uej−U0)Wt∣ϕt−1(0)⟩∥≤ηpt,j.(14)
We now compare the two executions with inputs ej and 0, each using its own fixed oracle. In (13), add and subtract UejWt∣ϕt−1(0)⟩. The triangle inequality and unitarity give
Applying the preceding inequality to these two final states shows that
∥∣ϕT(ej)⟩−∣ϕT(0)⟩∥≥1−2δ(j=1,…,n).
Thus n(1−2δ)2≤η2T2, and therefore
T≥η(1−2δ)n.(15)
This proves the claimed asymptotic bound.
D Proof of Proposition 2
Since the matrices are real diagonal, ωA=minj∣aj∣. Since each ∣aj∣ is independent and uniformly distributed on [0,1], j=1,…n, the minimum statistic of the sample (which is ωA) is known to have cumulative distribution function: Pr(ωA≤x)=1−(1−x)n, where x∈[0,1]. So we can see that Pr(l≤ωA≤u)=(1−l)n−(1−u)n. Let yn=Pr(0.2/n≤ωA≤2/n), for n≥2. The sequence {yn}n=2∞ is decreasing and converges to e−0.2−e−2. The result follows.
E Proof of Theorem 6
We first prove the upper bound. Use the contour Γ+ from Equation (10), with η=0 and R=2, as in the proof of Theorem 7. Thus Γ+=Γv∪ΓR, where Γv is the imaginary-axis segment joining −2i to 2i, and ΓR is the right semicircle of radius 2. Since ωA>0, the imaginary axis contains no eigenvalue of A, and the Riesz projection formula gives
The matrix S is unitary. Its eigenvalues and corresponding normalized eigenvectors are
λk=exp(ni(θ+2πk)),vk=n1(1λk⋯λkn−1)⊤,
for k=0,…,n−1. Indeed, λkn=eiθ and Svk=λkvk. Since S is unitary and the λk are distinct, the vectors vk form an orthonormal eigenbasis.
Direct multiplication gives
D−1AD=s−1S,An=eiθs−nI.(20)
Moreover,
A†A=diag(s−2n,1,…,1),
SO
∥A∥=1.
None of the eigenvalues of S is purely imaginary. If n is odd, then (±i)n is purely imaginary and hence cannot equal eiθ=1. If n is even, then (±i)n is real and hence cannot equal eiθ=i.
Let
K={k∈{0,…,n−1}:ℜ(λk)>0},
and define
Q=k∈K∑vkvk†.
Then Q=sign+(S). By (20), and because multiplication by the positive scalar s−1 does not change the right-half-plane spectral subspace,
sign+(A)=DQD−1(21)
Let Q=(qij)i,j=1n. We now estimate q1n. Since λkn=eiθ,
q1n=n1k∈K∑λkn−1=ne−iθk∈K∑λk.
The indices in K are consecutive modulo n. If m=∣K∣, the geometric-series formula gives
If n is even, the roots occur in antipodal pairs, so m=n/2. If n is odd, the right half-plane contains either (n−1)/2 or (n+1)/2 roots. Consequently,
∣q1n∣={nsin(π/n)1,2nsin(π/(2n))1,neven,nodd.
In either case, sinx≤x implies
∣q1n∣≥π1.(22)
Let sign+(A)=(pij)i,j=1n. By (21),
p1n=sn−1q1n.
Therefore
∥sign+(A)∥≥∣p1n∣≥πsn−1.
On the other hand, since Q is an orthogonal projection,
∥sign+(A)∥≤∥D∥∥Q∥∥D−1∥=sn−1.
Thus
πsn−1≤∥sign+(A)∥≤sn−1.(23)
It remains to estimate ωA. From An=eiθs−nI, one can verify that
(A−itI)−1=eiθs−n−(it)nAn−1+itAn−2+⋯+(it)n−1I.
If n is odd, then eiθs−n=s−n is real and (it)n is purely imaginary. If n is even, then eiθs−n=is−n is purely imaginary and (it)n is real. Hence, setting u=∣t∣,
∣eiθs−n−(it)n∣=s−2n+u2n.
Since ∥A∥=1, it follows that
∥(A−itI)−1∥≤s−2n+u2n∑k=0n−1uk.(24)
Recall that s≥2, so 2n≤sn. If u≤1/2, then
s−2n+u2n∑k=0n−1uk≤2sn.
If 1/2≤u≤1, then the denominator is at least un, and