Analyzing Quantum Circuits Via Polynomials Analyzing Quantum Circuits Via Polynomials Kenneth W. Regan1 University at Buffalo (SUNY) 15 November, 2013 1 Includes joint work with Amlan Chakrabarti and Robert Surówka Analyzing Quantum Circuits Via Polynomials Quantum Circuits Quantum circuits look more constrained than Boolean circuits: But Boolean circuits look similar if we do Savage’s TM-to-circuit simulation and call each column for each tape cell a “cue-bit.” Analyzing Quantum Circuits Via Polynomials Analyzing Quantum Circuits Via Polynomials Analyzing Quantum Circuits Via Polynomials Analyzing Quantum Circuits Via Polynomials Analyzing Quantum Circuits Via Polynomials Toffoli Gate Analyzing Quantum Circuits Via Polynomials Bounded-error Quantum Poly-Time A language A belongs to BQP if there are uniform poly-size quantum circuits Cn with n data qubits, plus some number α ≥ 1 of “ancilla qubits,” such that for all n and x ∈ { 0, 1 }n , x∈A =⇒ Pr[Cn given hx0α | measures 1 on line n + 1] > 2/3; x∈ /A =⇒ Pr[. . . ] < 1/3. One can pretend α = 0 and/or measure line 1 instead. One can also represent the output as the “triple product” ha | C | bi, with a = x0α , b = 0n+α . Two major theorems about BQP are: (a) Cn can be composed entirely of Hadamard and Toffoli gates [Y. Shi]. (b) Factoring is in BQP [P. Shor]. Analyzing Quantum Circuits Via Polynomials What is Known About BQP? BPP ⊆ BQP. BQP ⊆ PP [Adleman-Demarrais-Huang, 1998] The acceptance probability px of a QC on input x can be written as px = f (x) − g(x) √ 2m where f and g are #P functions whose nondeterminism ranges over m = nO(1) binary variables. Hence [Fortnow-Rogers, 1999] BQP is in a class AWPP ostensibly weaker than PP. BQP is not known to include graph-isomorphism or MCS (min.-circuit size). Analyzing Quantum Circuits Via Polynomials Translation Into Polynomials Dawson et al. [2004] showed that for QC’s of Hadamard and Toffoli gates, f and g could be the functions counting solutions to two sets E1 and E0 of polynomial equations over Z2 . Applied by Gerdt and Severyanov [2006] to build a computer-algebra simulation of these quantum circuits. [This talk] We make E1 and E0 each a single equation, over any desired field or ring, with direct translation of a much wider set of quantum gates, without resporting to mixed-modulus arithmetic. Some motivations: Build more extensive simulations—Chakrabarti. Understand which QC’s can be simulated “classically.” Idea for putting BQP into the third level of PH, via Stockmeyer’s approximate counting. Ideas for algebraic metrics of multi-partite entanglement. Limitations on scalability of QC’s? Analyzing Quantum Circuits Via Polynomials Target Rings Given a QC C, define k(C) to be the least integer such that all phase angles of gates in C are multiples of 2π/k. A ring is adequate for C if it embeds the k-th roots of unity, either multiplicatively or additively. Also embed e(0) = 0 in the multiplicative case (“p-case”) and e(0) = a set of dummy variables w in the additive case (“q-case”) (a key trick, given below). For Toffoli+Hadamard, k = 2, and Dawson et al. gave an additive embedding into Z2 . Whereas the p-case needs Z3 inside the field, so −1 6= +1. For the T -gate which has entries eπi/4 , k = 8. The gates in Shor’s QFT circuits have large k. But, they can be approximated by circuits with Hadamard and Toffoli only, with k = 2! Analyzing Quantum Circuits Via Polynomials Polynomials and Equation Solving We will translate quantum circuits with n lines and s gates. Each interior juncture is denoted by a variable zij (1 ≤ i ≤ n; 1 ≤ j ≤ s − 1). A gate is balanced if all non-zero entries in its gate matrix have the same magnitude r. All the most prominent gates are balanced. Given a QC of balanced gates, let R be the product of the balancing magnitudes r over its gates. For a polynomial p in variables ai , bi , zij and arguments a, b ∈ { 0, 1 }n , pa,b denotes the polynomial in variables zij resulting from substituting the arguments. NB [pa,b (zij ) = v] denotes the number of binary solutions to the equation, i.e. with an assignment from { 0, 1 }n(s−1) to the zij variables. Now we can state the theorem for the multiplicative case. Analyzing Quantum Circuits Via Polynomials Main Theorem—Multiplicative Case Theorem There is an efficient uniform procedure that transforms any balanced n-qubit quantum circuit C with s gates into a polynomial p such that for all a, b ∈ { 0, 1 }n : ha| C |bi = R k−1 X ω ` NB [pa,b (zij ) = e(ω ` )] (1) `=0 over any adequate ring. The size of p as a product-of-sums-of-products of zij and (1 − zij ) is O(22m ms) where m is the maximum arity of a gate in C, and the time to write p down is the same ignoring factors of log n and log s for variable labels. Analyzing Quantum Circuits Via Polynomials Main Theorem—Additive Case For Zk Theorem There is an efficient uniform procedure that transforms any balanced n-qubit quantum circuit C with s gates, whose nonzero entries have phase a multiple of 2π/k for k a power 2r , into a polynomial q(~a, ~b, ~z, w) ~ over Zk such that for all a, b ∈ { 0, 1 }n : ha| C |bi = Rk −s k−1 X ω ` NB [qa,b (zij , wsj ) = e(ω ` )], `=0 with R and the size of q the same as for p in Theorem 1. (2) Analyzing Quantum Circuits Via Polynomials Substitution and Nondeterminism When there is no gate between junctures j − 1 and j on qubit line i, or if the gate in column j leaves qubit i unchanged (as with a control), then one can substitute: i zji = zj−1 . Thus a new internal variable is introduced only when one cannot substitute. This happens with Hadamard gates. Nondeterminism = the number of internal variables. P 0 denotes polynomials obtained from the P formally given by Theorem 1 by substitution. Q0 likewise from Q in Theorem 2. P 00 denotes a particular embedding into the ring Z2 [u] where the adjoined element u satisfies u4 = 1, so it translates i. Analyzing Quantum Circuits Via Polynomials Examples of Gate and Circuit Simulations Projected from a draft of the paper. . . Definition. Two polynomials are equivalent if they arise from annotations of two equivalent quantum circuits. Analyzing Quantum Circuits Via Polynomials Annotating a circuit x1 a1 H a2 H a3 b2 x3 • H • x1 b2 + a3 − 2x1 b2 a3 b3 H b2 b3 + x3 − 2b2 b3 x3 b1 • b2 • b3 Analyzing Quantum Circuits Via Polynomials What to do with all this—in theory? Two central theoretical problems are: (1) Which subsets of quantum gates can be simulated efficiently with classical computation alone? (2) What (classical) upper and lower bounds can be given for BQP? Both problems involve one in subcases of the classic #P-complete problem of counting solutions to polynomial equations. Unlike the case of SAT, there has not been a comparable classification theorem, though Leslie Valiant and Jin-Yi Cai and their students have undertaken one. Analyzing Quantum Circuits Via Polynomials Case of Stabilizer Circuits Are QC’s with only Hadamard, S, and cnot and/or CZ gates. Have efficient classical simulations: O(s3 ) by Gottesmann-Knill, O(s2 ) by Aaronson-Gottesmann, O(s) by Peter Hoyer (give-and-take log n factors). Additive translation into equations over Z4 : 1 2 3 4 Hadamard: 2yz, with no substitution; and S: y 2 , substituting z := y; and CZ : 2y1 y2 , substituting z1 := y1 , z2 := y2 ; or cnot: 0, substituting z1 := y1 , z2 := y1 + y2 , with the latter being sound in place of the proper z2 := y1 + y2 − 2y1 y2 owing to the invariance under adding 2. Analyzing Quantum Circuits Via Polynomials Yet Another Proof of Dequantization Theorem (Cai-Chen-Lipton-Lu, 2010) Quadratic n-variable polynomials over Z2r for fixed r have polynomial-time solution colunting. Open for variable r = nO(1) . Corollary The exact acceptance probability for stabilizer circuits can be computed in deterministic polynomial time. General running time from CCLL is inferior to best-known “graph state” methods for stabilizer circuits. Can this be matched for the particular polynomials we get over Z4 ? Analyzing Quantum Circuits Via Polynomials Graininess of Solution Set Sizes Theorem (Surówka) Let P (x) be a multivariate polynomial of n variables over Zm where m = pr11 pr22 . . . prkk and all p1 , p2 , . . . , pk are different primes. Then for any g ∈ Zm there is an integer Tg such that: NP [g] = Tg Y i:2|ri ri (n−1) pi2 Y i:2-ri ri −1 (n−1) 2 pi Analyzing Quantum Circuits Via Polynomials Graininess of Solution Set Sizes Theorem (Surówka) Let P (x) be a multivariate polynomial of n variables over Zm where m = pr11 pr22 . . . prkk and all p1 , p2 , . . . , pk are different primes. Then for any g ∈ Zm there is an integer Tg such that: NP [g] = Tg Y i:2|ri ri (n−1) pi2 Y ri −1 (n−1) 2 pi i:2-ri Proof applies Hensel lifting. But we believe we can go beyond what Hensel’s techniques, as used by Ax and others, give. Analyzing Quantum Circuits Via Polynomials Beyond Lifting... Also in terms of the degree, we conjecture the following stronger result, with supportive computer runs: Conjecture Let P (x) be a multivariate polynomial of degree d, of n variables over Zpr1 pr2 ...prk where all p1 , p2 , . . . , pk are different primes. Then for any 1 2 k g ∈ Zpr1 pr2 ...prk there is an integer Tg such that: 1 2 k NP [g] = Tg Y i:ri =1 d n e−1 pi d Y i:ri >1 d pi ri n e−1 2 . Analyzing Quantum Circuits Via Polynomials The Other Goals—Ideas Welcome Extend notion of equivalence to manipulations giving polynomials that do not come from QC’s. Try to increase the R factor without introducing more nondeterminism. That makes Stockmeyer approximation “better.” What notions from algebraic geometry might yield measures of entanglement? Idea: It should reflect constraints on solution spaces. This aligns it with the idea of geometric degree of algebraic varieties. Ultimately goal is to apply Strassen’s lower-bound ideas to QC’s.