Factoring with Qutrits: Shor's Algorithm on Ternary and Metaplectic Quantum Architectures
Total Page:16
File Type:pdf, Size:1020Kb
Factoring with Qutrits: Shor's Algorithm on Ternary and Metaplectic Quantum Architectures Alex Bocharov∗, Martin Roetteler∗, and Krysta M. Svore∗ ∗Quantum Architectures and Computation Group, Station Q, Microsoft Research, Redmond, WA (USA) We determine the cost of performing Shor's algorithm for integer factorization on a ternary quan- tum computer, using two natural models of universal fault-tolerant computing: (i) a model based on magic state distillation that assumes the availability of the ternary Clifford gates, projective measurements, classical control as its natural instrumentation set; (ii) a model based on a meta- plectic topological quantum computer (MTQC). A natural choice to implement Shor's algorithm on a ternary quantum computer is to translate the entire arithmetic into a ternary form. However, it is also possible to emulate the standard binary version of the algorithm by encoding each qubit in a three-level system. We compare the two approaches and analyze the complexity of implementing Shor's period finding function in the two models. We also highlight the fact that the cost of achiev- ing universality through magic states in MTQC architecture is asymptotically lower than in generic ternary case. I. INTRODUCTION gate and the two-qubit CNOT gate, do not remain Clif- ford operations in the ternary case. Therefore, they can- not be emulated by ternary Clifford circuits. We resolve Shor's quantum algorithm for integer factorization [42] this complication by developing efficient non-Clifford cir- is a striking case of superpolynomial speed-up promised cuits for a generic ternary quantum computer first. We by a quantum computer over the best-known classical then extend the solution to the Metaplectic Topological algorithms. Since Shor's original paper, many explicit Quantum Computer (MTQC) platform [18], which fur- circuit constructions over qubits for performing the al- ther reduces the cost of implementation. gorithm have been developed and analyzed. This in- cludes automated synthesis of the underlying quantum A generic ternary framework that supports the full circuits for the binary case (see the following and refer- ternary Clifford group, measurement, and classical con- ences therein: [3, 4, 14, 31, 32, 44, 45, 47, 49]). trol [13], also supports a distillation protocol that pre- pares magic states for the P gate: It has been previously noted that arithmetic encod- 9 ing systems beyond binary may yield more natural em- −1 2π i=9 P9 = ! j0ih0j + j1ih1j + !9 j2ih2j;!9 = e : (1) beddings for some computations and potentially lead to 9 more efficient solutions. (A brief history note on this The Clifford+P9 basis is universal for quantum compu- line of thought can be found in section 4.1 of [28].) Ex- tation and serves a similar functional role in ternary logic perimental implementation of computation with ternary as the Clifford+T basis in binary logic (see [13, 25] for logic, for example with Josephson junctions, dates back the more general qudit context). to 1989 [34, 35]. More recently, multi-valued logic has We show in more detail further that the primitive R been proposed for linear ion traps [36], cold atoms [43], gate available in MTQC is more powerful in practice than and entangled photons [30]. In topological quantum com- the P9 gate. puting it has been shown that metaplectic non-Abelian Arguably, a natural choice to implement Shor's algo- anyons [18] naturally align with ternary, and not binary, rithm on a ternary quantum computer is to translate the logic. These anyons offer a natively topologically pro- entire arithmetic into ternary form. We do so by us- arXiv:1605.02756v4 [quant-ph] 8 Apr 2017 tected universal set of quantum gates (see, for example, ing ternary arithmetic tools developed in [8] (with some [37]), in turn requiring little to no quantum error correc- practical improvements). We also explore alternative ap- tion. proach: emulation of binary version of Shor's period find- It is also interesting to note that qutrit-based com- ing algorithm on ternary processor. Emulation has no- puters are in certain sense space-optimal among all the table practical advantages in some contexts. For exam- qudit-based computers with varying local quantum di- ple, as shown in section III A, using a binary ripple-carry mension. Thus in [22] an argument is made that, as the additive shift consumes fewer clean P9 magic states than dimension of the constituent qudits increases, the cost of the corresponding ternary ripple-carry additive shift (cf. maintaining a qudit in fully entangled state also increases table III). and the optimum cost per Hilbert dimension is attained We also show that on a metaplectic ternary computer at local dimension of dee = 3. the magic state coprocessor is asymptotically smaller Transferring the wealth of multi-qubit circuits to than a magic state distillation coprocessor, such as the multi-qutrit framework is not straightforward. Some of one developed in [13] for the generic ternary quantum the binary primitives, for example the binary Hadamard computer. Another benefit of the MTQC is the ability 2 to approximate desired non-Clifford reflections directly to [25],[13]). In this section we describe a generic ternary the required fidelity, thus eliminating the need for magic computer, where the full ternary Clifford group is pos- states. The tradeoff is an increase in the depth of the tulated; we also describe the more specific Metaplectic emulated Shor's period finding circuit by a logarithmic Topological Quantum Computer (MTQC) where the re- factor, which is tolerable for the majority of instances. quired Clifford gates are explicitly implemented by braid- The cost benefits of using exotic non-Abelian anyons ing non-Abelian anyons [17, 18]. For purposes of this for integer factorization has been previously noted, for paper, each braid corresponds to a unitary operation on example in [2], where hypothetical Fibonacci anyons were qutrits. Braids are considered relatively inexpensive and used. It is worthwhile noting that neither binary nor tolerant to local noise. Universal quantum computation ternary logic is native to Fibonacci anyons, so the NOT, on MTQC is achieved by adding a single-qutrit phase flip CNOT or Toffoli gates are much harder to emulate there gate (Flip in [18], Rj2i in [7] and our Subsection II D). In than on a hypothetical metaplectic anyon computer. contrast with the binary phase flip Z, which is a Pauli The paper is organized as follows. In Section II we gate, the ternary phase flip is not only non-Clifford, but state the definitions and equations pertaining the two it does not belong to any level of Clifford hierarchy (see, ternary architectures used, and gaive a quick overview of for example, [8]). Intuitively one should expect this gate the Shor's period finding function. In Section III we per- to be very powerful. Level C3 of the ternary Clifford hi- form a detailed analysis of reversible classical circuits for erarchy is emulated quite efficiently on MTQC architec- modular exponentiation. We compare two designs of the ture, while the converse is quite expensive: implementing modular exponentiation arithmetic. One is emulation of phase flip in terms of C3 requires several ancillas and a binary encoding of integers combined with ternary arith- number of repeat-until-success circuits. metic gates. The other uses ternary encoding of integers with ternary gates. In Section IV we develop circuits for the key arithmetic A. Ternary Clifford group gates based on designs from [8] with further optimiza- tions. In Section V we compare the resource cost of perform- Let fj0i; j1i; j2ig be the standard computational basis 2π i=3 ing modular exponentiation. An interesting feature of for a qutrit. Let !3 = e be the third primitive root ternary arithmetic circuits is the fact that the denser and of unity. The ternary Pauli group is generated by the more compact ternary encoding of integers does not nec- increment gate essarily lead to more resource-efficient period finding so- lutions compared to binary encoding. The latter appears INC = j1ih0j + j2ih1j + j0ih2j; (2) to be better suited in practice for low-width arithmetic and the ternary Z gate circuit designs (hence, e.g., for smaller quantum comput- ers). 2 Z = j0ih0j + !3j1ih1j + ! j2ih2j: (3) We also compare the magic state preparation require- 3 ments. We highlight the huge advantage of the meta- The ternary Clifford group stabilizes the Pauli group plectic topological computer. Magic state preparation is obtained by adding the ternary Hadamard gate H, requires width that is linear in log(n) on an MTQC, 3 whereas it requires width in O(log (n)) on a generic 1 X j k 1 H = p ! jjihkj; (4) ternary quantum computer. 3 3 All the circuit designs and resource counts are done un- der assumption of fully-connected multi-qutrit network. the Q gate Factorization circuitry optimized for sparsely connected networks, such as nearest-neighbor for example, is unde- Q = j0ih0j + j1ih1j + !3j2ih2j; (5) niably interesting (cf. [40]) but we had to set this topic aside in the scope of this paper. and the two-qutrit SUM gate, SUMjj; ki = jj; j + k mod 3i; j; k 2 f0; 1; 2g (6) II. BACKGROUND AND NOTATION to the set of generators of the Pauli group. Compared to the binary Clifford group, H is the A common assumption for a multi-qudit quantum ternary counterpart of the binary Hadamard gate, Q is computer architecture is the availability of quantum the counterpart of the phase gate S, and SUM is an ana- gates generating the full multi-qudit Clifford group (see log of the CNOT (although, intuitively it is a \weaker" entangler than CNOT, as described below). For any n, ternary Clifford gates and their various ten- n 1 It requires width in O(logγ (n)) in the binary Clifford+T architec- sor products generate a finite subgroup of U(3 ); there- ture, where γ can vary between log2(3) and log3(15) depending fore they are not sufficient for universal quantum compu- on practically applicable distillation protocol.