Introduction

Quantum control refers to the ability to steer a dynamical quantum system from an initial to a desired target or outcome, with a desired accuracy1. Several theoretical and experimental approaches to model controlled wave packets and their application are very useful to pave the way for future simulation or quantum calculation schemes2,3. In many of these, the physical system to be controlled is driven by an external potential, which needs to be controlled all along the experience, until the target is achieved. Although in this work we do not claim to offer a general theory of quantum control, we provide a new approach in which the control scheme is encoded once and for all into its initial state. The main protagonist here is not a generic quantum system, but a quantum walks (QW) in discrete time4,5,6. What may seem like a particular choice, in reality offers great potential, given the recognised versatility of this simple system. In fact, QW are a universal computational model7,8, that spans a large spectrum of physical and biological phenomena, relevant both for fundamental science and for applications. Applications include search algorithms9,10,11,12 and graph isomorphism algorithms13 to modeling and simulating quantum14,15,16,17,18 and classical dynamics19,20. These models have sparked various theoretical investigations covering areas in mathematics, computer science, quantum information and statistical mechanics and have been defined in any physical dimensions21,22 and over several topologies23,24,25. QW appear in multiple variants and can be defined on arbitrary graphs. Essentially, these simple systems have two registers: one for its position on the graph and the other is its internal state, often called coin state. It propagates on the graph, conditioned by its internal state, similarly to the classical case, where at each step we flip a coin to determine the direction of the walker. The essential difference is that in the quantum case, the walker propagates in superposition on the graph in various directions starting from a node. This feature allows the quantum walker to explore the graph quadratically faster a classical one, property that make it very useful to design, e.g., efficient search algorithms. However, we do not know many way to control the quantum walker evolution. For instance we can choose the initial condition and the evolution operator to tune the walker’s variance \(\sigma (t) = a f(t)\), where a is a real prefactor and f(t) is typically a linear function of t. However, once these are fixed at the initial time, both f and a remain the same all along the evolution, unless we do not allow the evolution operator to change in an in-homogeneous way at each time-step, as in26,27, which may be very costly. How can we control the walker’s dynamics at our will without having to change the evolution operator? Would it be possible to control, having only the initial condition, the variance or its average trajectory? In this manuscript we argue that, at the price of introducing a quantum memory, the answer is affirmative. Quantum walks with memory have already been studied and come in several variants28,29. As an example, these modified quantum walks may have extra coins to record the walker’s latest path, as in30,31. Here, the idea is to define an additional qubit for each site in the grid, with which the walker interacts throughout the evolution. Surprisingly, we will prove that the initial condition of the whole system, memory + walker, is sufficient to control, e.g., the variance and the mean position of the walker for all times. The interest is double: from one hand we provide a simple distributed quantum computational model to control a single qubit along its dynamics, which will not require us to control and adjust the local update rule at each time step; from a totally different perspective, this simple system may suggest an operational way to model and to unitary discretise curved propagation, as argued in32.

The manuscript is organised as follows: in “The model” we will provide the definition of the model with and without memory, in one spatial dimension; then, in “Control the walker’s dynamics”, we will prove analytically and numerically how to control the variance and the mean trajectory of a quantum walker, solely via the initial condition of the whole system. Finally, in “Discussion” we discuss and conclude.

The model

Formally, the simplest but non trivial QW is defined on a Hilbert space which has position and velocity (internal “spin” state) components. The position Hilbert space X is the set of states \(\left|\right.x\rangle \) where \(x \in {\mathbb {Z}}_N\), and the velocity Hilbert space is \(V={\mathbb {C}}^2\), for which we may choose some orthonormal basis labeled \(\{\left|\right.v^-\rangle , \left|\right.v^+\rangle \}\). Denote the QW Hilbert space by \(\mathscr {H}\),

$$\begin{aligned} \mathscr {H}=X\otimes V. \end{aligned}$$

The overall state of the walker at time \(t \in {\mathbb {N}}\) may thus be written

$$\Psi (t) = \sum\limits_{x} {\psi _{x}^{ + } } (t)\left| x \right.\rangle \otimes \left| v \right.^{ + } \rangle + \psi _{x}^{ - } (t)\left| x \right.\rangle \otimes \left| v \right.^{ - } \rangle,$$

where the scalar field \(\psi _x^+\) (resp. \(\psi _x^-\)) gives, at every position \(x\in {\mathbb {Z}}_N\), the amplitude of the particle being there and about to move right (resp. left). We can write an amplitude vector at time t and position x over the ordered basis of the coin space \(\{\left|\right.v^+\rangle , \left|\right.v^-\rangle \}\),

$$\begin{aligned} \Psi _x(t) =\begin{pmatrix}\psi _{x}^+(t)\\ \psi _{x}^-(t)\end{pmatrix}. \end{aligned}$$

Let W be the evolution of the QW at each time step,

$$\begin{aligned} \Psi _x(t+1)=W \Psi _x(t). \end{aligned}$$

W is composed of a coin operator \({C}\), an arbitrary element of U(2), acting on the velocity space, e.g.,

$$\begin{aligned} C =\left( \begin{matrix} \cos {\theta } &{}\quad i\sin {\theta } \\ i\sin {\theta } &{}\quad \cos {\theta } \\ \end{matrix}\right) , \end{aligned}$$

followed by a shift operator \({S}\)

$$\begin{aligned} {S}\Psi _x(t) =\begin{pmatrix}\psi _{x-1}^+(t)\\ \psi _{x+1}^-(t)\end{pmatrix}, \end{aligned}$$
(1)

with the overall evolution being

$$\begin{aligned} W = {S}({{\text {Id}}_X \otimes {C}}), \end{aligned}$$

where \({\text {Id}}_X\) is the identity operator on the position Hilbert space.

Quantum memory

Now, let us consider that at each site x of the grid we have a supplementary qubit \(\left|\right.m_x\rangle \in \mathscr {M}^x=\mathbb {C}^2\). This extended Hilbert space, as proved in6,33, may be used as a quantum memory to keep track of the past of the walker. Notice that the size of the Hilbert space now seems to be growing exponentially. However, according to34 this is not going to be an issue for infinite lattices as the Hilbert space can be taken to be countably infinite dimensional, even with the memory qubits included. That is because the interactions are only finite neighborhood and a Hilbert space of finite, unbounded configurations suffices35.

The whole state (QW + quantum memory) lies now in \(X \otimes V \bigotimes _{x=1}^{N} \mathscr {M}^x\). Indeed, one of the main motivation of this history dependent QW is to build a truly self-avoiding walker: one knows that the walker moves towards the left or towards the right according to the internal coin state; thus, in order to avoid sites already visited by the walker, one conditions the coin state on the neighbor memory states, which eventually recorded previous presence of the walker.

The coin operator \(\mathscr {C}\) of the previous section is replaced by a different operator Q, that acts on the joint velocity-memory space: \(V \otimes \mathscr {H}_{\mathscr {M}^{x-1}} \otimes \mathscr {H}_{\mathscr {M}^{x+1}}\)—whose basis is the set of \(\left|\right.v^\alpha \beta _l\delta _r\rangle \), \(\alpha = \{+, -\}\), \(\left|\right.\beta _l\rangle \) and \(\left|\right.\delta _r\rangle \) being the memory qubits located respectively at the positions \((x-1)\) and \((x+1)\) - so that the memory qubits adjacent to the position x of the walker are involved:

$$\begin{aligned}{{Q}} &= \left|\right.v^+ 1 1 \rangle \langle v^+ 00\left|\right. + \left|\right.v^- 0 0\rangle \langle v^- 00\left|\right. + \left|\right.v^- 0 1\rangle \langle v^+ 01\left|\right. + \left|\right.v^+ 0 1\rangle \langle v^- 10\left|\right.\\&\quad +\, \left|\right.v^+ 1 0\rangle \langle v^+10\left|\right. + \left|\right.v^- 1 0\rangle \langle v^-01\left|\right. + \left|\right.v^+ 0 0 \rangle \langle v^+11\left|\right. + \left|\right.v^- 1 1\rangle \langle v^-11\left|\right. \end{aligned}$$
Figure 1
figure 1

Schematic evolution of the walker \(\Psi _x(0)\) at the initial time conditioned by the neighbors qubits at position \(x=-1\) and \(x=1\).

Finally, the shift operator still acts on the joint velocity-position space in the standard manner, as defined in Eq. (1), and trivially on the memory space. Altogether the global evolution, depicted in Fig. 1, is:

$$\begin{aligned}&\Psi (t+1)= G \Psi (t) \\&G= S Q . \end{aligned}$$

Control the walker’s dynamics

To simplify our analysis, we choose a localized set of initial conditions

$$ \Psi (0) = \left| 0 \right.\rangle \left| v \right.^{ - } \rangle \left( {\mathop \otimes \limits_{{x = - \left\lfloor {\frac{N}{2}} \right\rfloor }}^{{ - 1}} A_{{ - x}} \left| 0 \right.\rangle + B_{{ - x}} \left| 1 \right.\rangle } \right)\left( {\mathop \otimes \limits_{{x = 0}}^{{\left\lfloor {\frac{N}{2}} \right\rfloor }} \left| 0 \right.\rangle } \right) $$
(2)

which is equivalent to requiring that all those sites with a nonzero internal state have all quantum memories to their right set to \(\left|\right.0\rangle \), as depicted in Fig. 2.

Figure 2
figure 2

The initial state of the quantum memory on the one dimensional line.

By looking at the single walker subspace, the recurrence relations for each amplitude, detailed in the “Appendix”, read:

$$\begin{aligned} \begin{aligned} \psi _x^-(t+1)&= A_{-x}\psi _{x+1}^-(t) \\ \psi _x^+(t+1)&= \psi _{x-1}^+(t) + B_{-x+2}\psi _{x-1}^-(t) \end{aligned} \end{aligned}$$
(3)

and given Eq. (2) we prove the following theorem.

Theorem 1

The left-moving and right-moving amplitudes \(\psi _x^{\mp }(t)\), solutions of the linear set of Eqs. (3), reads:

$$ \psi _{x}^{ - } (t) = \left\{ {\begin{array}{*{20}l} {\prod\limits_{{i = 1}}^{t} {A_{i} } } \hfill & {{\text{if }}x = - t} \hfill \\ 0 \hfill & {{\text{else}}} \hfill \\ \end{array} } \right. $$

and

$$ \psi _{x}^{ + } (t) = \left\{ {\begin{array}{*{20}l} 0 \hfill & {{\text{if }}\left| x \right| > t} \hfill \\ 0 \hfill & {{\text{if }}x = - t} \hfill \\ 0 \hfill & {{\text{if }}x - t{\text{ is odd}}} \hfill \\ {B_{{\frac{{t - x}}{2} + 1}} \prod\limits_{{j = 1}}^{{\frac{{t - x}}{2}}} {A_{j} } } \hfill & {{\text{else}}} \hfill \\ \end{array} } \right. $$

Proof

We can prove the above theorem by induction. Indeed, let us first compute \(\psi ^-_x(t+1)\), we may discern two cases:

  • \(x \ne -(t+1)\): then \(x+1 \ne -t\) and

    $$\begin{aligned} \psi _{x+1}^-(t) = 0 \Rightarrow \psi ^-_x(t+1) = 0 \end{aligned}$$
  • \(x = -(t+1)\): then \(x+1 = -t\) and

    $$\begin{aligned} \psi ^- _x(t+1) = A_{-x}\psi ^-_{x+1}(t) = A_{t+1}\prod _{i=1}^t{A_i} = \prod _{i=1}^{t+1}{A_i}. \end{aligned}$$

In order to compute \(\psi _x^{+}(t+1)\), we discern four cases:

  • \(\left|\right.x\left|\right.>t+1\): the celerity of the walk being of one space-step per time-step, and the initial condition being localized, then \(\psi ^+_x(t+1) = 0\)

  • \(x = -(t+1)\): using the same argument, \(\psi ^{\pm }_{x-1}(t+1)=0\) and \(\psi ^+_x(t+1) = 0\)

  • \(x-(t+1)\) is odd: then \((x-1)-t\) is odd and \(x-1 \ne -t\),

    $$\begin{aligned}\psi ^+_{x-1}(t) = 0 \text { and } \psi ^-_{x-1}(t) = 0 \Rightarrow \psi ^+_x(t+1) = 0\end{aligned}$$
  • else (in particular, \(x-t-1\) is even): there are two subcases:

    • \(x-1 = -t\): then \(\psi ^+_{x-1}(t) = 0\) and

      $$\begin{aligned}\psi ^+_x(t+1) = B_{-x+2}\prod _{i=1}^t{A_i} = B_{\frac{t+1-x}{2}+1}\prod _{j=1}^{\frac{t+1-x}{2}}{A_j}\end{aligned}$$
    • \(x-1 \ne -t\): then \(\psi ^-_{x-1}(t) = 0\) and

      $$\begin{aligned}\psi ^+_x(t+1) = B_{\frac{t+1-x}{2}+1}\prod _{j=1}^{\frac{t+1-x}{2}}{A_j}\end{aligned}$$

\(\square \)

Using Theorem 1, it is straightforward to compute the probability density of the walker, which reads:

$$ {\mathbb{P}}_{x} (t) = \left\{ {\begin{array}{*{20}l} {\prod\limits_{{i = 1}}^{t} {A_{i}^{2} } } \hfill & {{\text{if }}x = - t} \hfill \\ 0 \hfill & {{\text{if }}x - t{\text{ is odd}}} \hfill \\ {B_{{\frac{{t - x}}{2} + 1}}^{2} \prod\limits_{{j = 1}}^{{\frac{{t - x}}{2}}} {A_{j}^{2} } } \hfill & {{\text{else}}} \hfill \\ \end{array} } \right. $$

where, the above probability density is vanishing for \(\left|\right.x\left|\right.>t\).

Once we know the analytical expression of the probability density, one can compute the mean trajectory and variance. The first one reads:

$$\begin{aligned} \mathbb {E}(t) = -t\prod _{i=1}^t{A_i^2}+ \sum _{k=0}^{t-1}{(t-2k)B_{k+1}^2\prod _{j=1}^{k}{A_j^2}}, \end{aligned}$$

and the variance:

$$\begin{aligned} {\text {Var}}(t)=t^{2} \prod _{i=1}^{t} A_i^{2} - \left( t \prod _{i=1}^{t} A_i^{2} - \sum _{i=0}^{t - 1} - \left( 2 i - t\right) B_{i+1}^{2} \prod _{j=1}^{i} A_j^{2}\right) ^{2} + \sum _{i=0}^{t - 1} \left( 2 i - t\right) ^{2} B_{i+1}^{2}\prod _{j=1}^{i} A_j^{2}. \end{aligned}$$

Notice that the probability density and both the first two momenta, depend solely on the parameters \(\{A_x,B_x\}\) which we fix at the initial state. Let us now explore few exemples to show how we can recover any arbitrary mean trajectory and variance by controlling the sole initial condition of the system. Suppose we need to recover a linear mean trajectory. The way to do that is setting \(A_k=1\) and \(B_k=0\) \(\forall k > 1\), supposed that \(A_1\) and \(B_1\) are known. Without lack of generality we set \(A_1^2 = (1-B_1^2)\).

Then the probability density is:

$$ {\mathbb{P}}_{x} (t) = \left\{ {\begin{array}{*{20}l} {(1 - B_{1}^{2} )^{2} } \hfill & {{\text{if }}x = - t} \hfill \\ {B_{1}^{2} } \hfill & {{\text{if }}x = t} \hfill \\ 0 \hfill & {{\text{else}}} \hfill \\ \end{array} } \right. $$

In this particular case, the general expression of the mean value of the trajectory reduces to:

$$\begin{aligned} \mathbb {E}(t) = - t (1-2B^{2}_1) \end{aligned}$$

The pre-factor \(2B_1^2-1 \equiv v\), may be seen as the mean velocity of the walker. As we can see in Fig. 3 the smaller is v, the smaller will be the velocity of the mean trajectory. The variance \({\text {Var}}(t)\) will be of course \(\propto t^2\), which coincide with the standard ballistic behaviour of an homogeneous QW.

Figure 3
figure 3

Mean trajectory of the walker for different values of v. Points represents the theoretical prediction, the dashed line coincides with the numerical simulation.

A second less trivial example may be represented by the parabolic mean trajectory, which translates in a non-linear variance. For example, let’s set \(\displaystyle B_k = \sqrt{- \frac{z}{z \left( k - 1\right) - 2}}\), \(z \in {\mathbb {R}}^+\).

Now the probability reads:

$$ {\mathbb{P}}_{x} (t) = \left\{ {\begin{array}{*{20}l} {1 - \frac{{tz}}{{z + 2}}} \hfill & {{\text{if }}x = - t} \hfill \\ 0 \hfill & {{\text{if }}x - t{\text{ is odd}}} \hfill \\ {\frac{z}{{z + 2}}} \hfill & {{\text{else}}} \hfill \\ \end{array} } \right. $$

and we can consequently deduce the mean trajectory

$$\begin{aligned} \mathbb {E}(t) = \frac{t(zt-2)}{z+2} \end{aligned}$$

and the standard deviation \(\sigma =\sqrt{\text {Var}(t)} \):

$$\begin{aligned} \sigma (t) = \sqrt{\frac{t \left( - 3 t \left( t z - 2\right) ^{2} + \left( z + 2\right) \left( - 2 t^{2} z + 3 t z + 6 t + 2 z\right) \right) }{3 \left( z + 2\right) ^{2}}}. \end{aligned}$$

Notice that the above standard deviation is not linear in time, as shown in Fig. 4 and the non-linear behaviour of \(\sigma \) strongly depends on z.

Figure 4
figure 4

Mean trajectory of the walker for different values of z. (Bottom) Variance of the walker for different values of z. Points represents the theoretical prediction, the dashed line coincides with the numerical simulation.

In all previous particular cases, we have shown how to recover linear and non linear moments, keeping the probability density \(\mathbb {P}_x(t)\) either constant either linear in t. In our last result, we show how it is possible to generalize these results, making the walker’s probability density follow arbitrary trajectories. This result is surprising as, although similar results have been obtained before, they required to define a local metrics for each point of the space–time lattice. More specifically, we want to show how, by paying the price of introducing quantum memory, this result can be achieved simply by acting on the initial state and therefore can be exactly controlled once for all. This translates in the following theorem.

Theorem 2

Let us choose

$$\begin{aligned} B_k^2 = \frac{f_{k-1}}{1-\sum _{i=1}^{k-2}{f_i}} \end{aligned}$$

then the probability density reads:

$$ {\mathbb{P}}_{x} (t) = \left\{ {\begin{array}{*{20}l} {1 - \sum\limits_{{i = 0}}^{{t - 1}} {f_{i} } } \hfill & {{\text{if }}x = - t} \hfill \\ 0 \hfill & {{\text{if }}x - t{\text{ is odd or }}\left| x \right| > t} \hfill \\ {f_{{\frac{{t - x}}{2}}} } \hfill & {{\text{else}}} \hfill \\ \end{array} } \right. $$

for some arbitrary function \(f_i\) which verifies

  • \(\forall t, \; \sum _{i=0}^{t-1}{f_i} \le 1\)

  • \(\forall t, \; 0 \le f_t \le 1.\)

Proof

We take

$$ \left\{ {\begin{array}{*{20}l} {B_{k}^{2} = \frac{{f_{{k - 1}} }}{{1 - \sum\nolimits_{{i = 0}}^{{k - 2}} {f_{i} } }}} \hfill \\ {A_{k}^{2} = 1 - \frac{{f_{{k - 1}} }}{{1 - \sum\nolimits_{{i = 0}}^{{k - 2}} {f_{i} } }}} \hfill \\ \end{array} .} \right. $$

Now, we want to prove that

$$ \left\{ {\begin{array}{*{20}l} {\prod\limits_{{i = 1}}^{t} {A_{i}^{2} } = 1 - \sum\limits_{{i = 0}}^{{t - 1}} {f_{i} } } \hfill \\ {B_{{\frac{{t - x}}{2} + 1}}^{2} \prod\limits_{{j = 1}}^{{\frac{{t - x}}{2}}} {A_{j}^{2} } = f_{{\frac{{t - x}}{2}}} } \hfill \\ \end{array} } \right.. $$

First let us prove by induction that

$$\begin{aligned}\prod _{i=1}^t{A_i^2} = 1-\sum _{i=0}^{t-1}{f_i} .\end{aligned}$$
  • For \(t=0\):

    $$\begin{aligned}\prod _{i=1}^0{A_i^2} = 1-\sum _{i=0}^{-1}{f_i} = 1 .\end{aligned}$$
  • If it’s true for t, then

    $$\begin{aligned} \begin{aligned} \prod _{i=1}^{t+1}{A_i^2}&= A_{t+1}^2\prod _{i=1}^{t}{A_i^2}= \left( 1-\frac{f_t}{1-\sum _{i=0}^{t-1}{f_i}} \right) \prod _{i=1}^{t}{A_i^2}\\&= \left( 1-\frac{f_t}{1-\sum _{i=0}^{t-1}{f_i}} \right) \left( 1-\sum _{i=0}^{t-1}{f_i}\right) = 1-\sum _{i=0}^{t-1}{f_i} - f_t = 1 - \sum _{i=0}^{t}{f_i} \end{aligned}. \end{aligned}$$

    So it is true for \(t+1\).

Now let us prove that

$$ \begin{aligned} B_{{\frac{{t - x}}{2} + 1}}^{2} \prod\limits_{{j = 1}}^{{\frac{{t - x}}{2}}} {A_{j}^{2} } & = f_{{\frac{{t - x}}{2}}} \\ B_{{\frac{{t - x}}{2} + 1}}^{2} \prod\limits_{{j = 1}}^{{\frac{{t - x}}{2}}} {A_{j}^{2} } & = B_{{\frac{{t - x}}{2} + 1}}^{2} \left( {1 - \sum\limits_{{i = 0}}^{{\frac{{t - x}}{2} - 1}} {f_{i} } } \right) = \left( {\frac{{f_{{\frac{{t - x}}{2}}} }}{{1 - \sum\nolimits_{{i = 0}}^{{\frac{{t - x}}{2} - 1}} {f_{i} } }}} \right)\left( {1 - \sum\nolimits_{{i = 0}}^{{\frac{{t - x}}{2} - 1}} {f_{i} } } \right) = f_{{\frac{{t - x}}{2}}} \\ \end{aligned} $$

\(\square \)

Discussion

In conclusion, we introduced a quantum walker which interacts with a memory at each site, allowing the walker’s dynamics to depend on the state of the memory qubits in the particle’s neighborhood. We considered a scheme that parametrizes the initial states of the memory qubits, and we analytically obtain the probability density of the walker’s position, and consequently, its mean trajectory and variance. Varying these parameters alone suffices to generate a range of trajectories that may simulate motion on curved manifolds. This pave the way to implement dynamically interesting physics models, especially quantum particle propagation on curved spacetime. Indeed, embedding the mean trajectory, once for all, in the initial state of the overall QCA, is a clear computational advantage, which may reduce the resources needed for the simulation of a wide variety of dynamical physical models. Possible extensions of these results may also concern quantum algorithms. For example, such a model could inspire efficient spatial search algorithms, as an extension of single quantum walk based schemes. We also leave to future research the extension of the model in higher dimensional space than one.