1 Introduction

In this paper, we demonstrate an algorithm that factorizes any one-dimensional quantum walk into a finite “protocol” of shift and coin operations within a given cell structure. Such a factorization is of fundamental importance for the understanding of single-particle dynamics in discrete time and space and closes an important gap between two different perspectives. Only the two together give a complete understanding and allow to decide whether a given task be achieved with available building blocks. The description of the tasks is by axiomatic conditions “from without”. The corresponding definition of a quantum walk in this perspective is that of a one-step unitary operator on a lattice system satisfying a locality condition. Many overarching results, like the topological classification of walks with symmetries [10, 11, 13, 14] or the idea of quantum fields emerging from discrete automata [6, 7, 17, 27], are based on just such an axiomatic characterization. On the other hand, one may take a constructive approach to quantum walks, defining the class of quantum walks constructively “from within” in terms of a few available operations. This is the natural approach for experimental implementation. Also, the construction of explicit models as analogues of condensed matter systems [5, 9, 19, 26, 30, 33, 41] and the design of quantum walk-based algorithms [1, 2, 35, 40, 44] follows this approach.

Only when the two approaches are demonstrably equivalent, one is sure that no road blocks to implementation have been overlooked. The strongest way of showing this equivalence is a compilation algorithm, which produces from any abstractly given walk a factorization into a sequence of operations. In this paper, we provide such a compilation method, breaking a general walk into two kinds of operations: coins, rotating each cell separately, and the conditional shift. The shift is specified by singling out one basis vector in each cell and then shifting only these components. The shift operation and the cell structure, with cells of dimension \(2\le d<\infty \), will be arbitrary but fixed throughout.

Clearly, every shift–coin protocol is a quantum walk according to the axiomatic definition. For the converse, only partial results existed. In the translation-invariant setting, Fourier transformation maps any quantum walk to a finite-dimensional unitary, which then can be factorized into shifts and coins via techniques that were originally developed for filter banks [20, 28, 45]. These techniques basically use the factorization theorem for polynomials in the Fourier parameter and are hence limited to translation-invariant or periodic cases. A technique overcoming this limitation was given in [22]. It provides a factorization using a grouping of the system into sufficiently large cells. For this technique, the cell structure has to be adapted to the task, and possibly suitably redefined. In terms of a given cell structure, the resulting “shifts” could require very large jumps. In contrast, the algorithm described in this paper takes the cell structure together with nearest neighbour shifts as given. The only assumption is that the jump length of the walk is uniformly bounded by a known constant.

A shift–coin decomposition is required for a number of theoretical tasks. Firstly, to couple walks to gauge fields, such fields are implemented as commutation phases of the shift operators [12, 15, 16, 21]. Secondly, one would like to consider a walk as the one-particle sector of an interacting system, known abstractly as a quantum cellular automaton (QCA) [3, 18, 39]. The best construction for this [45] uses exactly a decomposition as provided in our paper. The analogy between walks and QCAs was a guiding idea in [22] and also includes an extremely versatile compilation method for QCA implementations using an ancillary system. This works for any lattice dimension [4]. However, since it essentially requires a doubling of the system, it can be experimentally too demanding. One can hope for an extension of our results to the QCA setting which would make do without such additional workspace.

Being able to factorize any local unitary is highly desirable also from an experimenter’s perspective since shift and coin operations are implementable in various platforms such as neutral atoms in optical lattices [24], trapped ions [36, 46], light pulses in optical fibres [37, 38] and photonic waveguide arrays [31, 34]. On the other hand, our algorithm provides a concrete method to adapt a given quantum walk to the experimental set-up at hand. This effectively reduces the required coin dimension and thereby expands the set of experimentally implementable systems. Moreover, it is often the case that local operations are cheap, but global operations are costly. It is thus important to minimize the set of required global operations. Our result achieves this in the quantum walk setting, where we show that a shift is the only global operation needed. We demonstrate this by compiling a quantum walk with three-dimensional coins [8, 23, 43] for systems where the experimental set-up provides only qubit cells.

2 Systems and results

We consider the discrete time dynamics of single particles, so-called quantum walks, on the 1D lattice \({{\mathbb {Z}}}\) “from without”. These systems are described by a unitary operator W subject to a locality condition on an arbitrary but fixed cell structure

$$\begin{aligned} {\mathcal {H}}=\bigoplus _{x\in {{\mathbb {Z}}}}{\mathcal {H}}_x, \end{aligned}$$
(1)

with uniformly bounded cell dimensions \(2\le d_x<N<\infty \). We denote the basis of such \({\mathcal {H}}\) by \(\vert x,i\rangle \) with \(x\in {{\mathbb {Z}}}\) and \(i=1,\ldots ,d_x\). The locality condition is expressed as a finite upper bound \(L<\infty \) on the jump length, i.e.

$$\begin{aligned} \vert x-y\vert >L\quad \Rightarrow \quad \langle x,i\vert W\vert y,j\rangle =0. \end{aligned}$$
(2)

Clearly, this abstract point of view is independent of the given cell structure, and reorganizing the cells leads merely to a different but still finite jump length. We could thus omit the cell structure altogether and define quantum walks “from without” as banded unitaries on \(\ell ^2({{\mathbb {Z}}})\simeq {\mathcal {H}}\).

Below we provide a factorization algorithm that allows us to compile any such banded unitary W as a quantum walk “from within”, i.e. as a sequence

$$\begin{aligned} W=C_0S^{n_1}C_1\cdots S^{n_{i}}C_i \end{aligned}$$
(3)

of two basic operations that are determined by the cell structure (1): the conditional shift operator S transports the first basis vector of each cell one cell to the right, i.e.

(4)

and coin operators C that act locally as a \(d_x\)-dimensional unitary C(x).

Since every quantum walk defined “from within” trivially satisfies the locality condition (2), the algorithm provides a constructive proof of the equivalence of the two definitions:

Theorem 2.1

Let W be a unitary operator on \(\ell ^2({{\mathbb {Z}}})\). Then, the following are equivalent:

  1. (1)

    W is banded.

  2. (2)

    On every cell structure, \({\mathcal {H}}=\bigoplus _{x\in {{\mathbb {Z}}}}{\mathcal {H}}_x\) with uniformly bounded cell dimensions \(2\le d_x<N<\infty \), W can be written as a finite product of coin operators and powers of the conditional shift S as in (3).

The conditional shift S in (4) is defined with respect to a fixed local basis. This arbitrary choice might be neglected: pick a unit vector \(e_x\) in each cell \({\mathcal {H}}_x\) and write \(e=\{\ldots ,e_{x-1},e_x,e_{x+1},\ldots \}\). We call a “generalized” conditional shift (with respect to e) the operator \(S_e\) such that (1) \(S_ee_x=e_{x+1}\) and (2) \(S\phi =\phi \) if \(\phi \perp e_x\) for all \(x\in {{\mathbb {Z}}}\). In other words, generalized conditional shifts shift one unit vector of each cell and leave invariant their complement. This operator is unitary, and

Lemma 2.2

W as in Theorem 2.1 is banded iff it can be written as a finite product of powers of generalized conditional shifts \(S_j=S_{e^j}\), i.e.

$$\begin{aligned} W=S_1^{n_1}\cdots S_i^{n_i}. \end{aligned}$$
(5)

Proof

We show that any product of generalized shifts can be written as a product of coin operators and powers of the conditional shift S as in (3), and vice versa. This implies the statement via Theorem 2.1.

First, note that any two generalized shifts \(S_e\) and \(S_f\) are unitarily equivalent by a coin operator. In particular, for every generalized conditional shift \(S_e\) there is a coin C such that \(S_e=CSC^*\) where S is the conditional shift in (4). Thus, (5) implies (3).

For the converse direction, we have to realize arbitrary coins by generalized shifts. To this end, let e be a choice of unit vectors, and set \(f_x=\lambda _xe_x\) for \(\lambda _x\) with \(|\lambda _x|=1\). Then, \(S_e^*S_f\) acts like the identity everywhere except in the one-dimensional subspaces of each cell spanned by the \(e_x\), where it multiplies with the phase \(\mu _x=\lambda _{x+1}\lambda _x^*\). Thus, by choosing e appropriately, we can realize any coin operator that multiplies the one-dimensional subspace of each cell spanned by \(e_x\) by a phase \(\mu _x\) by choosing an initial condition, say \(\lambda _0=1\), and iteratively solve for \(\lambda _x\). This is enough to realize an arbitrary coin C: since the dimensions of the cells are uniformly bounded, we can diagonalize C locally and write it as a product of at most \(\max _x\dim {\mathcal {H}}_x\) pairs \(S_e^*S_f\) as above. \(\square \)

Remark 2.3

Rephrasing the above, Theorem 2.1 and Lemma 2.2 state that on any cell structure the group generated by one particular conditional shift together with all coins, the group generated by generalized conditional shifts and the group of banded unitary matrices coincide.

3 The algorithm

Given some banded unitary W, fix some cell structure according to (1), thereby determining the jump length L in (2). To avoid heavy notation, we choose a pictorial approach to describe the subroutines in an intuitive way. Our factorization algorithm consists of five steps:

3.1 Step 0—deal with non-vanishing indices

In this preparatory step, we bring the walk into a standard form with zero net flow of information in the sense of Kitaev [25]. This is measured by an integer-valued index \(\mathrm{ind}\,(W)\) [22, 25], which can be explicitly calculated as

$$\begin{aligned} \mathrm{ind}\,(W)=\sum _{x\ge 0>y}\left[ {\text {tr}}\left( (W_{xy})^*W_{xy}\right) -{\text {tr}}\left( (W_{yx})^*W_{yx}\right) \right] . \end{aligned}$$
(6)

Note that by the locality condition on W, the sum on the right side contains only finitely many terms. Also, \(\mathrm{ind}\,(W)\) does not depend on the position where it is evaluated, i.e. one can replace the 0 in the formula above by any other lattice site.

Important for our purpose is that the index is additive, i.e. \(\mathrm{ind}\,(W_1W_2)=\mathrm{ind}\,(W_1)+\mathrm{ind}\,(W_2)\). Therefore, coins do not contribute to the index. Moreover, \(\mathrm{ind}\,(S)=1\) so that the walk \(S^{-n}W\), with \(n=\mathrm{ind}\,(W)\), has vanishing index. This allows us to henceforth assume that the walks we consider have vanishing net information flow, i.e. \(\mathrm{ind}\,(W)=0\).

3.2 Step 1—decouple periodically

Any walk W on the integers with vanishing index can be decoupled into two half-line walks via a local decoupling [22, Theorem 3], i.e. we can write W as

(7)

where the first operator on the right acts non-trivially only on a block of 2L cells and the second one is decoupled into a left and a right part. An explicit algorithm for this decoupling is found in [10, Section VII.B.]. The size of the block there is determined by the range of \(P-WPW^*\), where P is the half-space projection left invariant by the rightmost factor in (7). In our case, this is indeed a block of L cells to each side of the cut point.

Due to the locality of the decoupling, we can repeat this periodically every 2L cells which gives

(8)

where the blocks on the right side are of different size since the local dimensions of the cells they entail vary. Moreover, it is important to note that these blocks act on overlapping subspaces.

In a sense, the decomposition (8) is already a shift–coin decomposition with a cell structure given by the blocks, and the first factor a conjugation of the second factor by an unconditional shift on this cell structure. However, the point of our paper is to work with a given cell structure, and a particular conditional shift. The remaining steps are thus necessary to make do with just this given shift and cell structure.

3.3 Step 2—parametrize blocks by elementary unitaries

Each block in (8) is a \(D\times D\)-dimensional unitary with D depending on the dimensions of the 2L cells in the block. Every such block can be parametrized as a product of \(D(D-1)/2\) “elementary unitaries” [29, 32, 42] of the form

$$\begin{aligned} M^{nm}= \begin{pmatrix} {\mathbb {1}}&{} &{} &{} &{} \\ &{} a &{} &{} b&{}\\ &{} &{} {\mathbb {1}}&{} &{}\\ &{} c &{} &{} d&{}\\ &{} &{} &{} &{} {\mathbb {1}}\end{pmatrix} \equiv \begin{bmatrix}\begin{pmatrix} a &{} b \\ c &{} d \end{pmatrix}\end{bmatrix}^{nm}, \end{aligned}$$
(9)

which differ from the identity only in the four matrix elements at \((n,n),(n,m),(m,n)\) and (mm). These are replaced by the entries a, b, c and d of a unitary \(2\times 2\) matrix. We indicate the positions of these elements by the superscript in the matrix M. With this notation, every block in (8) can be written as

$$\begin{aligned} \prod _{n=1}^{D-1}\left( \prod _{m=n+1}^{D}M^{nm}\right) . \end{aligned}$$
(10)

The basic ingredient in the construction of the elementary unitaries in this decomposition is an elimination algorithm: first, one sets the (1, D)-th matrix element to zero by right multiplication with a suitable \((M^{1D})^*\). Continuing down the row, this successively eliminates the first row by right multiplication with \(\prod _{n=2}^{D}(M^{1n})^*\) and only leaves the pivot element non-vanishing. Applying this to the other rows yields the factorization in (10). Importantly, this algorithm affects only the block itself and therefore can be applied simultaneously in each block in (8).

We remark that the algorithm described in [29, 32, 42] actually does more: it aims at a parametrization of arbitrary unitaries by Euler angles in each hyperplane, while we are merely interested in the decomposition (9).

3.4 Step 3—factorize elementary unitaries into shifts and coins

The previous step reduces our task to writing each \(M^{nm}\) as a shift–coin sequence on the given cell structure. To this end, we embed \(M^{nm}\) into \({\mathcal {H}}\) by padding it with identities on both sides and take the indices nm as basis labels in the given cell structure, i.e. \(n=\vert x,i\rangle \) and \(m=\vert y,j\rangle \).

We distinguish two cases: either n and m belong to the same cell, i.e. \(x=y\). In this case, \(M^{nm}\) acts locally in the given cell structure, i.e. it is already a coin. Otherwise, \(M^{nm}\) straddles two cells with distance \(k=y-x\ne 0\). Then, the factorization of \(M^{nm}\) requires the use of the conditional shift \(S^k\). To implement \(M^{nm}\) as a shift–coin sequence, we start from a coin at y of the form

$$\begin{aligned} C_M=\begin{pmatrix}a &{} b &{} &{} \\ c &{} d &{} &{} \\ &{} &{} {\mathbb {1}}\end{pmatrix}, \end{aligned}$$
(11)

where abcd are the matrix elements of \(M^{nm}\) as in (9). Then, we conjugate \(C_M\) with \(S^k\), which translates the basis element \(\vert y,1\rangle \) to the correct cell at x. Last, we conjugate with a coin C that swaps basis elements in the cells at x and y according to

$$\begin{aligned} C\vert x,i\rangle =\vert x,1\rangle \quad \text {and}\quad C\vert y,j\rangle =\vert y,2\rangle \end{aligned}$$
(12)

and acts trivially otherwise. Combining these conjugation steps yields the sequence of shift and coin operations

$$\begin{aligned} M^{nm}=C^\dagger S^{-k}C_MS^{k}C. \end{aligned}$$
(13)

Let us illustrate this algorithm by implementing an elementary unitary \(M^{13}\) on the cell structure \({{\mathbb {C}}}^2\oplus {{\mathbb {C}}}^2\) where \(k=1\):

By adapting the swapping coin C accordingly, we can similarly factorize the other elementary unitaries \(M^{23}\), \(M^{24}\) and \(M^{14}\) on \({{\mathbb {C}}}^2\oplus {{\mathbb {C}}}^2\).

Applying this to each elementary unitary in the product (10) yields a factorization for each block in (8). In this factorization, the shift powers k are bounded by 2L. In some intermediate stage, neighbouring cells might be involved, but for the factorization given here it is understood that all coin operators of the neighbouring blocks are set to \({\mathbb {1}}\). Then in a sequence like (13), the shifts to neighbouring blocks are immediately reversed. In this way, the neighbouring blocks serve as workspace, which is left unchanged by the whole sequence.

3.5 Step 4—assemble

The total number of factors in the factorization of the blocks is infinite, because in (8) there are infinitely many blocks. However, we can parallelize the steps. Since, by definition, a coin is a unitary that is block diagonal with respect to the cell structure, coins in different cells can be executed in parallel. The shifts are anyhow global operations.

In order to get a global factorization, we first separate each factor in (8) into even and odd blocks

(14)

As discussed at the end of the previous step, this suffices to ensure that the factorizations of that step can be written with global shifts, but do not interfere with each other. However, the detailed shift sequence depends on the cell structure of each block. The same unitary, considered as a banded matrix but with respect to different cell structures, may already be a coin in one structure but may require a resolution into shifts and coins in another. This can be cured by introducing “blank cycles” of the form (13) but with \({\mathbb {1}}\) coins. The blank cycles are also compatible with using just the neighbouring blocks as workspace. Thus, we get a fixed “shift skeleton” from which each factorization cycle picks just the shifts needed. Due to the upper bound N on the dimension of the cells, there are only finitely many cell structures for blocks of 2L cells, and therefore only finitely many shift sequences that need to be unified.

The coins needed between any two shifts are now simply direct sums of the appropriate coin choices in each block. Often they will be \({\mathbb {1}}\), namely for all blank cycles and alternatingly for the even and odd blocks. This may seem wasteful but ensures that the whole operation can be parallelized in finitely many global steps.

This concludes our description of the algorithm and thus the proof of Theorem 2.1.

4 Example

An important application of the above algorithm is to tailor a given quantum walk to another architecture that is determined by experimental constraints. As an example, we show how the so-called “three-state” quantum walk discussed in [8, 23, 43] can be realized in a set-up with qubit cells. As the name suggests, this walk is defined on a Hilbert space with three-dimensional cells as the shift–coin protocol

$$\begin{aligned} W=S_1S_3^\dagger C \end{aligned}$$
(15)

where \(S_1=S\) as in (4) and \(S_3\) shifts the third basis vector in each cell. As coin we choose for all x the three-dimensional Grover matrix

$$\begin{aligned} C(x)=\frac{1}{3}\begin{pmatrix} -1 &{}\quad 2 &{}\quad 2 \\ 2 &{}\quad -1 &{}\quad 2 \\ 2 &{}\quad 2 &{}\quad -1 \end{pmatrix}, \end{aligned}$$
(16)

but the following analysis applies with appropriate changes for arbitrary choices of the local coins. The index of W vanishes by \(\mathrm{ind}\,(W)=\mathrm{ind}\,(S_1)+\mathrm{ind}\,(S_3^\dagger )=\mathrm{ind}\,(S_1)-\mathrm{ind}\,(S_3)=0\), such that we can directly start with Step 1. To decouple W, we capitalize on the hemiolic relation between the old and the new cell structure, where two three-dimensional cells are interpreted as three two-dimensional cells, i.e.

On the new \({{\mathbb {C}}}^2\)-cells, W has jump length \(L=2\) such that Step 1 gives a decoupling every \(2L=4\) new cells. However, by the hemiolic relation between the old and the new cell structure we can also decouple every 2L cells in the old cell structure where \(L=1\). It thus suffices to consider blocks that contain only 3 instead of 4 new cells. One possible periodic decoupling according to (8) results in the blocks

(17)

acting on \({\mathcal {H}}_{x-1}\oplus {\mathcal {H}}_{x}\oplus {\mathcal {H}}_{x+1}\) (\(x\in 3{{\mathbb {Z}}}\)) with respect to the \({{\mathbb {C}}}^2\)-cells, and

(18)

acting \({\mathcal {H}}_x\oplus {\mathcal {H}}_{x+1}\oplus {\mathcal {H}}_{x+2}\).

The parametrization by elementary unitaries of the first block can be read off directly. Applying the algorithm described in Step 2 and in [29, 32, 42], the second block is parametrized by the elementary unitaries \(M^{12}=[H]^{12}\), \(M^{14}=[A]^{14}\) and \(M^{24}=[\sigma _1H]^{24}\) for the first \(3\times 3\) block, and analogously \(M^{45}=[H]^{45}\), \(M^{46}=[A]^{46}\) and \(M^{56}=[\sigma _1H]^{56}\) for the second \(3\times 3\) block, where \(H=(\sigma _1+\sigma _3)/\sqrt{2}\) is the Hadamard coin and

$$\begin{aligned} A= \frac{1}{3}\begin{pmatrix} 2\sqrt{2}&{}\quad 1\\ -1&{}\quad 2\sqrt{2} \end{pmatrix}. \end{aligned}$$
(19)

Hence, the blocks (18) are parametrized as

(20)

Thus, in Step 3 we only need to consider \([\sigma _1]^{23}\) on \({\mathcal {H}}_{x-1}\oplus {\mathcal {H}}_{x}\oplus {\mathcal {H}}_{x+1}\) and \([A]^{13}\), \([\sigma _1 H]^{23}\), \([H]^{45}\) and \([A]^{46}\) on \({\mathcal {H}}_{x}\oplus {\mathcal {H}}_{x+1}\oplus {\mathcal {H}}_{x+2}\), since the remaining elementary unitaries are already coins. \([\sigma _1]^{23}\) is realized by \(C_M=\sigma _1\) at x, \(k=1\) and swapping coins at \(x-1\) and x. The shift–coin factorizations of the elementary unitaries in (20), with \(k=y-x\ne 0\), are parametrized by the following data:

 

\(C_M(x)\)

k

C(x)

\([A]^{13}\)

\(A(x+1)\)

1

\(\sigma _1(x+1)\)

\([A]^{46}\)

\(A(x+2)\)

1

\(\sigma _1(x+1)\)

\([\sigma _1H]^{23}\)

\(H\sigma _1(x)\)

\(-1\)

\({\mathbb {1}}\)

\([H]^{45}\)

\(\sigma _1H\sigma _1(x+1)\)

\(-1\)

\({\mathbb {1}}\)

Since the cells have constant dimension, in Step 4 these block factorizations can be performed in parallel with a common “shift-skeleton”.

5 Summary and outlook

We provided a concrete algorithm to factorize any one-dimensional quantum walk into a finite product of shift and coin operations on any given cell structure. This closes a long-standing gap in the understanding of such systems, but also has practical implications: on the one hand, it allows to adapt a given walk to any experimental set-up and, on the other, to either optimize with respect to the cell dimensions or the jump length.

An interesting direction for future work is to optimize the length of the shift–coin protocols. One option that jumps to the eye is to homogenize a given cell structure by “filling up” each cell by locally adding innocent bystanders until all cells have the same dimension. This, however, would violate the assumption of a given fixed cell structure.