Manuscript Offprint
arXiv:2609.38075Ramanujan quantum expanders from the Weil representation
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
For every odd prime power and , we construct an infinite family of Ramanujan quantum expanders of degree . The construction transfers Morgenstern's Ramanujan Cayley graphs on for which is an even power of , through the odd irreducible subrepresentation of the Weil representation of . For a quantum expander of dimension , our implementation uses elementary gates, and ancilla qudits, using a fixed finite gate set depending on . An advantage compared to the previous work of Iyer, Jain, Jordan, and Somma (FOCS 2026) is that assuming the quantum circuit is implemented exactly, we satisfy the singular value bound exactly without any additive error.
Quantum expanders are analogs of random walks over classical expander graphs. They are unital channels for which the second singular value is small. We study mixed-unitary channels, which choose one of unitaries uniformly and apply it to the input state, where is called the degree. For even , Hastings showed that choosing independent Haar-random unitaries and pairing each unitary with its adjoint gives channels whose second singular value converges to as the dimension grows [Has07]. The challenge is to construct these channels explicitly, with efficient circuits.
Harrow observed that a classical Cayley expander on a group G with symmetric generating set S, together with an N-dimensional irreducible representation of G, gives the quantum channel
The second singular value of the channel in Eq. (1) is no larger than the nontrivial spectral norm of the classical walk [Har08]. So we immediately get many quantum channels that satisfy the analytic bound, but the crux is implementing in time polynomial in . Harrow posed the remaining gap to be to design efficient quantum Fourier transforms (QFT) over groups with Ramanujan Cayley expanders.
But he also noted that one does not require a QFT. A nonabelian quantum Fourier transform over a group G with Ramanujan Cayley expanders is definitely sufficient: it decomposes the regular representation into all of its irreducible blocks, after which one can read off . However, for no efficient group QFT is known, and this is the obstruction Harrow identified for the LPS-type example [LPS88, Har08]. But the group QFT solves a much larger problem than we need. It constructs every irreducible representation at once, whereas the quantum expander construction requires only one large irreducible representation.
For , we use the odd Weil representation. It is obtained from a unitary action of on the -dimensional Hilbert space whose computational basis is indexed by the elements of the finite field. The elementary matrices generating have particularly simple actions on this basis: they apply a phase depending quadratically on , relabel by multiplying by a nonzero field element, or apply the Fourier transform over the additive group of [Gér77, GHS08]. It remains to implement an arbitrary matrix in . No general group machinery is needed. One can check that
(2)
Here we used . Thus, every is a product of at most four matrices of the three forms appearing above. Under the Weil representation these three forms become a quadratic phase, the finite-field Fourier transform, and a field scaling, respectively. Hence, implementing an arbitrary generator reduces to implementing these three elementary quantum operations.
Two representation-theoretic facts make this implementation fit Harrow’s transfer theorem. First, the odd parity subspace has dimension and is irreducible. Second, each element of has two lifts to , and the corresponding Weil operators differ only by a scalar phase on the odd subspace. These phases disappear under conjugation and therefore do not affect the channel. With this in mind, we can state the argument succinctly. We can combine the Morgenstern classical Ramanujan Cayley graphs, the odd Weil representation which is one large directly implementable irreducible representation, and Harrow’s transfer principle which implies the quantum spectral bound. With careful examination one can construct a size circuit for a Ramanujan quantum expander, with classical preprocessing time. We defer the discussion of the details to the appendices, which assumes minimal background in quantum computing and representation theory.
Related work. The work of Jeronimo, Mittal, Roy, and Wigderson constructed quantum expanders [JMRW25]. Starting from a constant-degree family with a constant gap, their construction achieves contraction at most with degree , but it does not give the optimal fixed-degree bound we achieve here. The recent work using the quantum Hermite transform gets -close to the Ramanujan bound in time for degree 6 [JIS 26, IJJS26], but our circuit satisfies the bound without additive error. While it is hard to imagine implementing such a quantum circuit exactly in practice, due to the Solovay–Kitaev theorem the overhead for implementing the circuit with operator norm error is where [Kup23]. This gives the additive error in the singular value if we additionally approximate the unitaries on the odd subspace (Section E.4). We do not know how to get this scaling with the approach of [IJJS26].
Open problems
-
Can we construct Ramanujan quantum expanders for all degrees?
-
Can we construct fixed-degree Ramanujan quantum expanders for every sufficiently large Hilbert-space dimension, rather than only for the dimensions ? The construction of [IJJS26] gives near-Ramanujan quantum expanders in every dimension.
A Quantum expansion and the transfer lemma
We first define the contraction that a quantum expander must satisfy. We then prove the transfer lemma: a spectral bound for a classical Cayley walk gives the same bound for an irreducible projective representation. The proof compares norms directly, without decomposing a representation into irreducible blocks.
Parameters. Throughout the appendices, we fix an odd prime power and the degree . We let range over the positive even integers and put
Thus q fixes the degree, while n controls the dimension. The symbol p denotes a field size, not necessarily a prime. We prove the spectral bound in Section D. We give the circuits and their classical preprocessing in Section E.
A.1 The contraction we need
For a finite set , we write for the Hilbert space with orthonormal basis . Thus is a register whose basis labels are field elements. For a finite-dimensional Hilbert space , let be its space of linear operators. We use the Hilbert–Schmidt inner product and norm
The traceless operators form the subspace
This is the orthogonal complement of the identity, since .
A density matrix is a positive semidefinite operator of trace one. If , the maximally mixed state is . A degree-D mixed-unitary channel chooses one of unitaries uniformly and applies it:
This map takes density matrices to density matrices and fixes . We call it an quantum expander if
for every density matrix . It is Ramanujan when , where
We will use the equivalent bound on traceless operators.
Lemma A.1 (Spectral form of quantum expansion). For a mixed-unitary channel , the least for which Eq. (3) holds is
If , then is the unique fixed density matrix.
Proof. We first pass from density matrices to Hermitian traceless operators, then to all traceless operators. Write . Then is Hermitian and traceless. Conversely, for every Hermitian traceless , the operator is a density matrix for all sufficiently small . Thus Eq. (3) is equivalent to for Hermitian traceless .
For a general traceless X, write , with A, B Hermitian and traceless. Since preserves Hermitian operators,
Applying the Hermitian bound to and proves the claimed norm formula. If is fixed and , applying the strict contraction to gives .
A.2 Cayley walks and irreducibility
Let be a generating set of a finite group . The normalized right Cayley walk acts on functions by
We give these functions the norm . Symmetry of makes Hermitian. Generation makes its eigenvalue-one space exactly the constant functions. Writing for the constant-one function, the classical estimate we need is
Here consists of the mean-zero functions. A connected non-bipartite Ramanujan Cayley graph of degree satisfies this estimate with .
A unitary representation assigns a unitary to each , with . A projective unitary representation allows a scalar phase:
It is irreducible if no subspace other than 0 and H is invariant under every . The commutant is the set of operators that commute with every . We need the following form of Schur's lemma.
Lemma A.2 (The commutant criterion). A finite-dimensional unitary representation, ordinary or projective, is irreducible exactly when its commutant consists of the scalar operators.
Proof. Suppose the representation is irreducible and commutes with every . Choose an eigenvalue of . Its eigenspace is nonzero and invariant, so it is all of . Hence . Conversely, if a nonzero proper subspace is invariant, unitarity makes its orthogonal complement invariant too. The orthogonal projector onto that subspace is a nonscalar operator in the commutant. Neither argument depends on the projective phases.
A.3 The transfer lemma
The idea is to turn a traceless operator into the function . Irreducibility makes this function mean zero. The classical walk then contracts it. This proves Harrow's transfer principle [Har08] in the projective form we use.
Lemma A.3 (Spectral transfer). Let generate a finite group , and suppose its normalized right Cayley walk satisfies Eq. (4). Let be an irreducible projective unitary representation on . Then
satisfies for every traceless operator .
Proof. For an operator X, define the operator-valued function
We give such functions the norm . Unitary conjugation preserves the Hilbert–Schmidt norm, so
We next show that has mean zero when . The average
commutes with every . Indeed, conjugating this sum by permutes its terms, since the projective phases cancel. By Lemma A.2, is scalar. It has trace zero, so it is zero.
Finally, applying the classical walk to gives the same function as applying the quantum channel to X:
The bound in Eq. (4) also holds for operator-valued mean-zero functions: apply it to each coordinate in an orthonormal basis of operator space and sum the squared bounds. Thus Eq. (5) gives
5
☐
The function is used only in the analysis. We do not prepare it, enumerate G, or compute a group Fourier transform.
B The classical graph family
We need generators whose Cayley walk has norm at most on mean-zero functions. Morgenstern's construction supplies them [Mor94]. For a publicly accessible reference we use the 1991 report [Mor91]. We use theorem numbering for this version below. Here is the group of determinant-one matrices over a field , and .
Theorem B.1 (Morgenstern finite-field PSL₂ family). Fix , where is an odd prime power. For every even , put . There is a symmetric generating set such that , , and is connected and non-bipartite. Its normalized right walk
satisfies
A field model for , the generators , and lifts to are computable deterministically in operations over the fixed field .
We prove this theorem below. The main choice is between two finite quotients: one gives a bipartite graph, while the other gives the norm bound we need. We defer the algorithm that constructs the field model to Section E.5.
B.1 Which finite quotient?
For an odd prime power Q, the multiplicative group is cyclic. A nonzero element is a square if it has a square root in the field. Euler's test gives
The square class of a records which of these two cases holds.
Write for invertible matrices modulo nonzero scalars. Multiplying a matrix by a scalar changes its determinant by a square. Thus determinant induces the map
An element of has two lifts to , differing by .
Let be monic and irreducible. Its residue field is , and denotes the image of in this field. A projective quaternion class is an invertible quaternion modulo nonzero scalars. Quaternion conjugation is denoted . The reduced norm plays the role of determinant and gives when the norm is nonzero.
We specify the basic generators so that the signs and the compiler's inputs are explicit. Fix a nonsquare and use the quaternion algebra over with
Set
These are Morgenstern’s basic norm-t elements [Mor91, Lemma 4.2(c), Eq. (9), and Definition 4.3]. There are pairs in : the field norm is onto, each fiber has elements, and is its fiber over , written as . Directly,
Thus conjugation pairs these projective classes with their inverses. The sign in matters: replacing its left side by would give norm , not .
Theorem B.2 (Morgenstern's finite quotient, specialized). Let be monic and irreducible, relatively prime to , and of even degree. Reducing the projective classes of the elements in Eq. (7) modulo gives a symmetric set of distinct nonidentity generators of a finite quotient , with
The Cayley graph is -regular and Ramanujan.
Proof. Theorem 4.10 of Morgenstern's report gives the finite -regular Cayley graph, and Theorem 4.11 bounds its adjacency eigenvalues other than by in absolute value [Mor91, Theorems 4.10–4.11].
To identify its group, note that
Thus has a square root in , and the quaternion algebra has the matrix form in Eq. (13). Lemma 4.12 of the report shows that the reduction image contains [Mor91, Lemma 4.12]. Every basic generator has determinant , so the image in is generated by . This quotient has order two, proving Eq. (8). Theorem 4.13 of the report states these two cases explicitly [Mor91, Theorem 4.13].
Remark B.3 (Why we need the square case). If is a nonsquare, every generator changes the determinant square class. These two classes give a bipartition of the Cayley graph on . The function that is 1 on one class and -1 on the other has mean zero and eigenvalue -1. A bipartite graph can be Ramanujan, but this eigenvalue prevents the absolute norm bound required by the transfer lemma. We choose to be a square, which selects the quotient.
B.2 Selecting the non-bipartite family
We need a field model in which both and the fixed nonsquare have known square roots. The first selects the desired quotient. The second lets us write its generators as matrices.
Lemma B.4 (Uniform square moduli). For every even , a deterministic algorithm outputs polynomials such that is monic irreducible of degree , , and, in ,
It uses arithmetic operations over the fixed field .
We prove this lemma in Section E.5. We can now finish the graph argument.
Proof of Theorem B.1. Apply Lemma B.4 and identify with . Since , Theorem B.2 gives the quotient . Let be the image of . It consists of distinct nonidentity symmetric generators and gives a connected Ramanujan Cayley graph.
It remains to rule out bipartiteness. A connected Cayley graph is bipartite only if there is a homomorphism that sends every generator to -1. Row elimination shows that is generated by the images of the upper and lower triangular matrices with ones on the diagonal. Every nonidentity such matrix has the odd order . Hence every homomorphism from to a group of order two is trivial. The graph is therefore non-bipartite. Dividing Morgenstern's nontrivial adjacency bound by gives
which proves Eq. (6).
For the algorithmic claim, use to write Morgenstern's quaternion generators as matrices over . Each matrix has determinant , so scaling it by gives a lift to . We give the formulas in Eqs. (13) and (15). Since is fixed, these steps use operations after the field construction. The total is .
C The odd Weil representation
We need a large irreducible representation whose operators are easy to apply. We begin with three operations on basis states labelled by : a quadratic phase, multiplication of the label by a nonzero field element, and a Fourier transform. These operations give the Weil representation on . This representation is reducible. We restrict it to the states that change sign under , then prove that the restriction is irreducible.
C.1 Three explicit operations
To specify the phases, we use the field trace and its additive character:
In the exponential, we identify elements of with their standard integer representatives. The next fact ensures that the phases distinguish field elements and that the Fourier transform is unitary.
Lemma C.1 (Trace pairing and character orthogonality). The map is a nonzero, hence surjective, -linear map. The pairing is nondegenerate: for every there is a with . The function is a nontrivial additive character, and
Proof. The polynomial is nonzero and has degree less than , so it cannot vanish at all field elements. Thus is nonzero and therefore surjective. For , choose with and set . Then , which proves nondegeneracy.
Linearity of Tr gives , so is an additive character. Surjectivity makes it nontrivial. For , translating the sum in Eq. (9) by a point where multiplies it by a scalar other than one. The sum is therefore zero. The case is immediate.
Let be the quadratic character: it is 1 on squares and -1 on nonsquares. Since is odd, exists in .
Theorem C.2 (Finite-field Weil representation). For and , the matrices and corresponding operators
extend, up to scalar phases, to a projective unitary representation of on .
Proof. The first operator is a diagonal phase, and the second is a phase times a basis permutation. The third is unitary by character orthogonality. To prove the projective multiplication law, we check how these operators conjugate translations and phase modulations.
For , define
An operator commuting with every is scalar. Indeed, the phase operators have distinct joint eigenvalue functions on distinct basis states, by nondegeneracy of the trace pairing. Commuting with all of them forces an operator to be diagonal. Commuting with all translations then forces its diagonal entries to agree.
Direct calculation gives
(10)
For the first identity, the new phase is . The second follows by relabelling . For the third, the matrix coefficient of in is
Character orthogonality makes this zero unless , in which case it is , as required.
The label changes in Eq. (10) are exactly multiplication of the column vector by , , and . These matrices generate by Eq. (2). A word for therefore implements , where . Two words for the same matrix give the same conjugation action on every , so their operators differ by a scalar. Choosing one word for each now gives , with . This proves the theorem over every odd prime-power field.
We call these operations the quadratic phase (also called a chirp), scaling, and Fourier transform. They suffice for every group element. Indeed, the matrix factorization in Eq. (2) reads
This is the two-by-two Bruhat factorization. It expresses every , up to a scalar phase, as a product of at most four of the operators above.
C.2 Why we restrict to the odd subspace
Define the parity operator by . All three operations commute with . Thus the full register has even and odd invariant subspaces, and we cannot apply the irreducible transfer lemma to it. We use the odd subspace
Choose a set containing exactly one representative of each pair .
Lemma C.3 (The odd subspace). The subspace is invariant under the projective Weil representation. It has the orthonormal basis
Proof. The quadratic phase depends on , and scaling sends to . Both therefore commute with . In the Fourier sum, substituting gives . The factorization above now proves invariance under every .
An odd vector has zero coefficient at 0 and opposite coefficients at x and -x. The nonzero field elements form disjoint pairs, so the vectors form the claimed orthonormal basis.
C.3 Irreducibility: first diagonal, then scalar
Lemma C.4 (Irreducibility of the odd Weil representation). The projective Weil representation on is irreducible.
Proof. We show that every operator commuting with the representation is scalar. The quadratic phases force it to be diagonal in the odd basis. The scalings then force its diagonal entries to agree.
Let commute with every and . Each is a joint eigenvector of the quadratic phases, with eigenvalue function . Distinct representatives satisfy . By Lemma C.1, some therefore satisfies
Hence the joint eigenspaces are exactly the one-dimensional lines . Commutation with every quadratic phase forces to preserve each line, so is diagonal in the odd basis.
Scaling sends to . For any two nonzero pairs, we can choose u to send the first to the second. Commutation with every scaling therefore forces all diagonal entries of T to agree. The commutant consists of scalars, so Lemma A.2 proves irreducibility.
The Fourier operator is not needed for this irreducibility argument.
C.4 Why the choice of lift does not matter
Our graphs use , while the Weil operators act on lifts in . The two lifts differ by . The scaling formula gives
Thus changing the lift changes its restriction only by a scalar phase.
For each , choose a lift and a unitary representative of its projective Weil operator. Set
The projective class of is independent of both choices. These operators give an irreducible projective representation of , since they include, up to phases, all the restricted Weil operators.
Their conjugation maps give an ordinary representation. Define
Projective phases cancel, so . Cyclicity of trace gives
Hence is a well-defined ordinary unitary representation on operator space. In particular, neither the choice of lift nor the choice of scalar phase affects the channel.
Remark C.5 (Origin of the representation). The Weil representation is also called the finite oscillator representation. The operators describe translations and phase modulations. The covariance identities above implement linear changes of their labels that preserve the alternating form . Gurevich, Hadani, and Sochen explain this oscillator picture over odd prime fields [GHS08]. The proof above supplies the projective representation over every odd prime-power field, with our chosen signs and scaling convention.
D Proof of the Ramanujan bound
We now combine the classical graph family with the odd Weil representation. For the generators in Theorem B.1, define
Theorem D.1 (Ramanujan quantum expander). For every even and , the map is a degree-D mixed-unitary channel on , of dimension . It satisfies
Consequently, every density matrix on satisfies
Proof. Each is unitary, so is a mixed-unitary channel. By Theorem B.1, the classical walk has norm at most on mean-zero functions. By Lemma C.4 and the lift calculation above, is an irreducible projective representation of . The transfer lemma gives the claimed bound on traceless operators. The density-matrix statement follows from Lemma A.1.
E Exact circuits and classical preprocessing
We first implement a supplied generator using its factorization into at most four elementary Weil operators. We then assemble the channel. Finally, we show how to compute the field model, generator matrices, and circuit coefficients deterministically. This separates the cost of a channel use from the cost of preparing its circuit description.
E.1 The register, gate set, and input promise
The fixed parameters and , a model of , a nonsquare , and the list from Eq. (7) are built into the compiler. We can obtain the list by checking all pairs in the fixed field. No -dependent advice is allowed. An -operation means an addition, multiplication, inversion, or zero test in this fixed field. The notation suppresses polylogarithmic factors.
We store in the basis obtained from a fixed -basis of and the powers . The register has
-level qudits. The full register has dimension , while the channel acts on its -dimensional odd subspace . We assume that the input is already supported on this subspace. Encoding and decoding costs are not included.
Our exact gate library contains all computational-basis permutations on at most three -level qudits and the one-qudit gates
We also include controlled versions of these gates and a fixed-size preparation of . The control labels occupy a subspace of qudits, and the controlled operators act as the identity on unused labels. Since , and are fixed, this is a finite gate library independent of , and . By an exact Stinespring circuit we mean a unitary circuit on the data and an environment, followed by discarding the environment, that realizes the channel exactly. Exactness refers to this declared library, not to exact synthesis over an arbitrary universal gate set.
Theorem E.1 (Uniform exact channel circuit). For every even , a deterministic compiler outputs an exact Stinespring circuit for over the gate library above. On inputs supported on , the circuit uses
The preprocessing uses operations over the fixed field , or bit operations. The hidden constants depend only on , and the fixed local gate library. Encoding into and decoding from are not included.
We prove the circuit bounds next. The preprocessing bound is Lemma E.4, proved in Section E.5.
E.2 Implementing the three elementary operators
For now, suppose we have the field model, a lifted generator, and its factorization coefficients from Eq. (11). Each factor is a quadratic phase, a scaling, or a Fourier transform. We implement each with gates and ancillas.
Reversible field arithmetic. The basic arithmetic operations are
Each map is bijective, with inverse given by subtraction or multiplication by . Schoolbook polynomial multiplication uses base-field multiply-adds. Reduction modulo is a linear map on the unreduced coefficients. We perform it reversibly by retaining those coefficients and applying . This uses controlled additions. Computing into a target and reversing the temporary work gives gates and depth and ancillas for each map above. Fixed field multiplication and the trace are linear maps in the chosen coordinates and obey the same bounds.
Quadratic phase. To apply , compute in an ancilla, apply , and reverse the computation:
The arithmetic bounds give gates and depth and ancillas.
Scaling. The operator multiplies the field label by the fixed element . This is an invertible linear map on m coordinates. Gaussian elimination writes it as elementary coordinate operations, each implemented by a local permutation gate. Its scalar factor is a global phase and may be omitted when we implement the channel.
Fourier transform. This is the Fourier transform of the additive group of the field, not of . In field coordinates it is a linear permutation followed by fixed-size Fourier transforms. To see this, let be our -basis of and set . The trace-pairing lemma makes invertible. For coordinate vectors ,
Consequently,
Indeed, the coefficient of on the right is , as required. Gaussian elimination implements with gates. The remaining gates are copies of . Thus has the claimed cost.
E.3 From a generator circuit to the channel
Proof of Theorem E.1. By Eq. (11), each lifted generator uses at most four elementary Weil operators. The constructions above therefore implement it, up to a scalar phase, with gates and depth and ancillas. We reuse the workspace between factors.
To apply the channel, choose a generator uniformly, apply its unitary, and forget the choice. This uses one exact D-ary random symbol. For a unitary circuit with an environment, use the control register and prepare
Let be the implemented unitary on the full register . Its restriction to equals up to a scalar phase. Apply
and discard C. For every input supported on ,
The partial trace removes terms with unequal control labels. Each remaining term is unchanged by a scalar phase on its generator. This also explains why we may omit the scalar phases in the elementary operators.
Since is fixed, controlling all circuits changes only the constants in the gate and space bounds. Each completed Weil operator preserves , although the primitive arithmetic gates need not preserve it at intermediate times. The preprocessing bound follows from Lemma E.4 below, and Eq. (12) converts to .
E.4 Approximation over another gate set
The exact circuit uses the gate set specified above. We now separate two claims about replacing it by another gate set. Local gate synthesis approximates the encoded channel, allowing small error outside the odd subspace. To use the mixed-unitary spectral bound below, we also require the approximating Kraus operators to be unitaries on the same odd subspace.
Let be the inclusion and write . We measure output error in the trace norm , allowing the input to be entangled with any reference register .
Lemma E.2 (Approximation of the encoded channel). Fix an inverse-closed finite universal gate set with efficiently computable entries on the constant-size local registers. For , the exact circuit in Theorem E.1 can be replaced by a circuit with
gates and ancillas. Let denote the resulting channel from the logical input to the physical output . For every reference register and density matrix on ,
The input is already encoded, as in the exact circuit theorem. The hidden constant also depends on the synthesis gate set.
Proof. Write the full exact Stinespring circuit, including control preparation and workspace, as a product of local gates. Kuperberg's Solovay–Kitaev theorem synthesizes a unitary in fixed dimension to operator-norm error with gates for every fixed , where [Kup23, Theorem 1.1]. We use and . We synthesize each controlled gate as a whole. Each primitive's scalar phase is then a global phase of the full circuit and may be ignored.
Let C and be the exact and synthesized full circuits. Telescoping their products gives, after choosing a global phase,
For any input density matrix , including initialized ancillas and an arbitrary reference register, we therefore have
Here the circuits act as the identity on the reference register. Discarding the environment cannot increase this distance. The gate count is , and local synthesis uses the same registers.
The synthesized circuit need not preserve exactly. Thus the lemma does not assert a spectral bound for a mixed-unitary channel on that subspace. Nor can we use the full physical register instead: the exact full-register channel fixes parity , and hence the nonzero traceless operator .
Lemma E.3 (Spectral stability on a fixed logical space). Suppose are unitaries on and, after a choice of scalar phases, satisfy for all . Then the degree-D mixed-unitary channel
satisfies .
Proof. For every operator X on ,
Average over and apply the exact contraction bound to traceless . This gives , as claimed.
In particular, unitary approximations of error give the additive spectral error .
E.5 Deterministic classical preprocessing
We have shown how to build the circuit from a field model and a list of generator matrices. We finish by computing these data. The only extra condition on the field model is that the residue of t must be a square with a known square root.
Finding a square that generates the field. We need a square that lies in no proper subfield of containing . We choose . The danger is that squaring places it in a smaller field. If is the Frobenius map, then
Thus it suffices to choose outside the kernels of and for . These are linear subspaces. We first show that they do not cover the field, then find a point outside them by fixing one coordinate at a time.
Proof of Lemma B.4. Shoup’s deterministic algorithm constructs a monic irreducible of degree in bit operations because is fixed [Sho90, Theorems 3.2 and 4.1]. Theorem 4.1 covers nonprime base fields. Shoup’s notation denotes a fixed polynomial in , so his bound has the stated form. Work temporarily in and represent the -linear map by an matrix. Put
Every element of is a root of , so . Hence
The strict inequality follows from , valid for even and . In particular, the subspaces do not cover K.
To find a point outside their union, fix coordinates on . For a prefix , let be the sum, over all the subspaces , of the number of their elements extending . Gaussian elimination computes each count: an inconsistent system contributes zero, and a solution space of dimension contributes . We have and
If , at least one choice of satisfies . Choose such an at each step. After steps the count is an integer smaller than one, so the resulting lies in none of the subspaces. There are steps, choices per step, and subspaces to check. Each count uses an rank computation. The total is field operations.
Set . The proper subfields of containing are the with and , hence . If lay in one of them, the implication above would give , contrary to our choice. Thus has degree over . Also , since . Let be the minimal polynomial of and express in the basis . Its coordinate polynomial satisfies in .
It remains to find a square root of . Since is even, contains . Its nonzero trace-zero elements satisfy , so is nonzero. Choose a nonzero in this kernel by Gaussian elimination. Then and is a nonsquare there. Otherwise a square root in would force , contradicting . Thus is a square in the fixed field . Enumerating its elements finds with . The coordinate polynomial of in the -basis is , and .
Computing , its powers, , and the basis conversions uses further operations. Shoup's initial routine also fits within the stated bound for fixed . This proves the lemma.
Computing the generator matrices and circuit coefficients. The square roots now give explicit determinant-one matrices. We then compute the linear and quadratic forms used by the circuits.
Lemma E.4 (Uniform classical compiler). Given for even , the compiler outputs , the lifted generators in , their factorization coefficients, the trace-pairing matrix, the quadratic-phase coefficients, and the complete gate lists. It uses operations over the fixed field . Its bit complexity is , and hence at most .
Proof. Apply Lemma B.4. Since m = rn and r is fixed, this uses operations. Write
Then and . Write for the generators of Morgenstern's quaternion algebra, with , , and . Over we represent them by
These matrices square to and and anticommute. Since and , the images of are linearly independent, so this is an isomorphism onto .
For each , the image of is
This agrees with Morgenstern's matrix formula after choosing -z as his square root [Mor91, Eq. (14) and Theorem 4.13]. We can check the determinant and inverse pairing directly:
Consequently,
and . These projective matrices are distinct: their diagonal entries fix the scalar, and their off-diagonal entries recover , since . None is scalar, since that would force . Computing all lifts uses operations over .
The remaining data come from linear algebra. Field inversions and the coefficients in Eq. (11) cost per generator. We compute the trace as a linear functional in our basis using the Frobenius matrix and its powers, in operations. The trace-pairing matrix and the quadratic forms each have coefficients. Once the trace is available, each coefficient costs operations by schoolbook field arithmetic. Their total cost is .
Gaussian elimination compiles each invertible linear map into elementary gates in time. For a general linear map , the reversible update uses controlled additions. The arithmetic constructions above then give the complete gate lists. These costs are dominated by the field construction. Since the base field is fixed, allowing for bit operations and gate indices gives bit complexity. The weaker bound removes the suppressed logarithms.
Corollary E.5. For every fixed odd prime power q and , put
The channels form an infinite uniform family of degree-D Ramanujan quantum expanders in dimensions . The compiler uses operations over a fixed finite field, or bit operations. Each channel use takes gates on inputs already supported on the odd subspace.
References
[Gér77] Paul Gérardin. Weil representations associated to finite fields. Journal of Algebra, 46(1):54–101, 1977. doi:10.1016/0021-8693(77)90394-5.
[GHS08] Shamgar Gurevich, Ronny Hadani, and Nir Sochen. The finite harmonic oscillator and its associated sequences. Proceedings of the National Academy of Sciences, 105(29):9869–9873, 2008. doi:10.1073/pnas.0801656105.
[Har08] Aram W. Harrow. Quantum expanders from any classical cayley graph expander. Quantum Information and Computation, 8(8–9):715–721, 2008. arXiv:0709.1142.
[Has07] M. B. Hastings. Random unitaries give quantum expanders. Phys. Rev. A (3), 76(3):032315, 11, 2007. doi:10.1103/PhysRevA.76.032315.
[IJJS26] Vishnu Iyer, Siddhartha Jain, Stephen Jordan, and Rolando Somma. Efficient quantum circuits for high-dimensional representations of SU(n) and Ramanujan quantum expanders, 2026. URL: https://arxiv.org/abs/2602.15180, arXiv:2602.15180.
[JIS 26] Siddhartha Jain, Vishnu Iyer, Rolando D. Somma, Ning Bao, and Stephen Jordan. Efficient quantum hermite transform. In Proceedings of the 58th Annual ACM Symposium on Theory of Computing, STOC '26, page 541–552, New York, NY, USA, 2026. Association for Computing Machinery. doi:10.1145/3798129.3800772.
[JMRW25] Fernando Granha Jeronimo, Tushant Mittal, Sourya Roy, and Avi Wigderson. Almost-Ramanujan expanders from arbitrary expanders via operator amplification. SIAM J. Comput., 54(5):FOCS22–120–FOCS22–158, 2025. doi:10.1137/22M1538739.
[Kup23] Greg Kuperberg. Breaking the cubic barrier in the Solovay–Kitaev algorithm. arXiv preprint arXiv:2306.13158, 2023. arXiv:2306.13158.
[LPS88] Alexander Lubotzky, Ralph Phillips, and Peter Sarnak. Ramanujan graphs. Combinatorica, 8(3):261–277, 1988.
[Mor91] Moshe Morgenstern. Existence and explicit constructions of regular Ramanujan graphs for every prime power q. Technical Report TR-91-11, Department of Computer Science, University of British Columbia, June 1991. Theorem numbering in the text refers to this report. URL: https://www.cs.ubc.ca/sites/default/files/tr/1991/TR-91-11.pdf.
[Mor94] M. Morgenstern. Existence and explicit constructions of regular ramanujan graphs for every prime power q. Journal of Combinatorial Theory, Series B, 62(1):44–62, 1994. URL: https://www.sciencedirect.com/science/article/pii/S0095895684710549, doi:10.1006/jctb.1994.1054.
[Sho90] Victor Shoup. New algorithms for finding irreducible polynomials over finite fields. Mathematics of Computation, 54(189):435–447, 1990. URL: https://shoup.net/papers/detirred.pdf.