Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2610.41180

Quantum query complexity of Hurwitz stability testing

Maxwell Fitzsimmons, Mohamed Serry, Meenu Kumari, Jun Liu

quant-phcs.CCSubmitted Oct 30, 2026• Announced Nov 2, 2026
arXivHTMLPDF

Abstract

Determining whether every trajectory of the linear system $\dot{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. We study the quantum query complexity of deciding whether a matrix $A\in\mathbb{C}^{n\times 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<ν\leq ω_A$ on the imaginary-axis distance $ω_A:=\min_{t\in\mathbb{R}}σ_{\min}(A-\mathrm{i}tI)$, where $σ_{\min}(A)$ is the smallest singular value of $A$. We prove a query-complexity lower bound of $Ω(\sqrt{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 $\operatorname{sign}^+(A):=(I+\operatorname{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/(4\sqrt{n}))$-block-encoded projector matrix (like $\operatorname{sign}^+(A)$) is zero or not; for constant success probability, it has complexity $Θ(β\sqrt{n})$. When the zero test is applied to specific approximations of $\operatorname{sign}^+(A)$, this yields an upper bound of $O(\sqrt{n}ν^{-2}\log(\sqrt{n}/ν))$ queries in the general case, and $O(\sqrt{n}ν^{-1}\log n)$ 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.

AI Summary

The paper studies the quantum query complexity of deciding whether a matrix $A$ is Hurwitz stable—all eigenvalues have negative real part—from normalized block-encoding access. It assumes a supplied lower bound $0<\nu\leq\omega_A$, where $\omega_A=\min_{t\in\mathbb R}\sigma_{\min}(A-itI)$ measures distance to acquiring an imaginary-axis eigenvalue. The guarantees include nonnormal and nondiagonalizable matrices, without a supplied guiding state or eigenvector-conditioning promise. For constant success probability, a weak-oracle search reduction gives an $\Omega(\sqrt n/\nu)$ lower bound, already for real diagonal matrices. The general-matrix algorithm uses $O(\sqrt n\,\nu^{-2}\log(\sqrt n/\nu))$ queries; for normal matrices, including Hermitian matrices, the bound improves to $O(\sqrt n\,\nu^{-1}\log n)$. The algorithm tests whether the right-half-plane spectral projector $P=(I+\operatorname{sign}(A))/2$ vanishes. Given a $(\beta,b,\epsilon)$ block-encoding of an idempotent with $\epsilon\leq1/(4\sqrt n)$, maximally entangled initialization and amplitude estimation give optimal $\Theta(\beta\sqrt n)$ zero-testing complexity when both outcomes are admissible. For general $A$, a Padé approximation to $P$ is extracted from a structured matrix inverse implemented using QSVT. A separate matrix-analysis result establishes the sharp fixed-dimension scaling $\|P\|=O(\omega_A^{-(n-1)/n})$, with matching examples. The nonnormal upper and lower bounds retain an inverse-margin factor gap, apart from logarithms. Whether improved projector construction or direct testing closes it remains open. The normal-case logarithm may also be removable. Bounds count oracle queries, exclude input-oracle implementation costs, and require the margin promise; no advantage over alternative matrix-sign implementations is established.

No sign of AI-generated text

Written by gpt-6.1-sol from the paper's full text. Automated: it can be wrong.

Comments
36 pages, including appendices; 1 figure, 1 table

Related papers

Sign Embedding Quantum Algorithms for Matrix Equations and Matrix Functions

Yanqiao Wang, Jin-Peng Liu

We develop operator-output quantum algorithms for matrix equations and matrix functions using matrix-sign embeddings. For each problem, an augmented matrix $M$ is chosen so that the target operator is a block of $\text{sign}(M)$ or is recovered from blocks of $(I-\text{sign}(M))/2$. We approximate the half-plane sign by a logarithmic-sinc formula and implement the shifted inverse families by scaled multiplexing with node-dependent rebalancing. For ordinary Sylvester equations, this yields a block-encoding of the solution with query complexity linear in the relevant conditioning parameters and logarithmic in the inverse error tolerance, under either a field-of-values (FoV) gap or a strip-resolvent bound. The same method extends to generalized Sylvester and Lyapunov equations, principal square and inverse square roots, matrix geometric means, and continuous-time algebraic Riccati equations (CARE), with explicit query-complexity and block-encoding-normalization bounds that cover non-normal and non-diagonalizable cases.

quant-pharXiv:2604.25333•Apr 29, 2026

Simultaneously Query-Optimal Quantum Linear-System Algorithm

Minbo Gao, Zhengfeng Ji, Chenghua Liu

Quantum linear-system algorithms access the coefficient matrix through a block-encoding oracle $U_A$ and the right-hand side through a state-preparation oracle $U_b$. The optimal query complexities of these two oracles are known separately: $O(κ\log(1/\varepsilon))$ queries to $U_A$ and $O(κ/s)$ queries to $U_b$, where $s=α\|A^{-1}b\|$. Whether a single algorithm can achieve both bounds simultaneously has remained open. We resolve this question affirmatively. Given a constant-factor estimate of $s$, we give a quantum linear-system algorithm that prepares the normalized solution to error $\varepsilon$ using simultaneously $ O\left(κ\log\frac1\varepsilon\right)$ queries to $U_A$ and $O\left(κ/{s}\right)$ queries to $U_b$. The algorithm separates state preparation from precision refinement, so only the matrix-query count depends on the target accuracy. We also prove a matching same-instance worst-case lower bound: for every quantum linear-system algorithm and every solution-norm scale, there exists a single Hermitian instance on which that algorithm requires both $Ω(κ\log(1/\varepsilon))$ matrix queries and $Ω(κ/s)$ state-preparation queries. Thus the two oracle complexities can be optimized simultaneously, and the resulting bounds are jointly optimal.

quant-pharXiv:2609.33686•Sep 29, 2026

Near-Optimal Quantum Algorithm and Complexity Analysis for Riccati Problems

Jingyao Wang, Yanqiao Wang, Bowen Li +2 more

We develop quantum algorithms that construct block-encodings of solution matrices for continuous- and discrete-time algebraic Riccati equations (CAREs and DAREs), differential Riccati equations (DREs), and finite Riccati recursions. The Quantum Weighted Riesz Method, unifying four kinds of Riccati problems, constructs projectors onto the solution graphs using weighted Riesz branching operators and recovers the solution matrices. Under the stated access and normalization assumptions, our algorithms for CAREs and DAREs have near-optimal query complexity $Θ(\mathcal Rα)$ up to logarithmic factors, with the generalized singularity factor $\mathcal R$ that reflects spectral separation, and the output normalization $α$. For DREs and finite-horizon problems, the query complexity has an additional initialization conditioning factor $κ_{\rm init}$. We establish product query lower bounds for specified input-oracle families, demonstrating necessary joint dependence on spectral separation and initialization or output scale. We also prove that selected-value promise problems are BQP-complete on explicit circuit-generated families of single-control discrete-time algebraic and zero-terminal differential Riccati equations. Applications include classical feedback evaluation for linear-quadratic control, a query-complexity comparison for stable random-phase approximation Riccati equations in quantum chemistry, and heated boundary control with numerical validation.

quant-pharXiv:2609.37207•Sep 30, 2026

Quantum lower bounds for convex optimization and real matrix-vector query problems

Andrew M. Childs

We (the author and the AI systems that did the heavy lifting) show that the quantum query complexity of minimizing a convex function over a convex subset of $\mathbb{R}^n$ with evaluation and membership queries is $\tildeΩ(n)$, nearly matching the best known upper bound. In particular, we show this even for quadratic minimization, which is equivalent to inverting an $n \times n$ real matrix using matrix-vector queries. We also show linear or nearly linear lower bounds on the quantum query complexity of computing the trace, the sign of the determinant, and the magnitude of the determinant of a real matrix in the matrix-vector query model. We use a novel quantum lower bound technique, the determinantal witness method, based on identifying a witness whose Fourier transform vanishes on low-rank matrices and that correlates well with the function being computed.

quant-pharXiv:2609.05679•Sep 8, 2026

Faster quantum linear system solver beyond the condition number

Alexander M. Dalzell, Jianqiang Li, Yuan Su

The spectral condition number is a widely adopted measure of worst-case cost for quantum linear system solvers. Yet it can significantly overestimate the actual runtime for a typical problem instance. We present two quantum algorithms that produce the normalized solution $|x\rangle$ of linear system $Ax=| b \rangle$ to accuracy $ε$ with complexity independent of the condition number $κ=\lVert A^{-1}\rVert$. We focus on the standard input model where $A$ is accessed through a block encoding and $| b \rangle$ is prepared by a unitary. But we also introduce an affine dilation model that encodes $A$ and $| b \rangle$ jointly, allowing further refinements of the query complexity. Our truncation-based solver makes an optimal number of queries to $| b \rangle$ and $\operatorname{\mathbf{O}}\left(κ_{\mathrm{eff}}\operatorname{polylog}\left(\frac{κ_{\mathrm{eff}}}ε\right)\right)$ queries to $A$. We prove a family of upper bounds on the effective condition number, including $κ_{\mathrm{eff}}\leq\frac{\lVert(A^\dagger A)^{-t/2}|x\rangle\rVert^{1/t}}{ε^{1/t}}$ for positive even integer $t$ and $κ_{\mathrm{eff}}\leq\frac{\lVert A^{-1\dagger}(A^\dagger A)^{-(t-1)/2}|x\rangle\rVert^{1/t}}{ε^{1/t}}$ for positive odd $t$, overcoming the $κ$-barrier. Our filtering-based solver is extremely simple with a favorable runtime prefactor. In particular, the solver has query complexity $3\frac{\lVert A^{-1\dagger}|x\rangle\rVert}ε$ to leading order when the solution norm is known. We then present a similarly simple solution norm estimator with the same asymptotic cost up to logarithmic factors. Our quantum linear system solvers thus substantially improve a recent algorithm of Li, enabling faster quantum linear system solving beyond the condition number.

quant-pharXiv:2607.07691•Jul 9, 2026

Optimal Quantum Junta Testing without Inverse Queries

Jinge Bao, Minbo Gao, Penghui Yao

We study the query complexity of testing quantum juntas. Given an unknown $n$-qubit unitary or quantum channel, the goal is to decide whether it acts nontrivially on at most $k$ qubits or is $\varepsilon$-far from every such operation. For unitaries, we consider the forward-only model, where the tester has access to $U$, but not to $U^\dagger$ or controlled-$U$. We give tight bounds for both unitary and channel junta testing. For sufficiently large $k$, $n \ge 2k$, and a broad range of $\varepsilon$, both problems have query complexity $Θ\left(k/(\varepsilon^2\log k)\right)$. Our upper bounds are achieved by simple nonadaptive testers using product inputs and single-qubit measurements. For junta channels, this closes the gap by Bao and Yao (COLT 23, TPAMI 2025) between an $\widetilde{O}(k)$ upper bound and a $\widetildeΩ(\sqrt{k})$ lower bound at constant $\varepsilon$, establishing the optimal $Θ(k/\log k)$ query complexity. At the heart of both bounds is a strong connection between quantum junta testing and classical support-size testing. For the upper bounds, we reduce quantum junta testing to a generalized support-size problem for distributions over random subsets, and develop a new tester with improved sample complexity. For the lower bounds, we proceed in the reverse direction, reducing classical support-size testing to quantum junta testing through a phase-masked hard ensemble and showing that forward quantum queries can be exactly classicalized on average. Together, these reductions identify support-size testing as the classical core of quantum junta testing and yield matching lower bounds. At constant $\varepsilon$, they also give a separation between $Θ(k/\log k)$ forward queries and $\widetilde{O}(\sqrt{k})$ queries with inverse access.

quant-pharXiv:2609.37926•Sep 30, 2026
Determining whether every trajectory of the linear system x˙=Ax\dot{x}=Axx˙=Ax converges to zero (or, equivalently, whether AAA 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. We study the quantum query complexity of deciding whether a matrix A∈Cn×nA\in\mathbb{C}^{n\times n}A∈Cn×n is Hurwitz stable, given an exact normalized block-encoding of AAA. The query complexity is characterized in terms of the system dimension nnn and a supplied lower bound 0<ν≤ωA0<ν\leq ω_A0<ν≤ωA​ on the imaginary-axis distance ωA:=min⁡t∈Rσmin⁡(A−itI)ω_A:=\min_{t\in\mathbb{R}}σ_{\min}(A-\mathrm{i}tI)ωA​:=mint∈R​σmin​(A−itI), where σmin⁡(A)σ_{\min}(A)σmin​(A) is the smallest singular value of AAA. We prove a query-complexity lower bound of Ω(n/ν)Ω(\sqrt{n}/ν)Ω(n​/ν), which holds even when AAA is restricted to be real and diagonal. For general matrices with nonzero ωAω_AωA​, we encode an approximation of the right-half-plane spectral projector sign⁡+(A):=(I+sign⁡(A))/2\operatorname{sign}^+(A):=(I+\operatorname{sign}(A))/2sign+(A):=(I+sign(A))/2 as a block of a matrix inverse, where AAA 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))(β,b,1/(4\sqrt{n}))(β,b,1/(4n​))-block-encoded projector matrix (like sign⁡+(A)\operatorname{sign}^+(A)sign+(A)) is zero or not; for constant success probability, it has complexity Θ(βn)Θ(β\sqrt{n})Θ(βn​). When the zero test is applied to specific approximations of sign⁡+(A)\operatorname{sign}^+(A)sign+(A), this yields an upper bound of O(nν−2log⁡(n/ν))O(\sqrt{n}ν^{-2}\log(\sqrt{n}/ν))O(n​ν−2log(n​/ν)) queries in the general case, and O(nν−1log⁡n)O(\sqrt{n}ν^{-1}\log n)O(n​ν−1logn) when AAA 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.
The paper studies the quantum query complexity of deciding whether a matrix AAA is Hurwitz stable—all eigenvalues have negative real part—from normalized block-encoding access. It assumes a supplied lower bound 0<ν≤ωA0<\nu\leq\omega_A0<ν≤ωA​, where ωA=min⁡t∈Rσmin⁡(A−itI)\omega_A=\min_{t\in\mathbb R}\sigma_{\min}(A-itI)ωA​=mint∈R​σmin​(A−itI) measures distance to acquiring an imaginary-axis eigenvalue. The guarantees include nonnormal and nondiagonalizable matrices, without a supplied guiding state or eigenvector-conditioning promise.
For constant success probability, a weak-oracle search reduction gives an Ω(n/ν)\Omega(\sqrt n/\nu)Ω(n​/ν) lower bound, already for real diagonal matrices. The general-matrix algorithm uses O(n ν−2log⁡(n/ν))O(\sqrt n\,\nu^{-2}\log(\sqrt n/\nu))O(n​ν−2log(n​/ν)) queries; for normal matrices, including Hermitian matrices, the bound improves to O(n ν−1log⁡n)O(\sqrt n\,\nu^{-1}\log n)O(n​ν−1logn). The algorithm tests whether the right-half-plane spectral projector P=(I+sign⁡(A))/2P=(I+\operatorname{sign}(A))/2P=(I+sign(A))/2 vanishes. Given a (β,b,ϵ)(\beta,b,\epsilon)(β,b,ϵ) block-encoding of an idempotent with ϵ≤1/(4n)\epsilon\leq1/(4\sqrt n)ϵ≤1/(4n​), maximally entangled initialization and amplitude estimation give optimal Θ(βn)\Theta(\beta\sqrt n)Θ(βn​) zero-testing complexity when both outcomes are admissible. For general AAA, a Padé approximation to PPP is extracted from a structured matrix inverse implemented using QSVT. A separate matrix-analysis result establishes the sharp fixed-dimension scaling ∥P∥=O(ωA−(n−1)/n)\|P\|=O(\omega_A^{-(n-1)/n})∥P∥=O(ωA−(n−1)/n​), with matching examples.
The nonnormal upper and lower bounds retain an inverse-margin factor gap, apart from logarithms. Whether improved projector construction or direct testing closes it remains open. The normal-case logarithm may also be removable. Bounds count oracle queries, exclude input-oracle implementation costs, and require the margin promise; no advantage over alternative matrix-sign implementations is established.
We develop operator-output quantum algorithms for matrix equations and matrix functions using matrix-sign embeddings. For each problem, an augmented matrix MMM is chosen so that the target operator is a block of sign(M)\text{sign}(M)sign(M) or is recovered from blocks of (I−sign(M))/2(I-\text{sign}(M))/2(I−sign(M))/2. We approximate the half-plane sign by a logarithmic-sinc formula and implement the shifted inverse families by scaled multiplexing with node-dependent rebalancing. For ordinary Sylvester equations, this yields a block-encoding of the solution with query complexity linear in the relevant conditioning parameters and logarithmic in the inverse error tolerance, under either a field-of-values (FoV) gap or a strip-resolvent bound. The same method extends to generalized Sylvester and Lyapunov equations, principal square and inverse square roots, matrix geometric means, and continuous-time algebraic Riccati equations (CARE), with explicit query-complexity and block-encoding-normalization bounds that cover non-normal and non-diagonalizable cases.
Quantum linear-system algorithms access the coefficient matrix through a block-encoding oracle UAU_AUA​ and the right-hand side through a state-preparation oracle UbU_bUb​. The optimal query complexities of these two oracles are known separately: O(κlog⁡(1/ε))O(κ\log(1/\varepsilon))O(κlog(1/ε)) queries to UAU_AUA​ and O(κ/s)O(κ/s)O(κ/s) queries to UbU_bUb​, where s=α∥A−1b∥s=α\|A^{-1}b\|s=α∥A−1b∥. Whether a single algorithm can achieve both bounds simultaneously has remained open. We resolve this question affirmatively. Given a constant-factor estimate of sss, we give a quantum linear-system algorithm that prepares the normalized solution to error ε\varepsilonε using simultaneously $ O\left(κ\log\frac1\varepsilon\right)$ queries to UAU_AUA​ and O(κ/s)O\left(κ/{s}\right)O(κ/s) queries to UbU_bUb​. The algorithm separates state preparation from precision refinement, so only the matrix-query count depends on the target accuracy. We also prove a matching same-instance worst-case lower bound: for every quantum linear-system algorithm and every solution-norm scale, there exists a single Hermitian instance on which that algorithm requires both Ω(κlog⁡(1/ε))Ω(κ\log(1/\varepsilon))Ω(κlog(1/ε)) matrix queries and Ω(κ/s)Ω(κ/s)Ω(κ/s) state-preparation queries. Thus the two oracle complexities can be optimized simultaneously, and the resulting bounds are jointly optimal.
We develop quantum algorithms that construct block-encodings of solution matrices for continuous- and discrete-time algebraic Riccati equations (CAREs and DAREs), differential Riccati equations (DREs), and finite Riccati recursions. The Quantum Weighted Riesz Method, unifying four kinds of Riccati problems, constructs projectors onto the solution graphs using weighted Riesz branching operators and recovers the solution matrices. Under the stated access and normalization assumptions, our algorithms for CAREs and DAREs have near-optimal query complexity Θ(Rα)Θ(\mathcal Rα)Θ(Rα) up to logarithmic factors, with the generalized singularity factor R\mathcal RR that reflects spectral separation, and the output normalization ααα. For DREs and finite-horizon problems, the query complexity has an additional initialization conditioning factor κinitκ_{\rm init}κinit​. We establish product query lower bounds for specified input-oracle families, demonstrating necessary joint dependence on spectral separation and initialization or output scale. We also prove that selected-value promise problems are BQP-complete on explicit circuit-generated families of single-control discrete-time algebraic and zero-terminal differential Riccati equations. Applications include classical feedback evaluation for linear-quadratic control, a query-complexity comparison for stable random-phase approximation Riccati equations in quantum chemistry, and heated boundary control with numerical validation.
We (the author and the AI systems that did the heavy lifting) show that the quantum query complexity of minimizing a convex function over a convex subset of Rn\mathbb{R}^nRn with evaluation and membership queries is Ω~(n)\tildeΩ(n)Ω~(n), nearly matching the best known upper bound. In particular, we show this even for quadratic minimization, which is equivalent to inverting an n×nn \times nn×n real matrix using matrix-vector queries. We also show linear or nearly linear lower bounds on the quantum query complexity of computing the trace, the sign of the determinant, and the magnitude of the determinant of a real matrix in the matrix-vector query model. We use a novel quantum lower bound technique, the determinantal witness method, based on identifying a witness whose Fourier transform vanishes on low-rank matrices and that correlates well with the function being computed.
The spectral condition number is a widely adopted measure of worst-case cost for quantum linear system solvers. Yet it can significantly overestimate the actual runtime for a typical problem instance. We present two quantum algorithms that produce the normalized solution ∣x⟩|x\rangle∣x⟩ of linear system Ax=∣b⟩Ax=| b \rangleAx=∣b⟩ to accuracy εεε with complexity independent of the condition number κ=∥A−1∥κ=\lVert A^{-1}\rVertκ=∥A−1∥. We focus on the standard input model where AAA is accessed through a block encoding and ∣b⟩| b \rangle∣b⟩ is prepared by a unitary. But we also introduce an affine dilation model that encodes AAA and ∣b⟩| b \rangle∣b⟩ jointly, allowing further refinements of the query complexity. Our truncation-based solver makes an optimal number of queries to ∣b⟩| b \rangle∣b⟩ and O⁡(κeffpolylog⁡(κeffε))\operatorname{\mathbf{O}}\left(κ_{\mathrm{eff}}\operatorname{polylog}\left(\frac{κ_{\mathrm{eff}}}ε\right)\right)O(κeff​polylog(εκeff​​)) queries to AAA. We prove a family of upper bounds on the effective condition number, including κeff≤∥(A†A)−t/2∣x⟩∥1/tε1/tκ_{\mathrm{eff}}\leq\frac{\lVert(A^\dagger A)^{-t/2}|x\rangle\rVert^{1/t}}{ε^{1/t}}κeff​≤ε1/t∥(A†A)−t/2∣x⟩∥1/t​ for positive even integer ttt and κeff≤∥A−1†(A†A)−(t−1)/2∣x⟩∥1/tε1/tκ_{\mathrm{eff}}\leq\frac{\lVert A^{-1\dagger}(A^\dagger A)^{-(t-1)/2}|x\rangle\rVert^{1/t}}{ε^{1/t}}κeff​≤ε1/t∥A−1†(A†A)−(t−1)/2∣x⟩∥1/t​ for positive odd ttt, overcoming the κκκ-barrier. Our filtering-based solver is extremely simple with a favorable runtime prefactor. In particular, the solver has query complexity 3∥A−1†∣x⟩∥ε3\frac{\lVert A^{-1\dagger}|x\rangle\rVert}ε3ε∥A−1†∣x⟩∥​ to leading order when the solution norm is known. We then present a similarly simple solution norm estimator with the same asymptotic cost up to logarithmic factors. Our quantum linear system solvers thus substantially improve a recent algorithm of Li, enabling faster quantum linear system solving beyond the condition number.
We study the query complexity of testing quantum juntas. Given an unknown nnn-qubit unitary or quantum channel, the goal is to decide whether it acts nontrivially on at most kkk qubits or is ε\varepsilonε-far from every such operation. For unitaries, we consider the forward-only model, where the tester has access to UUU, but not to U†U^\daggerU† or controlled-UUU. We give tight bounds for both unitary and channel junta testing. For sufficiently large kkk, n≥2kn \ge 2kn≥2k, and a broad range of ε\varepsilonε, both problems have query complexity Θ(k/(ε2log⁡k))Θ\left(k/(\varepsilon^2\log k)\right)Θ(k/(ε2logk)). Our upper bounds are achieved by simple nonadaptive testers using product inputs and single-qubit measurements. For junta channels, this closes the gap by Bao and Yao (COLT 23, TPAMI 2025) between an O~(k)\widetilde{O}(k)O(k) upper bound and a Ω~(k)\widetildeΩ(\sqrt{k})Ω(k​) lower bound at constant ε\varepsilonε, establishing the optimal Θ(k/log⁡k)Θ(k/\log k)Θ(k/logk) query complexity. At the heart of both bounds is a strong connection between quantum junta testing and classical support-size testing. For the upper bounds, we reduce quantum junta testing to a generalized support-size problem for distributions over random subsets, and develop a new tester with improved sample complexity. For the lower bounds, we proceed in the reverse direction, reducing classical support-size testing to quantum junta testing through a phase-masked hard ensemble and showing that forward quantum queries can be exactly classicalized on average. Together, these reductions identify support-size testing as the classical core of quantum junta testing and yield matching lower bounds. At constant ε\varepsilonε, they also give a separation between Θ(k/log⁡k)Θ(k/\log k)Θ(k/logk) forward queries and O~(k)\widetilde{O}(\sqrt{k})O(k​) queries with inverse access.