On Hitting Times for General Quantum Markov Processes

Random walks (or Markov chains) are models extensively used in theoretical computer science. Several tools, including analysis of quantities such as hitting and mixing times, are helpful for devising randomized algorithms. A notable example is Sch\"oning's algorithm for the satisfiability (SAT) problem. In this work, we use the density-matrix formalism to define a quantum Markov chain model which directly generalizes classical walks, and we show that a common tools such as hitting times can be computed with a similar formula as the one found in the classical theory, which we then apply to known quantum settings such as Grover's algorithm.


Introduction
Random walks (or Markov chains) are stochastic models that are extensively used in theoretical computer science. Classically, a random walk is defined through a graph, where the nodes are the possible states of the process and edges represent possible transitions. At each step, an outgoing edge from the current state is chosen according to some probability distribution, and the corresponding state is reached. A theory of Markov chains underlies the analysis of many algorithms: a notable example is Schöning's algorithm, one of the best known classical algorithms for the satisfiability (SAT) problem [1]. An important property of Markov chains is the so-called hitting time, which quantifies how many steps of the walk (in expectation) we need to execute in order to reach, or hit some fixed target state, given some initial conditions. The analysis of hitting times is a powerful tool in search problems [2,3,4,5], as these quantities are usually tightly related to complexity metrics. As an example, consider the satisfiability problem: given a formula F (x), we start from some assignment x 0 (e.g., x 0 = (0, . . . , 0)) and, at each step, we choose a variable to flip uniformly at random. This can be formalized as a random walk on an hypercube and, given a satisfying assignment x * for F , the hitting time from x 0 to x * tells us the number of steps needed on average to reach such assignment. An algorithm running this Markov chain and checking at each step whether the current state satisfies F has time complexity that is proportional to the hitting time.
Over the past decades, several research efforts were devoted to extending the concept of random walk to a quantum setting, with the aim of possibly achieving certain speedups leveraging quantum effects, such as constructive/destructive interference. Notable examples are the works by Kempe [6,7], where the unitary walk model is introduced: such a walk consists in repeatedly applying a unitary transformation to a pure (finite-dimensional) quantum state where the elements of the computational basis can be seen as vertices of a graph. While many interesting results have been proven over the years, including novel algorithms [8,9,7,10,11,12] and general constructions for quadratic speed-ups [13,14,15,16], the unitary walk model cannot by itself be considered a full generalization of classical random walks, as unitary evolution is purely reversible. Moreover, effects such as decoherence and classical randomness cannot be analyzed as part of the behaviour of these walks. Characterising the effect noise is not only relevant for implementations: in fact, Kendon and Tregenna [17,18] presented a series of numerical simulations in different settings, showing that decoherence can play a central role in providing additional speed-up. Thus, in order to construct a complete theory that unifies unitary walks and classical Markov chains, it is necessary to consider open-system dynamics. Among these models, which use density matrices and completely positive (CP) maps [19,20], one can find the transition operation matrix (TOM) formalism [21] and quantum stochastic walks [22]. The interested reader can find more comprehensive reviews of quantum walk models in [23,24], where several definitions and applications are listed.
Even within a generic quantum setting, defining quantum hitting times is not straightforward. One has for instance to consider that checking through a quantum measurement whether the target state was hit will in general perturb the walk process itself. As a consequence, different notions of quantum hitting times have been formalized, depending on how they overcome the measurement problem [7,14,25,26,27]. The definitions proposed in the literature can essentially be grouped into two classes. The first one is a one-shot version, based on the first point in time where the overlap with the target state reaches some predefined threshold. The second is instead a so-called concurrent definition, in which one checks at each step whether the target state was hit (a measurement whose observable has only two distinct eigenvalues). Clearly, these two formal definitions are diametrically opposed, in the sense that the former only requires one full final measurement at the end of the process, thus fully preserving the coherent behaviour of the walk, while the latter carries out one-bit measurements in between each execution of the walk. Although the one-shot definitions are perfectly exploitable in algorithms, they are harder to analyze. In particular, since they are far from the usual classical definition, one cannot directly apply analytical results known for classical hitting times. On the other hand, the concurrent formalization can be more clearly interpreted as a direct generalization of the classical definition, but require a specific analysis of the robustness of potential quantum speedups with respect to frequent measurement processes [28,29,30].
In this work, we first introduce (Section 2) a discrete version of the density matrixbased quantum stochastic walk framework [22] and show that not only it represents the most natural generalisation of the classical walk model, but that it also allows us to easily describe the effect of noise and measurements as quantum maps. Based on this formalism, we then propose (Sections 3 and 4) an extension of the notion of concurrent hitting time, originally given by Kempe [7,Def. 3.3] only for the case of unitary walks, which circumvents the measurement problem by randomising the times at which the process is observed and reusing post-measurement states. We leverage the algebra of completely positive (CP) maps to derive a clean analytical formula to compute such hitting time, which we find to be completely analogous and consistent with its classical counterpart. Finally, we demonstrate some concrete applications of our results to some specific examples (Sections 5 and 6), including quantum walks on cyclic graphs and a version of Grover's algorithm.

Quantum Markov Chains
In classical theory, the notion of random walk is formalized using a stochastic process called Markov chain.

Definition 1.
A Markov chain is a tuple (S, P ) where • S is a finite set of states; • P ∈ [0, 1] |S|×|S| is a stochastic matrix, i.e., a entry-wise non-negative matrix where each row sums up to 1.
The matrix P defines how a general probability distribution of states evolves at the next step of the process.
The system is in a state X t ∈ S at time t ∈ N, where X t follows a distribution q t , which can be seen as a (row) vector in S, whose entries are non-negative and sum up to 1 (the so-called state probability vector ). The stochastic matrix P is used to retrieve the distribution q t+1 of the state in the next time step: Therefore, a classical random walk can be seen as a (linear) evolution of a state q. A more detailed introduction to the topic can be found, e.g., in [31].
In order to analyze quantum random walks, we need a suitable model that conveniently defines such processes. As argued in the introduction, the unitary model is purely reversible and thus it cannot simulate a classical Markov chain (unless the stochastic matrix P of the chain is a permutation of the standard basis vectors and every probability distribution is trivial). Moreover, works by Kendon and Tregenna [17,18] involving numerical experiments suggest that classical randomness and noise may even accelerate the behaviour of quantum walks in some cases, and such feature cannot be expressed in the unitary model.
In this work we aim at using a more general model to formalize the process using completely positive (CP) maps and density matrices. This approach can also be seen as the discrete-time counterpart of the quantum stochastic walk [22]. Here Hom(H) represents the set of homomorphism of H onto itself, i.e., the set of the corresponding square matrices. The evolution is defined through a repeated application of a CP map E onto a (generally mixed) quantum state in H.
We show that this formalization is a straightforward extension of the classical Markov model: indeed, the density matrix formalism can be seen as a state probability vector (the diagonal of the matrix) completed with quantum coherences. Therefore, a general quantum random walk is simply a (linear) transformation of a density matrix: This model has several advantages over the unitary formalization: quantum channels can represent any hybrid quantum-classical process. In particular, an arbitrary Markov chain (S, P ) can be simulated by a quantum Markov chain (H, E) where H = span{|x⟩ : x ∈ S} and This construction projects all our quantum states onto a fixed measurement basis (in this case, the computational basis), and any quantum coherence is ignored, leaving us with a classical Markovian dynamics. On the other hand, also unitary walks are particular cases of this model, as the application of a unitary can always be represented through a quantum channel. Therefore, this model unifies the two theories, while its expressiveness allows to include classical random choices and decoherence into the picture. Moreover, there could be some type of quantum walk that lies in the middle between fully coherent and fully classical processes. For example, Kendon et al. [18] already showed that such hybrid dynamics could be beneficial in some contexts.

Hitting Times
Using the formalism introduced above, it is possible to extend classical results to the quantum setting by analogy. For example, if we translate a definition of hitting times proposed by Kempe (in particular, see Definition 3.3 in [7]) to this model, we obtain a natural generalization of the classical definition of hitting time, and a well-known formula for its computation can be derived for the quantum case with analogous methods. The classical setting is as follows: we start from a state X 0 distributed according to a state probability vector q, and we want to reach a given state z ∈ S. We want to quantify how many steps, in expectation, we need to run before reaching such state. Definition 3. Given a Markov chain (S, P ), a starting state q and a target state z ∈ S, define the following random variable: The z-hitting time is defined as the expectation of such variable: A more complete approach on the classical theory of hitting times can be also found in [31].
For the quantum case, we can extend a definition proposed by Kempe for unitary walks to our model. In particular, given a quantum Markov chain (H, E) and a target state |z⟩, we consider a process in which we alternate applications of the evolution map E with a measurement of the observable where Π z := |z⟩⟨z| and Π −z := 1 − |z⟩⟨z|. If such measurement returns +1, then the state will collapse to our target state, and the process will stop. Otherwise, we repeat the procedure by executing E and trying another measurement.
where ρ is the initial state of the chain.
One can see that this definition is closely related the classical one: in fact, both Definitions 3 and 4 imply a check on the state to see whether z was reached or not, and this bit of information is the only one we use in order to decide whether to stop the algorithm. However, in the quantum case some quantum coherences are in general destroyed at each step. It is worth highlighting here that such measurement is nevertheless different from a full collapse of the quantum state, which would always return a probabilistic mixture of measurement eigenstates, hence yielding a classical Markov process over the elements of the measurement basis itself (exactly what we did in Eq. (1)). We show a way to carry out such partial maeasurement using an ancilla qubit in Section 7.
We now derive a formula for computing such hitting times in the quantum general case. Consider the projector map P −z (ρ) := Π −z ρΠ −z , which basically removes from a state ρ the probability mass in the subspace spanned by our target state |z⟩. Physically, P −z represents the action of measuring with O z and halting when its outcome is +1. For the rest of the work we define ρ −z := P −z (ρ) and E −z := P −z • E • P −z . Theorem 1. Let (H, E) be a quantum Markov chain and fix a target state |z⟩. Moreover, suppose that each eigenvalue λ of the map E −z satisfies |λ| < 1. The following holds: where I is the identity map.
Before proving Theorem 1, let us give an interpretation of the results. First of all, notice that any eigenvalue of E (without projections) associated to an Hermitian eigenstate must be exactly 1, as the map is trace-preserving. As an example, if E(ρ) = U ρU † , then where |ϕ k ⟩ is the eigenstate of U associated with the eigenvalue λ k . On the other hand, eigenvalues associated to non-diagonal eigenoperators can be unitary (as in the case we have just shown), or even 0 (as in the example of Eq. (1)). The requirement of Theorem 1 on the eigenvalues of E −z has a precise meaning: under the assumption |λ| < 1 for the eigenvalues of E −z , each eigenvalue of (I − E −z ) is non-zero, and thus the map is invertible, implying that the hitting time is finite. On the other hand, a unitary eigenvalue would suggest that the corresponding eigenstate ρ is completely outside of the target subspace span{|z⟩}. As a consequence, for any k, also E k (ρ) will always have zero overlap with |z⟩. Under these conditions, each measurement would give zero probability of collapsing to the target state, and the hitting time would be infinite.
A second observation is that this result is in full correspondence with the known classical counterpart: indeed, for a classical Markov chain (S, P ) the formula for the hitting time as in Definition 3 (as used, e.g., by Magniez et al. [25]) is: where P −z (resp. q −z ) is taken from P (resp. q) by zeroing out the columns/rows corresponding to z, and 1 is the vector of all ones. This suggests that our formalization of the quantum hitting time is indeed a natural extension of the classical one. We would also like to remark that the target state |z⟩ can be replaced with an arbitrary target subspace S ⊆ H: in this case, the process will stop as soon as the state collapses to any of the states within S. This can be achieved by replacing Π z with the projector onto S.
Proof of Theorem 1. We are going to use the law of total expectation on the outcome of the first measurement. Let E be the event occurring when the first measurement makes the state collapse to |z⟩. Conditioning on such event we have: where Pr[E] = tr(Π z ρ) is the probability of measuring |z⟩ from the starting state ρ using the observable O z . When E occurs, we measure our target state in zero steps, implying that If E does not occur, then the state will collapse to the post-measurement state .
Then the algorithm will apply the step procedure E once to this state, and the process will start over, by the Markov property. Therefore, the second conditional expectation can be expressed as: .
In order to simplify the proof from now on, we make an educated guess: we assume that h z (ρ) is linear in ρ. Notice that this only adds constraints to our functional equation, therefore, any solution we find is also valid in the original setting 1 . The equation above can be rewritten as: and, by developing this recurrence N times, we obtain that: By exploiting the fact that P 2 −z ≡ P −z , the second term becomes, for N ≥ 2: Taking the limit as N → ∞, E N −z → 0 (by the condition on its eigenvalues), and thus the last term tends to h z (0) = 0, by linearity of h z . Therefore, we find that the hitting time satisfies A geometric sum argument concludes the proof.  Notice that the last expression essentially exploits the well-known fact that, for a nonnegative integer random variable, Thus, if we think of the hitting time as an average over the possible directed paths connecting initial and target states, then the k-th term tr(E k −z (ρ)) represents a contribution from all the paths of length ≥ k.

Generalized Hitting Time
Definition 4 states that a measurement with the observable O z must be carried out at each step. As this procedure removes relevant quantum coherences at each step, this may lead to undesired effects, such as a quantum Zeno effect. Thus, we further generalize the idea of hitting time as follows: instead of checking at each step, we extract a number of steps T from a fixed discrete probability distribution σ over the natural numbers, e.g., using a classical algorithm that samples from σ. Notice that we will indicate with A ∼ β the fact that a random variable A is distributed according to the probability distribution β. We then run the step procedure E for T times before attempting a measurement. Figure 1 gives a visual representation of the process. This approach allows us to apply the classical analysis of hitting times to quantum processes relying on prolonged coherent dynamics, such as Grover's algorithm [32] (see Section 5).

Definition 5.
Let {X k } k∈N be an infinite sequence of independent random variables where X k ∼ σ. Moreover, define Q as the number of times we measure with O z without hitting z, before succeeding. The generalized z-hitting time h σ z (ρ) with respect to σ is the expectation of the following random variable Here, X k represents the number of steps we execute after measuring the k-th time with failure. This means that we will execute E X k before attempting the next measurement. Definition 4 can be re-obtained by choosing σ to be the trivial distribution where X k = 1 with probability 1. Notice that this generalized definition is only relevant in the quantum case. Indeed, since measurements do not affect the behaviour of a classical walk, not looking at the state at some point of the evolution can only increase the hitting time. We remark that Q can also be 0, in the case where the first measurement succeeds (we do a measurement at the beginning, like in the basic case). Let us also define the map This quantum operation represents the process of sampling a T ∼ σ and running E for T times. We then have the following result.

Theorem 2.
Let (H, E) be a quantum Markov chain and fix a target state |z⟩, and suppose that each eigenvalue λ of the map E σ −z satisfies |λ| < 1. The following holds: Informally, notice that, if we consider the Markov chain (H, E σ ), the trace operation in the formula of Theorem 2 returns exactly the hitting time of such chain, i.e., the number of times E σ is executed before hitting z. Then the expectation of T represents the number of executions of E per execution of E σ . Despite this result seems reasonable, a formal argument is required to show that statistical interdependence between Q and X k 's does not influence the hitting time.
Proof of Theorem 2. We follow a similar approach as in Theorem 1. Considering the event E occurring when the first measurement of O z returns +1 and conditioning the expectation on this event we obtain, as in Theorem 1: What essentially changes here is the computation of this conditional expectation, since in this case we will apply E X 1 , for X 1 ∼ σ. Hence, let us condition on the value of this variable: If the measurement does not hit |z⟩, and t steps of E are executed, the conditional expectation will be: .
This because the process will start over, by the Markov property, after applying E for t times to the post-measurement state, and we incur a cost of t in terms of hitting times to do so. As in Theorem 1, we make the educated guess that h σ z is linear in ρ, and this implies that: Since Pr Ē = tr(P −z (ρ)), we can exploit linearity to simplify: By splitting the sum, we obtain that the first term is Pr[E] · E σ [T ] by definition of expectation. Again by linearity, the second term becomes: To sum up, the recurrence relation for h σ z is: By developing this recurrence as we did in the proof of Theorem 1, we obtain A geometric sum argument concludes the proof.
Also in this case, we can decompose the last expression as a sum over contributions of the trajectories If we remove E σ [T ] we obtain Definition 4 with respect to the chain (H, E σ ). The slight difference is that the paths considered in the k-th term of this sum are not of length k anymore. Instead, these trajectories have a length kT , where T is distributed according to σ. The expectation of T takes this random length into account.

Hitting Times for Grover's Algorithm
In this section we show how to apply our analysis of hitting times to a well-known problem in the literature: the unstructured search problem. Defining N = 2 n , the problem consists of a function f : [N ] → {0, 1} given as an oracle, for which there is exactly one value x 0 ∈ [N ] such that f (x 0 ) = 1. Any classical algorithm needs Ω(N ) queries in order to output x 0 with non-trivial success probability. However, a famous algorithm by Grover [32,33] can find such value within O( √ N ) queries to the oracle. Roughly speaking, Grover's algorithm starts in the state |+⟩ := |+⟩ ⊗n . Using the oracle of f , one can construct a unitary G that rotates the state in the plane H * = span{|+⟩, |x 0 ⟩} by an angle of Grover [32] showed that, after applying G for r = Θ( √ N ) times, the success probability can be shown to be: The original algorithm runs G for r times and then tries a full measurement in the computational basis, making the state collapse to the desired state with the aforementioned probability. Here, we want to use the hitting time framework to recover the same result. As a warm up, let us consider the case where we measure at each step. Therefore, we are considering a quantum Markov chain (H, G) where H = span{|x⟩ : x ∈ N} and and we want to compute the hitting time h x 0 (|+⟩⟨+|) with respect to this chain.
This result basically shows that measuring at each step nullifies all the quantum speedup given by Grover's algorithm. It is important to remark, however, that this is not a classical walk, as we are not doing a full measurement in the computational basis at each step. Indeed, the 1 4 factor is still not achievable by a classical walk. Proof of Theorem 3. First of all, notice that both G and O z are invariant with respect to H * , i.e. any state in H * will stay in such subspace after an application of the unitary G or a measurement of O z . Since these are the only two operations we are going to apply, we can restrict ourselves to this two-dimensional subspace. Hence, we can analyze the hitting time with respect to the quantum Markov chain (H * , G| H * ), where G| H * is the application of the unitary G restricted to H * : We can represent E, I, P −x 0 as 4 × 4 matrices, and density matrices as 4-dimensional vectors, we can apply the formula of Theorem 1 (the trace operator becomes the dot product with the representation of the identity matrix). By doing this computations with a software of symbolic calculation [34], one can check that this formula gives N 4 .
As expected, destroying quantum coherence too often hinders the performance of Grover's algorithm. As a second attempt, we consider the case in which the measurement is carried out at each step only with probability p. The analysis of such processes coincides with the notion of the generalized hitting time (Definition 5), where σ is the geometric distribution with parameter p.
To make use of the formula given by Theorem 2, we first need to compute a closed form representation for the linear map E σ . In the case of a geometric distribution, this can be achieved easily as detailed in the following lemma.

Lemma 4. If σ = Geom(p), then
Note that such operation is always well-defined as long as the probability p of measuring is non-zero: since E is completely positive and trace-preserving, any eigenvalue λ of E satisfies |λ| ≤ 1, and thus all the eigenvalues µ of the map I − (1 − p)E satisfy |µ| ≥ p > 0, giving us an invertible map.
Proof of Lemma 4. Since σ is a geometric distribution, Pr σ [T = t] = p(1 − p) t−1 . Therefore, by definition of E σ : We can now prove the following general result.
As a first observation, this claim extends the result of Theorem 3, proving that no constant probability p can give quantum speed-up in Grover's search. Secondly, our upper bound is fully consistent with the well-known result about the optimality of Grover's algorithm, proving a lower bound of Ω( √ N ) quantum queries for the unstructured search problem. Indeed, our upper bound reaches its optimum when we choose p = Θ(N −1/2 ), achieving an optimal algorithm. A possible implementation of the algorithm on digital quantum processors is shown in Section 7.
Proof of Theorem 5. As in the proof of Theorem 3, we can simply study the two-dimensional quantum Markov chain (H * , G| H * ), since we are still applying the same set of operations to the starting state |+⟩⟨+|. Again, we represent every super-operator as 4 × 4 matrix and quantum states as 4-dimensional vectors. What changes here is the formula we have to compute: we first use Lemma 4 to compute the matrix representation of E σ and then use this to apply Theorem 5 (for a geometric distribution, E σ [T ] = 1 p ). With the help of a software for symbolic calculation [34], we obtain that: For p = 1 we obtain N 4 , as entailed by Theorem 3. For p = o(1), this is asymptotically equal to N p 8 + 2 p .

Traversing the cycle
In this section we consider a different example, showing that results of Section 3 can be exploited not only to derive analytical expressions for hitting times, but also to provide numerical estimations. Consider a cyclic structure with 2N sites such as the one depicted in Fig. 2 (left) and a unitary Markov chain (H, U) whose Hilbert space can be decomposed is the Hadamard gate, and S moves from |x⟩ to |x + 1⟩ if the coin is in state |↑⟩, and to |x − 1⟩ if the coin is in state |↓⟩. Therefore, the unitary U acts on the total state as follows: We start from the state |↑, 0⟩ and we want to reach the opposite state in the cycle, namely the state |N ⟩ (regardless of the state of the coin register). We can apply the formula from Theorem 4, where the projector outside the subspace of |N ⟩ is Using numpy [35], we can numerically compute the matrices for U, P −N , and the formula can be calculated using matrix algebra, just like we did in Section 5, taking σ = Geom(p) and p = 1 100 , 2 100 , . . . , 1. The results of these computations are summarized in the plots of Fig. 3. We can observe some interesting behaviours: in the case where p = 1 (which coincides with the regular hitting time), numerical estimations give an hitting time scaling as N 2 , which is consistent with the symmetric classical case (see Gambler's Ruin [31]). On the other hand, the optimal choice for p seems to depend on the parity of N : while an odd N always yields a quadratic hitting time, for even values of N there exist a p that achieves a hitting time scaling linearly with the size of the cycle. We repeated these computations for a cycle of odd length (see Fig. 2, right) and, unlike the even case, under optimal p any value of N led to a linear hitting time.

Implementation with digital quantum circuits
The generalized hitting-time paradigm as shown in Section 4 consists of interrupting the execution of a quantum circuit as soon as (1) the measurement takes place (this happens with probability p), and (2) the observable for the hit yields a +1, making the state collapse to the target subspace.
Although this paradigm seems conceptually simple, such a hybrid process is not straightforward to implement on current quantum computing platforms. In fact, one essentially needs a classical process that interacts with the quantum device in an online fashion, In the left plot, when p = 1 the regression gives N 2 , while for the optimal p we obtain ∼ 2N (even N ) and ∼ N 2 /1.15 (odd N ). In the right case, any N yields a linear hitting time with the optimal p. Figure 4: Circuit implementing a step with measurement for the generalized hitting time. R X rotates the state of the ancilla so that the probability of measuring 1 is exactly p. b i is the bit recording whether the target state was hit at step i. The walk is stopped whenever E(ρ i−1 ) is in the target state |111⟩ and qubit R is found in state |1⟩ (such that the measurement is performed).
conditioning the execution on the measurement outcomes. In principle, this represents a possible intriguing use case for dynamic circuits [36,37]. In this section we show how to carry out hitting time experiments in the standard unitary quantum circuit model using Qiskit [38]. To be completely general, we assume that is not possible to conditionally interrupt the execution of a quantum circuit, hence we fix a number N of steps to run and, besides the n qubits needed to store the state of our walk, we also allocate N classical bits {b i } i , where b i stores the measurement outcome at the i-th step. Two extra qubits are used to emulate the classical coin flip which decides whether to try the measurement or not (q R ), and to carry out the measurement (q M ). The quantum circuit implementing a single step is depicted in Figure 4. Here we use R X to rotate q R by an angle θ = arcsin √ p, so that the measurement yields |1⟩ with probability p. The measurement qubit q M will be flipped if q R is in state |1⟩ and ρ is in the state |111⟩, which is the target state in our toy example. One could change the target state by simply replacing the 4-way Toffoli gate T with U · T · U † , where U is a unitary mapping |111⟩ onto a different vector. After the measurement, b i will tell whether the walk should stop at the i-th step. The circuit of Figure 4 transforms the state as follows: Running this circuit N times will yield N classical bits, from b 1 to b N , and the hitting time can be computed as the smallest i such that b i = 1 2 . We used this construction to run Grover's algorithm as described in Section 5. All numerical simulation confirmed the predictions of Theorem 5: Figure 5 shows four plots for different choices of N , comparing the average hitting time of 1000 executions and the theoretical expectation computed analytically.

Conclusions
In this work we described and developed a general way to formalize quantum random walks, including both coherent dynamics and classical randomness. Within this framework, the notion of concurrent hitting time, originally given only for unitary walks [7], can be naturally extended using the interpretation of quantum measurements as CP maps, and an explicit formula -directly related to a well-known classical counterpart -can be derived. Such results were used to study some paradigmatic examples of quantum walks, including Grover's algorithm, both analytically and numerically. A few concluding remarks are in order.
First, it is worth observing that, for an for a N -state walk, computing the hitting time through Theorem 1 and its generalisations requires the manipulation of N 2 × N 2 matrices -representing the related CP maps -thus requiring O(N 6 ) arithmetic operations with a naive approach. Possible future works could hence investigate more efficient numerical approaches with the aim of treating larger problem instances.
Concerning our analysis of Grover's algorithm, it is important to notice that, while our formulation is in principle fully equivalent to its traditional form [32,33], the process of Figure 1 never discards the quantum state upon failure but always restarts from the post-measurement one, i.e. only one copy of the initial state is necessary. This feature could be useful in practical implementations and, more in general, for extending the search algorithm to an oblivious amplitude amplification scheme. Finally, in the setting of the cycle we showed that reaching the opposite site takes a quadratic time if we use the basic protocol where measurements are taken at each step, just like in a classical balanced walk. Instead, the situation changes if we use the protocol associated to the generalized hitting time with a geometric distribution of parameter p. In particular, for an odd cycle (i.e. of length 2N + 1), one can always find a suitable choice for p such that the opposite side is hit in linear time. On the contrary, for an even cycle of length 2N no p achieves better than quadratic time when N is odd. These results closely resemble what Kendon and Tregenna report in Ref. [18,Sec. V] for mixing times. This is not surprising if one recalls that a tight connection between hitting and mixing times exists already in classical setting [39].
Overall, our results suggest that a complete theory of quantum walks and of the tools required to analyze their behaviour could be developed further by leveraging some tight analogies with classical Markov chains. Our formula for generalised concurrent hitting times is, in fact, just the tip of the iceberg, compared to the rich toolbox known in the literature to estimate and bound classical hitting times. As possible next steps, it could for example be interesting to extend our analysis towards drift theory and the study of random decline [40,41].