Resetting uncontrolled quantum systems

We consider a scenario where we wish to bring a closed system of known Hilbert space dimension $d_S$ (the target), subject to an unknown Hamiltonian evolution, back to its quantum state at a past time $t_0$. The target is out of our control: this means that we ignore both its free Hamiltonian and how the system interacts with other quantum systems we may use to influence it. Under these conditions, we prove that there exist protocols within the framework of non-relativistic quantum physics which reset the target system to its exact quantum state at $t_0$. Each"resetting protocol"is successful with non-zero probability for all possible free Hamiltonians and interaction unitaries, save a subset of zero measure. When the target is a qubit and the interaction is sampled from the Haar measure, the simplest resetting circuits have a significant average probability of success and their implementation is within reach of current quantum technologies. Finally, we find that, in case the resetting protocol fails, it is possible to run a further protocol that, if successful, undoes both the natural evolution of the target and the effects of the failed protocol over the latter. By chaining in this fashion several such protocols, one can substantially increase the overall probability of a successful resetting.

In Newtonian Physics, as well as in non-relativistic quantum theory, time is regarded as a real external parameter that is not subject to dynamics but describes the evolution of the whole universe in Newtonian absolute space. This leaves out the possibility to influence or manipulate it in any way. This notion of time, however, does not correspond to the entity that we measure in the lab when we speak of, e.g., the time between a particle's production and its subsequent detection. In real life, to measure time, we use clocks, i.e., physical devices whose state describes a trajectory {ψ(s) : s ∈ R} in state space. When we say that an event happened at time s, what we actually mean is that the state of our clock was ψ(s) when we recorded the event [1].
Syncronizing two different clocks, with state trajectories {ψ 1 (s 1 ) : s 1 }, {ψ 2 (s 2 ) : s 2 } amounts to party 1 (2) being able to predict the state ψ 2 (ψ 1 ) of clock 2 (1), given the state of its own clock ψ 1 (ψ 2 ). Mathematically, this involves identifying a parametrization s 1 (s), s 2 (s) such that, for all values of s, the simultaneous state of both clocks is ψ 1 (s 1 (s)), ψ 2 (s 2 (s)), respectively. If both parties now parametrize time by s, then they will always agree on the time coordinate of each event. This other conception of time, as a relation between the physical states of different systems, is at the heart of our understanding of time in general relativity and in the relational approach of dynamics in quantum gravity [2].
It also opens the door to manipulating the local time within a physical system or "moving it through time". Indeed, consider a physical system S that, left to its own, would follow a trajectory in state space {ψ(t) : t}, where t denotes the agreed parametrization of time between us and S. Now, imagine that we interacted with S within the time interval t ∈ [0, τ ] in such a way that, at the end of our interaction, the state of the system were not ψ(τ ), but ψ(τ ), with τ = τ . If, from this point on, S kept evolving as expected, then there would be a mis-match τ − τ between the time measured in our lab and at system S. From our point of view, there would have been a disruption in the normal flow or progress of time in system S. Following Merriam-Webster [3], we will call such a disruption a time-warp.
There exist a number of proposals to carry out this effect. For instance, special relativity teaches us that we can decrease the flow of time within a physical system just by accelerating and decelerating it with respect to us. This would allow us to carry a time-warp experience with 0 < τ < τ . Such a form of time-warp is very limited, though: it doesn't allow us to increase the flow of time within the system (τ > τ ), or to reverse its direction (τ < 0). Further schemes based on general relativity have been proposed to achieve these other effects [4,5]. In this regard, it is worth mentioning the interesting -and inexplicably unnoticed-work of [6], where the authors show how to use linear superpositions of spacetime metrics to accelerate, slow or reverse the unitary time evolution of a closed quantum system.
At this point it is worth remarking there is nothing mysterious about time-warp in itself. Consider, e.g., a gas of classical particles. We could study its dynamics via a Maxwell demon, and, once we had an accurate Hamiltonian description of the particles, ask the demon to return all of them to the position they must have occupied a year ago. That would qualify as time-warp, according to our definition. However, this time-warp scheme requires an absolute control of the considered system. The merit of the proposals above is, precisely, that they effect time-warp within a system over which we hardly have any control. Coming back to special relativity, one does not need to act precisely on each internal degree of freedom of a system in order to dilate its proper time: it is enough to give the system a push.
Unfortunately, the time-warp schemes listed so far turn out to be highly impractical, when not impossible, to realize. We do observe time dilation in particle accelerators and orbiting satellites, but large effects can just be measured at a sub-atomic level (and at a vast energy cost). Time-warping schemes based on relativistic time-travel seem to require the violation of a number of basic physical principles [7,8]. Technological challenges aside, the scheme proposed in [6] to perform time-translations in quantum systems has an astronomically small probability of success. In the words of one of its co-authors: "it has the same chances of succeeding as I have of delocalizing and relocalizing somewhere else" [9].
In this paper, we investigate the feasibility of timewarp from the point of view of non-relativistic quantum theory. Surprisingly, we find that it is possible to engineer particle beams with the property to project the systems they interact with to a past quantum state. More specifically: the target system, whose free evolution is governed by an unknown time-independent Hamiltonian, is made to interact sequentially with a number of quantum probes. By manipulating these probes before and after their also unknown interaction with the target, we induce a heralded probabilistic transformation on the latter, that, if successful, will bring its quantum state back to the one it had at an arbitrarily long time before we started the "resetting protocol". In the language above, the physical realization of any such protocol can be interpreted as a time-warp experience with τ < 0.
Contrarily to the time-translation scheme proposed in [6], our resetting protocols exhibit a significant probability of success. In addition, should the resetting protocol fail, it is possible to carry a further protocol to revert both the past unitary evolution of the system and the action of the first protocol over the target. By iterating this procedure a few times, one can considerably increase the probability of a successful reset. Finally, the simplest protocols just require control over three qubits and hence can be implemented with current quantum technologies.

The scenario
Think of a quantum system S (our target) of dimension d S , undergoing an evolution determined by an (unknown) time-independent Hamiltonian H 0 . Acting on S from time t = T > 0, we wish to reset the current state of the target, |ψ(T ) = e −iH0T |ψ(0) , to its past value |ψ(0) .
There is an additional complication: the target system is uncontrolled. This means that we ignore how the target evolves by itself (i.e., we ignore H 0 ) and how it jointly evolves with other quantum systems we may use to influence it. We can picture this scenario by imagining that the target is outside our perfectly controlled quantum lab and our only means of interacting with it is by setting a quantum probe P in an orbit close to S and then back to the lab, for a total amount of time δ, see Figure 1. When we do so, the joint state ρ SP of both target and probe will have evolved according to an unknown joint unitary W SP , the result of integrating the evolution equation i dρ SP ds = [H 0 + H SP (r(s)), ρ SP ] from s = 0 to s = δ. Here H SP (r) denotes the (unknown) interaction between target and probe, that depends im- b) At times t = T, 2T + δ, 3T + 2δ..., the lab sets a probe in a trajectory close to system S, that interacts with it in an unknown (unitary) way for a time δ. For times t ∈ [T +δ, 2T + δ], [2T + 2δ, 3T + 2δ], ..., the evolution is once more governed by the free Hamiltonian H0. c) Conditioned on some heralded probabilistic operation on the returned probes (in blue) and possibly an extra ancillary system (in green), the state of system S at time n(T + δ) is again |ψ(0) . plicitly on time through the relative positionr between S and P .
To return the target system to its original state, we will carry out the quantum resetting protocol sketched in Figure 1: at time T , we will send a first probe to system S. Upon its return to the lab, at time T + δ, we will prepare a second probe, that we will keep in the lab for T time units and then send in an identical orbit around S at time 2T + δ. After this second probe arrives, we again prepare a third probe, wait for time T and then send it around S. We iterate this procedure until the n th probe arrives at the lab at time t f ≡ n(T + δ). By conducting an operation over the returned probes and possibly on some extra ancillary system, we wish to project system S to its exact quantum state at time t = 0.
The first probe, in principle, can be prepared at the beginning of the protocol (i.e., at time T ), but for theoretical convenience and w.l.o.g. we will pretend that the probe already existed in the lab at time t = 0 and did not evolve between times [0, T ]. That way, for k = 1, ..., n the joint evolution of the target and the k th probe from time (k − 1)(T + δ) to k(T + δ)] can be modeled with the same bipartite unitary operator U ≡ W SP (V S ⊗ I P ), with V ≡ e −iH0T (namely, a solo evolution of system S  This allows us to reformulate the resetting scenario as a quantum network of the form depicted in white in Figure 2, whereby the target and each probe undergo the joint evolution U , and we can choose how to prepare each probe before each unitary interaction and what we do with it after it returns to the lab. Our hope is that there exists a quantum circuit that produces inputs for the network and processes its outputs in such a way that the final effect on system S is simply to undo the effect of the interaction U , see the purple device in Figure 2. Clearly, this hypothetical circuit cannot be deterministic. Suppose that the unknown unitary U SP happened to be of the form U SP = V S ⊗Ṽ P , i.e., such that systems S and P do not interact at all. Then, no matter what operations we apply to our probes, the state of system S at time t f will be |ψ(t f ) = V n S |ψ(0) . If U SP is just close to being a tensor product, then, by continuity, the probability of success of our undoing operation cannot be 1.
These considerations imply that, at best, our scheme will have the effect of leaving the target in state |ψ(t = 0) with a probability p(U ) that depends on the particular joint evolution U between system and probe. In particular, p(U ) = 0 when U is of tensor product form. In other words: this circuit, it it exists, will involve conducting a heralding measurement, that we can postpone till the end of the protocol. The outcome x of this binary measurement, say, 0 or 1, will tell us whether the state of S remains the same it was at time t = 0 (x = 0) or, on the contrary, it has experienced an uncontrolled evolution (x = 1). In the quantum network slang, such a circuit is termed a quantum tester [10], [11].
We remark once more that we demand this tester to be sound under all unitaries U . That is, whenever the final outcome x of the tester is 0, we must guarantee that the state of system S is exactly |ψ(0) independently of the particular unitary interaction U that guided the evolution. Due to this soundness requirement, one can prove that quantum resetting is impossible if we allow U to be an arbitrary trace-preserving completely positive map, see Appendix C.
At this point, it is interesting to draw a comparison between this scenario and that of refocusing, see, e.g., [12,13]. Given a quantum system S in state ρ(0), subject to a partially unknown interaction with an environment E, the purpose of refocusing is to make sure that, at some fixed time ∆, the state of system S will still be approximately ρ(0). This is achieved by applying over S a fast sequence of unitary pulses for time t ∈ [0, ∆]: if the interaction with the environment is weak enough, the net effect of the pulses will be to freeze the evolution of system S. Contrarily to resetting, standard refocusing techniques do not allow us to project the state ρ(0) of S to ρ(−T ) for any finite amount of time T > 0.
The related primitive universal unitary refocusing is another story [14]. Here, as in resetting, it is assumed that the target system has evolved under the action of an unknown time-independent Hamiltonian H 0 for a finite time T , i.e., via the unitary operator V = e −iH0T . A universal unitary refocusing protocol consists in alternating a sequence of unitary gates U 1 , ..., U n with the natural evolution of the target such that U n V U n−1 ...U 2 V U 1 |ψ(T ) ≈ |ψ(0) with very high probability. The main difference between universal unitary refocusing (and also standard refocusing) and resetting protocols is that in the former the target system is controlled, i.e., we can act on it with any quantum operation we wish (such as U 1 , ..., U n ). In those conditions, it is not difficult to reverse or accelerate the evolution of the system: one could in principle move the state of the system to a quantum memory, find the unknown unitary via channel tomography, apply it or its inverse several times on the modified state of the system and finally move back the resulting state to system S. The merit of [14] is to show that one does not need ancillas to accomplish this. While technically interesting, this feature is irrelevant from the point of view of time-warp.
The next question is whether quantum resetting protocols actually exist. We will next show an explicit construction for the simplest non-trivial scenario: n = 4, d S = d P = 2.

A simple quantum resetting protocol
Suppose then that both systems S and P are qubits, We input two copies of the singlet state and then project the four output qubits onto the quasy-symmetric space Q. If the projection succeeds, the state of the target does not vary.
and that we wish our device to return S to its original state after making it interact sequentially with n = 4 probes (when the target is a qubit, it can be proven that no resetting protocol exists for n = 3). A possible prototype to do the job is the one depicted in Figure 3. We call this protocol W 4 . Let {|0 , |1 } be an orthonormal basis for the twodimensional Hilbert spaces where S and P live. As shown in Figure 3, it suffices to prepare our four probes ). After their return, probes 1, 2, 3, 4 are post-selected to the quasi-symmetric space Q generated by the vectors where the state |a 1 , a 2 , a 3 , a 4 must be understood as |a 1 1 |a 2 2 |a 3 3 |a 4 4 . To get a grasp on the structure of Q, note that the symmetric subspace of two qubits is spanned by the vectors |0 ≡ |00 , |1 ≡ 1 √ 2 (|0, 1 + |1, 0 ), |2 ≡ |11 . Q corresponds to the symmetric space of two copies of two symmetric qubits, i.e., it is spanned by the vectors {|k |l + |l |k : k, l = 0, 1, 2}.
The result of post-selecting the returned probes on any of the states {|m i } 6 i=1 is to multiply the wave function of system S by a homogeneous polynomial of degree n = 4 on the 2 × 2 complex matrices {U j,k } j,k=0,1 , where For example, if we post-select the output probe qubits to the state |m 1 , then the (non-normalized) state of system S at time t f will be Now, note that [U 0,0 , U 0,1 ] can be expressed as a linear combination of Pauli matrices X, Y, Z, i.e., [15], i.e., a polynomial that is proportional to the identity when evaluated with 2 × 2 matrices U 0,0 , U 0,1 .There exist no central polynomials for dimension d S = 2 with degree smaller than 4, not even when we restrict the matrices U k,l to be pieces of two-qubit unitaries, and hence a resetting protocol for n < 4 is impossible.
It can be verified that post-selection with the remaining elements of the basis (1) also leads to central polynomials acting on S[16]. As long as we post-select on one of these vectors, we thus have that system S will just acquire a global phase, i.e., it won't change. We note that the state of system S does change, though, during the course of the protocol (i.e., it is not frozen). The projection on the space Q spanned by vectors (1) acts as a sort of quantum Ctrl+z, undoing such an evolution.
The probability of success of protocol W 4 just depends on U , and not on the initial state of the target. This is a common feature of all quantum resetting protocols. p(x = 0|U, W 4 ) varies wildly with U : it ranges from zero (for product unitaries) to one (e.g., ). If U is taken uniformly according to the Haar measure, we find that the average probability of success dU p(x = 0|U, W 4 ) is approximately 0.2170. Note that, if the interaction W SP between probe and target is sampled from the Haar measure, so will be U = W SP (V S ⊗ I P ), independently of V S . Hence the average probability of success will not depend on neither H 0 nor T .
The ideas behind the above construction can be generalized to show that there exist quantum resetting protocols for target systems of arbitrarily high dimension d S involving at most O(d 3 S ) qubit probes, see Appendix A. There the reader can also find a semidefinite programming [17] characterization of the set of resetting protocols for fixed n, d S , d P . This characterization relies on the theory of quantum testers [10], [11] and on a variant of the method proposed in [18] to compute the support of cut-and-glue operators for homogeneous matrix product states.
In Appendix D we also carry out a comparison between the performance of all quantum resetting protocols with n = 4 probes and two extremal protocols with n = 8 in realistic physical scenarios. The results are paradoxical: in some situations, as one would expect, the average probability of success decreases as we try to make the system leap to a more distant past. In some others, the average success probability grows with T . In addition, we observe that no single extremal protocol outperforms all the others in all situations. The decision to use one protocol or another will depend on our prior knowledge on the target and its interaction with the probes.

Undoing failure
Being probabilistic, it is expected that sometimes a resetting protocol yield a negative outcome. Think of protocol W 4 : at time t f , we conduct a projection onto the quasi-symmetric space Q, see eq. (1). Suppose that the said projection fails, but we conducted it in a nondemolition way. Let {|m i } i be an orthonormal basis for the orthogonal complement of Q. Then, at the end of the protocol, the joint state between S and the measurement apparatus A in the lab is of the form: where f i (U ) are homogeneous polynomials of degree 4 of the operators (2). No linear combination of these polynomials is central [19]. Under these circumstances, is there any way to return S to its original state? Actually, there is. Suppose that we sent two more probes P 1 , P 2 to S, say, in the singlet state and then we processed the state of the measurement apparatus together with these two probes, see Figure 4. If we project systems A, P 1 , P 2 onto a pure state |m , the final state of system S will be where {g i (U )} i are homogeneous polynomials of degree 2.
In principle it could be that, even though {f i (U )} i are not central, there exist {g i (U )} i such that i g i (U )f i (U ) is a central polynomial. Let Q be the space of tripartite measurement vectors in the two probes and the measurement apparatus inducing a central polynomial on S. If we implemented a projection on Q over P 1 , P 2 , A, conditioned on a successful outcome, we would undo, not only , i.e., x = 1, but the last measurement was a non-demolition one, outputting the green system. We make two more probes in the singlet state interact with S and then project them and the green output on a second space Q . If the projection succeeds (x = 0), the system has been reset. the unitary evolution under those two more time steps, but also the action of the previous resetting process, see Figure 4.
Using the tools developed in Appendices C, D, we find that our theoretical speculations are sound (MATLAB code available in the Supplemental Material). The second row of Table I shows the total probability of success of the resetting protocol after this second step. Note that, should this second measurement also fail (x = 1), we can make two more probes in the singlet state interact with the target and identify the controlled measurement that induces a central polynomial on S. Iterating this trick m times, we end up at a resetting protocol whose duration is itself a dynamical variable, i.e., its exact value, that lies between 3T + 4δ and (3 + 2m)T + (4 + 2m)δ, is determined during the course of the experiment. of m. The numbers between brackets reflect our precision in computing the average success probability over the Haar measure, which we replaced by a Montecarlo sampling of 100 random unitaries U . Calculating the last row was a highly demanding computational task, as it involved characterizing subspaces of central polynomials spanned by thousands of vectors. The resulting truncated sequence of probabilities does not show any signs of saturation; for all we know, it may converge to 1. The last value that we managed to estimate was 0.6585 ± 0.0212.

Conclusion
We have proven that there exist probabilistic nonrelativistic quantum protocols which allow one to bring an uncontrolled quantum system to a past state. These protocols work by making the uncontrolled system interact sequentially (in an unknown way) with a number of quantum probes, which are then processed in a controlled way. We showed that, should these protocols fail, one can then carry further protocols to undo the mess induced in the target and still drive it to its original state.
Our work raises several questions, the most important of which is how much more we can increase the average probability of success. It is a theoretical possibility that, as we consider protocols involving more and more probes, we manage to reset all possible unitary gates with probability arbitrarily close to 1, except for a subset of measure zero.
Another question concerns the duration of a resetting protocol. The protocol in Figure 3 requires more than 3T time units to send the target T time units backwards in time. Is it feasible to reset the state of a quantum system T time units by investing an arbitrarily short amount of time? Surely not, if we stick to the family of resetting protocols depicted in Figure 1. We do believe, however, that an improvement in duration is possible, provided that we are allowed to exploit the which-path degree of freedom of the sent probes. It is also a topic for further research whether similar schemes can be devised to "fast-forward" the evolution of the target system, i.e., to achieve a time-warp experience with τ > τ .
We conclude with this last reflection. We believe that the best thing one can do with a time-warping device is not to speculate about its theoretical features, but to turn it on. Hence some experimental work towards an implementation of a resetting protocol would be welcome. In this regard, we feel that a future implementation of protocol W 4 or some suboptimal variant, while challenging, is within reach of current quantum technologies.
The ideas behind protocol W 4 can be generalized to show that there exist quantum resetting protocols for target systems of arbitrarily high dimension d S involving O(d 3 S ) qubit probes. Indeed, suppose that we prepare n probes in state |0 , and make them interact sequentially via a unitary V with a d S -dimensional target. If we project the outgoing probes onto the state i1,...,in p * i1,...,in |i 1 , ..., i n , the final wave function of the target will be P (V 0,0 , V 1,0 )|ψ(0) , where and P (Y 0 , Y 1 ) is the homogeneous matrix polynomial P (Y 0 , Y 1 ) = i1,...,in p i1,...,in Y in ...Y i1 . To show that there exists a resetting protocol for system S, we will prove that there exists a polynomial F such that, for any vanishing just for a subset of unitaries of zero measure.
For any dimension d S , there exists a homogeneous central polynomial P (X) for dimension d S of degree d 2 S involving d S + 1 matrix variables X 1 , ..., X d S +1 [15]. Let X 1 , ...,X d S +1 be d S × d S matrices such that P (X) = 0. In Appendix B, we show that there exists a unitary U for 2d S -dimensional systems such that the prod- S ) is non-zero when evaluated on (U 0,0 , U 1,0 ).
It just rests to show that F (V 0,0 , V 1,0 ) is also nonzero for generic unitaries V . For an arbitrary unitary of SU (2d S ) as V = e i j cj Rj , then f (V ) =f ( c), withf analytic in R 4d 2 S −1 . Sincef is non-zero, by analyticity it can just vanish in a subset of R 4d 2 S −1 of zero measure. Hence f (V ) is non-zero for generic V .

Appendix B: Identifying injective unitaries
The purpose of this appendix is to prove that, for any d S ∈ N, there exists a unitary interaction U ∈ B(C 2d S ) such that the products {U i1,0 ..
Choose then two matrices A 0 , A 1 ∈ B(C d S ) such that, for some L, the products {A i1 ...A i L } span the space B(C d S ). This can be done for L = 2d S + 1, see Appendix A.1 in [18]. Note that, by re-scaling and perturbing A 0 , A 1 , we can make sure that there exists ρ > 0 with i A † i ρA i = ρ. Let ρ = R 2 , with R > 0, and define the matrices via the relation U |ψ |0 = i=0,1 U i,0 |ψ |i . Since, within this subspace, u|U † U |v = u|v , there exists a unitary extensionŨ of U to the whole space C d S × C 2 . By construction, Appendix C: Characterizing the set of resetting protocols The argument given in Appendix A cannot be used to devise practical quantum resetting protocols. In effect, taking the family of central polynomials proposed in [15] and using the construction above invariably leads to protocols with a negligible average probability of success. What we need are methods which help us identify practical resetting schemes. This is the topic of the present Appendix.
Intuitively, everything amounts to making sure that, no matter how we interact with the probes, at the end of the protocol the wave function of system S is multiplied by a central polynomial, or, at least, a matrix polynomial that is central when restricted to pieces of unitaries of the form (2). Building upon this idea, we provide a full characterization of the set of all quantum resetting protocols for fixed n, d S , d P . This characterization relies on the theory of quantum testers [10], [11] and on a variant of the method proposed in [18] to compute the support of cut-and-glue operators for homogeneous matrix product states.
Take the quantum network depicted in Figure 2 in the main text, and fix the value of the unitary U . The action on the target system conditioned on a result x = 0 is given by where S U is a rectangular operator of the form: . {M x } x=0,1 are the Choi operators of our quantum tester [10], [11]. They are characterized by the conditions [11].
Let s λ s |c s c s | be the spectral decomposition of M T 0 ≥ 0. Since we want |ψ(0) to remain the same, it follows that, for s = 1, ..., 2 2n and for all initial states |ψ(0) and U 's, (I S ⊗ c s |)S U must be proportional to the identity matrix.
Coming back to unitary U s, the set of all vectors |c such that, for all unitaries U , (I S ⊗ c s |)S U is proptortional to the identity forms a vector subspace H c ⊂ (C 2 ) ⊗2n . In order to identify this subspace, we apply the same scheme used in [18] to identify the related subspace of cut-and-glue vectors for matrix product states. Namely, we generate a sequence of states (|ξ i ) i of the form |ξ = ( ϕ| S ⊗ I IO )S U |ϕ ⊥ S by choosing random instances of U, ϕ, ϕ ⊥ , with ϕ|ϕ ⊥ = 0. Applying the Gram-Schmidt method to the states (|ξ i ) i , we obtain an orthonormal basis for the subspace H c ⊥ spanned by them. The process is complete when the k th randomly generated vector lives in the span of the former k − 1 vectors. This indeed indicates that (|ξ i O ) k−1 i=1 span H c ⊥ , for, if they did not, the probability that a random vector in H c ⊥ belonged to their span would be zero. H c is the orthogonal complement of H c ⊥ . Indeed, let |v ⊥ H c . Then, for fixed U , we have that, for all vectors |ψ L ⊥ |ψ R , It follows that (I S ⊗ v|)S U = f (U )I S , where f (U ) is a scalar. This must hold for all U , so |v ∈ H c . The opposite implication is immediate. Now, suppose that we have a prior distribution ρ(U )dU of unitaries U , and we want to maximize the average probability of success ρ(U )p(x = 0, |U, π)dU over all quantum resetting protocols π involving n probes. By all the above, this reduces to the following problem: This is a semidefinite program [17], and, as such, we can solve it in time polynomial on 2 n . Taking n = 4, d S = 2 and using the numerical packages MOSEK [20] and YALMIP [21], we find that the maximum average success probability for the prior ρ(U )dU = dU coincides with the one achieved by protocol W 4 (up to a precision of 10 −6 ). This suggests that W 4 is an optimal or extremal resetting protocol.

Appendix D: Devising new resetting protocols
The implementation of the SDP (C5) for n > 4 turned out to be computationally prohibitive, mainly due to lack of computer memory. Hence we had to rely on heuristics to devise new resetting schemes. We settled on prepareand-measure protocols, where we input an n-qubit state into the network and then measure the n output qubits in some appropriate basis. Note that the optimal protocol W 4 falls in this category, so perhaps this restriction is not that limiting after all.
In the following, we present two heuristics to find extremal measure-and-prepare resetting protocols for high n. Given a guess |ϕ on the input state, heuristic #1 returns the projection operator Π with maximum support such that the pair (ϕ, Π) constitutes a sound quantum resetting protocol. Conversely, given a guess on the final projection operator Π, heuristic #2 returns the state space H Π , such that, for any ϕ ∈ H Π , the pair (ϕ, Π) is a valid resetting protocol. Given a prior ρ(U )dU , identifying the state ϕ ∈ H Π that maximizes the average success probability reduces to an eigenvalue problem.
For extreme prepare-and-measure strategies, M 0 = |ϕ ϕ| I ⊗Π T O , where |ϕ is the input state and Π is the projector describing the measurement of the output qubits. To devise a resetting protocol, we need to make sure that the support of M T 0 is in H c .
Suppose that we have a guess on the n-qubit input state |ϕ . In analogy with the characterization of H c , the maximum support of Π corresponds to the orthogonal complement of the subspace H c ϕ spanned by vectors of the form with |ψ L ⊥ |ψ R . The latter can be characterized using the randomizing algorithm described before. Note that there may exist vectors |m with |ϕ * ⊗ |m ∈ H c such that, for all unitaries U , We first used heuristic #1 to explore the scenario d S = d P = 2, n = 8. We identified the protocols W 8 ,W 8 , with input states |ϕ = 4 k=1 |ψ − 2k−1,2k and |φ = |ψ − 13 |ψ − 24 |ψ − 57 |ψ − 68 , respectively, and corresponding projective measurements Π,Π of ranks 39 and 78. The MATLAB code employed is in the Supplemental Material.
Let us test the performance of these new protocols in a specific physical scenario. Let system S evolve freely via the Hamiltonian H 0 = λZ for time T , and interact with system P through the term −(X + Z) S ⊗ Y P . We assume that probes access and leave the system very quickly, and that they are quantum memories, i.e., H P = 0. The full interaction between the probe and the target is thus modeled by the Hamiltonian H I = −(X + Z) ⊗ Y + λZ ⊗ I, and the total unitary interaction is U (λ, T ) = e −iH IN T δ e −iH0T . We take λ to be distributed uniformly in the interval [−1, 1], and δ = 0.5.
Note that the above assumptions are just required to compute the average probability of success. Even if all of them turned out to be false, any resetting protocol we will consider next would be sound. That is, conditioned on x = 0, it would reset S to |ψ(0) , as long as the total unitary interaction U SP between the target and the probe is the same during the n steps of the protocol. Figure 5 compares the results of strategies W 8 ,W 8 with the best available protocol for n = 4 probes, computed via SDP. The curves obtained are peculiar in that, at the beginning, the probability of success increases the further in the past we want to revert the target. We also see that W 8 ,W 8 supersede all protocols involving four probes, at the price of doubling the duration of the whole resetting procedure.
We must not conclude, though, that W 8 ,W 8 are superior to, say, W 4 . Let us keep the same free Hamiltonian −0.7464X ⊗ X + 1.4885Y ⊗ Y − 3.1014Z ⊗ Z + λZ ⊗ I (i.e., U (λ, T ) = e −iH IN T δ e −iH0T ). For δ = 1, we obtain the curves depicted in Figure 6. Now n = 4 protocols supersede both W 8 andW 8 , and the latter protocol achieves the worst results. The take-home message is that no single protocol outperforms all the others in all situations. The decision to use one strategy or another will depend on our prior knowledge on the target and its interaction with the probes.
To conclude, we tried to identify some resetting protocols for d S = 3. This turned out to be very challenging, because there exist no central polynomials for dimension 3 with degree smaller than 8 [15]. Moreover, for n = 8 there seems not to be any resetting protocol involving qubit probes. For n = 9, the only protocol we found, W 9 , involves projecting the output qubits on the symmetric space of n qubits, and inputting a vector determined by the heuristic #2. Our prior on U was a discrete distribution given by 100 6 × 6 unitaries sampled from the Haar measure. Putting all together, we obtain the discouragingly small value p(x = 0|U, W 9 ) U = 0.0035(±0.0004).