RIKEN-iTHEMS-Report-21, N3AS-21-003

Improving Schrödinger Equation Implementations with Gray Code for Adiabatic Quantum Computers

Chia Cheng Chang,1, 2, 3, ∗ Kenneth S. McElvain,2, 3 Ermal Rrapaj,2 and Yantao Wu1, 2, 4 1RIKEN iTHEMS, Wako, Saitama 351-0198, Japan 2Department of Physics, University of California, Berkeley, California 94720, USA 3Nuclear Science Division, Lawrence Berkeley National Laboratory, Berkeley, California 94720, USA 4Department of Physics, Princeton University, Princeton, New Jersey 08544, USA We reformulate the continuous space Schrödinger equation in terms of Hamiltonians. For the kinetic energy operator, the critical concept facilitating the reduction in model complexity is the idea of position encoding. A binary encoding of position produces a Heisenberg-like model and yields exponential improvement in space complexity when compared to classical computing. Encoding with a binary reflected Gray code (BRGC), and a Hamming distance 2 Gray code (H2GC) reduces the model complexity down to the XZ and transverse Ising model respectively. For A qubits BRGC yields 2A positions and is reduced to its 2-local form with O(A) ancillary qubits. H2GC yields 2A/2+1 positions with O(A2) 3-local penalty terms. We also identify the bijective mapping between diagonal unitaries and the Walsh series, producing the mapping of any real potential to a series of k-local Ising models through the fast Walsh transform. Finally, in a finite volume, we provide some numerical evidence to support the claim that the total time needed for adiabatic evolution is protected by the infrared cutoff of the system. As a result, initial state preparation from a free-field wavefunction to an interacting system is expected to exhibit polynomial time complexity with volume and constant scaling with respect to lattice discretization for all encodings. For H2GC, if the evolution starts with the transverse Hamiltonian due to hardware restrictions, then penalties are dynamically introduced such that the low lying spectrum reproduces the energy levels of the Laplacian. The adiabatic evolution of the penalty Hamiltonian is therefore sensitive to the ultraviolet scale. It is expected to exhibit polynomial time complexity with lattice discretization, or exponential time complexity with respect to the number of qubits given a fixed volume.

I. INTRODUCTION on the discretized wavefunction ψ(am):

The understanding of many physical problems requires 2 1 ψ(x) 2 (Lψ)(an) obtaining Schrödinger equation solutions for the system ∇ ≈ a    (1.2) under study. In this work, we develop techniques to solve 1 X it with adiabatic quantum computing. A typical classical =  ψ(am) 2Dψ(an) , a2 − computing choice for numerically solving the Schrödinger m∈N (n) equation is to pick a discrete basis in which to express the Hamiltonian. Then, one diagonalizes the resulting ma- with (n) indicating the set of immediate neighbors of N trix, either completely, or for very large problems, uses the discrete point n. Here, we have used L to denote techniques such as the Lanczos algorithm to find low ly- the dimensionless part of the Laplacian. The discrete ing eigenstates and eigenvalues. The discrete basis can, Schrödinger equation then follows as for example, be comprised of the states of a harmonic 1 oscillator, or some other exactly solvable Hamiltonian. (Hψ)(an) = (Lψ)(an)+V (an)ψ(an) = Eψ(an). Other useful basis choices are a discrete position, or mo- −2Ma2 (1.3) mentum basis. As a first step, we focus on a simple The next step is to encode the positions in states of version of the problem: a one-body system with a local

arXiv:2103.08056v3 [quant-ph] 18 May 2021 qubits (spins). One choice of encoding in use is to asso- potential in a D dimension periodic position basis. i ciate position i with a set of qubits qn [1]. In each po- 2 sition, the value of the function is given{ } by a fixed-point ~ 2 ψ(x) + V (x)ψ(x) = Eψ(x). (1.1) representation of the qubits. The advantage of such an − 2M ∇ encoding is that the solution is diagonal in the compu- For simplicity of notation, throughout this article, we will tational basis, and is implementable with quantum an- work in natural units, ~ = c = 1. We discretize the equa- nealers available today. However, the number of qubits tion on a lattice with spacing a and N positions in each is comparable to the number of classical bits required to direction. Then, up to a discretization error proportional solve the same problem. to a, the Laplacian becomes an N N matrix which acts Alternatively, one can associate positions with A-body × qubit states in the computational basis and identify each basis state’s amplitude with the wave function at the cor- responding point. Such an association produces a lattice ∗ [email protected] with 2A sites, yielding an exponential improvement in 2 space complexity. This approach appears in circuit-based First, we define a bijection between binary bits and quantum algorithms [2], specifically associating the state qubit states. Spin up will be associated with a bit value of of qubit i with the value of bit i of the position index. 0 or 0 , and spin down with a bit value of 1 or 1 . Basis Bit i of a number is the coefficient of 2i in the base 2 states| i of an A-body qubit system are therefore associated| i representation of the number. with an A bit binary string with the usual interpretation In this work, we explore the advantages of other encod- as an integer in a base 2 representation. For matrices and ing possibilities which yield simpler spin Hamiltonians. A vectors over the basis, we order the entries according to first encoding choice uses the binary reflected Gray code the integer value of the corresponding state’s bit string. (BRGC) to represent the sequence of positions, with the Let 1 be the 2 2 identity matrix, and σx, σy, and σz be bits of the code having the same connection to the qubit the :× states as before. This option requires only the σxσz op- i j 0 1 0 i 1 0  erators, in addition to the σx and σzσz operators in the σx = , σy = , σz = (1.4) i j 1 0 i −0 0 1 transverse-field Ising model, and has the key advantage − of allowing an O(A) mapping of the Laplacian matrix The set 1, σx, iσy, σz forms a basis of 2 2 real matri- to a two-local form. The BRGC encoding preserves the ces. Thus,{ any matrix} of size 2A 2A has a× unique tensor A maximum 2 lattice sites that can be generated from A product decomposition with these× four matrices. qubits. Gray codes were proposed for encoding ladder Throughout the paper, for a matrix M of size 2A 2A, states in d-level systems to simplify raising and lowering or an array V of size 2A, the indices will be denoted× by operators in gate based quantum computing [3]. In [4] square brackets: M[k, m] is the (k, m) element of M and this idea was applied to finding the ground state energy V [k] is the k-th element of V . Subscripts of operators of a deuteron in a harmonic oscillator basis with a sim- will denote the qubit index. When we index qubits, we ulated variational quantum eigensolver (VQE). Here, we will start from 0 and count from the right. For example, extend the application of BRGC to map the Schrödinger equation, in any dimension, to the XZ model. σz = 1 1 σz 1 (1.5) 1 ⊗ ⊗ ⊗ A second Gray code, which we call a Hamming- z distance-2 Gray code (H2GC), introduces an alternative means that σ is acting on qubit 1, while the tensor prod- mapping of the Schrödinger equation requiring only the uct of the 3 identity operators explicitly states that we are transverse-field Ising model. The mapping retains an ex- working in a Hilbert-space of 4 qubits. In the subscript ponential number of valid lattice sites associated with notation, the dimension of the Hilbert-space is unspeci- fied, and will be explicitly stated if necessary (e.g., when A bit codes in the sequence, while the invalid codes are we provide explicit examples). nulled using an O(A2) number of 3-local penalty terms. As a result, the H2GC formulation is polynomially equiv- For multi-qubit operators such as the Laplacian, we alent to BRGC while reducing the complexity of the spin explicitly list all indices in the subscript. For example, model. we label a 3-qubit Laplacian operator acting on qubits 0, 1, 2 as For the convenience of the reader, the notation used throughout this work is defined in Sec.IA. In Sec.II we L(3,bin). (1.6) provide the mapping of the discretized Laplacian to a k- 0...2 local Hamiltonian, in binary, BRGC, and H3GC codes Additionally, the superscript “bin” denotes that the in Sec.IIA,IIB, andIIC respectively. Then, we pro- Laplacian is expressed in binary order. In this work, we ceed to describe the mapping of the local potential to also derive the Laplacian in “BRGC” and “H2GC” forms any Gray code in Sec.III. Having provided all the nec- for the binary reflected Gray code and the Hamming- essary steps for encoding the Hamiltonian, in Sec.IV we distance-2 Gray code. provide various simulations of quantum adiabatic com- For convenience in what follows we define qubit (spin) putation of the ground state. Specifically, in Sec.IVA projection operators we study a BRGC encoded S-wave nucleon potential that 1 + σz 1 0 1 σz 0 0 reproduces the deuteron binding energy. In Sec.IVB we P 0 = = ,P 1 = − = (1.7) focus on a two-dimensional quartic and quadratic set of 2 0 0 2 0 1 potentials activated in different time intervals to study where P 0 projects onto 0 (spin up) and P 1 onto 1 (spin both initial state preparation and time evolution of the | i | i system. We also provide an example of the H2GC code down) for a single qubit. Raising and lowering operators with a harmonic oscillator potential in Sec.IVC. We con- on a spin are defined as clude with a summary of our results in Sec.V. σx + iσy 0 1 σ+ = = σxP 1 = , 2 0 0 σx iσy 0 0 A. Notation and Definitions σ− = − = σxP 0 = . (1.8) 2 1 0 Before we begin our discussion, the notation used The variable A will indicate the number of qubits in throughout the paper is defined here for clarity. the system. 3

Readers who do not speak binary as a first or second A. The Laplacian matrix in the binary encoding language are highly encouraged to read App.B, which summarizes the various binary representations used in Let L(A,bin) be the Laplacian matrix of 2A lattice this work and their related Walsh functions, which are points with periodic boundary condition in one dimen- the foundation of our construction of arbitrary real po- sion. When A = 3, for example, L(3,bin) is given by Eq. tentials. Additionally, for readers who would enjoy a 2.2. We define the operator more in-depth overview of and Gray codes, there are many textbooks available in the litera- A−1 A−1 (A) Y + Y − ture (e.g. [5]). C0...A−1 = σi + σi . i=0 i=0

Then one obtains an recursive formula for L(A,bin): II. CONSTRUCTION OF THE LAPLACIAN L(A,bin) = L(A−1,bin) C(A−1) + σx C(A−1) 0...A−1 0...A−2 − 0...A−2 A−1 0...A−2 In this section, we present the mapping of the discrete A−2 (2.4) (A−1,bin) Y Laplacian to k-local Hamiltonians. The simplest form of = L + (σx 1) σx(P 0 + P 1) 0...A−2 A−1− i i i the discrete Laplacian is given by the nearest-neighbor i=0 finite difference method, starting from the two-site Laplacian with periodic bound- ary conditions ∂2 1 f(x) = [f(x + a) + f(x a) 2f(x)] (2.1) ∂x2 a2 − − (1) x L0 = 2σ0 . (2.5) where a is the lattice spacing. In operator-form, the (1) dimensionless part of the discrete Laplacian is a tri- We emphasize that L0 is the same for all codes and is diagonal matrix with additional non-zero entries in the the starting condition for all recursive formulas presented ends of the antidiagonal due to periodic boundary condi- in this work. tions. For example, a 1-dimensional lattice with 23 lattice Fig.1 gives a graphical derivation of Eq. 2.4 for A = 3. sites has a binary encoded Laplacian operator given by The sum of projection operator products can be seen to be picking out the ends of the 2A−1 position sub-regions. x 0 1 0 0 0 0 0 1 Then, the σ operators add the new green dashed contri- butions in, and subtract the old red dotted contributions 1 0 1 0 0 0 0 0   out. 0 1 0 1 0 0 0 0   (3,bin) 0 0 1 0 1 0 0 0 L0...2 =   , (2.2) position: 0 1 2 3 4 5 6 7 0 0 0 1 0 1 0 0   0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 spin 2: 0 0 0 0 0 1 0 1 spin 1: 0 0 1 1 0 0 1 1 1 0 0 0 0 0 1 0 spin 0: 0 1 0 1 0 1 0 1 x ⎫ where we drop the 2 down the main diagonal. In the σ 0 (2,bin) − x x ⎬ L context of Hamiltonian evolution, the main diagonal con- σ 0σ 1 ⎭ remove x x P0 P0 P1P1 tributes a global time dependent phase and a shift of the −σ 0σ 1 ( 0 1 + 0 1 ) eigenvalues by a constant while leaving the eigenvectors add σ xσ xσ x P0 P0 + P1P1 1 0 1 2 ( 0 1 0 1 ) unchanged. Note that the full Laplacian operator is a2 L. The results can be generalized to the multi-dimensional FIG. 1. The 3 qubit binary encoded Laplacian is constructed case since contributions in different dimensions are inde- from the 2 qubit Laplacian and two corrections. The horse- pendent. For example, in 2 dimensions with Ax qubits shoe shaped lines with arrows indicate the symmetric contri- in the x-direction, Ay qubits in the y-direction, and in- butions between neighboring positions. The first three row of dependent of the position encoding, we have lines show the contributions inherited from L(2,bin), including connections in red(dotted) lines that are now incorrect. The (A ,A ) L x y green(dashed) lines indicate the two contributions not pro- 0...(Ax−1),Ax...(Ax+Ay −1) vided by L(2,bin). The corrections are shown next to the red (A ) =L(Ax) + L y . (2.3) and green lines. 0...(Ax−1) Ax...(Ax+Ay −1)

x In the following sections, we first present the mapping The σi part of the correction generates many copies x z y in binary encoding in SecIIA which requires the full of the product σ0 σ0 = iσ0 , so the Laplacian includes Pauli basis, the derivation of the BRGC Laplacian in all three Pauli matrices if− expanded. In conjunction with Sec.IIB which maps to the XZ-model, and the H2GC the potential, this mapping uses the entire Pauli basis. Laplacian in Sec.IIC which maps to the transverse Ising Current quantum annealers can only evolve qubit sys- model. tems from the transverse-field Hamiltonian to the Ising 4 model. While hardware improvements may be developed 1. Gray encoding to handle couplings of other Pauli products, such as XZ, in the near future, one expects that it will still only han- Any Gray encoding (reflection-based or not) of the po- dle Hamiltonians composed of terms with small Pauli sitions guarantees that neighboring bit-strings differ in 1 support . exactly one bit. Gray code is an alternate compact binary In adiabatic quantum computing, if the target Hamil- encoding of integers 0 to 2A 1 into A bits. For example, tonian is classical, i.e. diagonal in the computational ba- the standard binary encoding− of the numbers from 0 to sis, the reduction of multi-qubit to two-qubit interactions 3 is 00, 01, 10, 11. The binary encoding is convenient for is well-understood [6]. In Eq. (2.4), however, the opera- arithmetic, but neighboring numbers have varying num- tor is non-diagonal in the computational basis on most of bers of bit differences. For neighborhood operators like the sites, making the method in Ref. [6] not applicable. the Laplacian we would like to minimize the bit difference In Sec.IIB, we will introduce the BRGC encoding of the between nearby points. Gray code does this, resulting in Laplacian which allows for reduction with O(A) qubits neighboring points differing in only one bit in their code. to a 2-local form. This is an important advantage of a If we are working in a periodic space, this property is BRGC encoding over the binary one. preserved with a one bit difference between the first and last point. The most common Gray code is the Binary Reflected Gray Code, which can be constructed by in- duction on A. For the base case, A = 1, we encode 0, 1 B. The Laplacian matrix in the binary reflected as 0, 1 . For larger A we concatenate the codes for{ the} Gray encoding A { 1 case} to the reflected (or reversed order) codes for the−A 1 case. We then add a most significant bit of 0 to − As explained in the previous section, the tensor prod- the first half and a 1 to the second half. For A = 2, this uct decomposition of the Laplacian matrix in the binary procedure yields 00, 01, 11, 10 , and for A = 3 it yields { } encoding has the undesirable y terms. Thus, it is natu- 000, 001, 011, 010, 110, 111, 101, 100 . σ { } ral to ask whether it is possible to find a position encoding In general, for an encoding G, let the encoding func- th so that the tensor product decomposition of the Lapla- tion G(n) denote the integer that the n bit-string of G cian is simpler. We will show that the Binary Reflected represents in binary. When we have a specific encoding Gray Code (BRGC) encoding of position, matching po- function, we will explicitly use its code name to denote sition x to the qubit state specified by the xth member it. For example, of the BRGC, achieves a dramatic simplification. BRGC(0) = 0, BRGC(1) = 1, BRGC(2) = 3, An implementable qubit or spin Hamiltonian in current (2.7) BRGC BRGC BRGC quantum annealers is the sum of transverse fields: (3) = 2, (4) = 6, (5) = 7. To transform a matrix M between different encodings, A−1 we view the matrix as intrinsically defined with respect x X x H = σi . (2.6) to the A-body qubit states. Because the qubit states i=0 are ordered differently in different encodings, the ma- trix transformation is induced by the encoding function For a system with A-qubits, Hx contains 2A−1A symmet- G. The encoding function for the binary encoding is the ric couplings between qubit states differing in one bit. By identity map, and therefore M is just M. For the M in symmetric, we mean that Hx couples, for example, qubit encoding G, we define states to and to . Each of these symmet- 000 001 001 000 (A,G) (A,bin) x M [G(k),G(m)] M [k, m]. (2.8) ric couplings will give rise to two 1s in H expressed in ≡ the tensor products of the A qubits. We call the sym- For simplicity, we will also denote the nth bit-string of G metric coupling a connection between the qubit states. with G(n). Note that the Laplacian matrix couples consecutive po- sitions. Thus, if the A-body qubit states are ordered so that the consecutive states differ only in the state of one 2. The recursive formula for the Laplacian matrix qubit, then the representation of Hx in the ordering con- tains all the non-zero elements of the Laplacian matrix2. In the case of the Laplacian, L(bin) is tri-diagonal, but Gray codes, well-known in signal processing, have this (A, brgc) (A,brgc) property [7–9]. We give a short review below. L is not. As explained above, L should be closer to Hx than L(A,bin). For example, when A = 2,

0 1 3 2 0 1 2 3 0  0 1 1 0  0  0 1 0 1  1 brgc 1 1 The support of an operator is the number of non-identity Pauli x X x 1 0 0 1 1 0 1 0 H = σi =    . 3  1 0 0 1  −−−−→to bin 2  0 1 0 1  matricies. i 2 Note that binary encoding does not meet this condition. 2 0 1 1 0 3 1 0 1 0 5

A In the Gray encoding, the 2 connections between ad- position: 0 1 2 3 4 5 6 7 jacent positions in the Laplacian matrix are generated by spin 2: 0 0 0 0 1 1 1 1 Hx, but there are 2A−1A 2A = 2A−1(A 2) extra con- spin 1: 0 0 1 1 1 1 0 0 nections that must be suppressed.− We suppress− the extra spin 0: 0 1 1 0 0 1 1 0 contributions by multiplying by a sum of projection op- x ⎫ 2,BRGC erators on one or more bits. The projection operators are σ 0 ( ) x ⎬ L the simplest if they represent a projection onto a lower σ 1 ⎭ remove x 0 dimension subspace of the 2A binary hypercube. −σ P add 1 0 With a BRGC encoding of the positions, the Lapla- +σ x P0 cian has a recursive decomposition that follows the re- 2 0 cursive definition of the BRGC itself. Because the two FIG. 2. The 3 qubit BRGC Laplacian is constructed from the sub-blocks are reflections of each other with leading 0 2 qubit Laplacian and two corrections. The columns under the and 1 bits added, we know precisely the codes at the position index line are the position encoding. The horseshoe- sub-block boundaries. The outer codes are all zero ex- shaped lines with arrows indicate the symmetric contributions x cept for the leading bit. The inner codes are zero except between neighboring positions with σ0 generating the first x for the two leading bits being 01 and 11. All corrections row and σ1 the second and third rows. The third row is required to construct the larger A bit Laplacian from the drawn as a dotted red line, indicating that it must be removed x 0 A 1 bit Laplacian take place in the subspace of the by σ1 P0 . The last row shows the two missing connections x 0 4 codes− and are restricted to that subspace by a simple between the two sub-blocks, which are implemented by σ2 P0 . projection operator. The base case is the 1-qubit Laplacian of Eq. (2.5). We emphasize, however, for A = 2, the neighbor contri- of the XX couplings appearing in L(bin). In particular, x butions to the Laplacian operator are in Eq. 2.10, the non-diagonal operator σi appears just once each term. Thus, one can reduce the shared product (2,brgc) x x of A 2 projection operators P 0 into a single qubit, for L0,1 = σ0 + σ1 , (2.9) i which− the classical method in [6] applies. This gives the which we again recognize as the transverse Hamiltonian 2-local Laplacian containing XZ couplings. It is impor- acting on qubits 0 and 1. For larger A we have tant to note that the number of ancillary qubits required is a linear function of A, preserving the exponential im- A−3 provement over classical computing. See App.A for the (A,brgc) (A−1,brgc) Y x x  0 (A,brgc) L = L + σA−1 σA−2 Pi . (2.10) reduction of to a 2-local Hamiltonian. 0...A−1 0...A−2 − L i=0 A graphical derivation of Eq. 2.10 is given in Fig.2. A more detailed derivation is given in App.C. In this C. The Laplacian matrix in the Hamming Distance construction, it is clear that since projection operators 2 Gray encoding contain only constants and σz operators, and that no products of Pauli matrices are taken that act on the same The advantage of a Gray encoding of position is that qubits, that each iteration will not introduce either σy or neighboring positions always differ in a single bit flip, products of σx. Since the base case Eq. (2.9) has no σy meaning that Hx automatically generates the neighbor operators or σx products, this property is preserved for contributions to the Laplacian. The Hamming distance all A. between two codes is defined to be the number of bit Fig.2 shows how the added and subtracted terms cor- differences between them. The existence of pairs of non rect the 1D Laplacian L(2,brgc) to make L(3,brgc). All adjacent positions of Hamming distance 1 requires the the required corrections take place in the subspace de- use of projection operators to eliminate the associated fined by the lower A 2 qubits being zero. The trailing unwanted contributions. This motivates a second Gray product of projection− operators in Eq. (2.10) implements code sequence that we call a Hamming distance 2 Gray the projection onto that subspace. In a system with A code sequence (H2GC). With H2GC any two codes in qubits, L(A−1) makes extra 2A−1 periodic contributions, the sequence that are not sequential neighbors are at least shown as red dotted lines, which must be removed, as Hamming distance 2 from each other. Finding the longest well as missing contributions connecting the ends of the such sequence is known as the snake-in-a-box problem; two 2A−1 length sub-blocks, shown as dashed green lines, optimal sequences are unknown for large A. However, that must be added. lower bound constructions show that the sequence length grows exponentially [10], as does the number of omitted codes. These longest length H2GC are quite irregular 3. Reduction to the 2-local form and would have large and complex penalty Hamiltonian contributions for the excluded codes. One can immediately see that the correction terms in We now demonstrate a recursive regular construction each iteration of Eq. 2.10 are simple, containing none of an H2GC sequence in which the length grows slightly 6 slower, as n = 2A/2+1, but with an efficient implemen- via codes in the upper right subspace of Fig.4. For A = 4 tation of the penalty Hamiltonian. We begin with an we choose code a3,2,1,0 = 0001 to remove, as the required A = 4 construction with sequence length 8 as a base penalty term is only 2-local. For larger A we choose one case, illustrated in Fig.3 on Karnaugh map. of the codes in the upper right subspace previously used to join two subsequences. A 3-local penalty term suffices to cover the opened code without overlapping the H2GC a1,0 a 00 01 11 10 sequence. For A = 4, this is obvious, and for larger A, 3,2 the links between the A 2 sequence copies are isolated 00 − in a subspace encoded by aA+1,A = 01 (a5,4 = 01 in the figure) and a single variable suffices to distinguish the 01 two link codes in the subspace, which can be seen in the upper right a5,4 = 01 subspace of Fig.4. 11 We then make two copies of the A sequence associating one with a code of aA+1,A = 00 and the other with a code of aA+1,A = 11. In doing so, all existing penalty 10 terms extend over all 4 values of the new qubits, and are therefore preserved unchanged for the A + 2 sequence.. FIG. 3. The A = 4 base case for recursive H2GC construc- The penalty cover for the bottom left subspace, which tion. The sequence is illustrated with a solid line and passes the sequence does not enter, is completed by a single through 8 codes. The remaining 8 unused codes are covered 2-local term that depends only on the two new qubits. by a 2-local term on the bottom, and a pair of 3-local terms The upper right subspace has two drill-through sequence indicated by vertical ovals. members added that complete the new H2GC cycle. The penalty cover for the unused part of the upper right sub- space is completed by (A 3) 3-local terms, each includ- − a4 ing one subspace qubit having the same value for both a 0 1,0 1 drill-through codes, with the penalty term carrying the a 00 01 11 10 00 01 11 10 3,2 the opposite value for the qubit, and a code of 01 for 00 the new qubits. It would be (A 2) 3-local terms, but − 01 the inherited penalty terms will already cover 1/4 of the 0 subspace, seen in the bottom row of the subspace. At 11 larger A, the pre-existing coverage comes from the lower left subspace of the A 2 sequence. 10 The upper left and− lower right subspaces are them-

a5 selves distance 2 sequences because they are derived from the known good sequence on A qubits. All members of 00 the upper left and lower right differ in both of the new qubits. The drill-through codes in the upper right dif- 01 fer in one bit with the adjacent sequence member in the 1 11 upper left and lower right subspace, and must differ in an additional bit with any other sequence member in the 10 upper left or lower right. And last, the two drill-through codes differ by two bits from each other by construction. FIG. 4. The recursive construction of the cycle for (A + 2) We conclude therefore that the constructed sequence is qubits creates two copies of the A qubit cycle with a gap, an H2GC sequence. isolated by a difference of both new qubits. Solid ovals are the The construction of the (A + 2) sequence, adds (A − original penalty cover extended over the two new qubits. The 2) 3-local terms to the penalty Hamiltonian. Therefore, upper right subspace contains the two codes used to connect the number of 3-local terms grows quadratically with A. the copies into a new cycle. They are referred to as drill- A reduction to 2-local requires at most (some ancillary through codes because they connect the subsequent copies qubits may be shared) (A 2) additional ancillary qubits. through the isolating layer represented by the upper right A key observation is that− the Hamiltonian for the sys- subspace. The additional penalty cover for the upper right tem now takes the form subspace is a set of large subcubes, each covering half the subspace. Code values for a3,2 and a1,0 should be applied A−1 across the entire figure. X x X σi + A(t) Q p + B(t)V. i=0 p∈penalty terms The recursive step builds the A+2 qubit sequence from two copies of the A qubit sequence. The first step is the With the penalty strength, Q, set to O(1/a), the spu- removal of a link in the cycle for A, exposing two ends rious degrees of freedom decouple from the theory. For that will be used to join the two copies in a larger cycle the decomposition of the potential, the prohibited basis 7 states are then “don’t cares”, a term from Boolean logic mapped to the set of k-local Ising models with k A, minimization, meaning that the value of V (c) for the pro- and, indeed, any local potential can be represented≤ in hibited codes may be adjusted to a value that simplifies this fashion. This conclusion can be reached by recogniz- the decomposition of V . ing the Walsh basis as the digitized version of the Fourier In this Hamiltonian, all terms are either just σx or series. While the focus of this work are quantum adia- products of σz (from the expansion of the projection op- batic compuations, we would like to emphasize that this erators), and therefore map to the k-local transverse Ising bijection reduces the problem of constructing the mini- model. The set of projection operators can be decom- mal depth quantum circuit for a given error tolerance, for posed to a 2-local form using intermediate qubits with an arbitrary diagonal unitary operator eif(ˆx), to that of penalty terms as is discussed in Sec.A, which then fur- finding the minimal length Walsh-series approximation ther maps the Schrödinger equation to a 2-local trans- of the exponent f(x) [11]. Details of the Walsh basis and verse Ising model. The simple form of the H2GC Lapla- their relationship to the Ising model and cian raises the possibility of applying this technique with are provided in App.B. existing hardware systems. Typically, given a local potential V (x) in the contin- One strategy for evolving to the H2GC Laplacian is uum, its discrete version V bin[m] is an array obtained to first turn on the penalty via A(t) and later to turn through sampling the continuum at successive lattice on V via B(t). We provide a demonstration of the time spacings a: evolution of the H2GC Hamiltonian in Sec.IVC. Alternatively, since the ground state of the H2GC V bin[m] = V cont.(ma). (3.2) Laplacian operator is known, one can imagine initializ- ing a future quantum computer with this a priori known In order to correctly evaluate the Schrödinger equation (and therefore “trivial” in the context of the quantum however, one must encode the position of the discretized adiabatic theorem) ground state. Specifically, at first ap- potential in the same encoding G as the Laplacian oper- (A,G) proximation, the n valid sites the ground-state wavefunc- ator L , tion are given by the normalization coefficient, while the G bin invalid sites are then set to zero such that V [G(m)] = V [m], (3.3)

Ψ(t = 0, x) =1/2(A+2)/4 x H2GC(i) , For example, if we want to solve the Schrödinger equation ∀ ∈ { } in BRGC with L(A,brgc), then a 2-qubit potential will take Ψ(t = 0, x) =0 x / H2GC(i) , ∀ ∈ { } the form A/2+1 where Z . Corrections to this brgc brgc bin i 0 i < 2 V [0] =V [BRGC(0)] = V [0] ideal ground-state{ ∈ | ≤ are polynomially} suppressed by the brgc brgc bin strength of the penalty coefficient. The exact form of V [1] =V [BRGC(1)] = V [1] higher-order correction terms will depend on the penalty V brgc[2] =V brgc[BRGC(3)] = V bin[3] cover as shown in Fig.4 and is beyond the scope of the brgc brgc bin current work. The time evolution would then depend V [3] =V [BRGC(2)] = V [2] only on the intermediate ground state gap induced by V as its contribution is turned on, and importantly, be pro- because the positions [0, 1, 2, 3] are encoded in BRGC tected by the IR cutoff of the system, which we discuss as [00, 01, 11, 10] and reinterpreted as binary numbers to in more detail in Sec.IV. [0, 1, 3, 2] in the same way the Laplacian is encoded. After being encoded, the potential can then be ex- G panded in Wn . Typically, the inner product with each III. POTENTIAL DECOMPOSITION basis element is taken, resulting in a series expansion. However, in practice, this is computationally expensive as, for N = 2A, O(N 2) operations are required. To speed We demonstrate the method of mapping any local, up the decomposition, the fast Wash-Hadamard trans- real potentials sampled at N = 2A lattice sites in form FWHT is employed to reduce the complexity to D-dimensions. The potential matrix is diagonal and O(N log(N)) operations. This transform expands any spanned by the product of A-body σz interactions yield- i real potential in W G to a given order. ing the complete Walsh basis in encoding G: n As a consequence of the various codes available, the W G = (σz)bit(G(n),A−1) (σz)bit(G(n),0) FWHT is also representation dependent. However, the n ⊗ · · · ⊗ chosen representation in this case is immaterial and only 0 O (3.1) yields a remapping of the Walsh functions. In particular, = (σz)bit(G(n),i) given a system of A qubits, one obtains the same set of i=A−1 basis operators. For example, if one works in the binary bin where G(n) is the n-th bit-string in G. Note that representation, what is labelled W2 will simply be bijec- brgc bit(s, A 1) is the most sigfinicant, i.e. the left most, tively remapped to W3 as discussed in App.B, while bit of s,− and bit(s, 0) is the right most bit. Indepen- the resulting k-local Ising model stays unchanged. In dent of the encoding, the Walsh functions are bijectively this paper, we use the sequency ordered transformation 8

seq seqA FWHT A [12, 13] because the subscript label in Wn trol. Nevertheless, the computational cost of decimation can be interpreted as the sequency3 of the basis function can be made negligibly small for any potential. and is therefore the choice that mimics the Fourier series mode expansion. In summary, the steps of mapping the potential to the B. Example: S-wave deuteron potential qubit or spin Hamiltonian are: 1) discretize the potential to a given lattice, 2) map the potential array to the same As an illustration, in Fig.5a, we plot both the potential code as the Laplacian, 3) decompose the mapped poten- and its low mode expansions from both strategies. We tial using FWHT, 4) map the resulting series expansion constructed a simple S-channel smooth hard core plus to the k-local Ising model. well nucleon-nucleon potential that roughly mimics the form of the well known Argonne v18 potential [14]. The height of the hard core and the depth of the well are A. Potential coarse graining tuned to reproduce the deuteron binding energy in infi- nite volume. The potential has the functional form

While the FWHT reduces the complexity of decompo- 4 4 −(r/Rcore) −(r/Rwell) VNN (r) = Ecoree Ewelle , (3.4) sition, the cost still scales exponentially with respect to − the number of qubits. To further reduce the setup cost, where E and R are free parameters tuned to experimental we opt to employ coarse graining methods. If the fea- data parameterizing the height and radius of the core tures of the potential are on a scale that is much larger (r . 0.3 fm) and well (r & 0.3 fm). Details of the free than the lattice spacing, then one expects a low-mode parameters are given in Fig.5a. expansion to be a sufficient representation of the poten- tial. As a result, given a coarse-graining scale acg a, cg ≥cg the complexity of the FWHT becomes O(N log(N )) 2.0 where N cg = (L/acg)D in D dimensions can be exponen- 0 tially smaller than the original lattice. Such a strategy 20 1.5 − allows one to decouple the setup cost from the lattice size R = 1.7 fm [MeV] well 40 R = 0.25 fm for a suitable potential. V core − E = 54.531 MeV In this work we explore two coarse-graining strategies: [GeV] 1.0 well 60 Ecore = 40Ewell averaging and decimation. In both cases, we define the V − cg 1 2 3 4 coarse-grained lattice, N cg = 2A where Acg < A. 0.5 Avg. Acg =6 In averaging, we block average the potential between a Dec. Acg =7 given interval. This approach has the benefit of obtaining 0.0 exactly the same coefficients as in the complete expansion 1 2 3 4 5 with the high sequency modes Acg < r A set to zero, r [fm] serving as a low pass filter. Therefore for≤ suitable poten- a tials, averaging introduces only a series trunction error that is well-behaved, in the sense that the coefficients of Average higher-sequency contributions are at least polynomially Decimation suppressed. If we have the functional form of the poten- 101 tial, one can analytically compute the indefinite integral and construct averages for the result, and would be com- putationally cheap to carry out. If the potential does not d.o.f. [MeV] / have an analytic form, one would require sampling at all | 0 r 10 grid locations making the computational complexity of | averaging O(2A), and can become prohibitively expen- sive. 4 6 8 10 One approach to coarse-grain potentials without an- cg alytic forms is to only sample N cg equidistant points A through decimation. Unlike averaging however, decima- b tion introduces an uncontrolled error in the values of FIG. 5. a) The S-wave potential for the deuteron (solid the coefficients in addition to the series truncation error. black line), and the respective discretized potentials on coarse- Multiple coarse-graining scales will need to be studied to grained lattices. b) The L1-normed error per degree-of- numerically demonstrate that decimation is under con- freedom of the coarse-grained potential as a function of the number of qubits used to represent the coarse-grained lattice. cg As A increases, the L1-normed difference from the contin- uum potential exponentially decreases. 3 The sequency of a Walsh function is the number of positive zero- crossings of that function. As demonstrated, the Walsh expansion is a very effec- 9 tive representation in both approaches. The difference the addition of a 2-local XZ coupling. The application between averaging and decimation decreases rapidly as of H2GC allows simulations to proceed via the transverse Acg increases. The difference from the continuum poten- Ising model and in principle, can be implemented today tial is summarized in Fig.5b, where the L1-normed error if the transverse field is allowed to persist throughout the per degree-of-freedom is shown to decrease exponentially evolution. given a linear increase in Acg. In this section we simulate the following time- The potential is encoded in the BRGC representation dependent Hamiltonian for this example. Once encoded, it is then expanded by the aforementioned FWHTseqA . As an illustration, we H(s) =HL + B(s)HV , (4.1) provide the Walsh expansion for the averaging scheme Ψ(0) = ( + )⊗A , (4.2) depicted in Fig.5 for Acg = 4, |↑i |↓i where HL is the Laplacian Hamiltonian defined in sec- discretize bin brgc brgc A VNN V V tionII. Here, a = L/2 is the lattice spacing and HV is −−−−−−→ NN −−−→ NN 3 7 the potential Hamiltonian from sectionIII. X seq4 X seq4 The time dependence comes from B(s), whose argu- =129 Wi + 129 Wi i=0 i=4 ment s is a dimensionless coefficient with normalized evo- 10 13 lution time s = t/T with total evolution time T such that X seq4 X seq4 s [0, 1]. The initial wavefunction Ψ(0) is an equal su- + 135 Wi + 135 Wi , ∈ i=8 i=11 perposition state in any encoding of the Laplacian. In particular, the ground state of HL for binary encoding where, for brevity, we have rounded to integer values in and BRGC is exactly the same as the transverse Hamilto- x P x the decomposition. Since we have the functional form of nian H = i σi , which is seen to be the zero-frequency the potential given by, Eq. (3.4), the averaging can be plane wave solution. It follows that adiabatic evolution to performed analytically. H(1) prepares the qubits into the ground state of a given The resulting potential decomposition to the k-local quantum system, which becomes the starting point for a Ising model is, time-dependent Schrödinger simulation. In [15] the authors compare quantum and statistical brgc z z z z HV =129 (I + σ3 + σ3 σ2 + σ2 ) annealing for the transverse Ising model using three an- z z z z z z z z +129 (σ2 σ1 + σ3 σ2 σ1 + σ3 σ1 + σ1 ) nealing schedules; linear, square root, and the logarith- z z z z z z z z z z z z mic form. They found that the logarithmic annealing +135 (σ1 σ0 + σ3 σ1 σ0 + σ3 σ2 σ1 σ0 + σ2 σ1 σ0 ) z z z z z z z z schedule keeps the wavefunction closest to the instanta- +135 (σ2 σ0 + σ3 σ2 σ0 + σ3 σ0 + σ0 ) , neous ground state (with the largest overlap). In this work, we chose the schedule based on recent develop- which can be obtained by inspection from the bijective ments in understanding adiabatic schedules [18, 19]. Fol- map between the Walsh functions and the k-local Ising lowing Ref. [19], we employ the schedule with vaninishing model. We comment that the deuteron potential requires gradients at the boundary, a relatively large basis to describe because the 2 GeV hard core is delta function-like, and poses a challenge for series R s  −1  0 expansion methods. 0 exp s0(1−s0) ds B(s) =   (4.3) R 1 −1 0 0 exp s0(1−s0) ds IV. ADIABATIC QUANTUM COMPUTING SIMULATIONS for all simulations presented in this work. Additional optimizations to the schedule warrant further investiga- tion [20–22], but are beyond the scope of this work. Adiabatic quantum computation (AQC) solves for the The total evolution time T can be roughly estimated ground state of a complex Hamiltonian by starting from from the infrared (IR) cutoff of the theory given by the the known ground state of a trivial Hamiltonian and adi- box size. In particular, the energy gap between the abatically evolving the initial Hamiltonian to the final ground-state and first excited-state of the free field equa- target [15–17]. AQC is an alternative paradigm for real- tion with periodic boundary conditions is izing universal quantum computation. Quantum anneal- ing hardware is the closest to an implementation of AQC. (2π)2 It solves problems where the initial Hamiltonian is the δE = 1/T (4.4) 2mL2  transverse field, and the final Hamiltonian is restricted to be a 2-local Ising model. With the current engineer- where m is the (reduced) particle mass, and L is the ing specifications in mind, one goal of this work is to length of the finite box. In the examples below, we find tailor our algorithm to be implemented with as few ex- setting T to be approximately two orders of magnitude tensions to existing hardware as possible, enabling possi- longer than 1/δE is sufficient to evolve the system adi- ble near-term applications. In particular, the application abatically. We note that there exist proofs of rigorous of BRGC eliminates the necessity of σy. It requires only bounds for the quantum adiabatic theorem [18, 23], but 10

30 1.0 1 1 (1 MeV)− (1 MeV)− 1 1 0.8 (200 keV)− (200 keV)− [MeV] 2 1 20 1 i i| (100 keV)− (100 keV)− ) s

(1) 0.6 1 1

0 (50 keV)− (50 keV)− Ψ( Ψ |

| 10 ) t

0.4 (1) Ψ( H | |h 0.2 ) 0 s

Ψ( E h 0 0.0 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 s s a b

FIG. 6. Adiabatic evolution from a free particle to the interacting system with the S-wave potential of sectionIII. a) Overlap with the true ground state and expectation of the interacting Hamiltonian as function annealing time. b) The ground state energy as a function of evolution time. The dashed black line marks the physical deuteron binding energy of -2.2 MeV. when applied to examples discussed later in this sec- A. Example: S-wave nucleon potential with BRGC tion, the rigorous bounds over-estimate the required time by several orders of magnitude when compared to both We simulate quantum adiabatic evolution for the po- Eq. (4.4) and observations from the corresponding nu- tential discussed in Sec.III. The grid size was chosen to merical simulations. Additional investigation of tighter be N = 27 based on the results displayed in Fig.5. The theoretical adiabatic bounds for Hamiltonian simulation S-wave potential was fitted to reproduce the deuteron is important but beyond this work’s scope. binding energy with a reduced mass of 469.14 MeV, and In the other extreme, the ultraviolet (UV) cutoff is vanishes at a distance r 5 fm. Because the system is ≈ regularized by the lattice spacing and given by 1/a. The weakly bound it extends much further in radius. The critical role of the UV cutoff in the application of the box size is set to L = 20 fm to properly represent the H2GC Laplacian is discussed in Sec.IVC. interacting system’s ground state. In Fig.6 we show the evolution of the system as a func- All simulations have been performed with QbSim, a tion of total evolution times ranging from (1 MeV)−1 to quantum bit simulator. QbSim performs real or imaginary −1 time simulation of qubit systems where the Hamiltonian (50 keV) . Given a lattice box size of 20 fm, the low- is expressed as est non-zero momentum state is approximately a 4 MeV excitation above the ground state. We observe that at a total evolution time of (100 keV)−1 recovers the ground X H(t) = Bi(t)Hi. (4.5) state at the end of the evolution with 98% probability, −1 i and at (50 keV) the probability increases to 99.97%. These values are roughly two orders of magnitude longer than the estimate of Eq. (4.4). The Bi(t) functions are scalar weight functions imple- While changes in the schedule will affect the result, menting time dependence. The Hi components are ex- we observe numerical evidence for physical systems that pressed as sums of products of Pauli matrix operators v the IR cutoff of the theory sets the scale for adiabatic and composites like projection operators Pi . A Python evolution. As a result, for a physical system, the to- integration is used to configure the simulation and ac- tal evolution time required for adiabatic state prepara- cess the system’s evolving state as time is advanced. A tion is expected to scale polynomially with the box size, higher-order Dyson series expansion with automatic step while exhibiting constant scaling with respect to the lat- size control generates the state evolution. Calculations tice discretization, which governs the ultraviolet cutoff. take place in a fully parallel way. With GPU accelera- This claim is further supported by studying the instan- tion, runtimes are reasonable for 20+ qubit systems. We taneous energy spectrum during the evolution as shown intend to write a separate document describing QbSim, in Fig.7. We observe throughout the entire evolution and make it available for broader use. that the ground-state to first excited-state energy gap In the sections that follow, we continue the discussion remains of the same scale as the IR cutoff, only subject of the S-wave deuteron potential mapped using BRGC to small changes even when the system is undergoing the as a time-independent application, followed by an exam- non-trivial change of introducing a 2 GeV hard-core po- ple of a time-dependent calculation in 2-dimensions for a tential. The fundamental reason why the energy gap is quartic potential in BRGC, and conclude with a simple so well protected, even against significant changes in the harmonic oscillator mapped to H2GC. potential, is that the kinetic energy is quantized within a 11

100 (Quartic) 20 50 E0

[MeV] 0

10 i [MeV] ) s n 50 E

Ψ( − 0 | )

s 100 ( − H 5 IR cutoff | 150 ) (Quartic+Quadratic)

s − E0 [MeV]

Ψ( 200

h − δE 0 250 0.0 0.2 0.4 0.6 0.8 1.0 − 0.0 0.5 1.0 1.5 s s a FIG. 7. (Top) The instantaneous spectrum during the adia- batic evolution for the first five states. At s = 0, the free-field 100 Laplacian has a 2-fold degeneracy for periodic boundary con- ditions. The NN-potential lifts the degeneracy afterwards. 0

(Bottom) The energy gap between the first-excited state and [MeV] n 100 ground state as a function of evolution time s. The dashed red E − line is calculated from Eq. (4.4), yielding the infrared cutoff. 200 − 50 [MeV] finite box. This is a significantly different situation than IR cutoff the typical quantum annealing application, in which the δE 0 transverse field is progressively switched off during the 0.0 0.5 1.0 1.5 s evolution. b A classical determination of the ground state is more challenging than one might expect. Because of the large FIG. 8. a) Instantaneous energy of the time-evolved wave- function as function of evolution time s. The dashed line difference in scale between the hard core height and the (Quartic) binding energy, numerical differential equation solvers are labeled by E0 show where the ground-state energy of the system with the quartic potential lies. The dashed line unstable, requiring extra precision and care to find the (Quartic+Quadratic) ground states. A more straightforward technique is to labeled by E0 shows where the ground-state pick a large discrete basis such as more than O(100) energy lies with the addition of the quadratic potential. b) (Top) The energy spectrum of the first 5 eigenstates of H(s), states in a harmonic oscillator basis or a similar num- and (Bottom) energy gap between the ground state and the ber of points in a discrete position basis. One then takes first excited state as functions of evolution time. The dashed matrix elements in that basis and diagonalizes. The large red line is calculated from Eq. (4.4), yielding the infrared cut- basis is required to simultaneously resolve the spatially off. tiny hard core and represent the wave function at the long-range associated with the small binding energy. The runtime of partial diagonalization with techniques like quadratic potential, the Lanczos algorithm is a function of N, the number of (quartic) 2 2 2 basis states, and the number c of matrix-vector product V (x, y) =V4(x + y ) , 3 (4.6) iterations required, taking O(cN ) for a dense matrix. In (quadratic) 2 2 V (x, y) = V2(x + y ), contrast, with the position encoding here, A = 7 qubits − yield N = 128 basis states. where, V4 = 10 MeV and V2 = 100 MeV. As a conse- quence of turning on the quadratic potential, the ground state wavefunction which was originally centered around the origin deforms into a ring. B. Example: 2D quartic potential with BRGC The effective mass is set to m = 1 GeV in a box that is L = 10 fm long in each direction. We opt for N = 26 lattice points per dimension (for a total of 12 qubits) In the section we demonstrate the ability to evalu- yielding a lattice spacing of a 0.15 fm resulting in a ate potentials beyond one dimension. The example per- UV cutoff of approximately 1.3∼GeV. Correspondingly, forms adiabatic evolutions in two stages. Starting from the IR cutoff is approximately 8 MeV given the box size the free particle Hamiltonian, we first evolve the system and particle mass. As a result, we set the evolution into a quartic potential as an example of initial state time of going from free-field to the quartic potential as −1 −1 preparation, followed by the introduction of an additional T1 = (50 keV) , while T2 = (100 keV) is used as the 12

1 evolution time for ramping up the quadratic potential. the Schrödinger equation, we use the scale U Ma2 to For purposes of separating the two parts of the evolu- measure the penalty strength Q needed to suppress≡ the tion, we normalize the evolution time of the first half to invalid codes in H2GC. s1 [0, 1], which governs the initial state preparation of the∈ interacting system with a quartic potential. In the 1.0 second part of the simulation, s2 [1, 1.5] the quadratic potential is turned on gradually. ∈ 0.8

) 0.6

10 s (

s = 1 s = 1.5 B 0.4 8 Bx(s) Q 6 0.2 B (s) V

[fm] B (s)

y 4 0.0 0.0 0.2 0.4 0.6 0.8 1.0 2 s a 0 0 2 4 6 8 10 0 2 4 6 8 10 s = 0 x [fm] x [fm] 0.3 s = 0.5 s = 1

FIG. 9. The probability density from the instantaneous wave- i x

| 0.2

function at s = 1 of the quartic potential, and s = 1.5 with ) the addition of a quadratic potential. s Ψ( h 0.1 In Fig.8a, we show the time-dependent energy of the system. Due to the long evolution time, we observe that the system reaches the correct ground state for the quar- 0.0 tic potential at s = 1. The system then proceeds with 1.0 0.5 0.0 0.5 1.0 − − the addition of a quadratic potential and reaches its new x ground-state energy. Fig.8b shows the evolution of the b low lying spectrum of the system. Similar to the deuteron FIG. 10. a) The time-dependent coefficient Bx(s) for the example in Sec.IVA, we observe that the minimum en- x Q ergy gap stays well protected by the IR cutoff. Addi- transverse Hamiltonian H , B (s) for the penalty Hamilto- nian Q P P (c), and BV (s) for the potential. b) The ground- tionally, we show snapshots of the wavefunction at s = 1 c state eigenvector of H(s) for when (solid line) s = 0 and the and s = 1.5, illustrating the phase transition effects. The system is governed by Hx, (dashed line) s = 0.5 when the wavefunction can, in principle, be obtained through re- system is the H2GC Laplacian, and (dotted line) s = 1 where peated measurements of the qubits at the end of the evo- the harmonic oscillator potential is present. lution.

Our time evolution strategy keeps the transverse field C. Example: harmonic oscillator with H2GC constant during evolution using the schedule function de- fined in Eq. (4.3) to introduce the penalty Hamiltonian, In this section, we perform a calculation using the followed by a second delayed schedule to introduce the H2GC Laplacian. The final target potential is that of harmonic oscillator potential. Fig. 10a shows the time- the simple harmonic oscillator dependent weight B(s) for the three different contribu- tions to the Hamiltonian. The total time required for 1 adiabatic evolution can be roughly estimated by consid- V (x) = mx2. (4.7) 2 ering the dynamics of two stages: 1) transverse Hamilto- nian to H2GC Laplacian and 2) H2GC Laplacian to the In this example, we work in dimensionless units for sim- harmonic oscillator system. plicity, setting the particle mass m to 10 to confine low Given a system of qubits in the ground-state of the lying states to the box and avoid finite volume effects. Laplacian operator, the evolution time required to turn We work in a symmetric box ranging from L = [ 1, 1]. on the harmonic oscillator potential follows the reasoning With , H2GC has 32 valid codes, yielding− a lat- A = 8 from previous sections and is some multiple (e.g. 100 ) tice spacing of a = 2/32 = 0.0625. As a result, the the IR scale, which in this example still holds. How-× (2π)2 IR cutoff is 2mL2 = 0.4934, and the UV cutoff is 16. ever, the physics governing the adiabatic evolution to 1 Because the Laplacian matrix is multiplied by Ma2 in the H2GC Laplacian from the transverse Hamiltonian 13 is dominated by the UV cutoff, and must therefore scale Q=1000xU as a function of U. This is because the penalty Hamil- tonian coefficient needs to be many orders of magnitude 0 above the UV scale to preserve the Laplacian’s eigenspec- 20 trum. As a result, the penalty Hamiltonian significantly − ramps up as a function of s and requires a commensu- n E rate amount of evolution time. In simulations, we set 40 − the evolution time of the first stage to equal the penalty Hamiltonian coefficient. Applying this logic, the time 60 − complexity of adiabatically evolving from the transverse Hamiltonian to the H2GC Laplacian scales exponentially 80 − poorly with the number of qubits, since the lattice spac- 0.0 0.2 0.4 0.6 0.8 1.0 s ing approaches the continuum exponentially quickly due to the exponential growth of the length of the H2GC a code. Nevertheless, the H2GC Laplacian provides a way 25 to implement the Schrödinger equation on near-term adi- Exact gap abatic quantum computers. IR cutoff 20 10000 U For a better understanding of what is happening to × 1000 U the wavefunction, we provide the ground-state eigenvec- 15 × 100 U tors obtained from direct diagonalization in Fig. 10b. δE × 10 U We observe that when H(s) is the transverse Hamilto- 10 × nian, the ground state is the properly normalized su- perposition state. With 8 qubits, the normalization fac- 5 p tor is 1/28 = 0.0625, as indicated by the solid black 0 line. When the penalty Hamiltonian is fully engaged, 0.0 0.2 0.4 0.6 0.8 1.0 the H2GC Laplacian will be in its zero-energy ground- s state. When properly normalized over 32 positions, we p b see a constant wavefunction at 1/32 = 0.177 as shown by the dashed line. After introducing the harmonic oscil- FIG. 11. a) The time-dependent energy spectrum of H(s) of lator potential, the wavefunction becomes the expected the first 10 states for a system of 8 qubits. The solid lines de- Gaussian, as demonstrated by the dotted line. note even-numbered states (0, 2, 4, 6, 8), and dashed lines One can further infer the dynamics of the system by label odd-numbered states (1, 3, 5, 7, 9). b) The time- studying the time-dependent spectrum of the system dependent energy gap between the first excited state and shown in Fig. 11a. In a system of 8 qubits, we observe ground state as a function of evolution time s and strength that the system exhibits a 8-fold degeneracy in the first of the penalty coefficient Q. The dotted, dashed, and solid lines denote progressively stronger penalty coefficients, set rel- excited state, as is expected from the transverse Hamilto- th ative to the U scale. The dashed red line is calculated from nian. We plot the 9 (dashed odd state) excited state to Eq. (4.4), yielding the infrared cutoff. confirm there are no additional degeneracies. When the penalty Hamiltonian is introduced, the 8-fold degeneracy evolves into the expected tower of 2-fold degeneracies for tions in classical computations. We introduced the con- the Laplacian operator in a periodic box. cept of encoding in the association of positions with A- Fig. 11b further demonstrates why the prohibited body qubit states in the computational basis. Such an as- codes must be cleanly gapped from the rest of the sys- sociation provides an exponential improvement in space tem. In this plot, we show the time-dependent energy complexity, and encoding further reduces the Hamilto- gap between the ground-state and first excited state. We nian complexity. With near-term adiabatic quantum expect that the free-field Laplacian has a gap given by computers in mind, we demonstrate the power of Gray the IR cutoff, while deviations from the red line arise only encoding in simplifying the spin Hamiltonian representa- from interactions with the potential. After increasing the tion. With a BRGC encoding of positions, we mapped penalty coefficient to 100U, the H2GC Laplacian starts the Schrödinger equation with a real, local potential to to reproduce the expected gap within 1% (Fig. 11b). the XZ model, and through H2GC we further simplified it to a transverse Ising model while maintaining an expo- nential improvement in space complexity and a quadratic V. SUMMARY AND CONCLUSION count of 3-local penalty terms for unused codes. These advantages also apply to the implementation of ladder The Schrödinger equation remains one of the founda- operators. More specifically, with H2GC, the generic tional blocks of our understanding of quantum systems. Schrödinger equation with a local potential discretized on One common method of solving this equation is by dis- 2A/2+1 points is equivalent to an Ising model on A qubits cretization in a selected basis and has found wide applica- and a quadratic in A count of 3-local penalty terms. 14

In both BRGC and H2GC cases, we employed the to the ultraviolet scale. This sensitivity will give rise to FWT to efficiently encode the potential as an Ising polynomial time complexity with lattice discretization. Hamiltonian and showed that coarse-graining techniques could further reduce the computational cost of encoding. VI. ACKNOWLEDGEMENTS Through numerical simulations, we discovered that the system’s adiabatic evolution is stable due to the infrared We thank Dong An and Alessandro Roggero for useful cutoff associated with finite volume. By borrowing tech- discussions and suggestions. niques successfully used in lattice QCD computations Lawrence Berkeley National Laboratory (LBNL) is op- with finite range interactions, e.g. Luscher’s method [24], erated by The Regents of the University of California for extracting infinite volume results from finite volume (UC) for the U.S. Department of Energy (DOE) under ones, we can envisage performing quantum calculations Federal Prime Agreement DE-AC02-05CH11231. This in finite volume and benefiting from the polynomial time material is based upon work supported by the U.S. De- scaling associated with finite volume for computing ob- partment of Energy, Office of Science, Office of Nu- servables. clear Physics, Quantum Horizons: QIS Research and For all codes, evolution from a free-field to an inter- Innovation for Nuclear Science under Award Number acting system exhibits polynomial time complexity with FWP-NQISCCAWL (CCC, KSM, YW). ER acknowl- volume and constant scaling with respect to lattice dis- edges the NSF N3AS Physics Frontier Center, NSF Grant cretization. For H2GC, if the evolution begins with the No. PHY-2020275, and the Heising-Simons Foundation transverse Hamiltonian followed by the introduction of (2017-228). YW is grateful for mentorship from his ad- penalties to keep the low lying spectrum of the Lapla- visor Roberto Car, and acknowledges support from the cian intact, the time evolution will initially be sensitive DOE Award DE-SC0017865.

[1] S. Abel, N. Chancellor, and M. Spannowsky, Physical ph/0001106. Review D 103 (2021), 10.1103/PhysRevD.103.016008, [17] A. Das and B. K. Chakrabarti, Rev. Mod. Phys. 80, 1061 arXiv:2003.07374. (2008). [2] P. Mocz and A. Szasz, (2021), arXiv:2101.05821. [18] T. Albash and D. A. Lidar, Rev. Mod. Phys. 90, 015002 [3] N. P. D. Sawaya, T. Menke, T. H. Kyaw, S. Johri, (2018). A. Aspuru-Guzik, and G. G. Guerreschi, npj Quantum [19] D. An and L. Lin, (2020), arXiv:1909.05500 [quant-ph]. Information 6, 49 (2020). [20] T. Albash and D. A. Lidar, Phys. Rev. X 8, 031016 [4] O. Di Matteo, A. McCoy, P. Gysbers, T. Miyagi, R. M. (2018). Woloshyn, and P. Navrátil, (2020), arXiv:2008.05012 [21] P. Hauke, H. G. Katzgraber, W. Lechner, H. Nishimori, [quant-ph]. and W. D. Oliver, Reports on Progress in Physics 83, [5] K. Rao and N. Ahmed, in ICASSP ’76. IEEE Interna- 054401 (2020), arXiv:1903.06559 [quant-ph]. tional Conference on Acoustics, Speech, and Signal Pro- [22] K. Takada, Y. Yamashiro, and H. Nishimori, Jour- cessing, Vol. 1 (1976) pp. 136–140. nal of the Physical Society of Japan 89, 044001 (2020), [6] A. Perdomo, C. Truncik, I. Tubert-Brohman, G. Rose, https://doi.org/10.7566/JPSJ.89.044001. and A. Aspuru-Guzik, Phys. Rev. A 78, 012320 (2008). [23] S. Jansen, M.-B. Ruskai, and R. Seiler, Journal of Math- [7] W. H. Kautz, IRE Transactions on Electronic Computers ematical Physics 48, 102111 (2007). EC-7, 179 (1958). [24] M. Lüscher, Communications in Mathematical Physics [8] H. E. Tompkins, IRE Transactions on Electronic Com- 105, 153 (1986). puters EC-5, 139 (1956). [25] J. L. Walsh, American Journal of 45, 5 [9] J. Chinal, “Codes,” in Design Methods for Digital Sys- (1923). tems (Springer Berlin Heidelberg, Berlin, Heidelberg, [26] Kunz, IEEE Transactions on Computers C-28, 267 1973) pp. 44–66. (1979). [10] H. Abbott and M. Katchalski, Discrete Mathematics 91, [27] J. Cooley and J. Tukey, Mathematics of Computation 111 (1991). 19, 297 (1965). [11] J. Welch, D. Greenbaum, S. Mostame, and A. Aspuru- [28] N. Ahmed and S. M. Cheng, IEEE Transactions on Ed- Guzik, New Journal of Physics 16, 033040 (2014). ucation 13, 103 (1970). [12] W. K. Pratt, J. Kane, and H. C. Andrews, Proceedings of the IEEE 57, 58 (1969). [13] J. Manz, IEEE Transactions on Audio and Electroacous- tics 20, 204 (1972). Appendix A: Projection Operator Product [14] R. B. Wiringa, V. G. J. Stoks, and R. Schiavilla, Phys. Reduction Rev. C 51, 38 (1995). [15] T. Kadowaki and H. Nishimori, Phys. Rev. E 58, 5355 (1998), cond-mat/9804280. Current hardware topology requires the qubit or spin [16] E. Farhi, J. Goldstone, S. Gutmann, and M. Sipser, Hamiltonian to have two-local interactions. For Eq. 2.10, eprint arXiv:quant-ph/0001106 (2000), quant- fortunately, there is a known method [6] to replace a 0 product of Pi s to the projection operator of a single qubit 15 while keeping the low-lying spectrum of the Hamiltonian, i j at the expense of adding ancillary qubits4. Because each 00 01 11 10 iteration of the recursion formula shares all but one pro- jection operator with its predecessor, the ancillary bit +1 +1 0 0 1 3 1 cost is linear in A. We include a brief discussion of the +1 z P1 P1 construction of the reduction. σ a ( i + j ) a +1 -1 -1 1 1 0 0 0

To reduce the correction terms to 2-local, it is sufficient 1 1 1 Pa Pi Pj to reduce the product of projection operators to the pro- jection operator of a single ancillary qubit. If we can FIG. 12. Penalties from TableI appear here as non-zero reduce two qubits to one, then a tree or chain of such re- values in the center of the cells, which will be multiplied by Q. ductions will suffice. We construct the 2 to 1 reduction by Contributions are shown as ovals with +1 or -1 indicating the adding qubit a along with a penalty contribution to the coefficient for the contribution. The sum of such values for all 0 0 Hamiltonian. To replace Pi Pj , for example, a penalty ovals covering the center of a cell totals to the penalty value of 0 0 0 the cell. When restricted to the first row, P 1 + P 1 generates is added when Pa = Pi Pj . The penalty is shown for all i j states of qubits a, i6, and j in TableI. We use a Karnaugh the two ovals in the row. The same contribution with the opposite phase is needed in the bottom row, shown with green z 1 1 dashed ovals. σa Pi + Pj generates all 4 contributions. A 1 value is 1 is added in the bottom row with Pa , leaving only 1 1 cell 1/11 needing a correction, which is provided by Pi Pj . This process leaves cell 0/11 with a larger than needed but acceptable penalty of 3Q.

map, shown in Fig. 12, to visualize the adjacencies and TABLE I. A diagonal penalty Hamiltonian for reducing the 0 0 assist in minimizing the implementation of the penalty product of two qubit projection operators pi and pj to a single qubit labeled q that is 0 when the original qubits are both 0. Hamiltonian. The Q indicates a sufficient penalty to remove violators from The resulting penalty Hamiltonian is the low lying states, not a specific value. 0 0 0  1 z 1 1 1 1 a Pa i j Pi Pj Hpen Hpen = Q Pa + σa Pi + Pj + Pi Pj . (A1) 0 1 0 0 1 0 0 1 0 1 0 Q All pieces of this penalty contribution are 2-local. 0 1 1 0 0 Q To reduce a collection of projector products to 2-local, 0 1 1 1 0 Q 1 0 0 0 1 Q an efficient heuristic is to rank projector pairs by the 1 0 0 1 0 0 number of existing products in which they appear. Then, 1 0 1 0 0 0 the highest-ranked such pair is processed, producing a 1 0 1 1 0 0 new qubit, and the projector on the new qubit replaces the pair in every product in which it appears, repeat- ing the process until completion. This process is a well- known heuristic for reducing collections of multi-input boolean and gates. The pair’s tree height can also be in- cluded as a negative contribution in the ranking to avoid long chains of ancillary qubits.

Appendix B: Review of the orthogonal functions

1. Walsh series

The tensor product space of Pauli σz matrices form a complete basis for real valued functions and is anal- ogous to a digitized Fourier series expansion. This can be understood by recognizing that there is a one-to-one mapping of the σz tensor products to the Walsh series 4 1 The qˆi in [6] is Pi here. which we will discuss in this section. 16

a. Walsh and Rademacher functions c. Binary reflected Gray order

Before defining the Walsh functions, let us first intro- An alternative way to order the Walsh functions is to duce the Rademacher functions Rn, which are the basic map the sequence to BRGC, and is the computational building blocks of the basis states. The functions Rn are ordering for the XZ-model mapping of the Schrödinger brgc defined as equation. We use the notation Wn to denote the Gray ordered Walsh function. Following Eq. (B4), the first R (t) = sign sin(2n+1πt), (B1) n three Walsh functions in Gray order are where t spans the unit interval, and n is the set of natural numbers starting from zero. We can immediately inter- brgc 1 001 W =R2, → ∴ 1 pret Rn as the set of periodic step functions with integer brgc 2 011 W =R1R2, frequencies as enforced by periodic boundary conditions. → ∴ 2 In an encoding G, the Walsh functions are constructed brgc 3 010 ∴ W3 =R1. from the Rademacher functions such that → W G 1 (B2) 0 ≡ G d. Sequency order Wn =Πni Rni , (B3) where the set ni is composed of the positional indices of the non-zero bits{ } in G(n). The bit-string representation The sequency order is analogous to the Fourier series of n is read from left to right. For example, if G(n) = mode expansion, and was the version originally employed by Walsh [25]. In this order, each function has one more 110, then ni = 0, 1 , and the corresponding Walsh { } { } G zero crossing than the previous function and the set alter- function is R0(t)R1(t). By definition, W0 corresponds to the zero-frequency mode in all encodings. For a more nates between even and odd functions sequentially. From concrete discussion, we list the first 23 integers in binary, this perspective, it is very similar to the Fourier series BRGC, sequency, and Hamming distance 2 Gray (H2GC) and the concept of frequency is replaced by senquency. encoding The list of sequency bit-strings are obtained by perform- ing a bit-reversal on the BRGC bit-strings. Due to bit-           reversal, the sequency order mapping is dependent on the 0 000 000 000 000 seqA total size of the system A. We use the notation Wn 1 001 001 100 001 to denote the sequency ordered Walsh functions for an           A 2 010 011 110 011 (qu)bit system. Following Eq. (B4), the first three Walsh           3 bin 011 010 010 111 functions in sequency order for a 3-bit system are           (B4) 4 −−→rep 100 110 011 110 5 101 111 111 100 seq3           1 100 W =R0, 6 110 101 101 010 → ∴ 1 seq3 7 111 100 001 101 2 110 W2 =R0R1, → ∴ seq3 int bin brgc seq h2gc 3 010 W =R1. 3 → ∴ 3 The binary order is also called the Hadamard order in the literature, the BRGC order follows from Gray code As a result, low-mode expansions can be computed suc- discussed in Sec. IIB1, sequency order is also called the cessively one contribution at a time given the above se- Walsh order in the literature and is just the reflection of quency order. In Sec.III we suggest using a combination the BRGC order for a given number of bits, and finally of coarse graining and the Fast Walsh Transform (simi- the H2GC sequence is discussed in Sec.IIC and is used lar to the Fourier version) in order to gain a substantial to encode the Laplacian with the transverse Ising model computational speed up when series expanding arbitrary Hamiltonian. real functions. Therefore, this discussion of the sequency ordering is meant to give better intuition for the Walsh series, and are important when discussing the series ex- b. Binary order pansion for potentials. The Walsh functions in the se- quency order are also given by the rows of the Hadamard bin matrix, The Walsh functions Wn in binary order are denoted by a superscript bin. Following Eq. (B4), we give the  k−1 k−1  first three Walsh functions in binary order to illustrate k H(2 ) H(2 ) H(2 ) = k−1 k−1 , (B5) the construction H(2 ) H(2 )   − bin 1 1 1 1 001 W =R2, H(2 ) = . → ∴ 1 1 1 bin 2 010 W =R1, − → ∴ 2 bin bin th k 3 011 W =R1R2. Then, W = n row of H(2 ). → ∴ 3 n 17

1 R0 1 0 z σ 0 2 0 1 W − 1 1 −1 R1 0 z 1 σ1 0 W 1 − 1 1 −1

R2 2 0 z 0 σ0 W 1 1 − −1 0.0 0.2 0.4 0.6 0.8 1.0 3 0

x W 1 FIG. 13. The first 3 Rademacher functions. −1 4 0 W 1 e. Mapping to the Pauli basis −1 5 0 A W For a system of A qubits, the first 2 Rademacher 1 functions have an exact mapping to the diagonal of the −1 local z Hamiltonian, z . The first three 6 0

1 σ Rn σ W − → A−1−n Rademacher functions are shown in Fig. 13 along with 1 − the corresponding 1 local Hamiltonian for a system of 3 0.0 0.2 0.4 0.6 0.8 1.0 qubits. − x It follows immediately that given a system of A qubits, the set of A, -local Ising-like Hamiltonians are bijec- 2 k FIG. 14. The first 7 Walsh functions in sequency order. tively mapped to the first 2A Walsh functions. For ex- ample, in a system of 3 qubits, the n = 4 Walsh function in binary order is given by product, bin z z W = R2 σ = 1 1 σ (B6) 4 → 0 ⊗ ⊗ X and in Gray order as f(x) = anWn(x), n brgc z z z z 1 (B9) W4 = R0R1 σ2 σ1 = σ σ 1 (B7) Z → ⊗ ⊗ an = f(x)Wn(x). and in Walsh order as 0

seq3 z z z z A W4 = R1R2 σ1 σ0 = 1 σ σ . (B8) On a discretized domain of N = 2 equally spaced grid → ⊗ ⊗ points, the Walsh- can be easily re- In general, given a binary representation for an integer alised from Eq. (B5), n, the 1s and 0s map respectively to tensor products of σz and 1. Fig. 14 shows the first 7 Walsh functions in 1 sequency order and highlights the connection to sine and (W ) A (B10) f = A H 2 f cosine functions with increasing frequency. 2

2A−1 where the real function, f = f(xi) i=0 , has been 2. Fast Walsh-Hadamard Transform evaluated at the grid points. This{ transformation} re- quires N 2 operations, just like the Discrete Fourier Trans- In analogy with the Fourier series, the Walsh functions form (DFT), and indeed is equivalent to a multidimen- in a given order form an for the vector sional DFT of size 2A [26]. In practice, one opts for space of functions defined on [0, 1]. As already touched an efficient implementation like the Fast Fourier Trans- upon, differently from the Fourier series, there are many form (FFT) [27]. This is achieved by the Fast Walsh- versions of the Walsh series depending on how the func- Hadamard Transform (FWHT) which requires N log(N) tions are ordered and sequency most closely resembles operations. Through the decades, various fast algorithms the concept of frequency with each subsequent element have been developed, which automatically return the ex- in the series increasing the number of zero crossings by pansion in a given order. As an illustration, here we pro- one. The expansion can be performed through the inner vide the decompostion in binary order for a sequence of 18

4 grid points by matrix partioning techniques [28], where Let the matrix transformation in Eq. 2.8 be denoted by GA:  (W,b)  f (x0) f(x0) (W,b) (A,brgc) (A,bin) f (x1) f(x1) L GA(L ). (C3) 4  (W,b)  =H(4) (A,≡brgc) f (x2) f(x2) To derive a formula for L , we first note that GA(1 (W,b) ⊗ f (x3) f(x3) M) = 1 GA−1(M) if M is invariant under the reflection ⊗ (A−1,bin)   permutation, (A 2,A 3, , 0), and that L f(x0) A−1 − − ··· H(2) H(2)  f(x ) and C both enjoy this invariance. Thus, =  1  H(2) H(2) f(x2) − (A,brgc) (A−1,brgc) x f(x3) L = 1 L 1 GA−1(CA−1)+GA(σ CA−1). ⊗ − ⊗ ⊗(C4) partitions to To compute GA(CA), note that (CA)ij is nonzero if A A (i, j) = (0, 2 1) or (2 1, 0). Thus, GA(CA) is nonzero  (W,b)    A−1 − A−1 − f (x0) f1(x0) at (0, 2 ) and (2 , 0). For example, for A = 2, 4 (W,b) =H(2) f (x1) f1(x1) f(x ) + f(x ) 0 0 1 0 =H(2) 0 2 , f(x1) + f(x3) 0 0 0 0 x 0 G2(C2) =   = σ P (C5)  (W,b)    1 0 0 0 ⊗ f (x2) f1(x2) 4 (W,b) =H(2) 0 0 0 0 f (x3) f1(x3)   f(x0) f(x2) 0 z =H(2) − where P = (1 σ )/2 is a z-projection matrix. It is easy f(x1) f(x3) − − to see that, for general A, which can be further partitioned into x 0 ⊗(A−1) GA(CA) = σ (P ) (C6) (W,b) ⊗ 4f (x0) =f2(x0) = (f1(x0) + f2(x1)) , x x (W,b) To compute GA(σ CA−1), we note that (σ CA−1)ij is 4f (x1) =f2(x1) = (f1(x0) f2(x1)) , ⊗A A A−⊗1 A−1 − nonzero at (i, j) = (2 1, 0), (0, 2 1), (2 , 2 1), (W,b) A−1 A−1 − − − 4f (x2) =f2(x2) = (f1(x2) + f2(x3)) , and (2 1, 2 ). According to Eq. C2, this means x− A−1 A−1 (W,b) that GA(σ CA−1) is nonzero at (2 , 0), (0, 2 ), 4f (x3) =f2(x3) = (f1(x2) f2(x3)) . − (2A−1 + 2A−⊗2, 2A−2), and (2A−2, 2A−1 + 2A−2). For ex- ample, for A = 3, Appendix C: Derivation of Eq. 2.10 in tensor product notation 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0   We start from the recursion formula of L(A,bin) in Eq. 0 0 0 0 0 0 1 0   2.4: x 0 0 0 0 0 0 0 0 x 0 G3(σ C2) =   = σ 1 P . ⊗ 1 0 0 0 0 0 0 0 ⊗ ⊗ (A,bin) (A−1,bin) x 0 0 0 0 0 0 0 0 L = 1 (L CA−1) + σ CA−1 (C1)   ⊗ − ⊗ 0 0 1 0 0 0 0 0 We follow the notation in Sec. IIB1. For an integer 0 0 0 0 0 0 0 0 A N = 2 , the encoding function, GA, of BRGC is a per- (C7) mutation of (0, 1, 2, ,N 1). It is defined inductively. For general n, we see that ··· − G1 = (0, 1). For A > 1, the first half of GA is GA−1, and the second half of is reversed in order and then x x 0 ⊗(A−2) GA GA−1 A(σ CA−1) = σ 1 (P ) (C8) A−1 G added by 2 . For example, G2 is (0, 1) concatenated ⊗ ⊗ ⊗ with , which is . In particular, (1 + 2, 0 + 2) (0, 1, 3, 2) Thus, we obtain

GA(0) = 0 (A,brgc) (A−1,brgc) x x 0 ⊗(A−2) A A−1 A−1 L = 1 L +(σ 1 1 σ ) (P ) , GA(2 1) = 2 + GA(0) = 2 ⊗ ⊗ − ⊗ ⊗ − (C9) A−1 A−2 . x x GA(2 1) = 2 where the base case is L2 = 1 σ + σ 1. − ⊗ ⊗ A−1 A−1 A−1 A−1 A−2 GA(2 ) = 2 + GA(2 1) = 2 + 2 − (C2)