Quantum mechanics imposes a fundamental trade-off between the accuracy of time measurements and the size of the systems used as clocks. When the measurements of different time intervals are combined, the errors due to the finite clock size accumulate, resulting in an overall inaccuracy that grows with the complexity of the set-up. Here, we introduce a method that, in principle, eludes the accumulation of errors by coherently transferring information from a quantum clock to a quantum memory of the smallest possible size. Our method could be used to measure the total duration of a sequence of events with enhanced accuracy, and to reduce the amount of quantum communication needed to stabilize clocks in a quantum network.

1. Introduction

Accurate time measurements are important in a variety of applications, including global positioning systems (GPS) [1], frequency standards [2] and astronomical observations [3,4]. But the accuracy of time measurements is not just a technological issue. At the most fundamental level, every clock is subject to an unavoidable quantum limit, which cannot be overcome even with the most advanced technology. The limit has its roots in Heisenberg’s uncertainty principle, which implies fundamental bounds on the accuracy of time measurements [5–7]. For an individual time measurement, the ultimate quantum limit can be attained by initializing the clock in a suitably engineered superposition of energy levels [8–10]. However, the situation is different when multiple time measurements are performed on the same clock (e.g. in order to measure the total duration of a sequence of events) or on different clocks (e.g. in GPS technology). In these scenarios, the errors accumulate, resulting in an inaccuracy that grows linearly with the number of measurements. To address this problem, one may try to minimize the number of measurements: instead of measuring individual clocks, one could store their state into the memory of a quantum computer, process all the data coherently, and finally read out the desired information with a single measurement. However, quantum memories are notoriously expensive and hard to scale-up [11]. This leads to the fundamental question: how much memory is required to record time at the quantum level?

Here, we derive the ultimate quantum limit on the amount of memory needed to record time with a prescribed accuracy. The limit is based on a Heisenberg-type bound, expressing the trade-off between the accuracy in the read-out of a given parameter and the size of the system in which the parameter is encoded. We show that the bound is tight, by constructing a protocol that faithfully transfers information from the system to a quantum memory of minimal size. The protocol, which we call quantum stopwatch, freezes the time evolution of a clock by storing its state into the state of the memory, as in figure 1. The quantum stopwatch protocol works with clocks made of many identical and independently prepared particles, a common setting when the clocks are identical atoms or ions [12]. The use of identical particles can also be thought as a simple repetition code for transmitting time information. As our protocol uses identically prepared particles, the optimal scaling with the memory size is robust to depolarization of the clocks and to particle loss. Figure 1. Working principle of the quantum stopwatch. The quantum stopwatch coherently transfers time information from a quantum clock, consisting of many identical particles, to a quantum memory of minimum size. (Online version in colour.)

Storing time coherently into a quantum memory is a useful primitive for many applications. As an illustration, we construct a quantum-enhanced protocol to measure the total duration of a sequence of events. The same protocol can be used to establish a shared frequency standard among the nodes of a network, and to generate quantum states with Heisenberg-limited sensitivity to time evolution and to phase shifts.

2. The size-accuracy trade-off

Suppose that a parameter T is encoded in the state of a quantum system, say ρ T . The system can be either a quantum clock, where T is the time elapsed since the beginning of the evolution, or a quantum memory, where the dependence of ρ T on T can be completely arbitrary. In general, the parameter T does not have to be time: it can be phase, frequency or any other real parameter.

When needed, one can extract information about the parameter T by measuring the system. The question is how accurate the measurement can be. The inaccuracy of a given measurement can be quantified by the size of the smallest interval, centred around the true value, in which the measurement outcome falls with a prescribed probability, for example, P=99%. Explicitly, the inaccuracy has the expression

δ ( P , T ) := inf { δ | P ( δ , T ) ≥ P } , 2.1

T ^

where) is the probability that the measurement outcomebelongs to an interval of sizecentred around the true value

Note that the inaccuracy can generally depend on the true value T, which is unknown to the experimenter. The dependence can be removed by fixing a fiducial interval [ T min , T max ] . For example, the fiducial interval could be the inversion region where the parameter T is in one-to-one correspondence with the state of the system [13]. We denote by δ(P) the worst-case value of the inaccuracy within the fiducial interval. In the Bayesian approach, δ(P) provides a lower bound on the probability that the true value falls within an interval of size δ(P) around the measured value T ^ : such probability is guaranteed to be at least P for every prior distribution on T and for all values of T ^ except at most a zero-probability set. Other properties of the inaccuracy, used later in the paper, are presented in Material and methods.

We now derive a fundamental lower bound on the inaccuracy, expressed in terms of the size of the quantum system used to encode the parameter T. Let us denote by D the dimension of the smallest subspace containing the eigenvectors of the states { ρ T ∣ T min ≤ T ≤ T max } . Physically, D can be regarded as the effective dimension of the system used to encode the parameter T. In terms of the effective dimension, the inaccuracy satisfies the bound

δ ( P ) ≥ P Δ T D + 1 , Δ T := T max − T min , 2.2

valid for arbitrary encodings of the parameterand for arbitrary quantum measurements. We call equation ( 2.2 ) the

The size-accuracy bound follows from dividing the fiducial interval ΔT into N=⌊ΔT/δ(P)⌋ disjoint intervals of size δ(P). One can then encode the midpoint value of the ith interval into the state ρ T i . In this way, one obtains N quantum states, which can be distinguished with probability of success at least P (one has just to estimate T and to declare the state ρ T i if the estimate of T falls in the ith interval). On the other hand, the N states are contained in an D-dimensional subspace, and therefore the probability of success is upper bounded by D/N [14], leading to the bound P≤D/N and, in turn, to equation (2.2).

The size-accuracy bound (2.2) captures in a unified way the Heisenberg scaling of quantum clocks and the ultimate limits on the memory needed to store the parameter T. Let us first see how it implies the Heisenberg scaling of quantum clocks. Consider a clock made of n identical non-interacting particles, each evolving with the same periodic evolution U T = e − i T H / ℏ , where H is the single-particle Hamiltonian. If the particles are initialized in the state |Ψ〉, then the quantum state at time T is | Ψ T ⟩ = U T ⊗ n | Ψ ⟩ . Now, in order for the time evolution to be periodic, the eigenvalues of H must be integer multiples of a given energy. This implies that the number of distinct eigenvalues of the n-particle Hamiltonian grows linearly with n, and, therefore, all the states |Ψ T 〉 are contained in a subspace of dimension proportional to n. Hence, one obtains the bound δ(P)≥c/n for some suitable constant c>0. Note that this relation also holds for mixed states, because mixing can only increase the inaccuracy (see Material and method). Moreover, the relation δ(P)≥c/n holds for arbitrary measurements.

The bound δ(P)≥c/n implies the familiar Heisenberg bound on the standard deviation of the best-unbiased measurement. The argument is simple: by Chebyshev’s inequality, the standard deviation σ satisfies the bound σ ≥ ( 1 − P ) / 4 δ ( P ) , which combined with the bound δ(P)≥c/n implies the Heisenberg scaling of the standard deviation. It is important to stress that our ‘Heisenberg-like’ bound δ(P)≥c/n holds even when the measurement in question is not unbiased.

The size-accuracy bound (2.2) can also be applied to memories. Suppose that one wants to write down the parameter T with accuracy δ(P) into a quantum memory of q qubits. Then, equation (2.2) implies that, no matter what encoding is used, the number of memory qubits must be at least

q ≥ log ⁡ 1 δ ( P ) + O ( 1 ) . 2.3

3. Compressing time information: the noiseless scenario

We call equation ( 2.3 ) the. In the following, we show that the bound is tight, meaning that there exist quantum states and quantum measurements for which equation ( 2.3 ) holds with the equality sign. Moreover, we show that these states can be generated from an ensemble of identically prepared quantum particles by applying a compression protocol that minimizes the memory size while preserving the accuracy.

Consider a quantum clock made of n identical particles oscillating between two energy levels. Restricting the attention to these levels, each particle can be modelled as a qubit. In the absence of noise, the evolution of each qubit is governed by the Hamiltonian H=E 0 |0〉〈0|+E 1 |1〉〈1|, where E 0 and E 1 are the energy levels and |0〉 and |1〉 are the corresponding eigenstates. For each individual qubit, the best clock state is the uniform superposition | + ⟩ = ( | 0 ⟩ + | 1 ⟩ ) / 2 . Choosing units such that ( E 1 − E 0 ) / ℏ = 1 , the state at time T is | ψ T ⟩ = ( | 0 ⟩ + e − i T | 1 ⟩ ) / 2 .

It is well known that n qubits in an entangled state can achieve the Heisenberg scaling 1/n in terms of standard deviation, from which it is immediate that the same scaling can be achieved in terms of inaccuracy.1 However, here we consider n qubits in a product state—specifically, the product state |ψ T 〉⊗n obtained by preparing each qubit in the optimal single-copy state. The state |ψ T 〉⊗n has the standard scaling δ ( P ) ≈ 1 / n with the clock size (see Material and methods). And yet, it can be compressed to a state that has the optimal scaling with the memory size.

To understand how the compression works, it is useful to expand the clock state as

| ψ T 〉 ⊗ n = ∑ k = 0 n e − i k T B k , n , 1 / 2 | n , k ⟩ , 3.1

k,n,1/2

O ( n )

T

O ( n )

1 2 log ⁡ n

δ ( P ) ≈ 1 / n

1 2 log ⁡ n

log ⁡ [ 1 / δ ( P ) ]

whereis the binomial distribution with probability 1/2, and |〉 is the state obtained by symmetrizing the state |1〉⊗|0〉over thequbits. The key observation is that, for large, the binomial distribution is concentrated in an interval of sizearound the average value 〈〉=⌊/2⌋. This means that the state |can be compressed into a typical subspace of dimensionwithout introducing significant errors. More precisely, the errors are determined by the tails of the binomial distribution, which fall off exponentially fast asincreases. After the clock state has been projected in the typical subspace, it can be encoded intomemory qubits at the leading order. This encoding attains the bound ( 2.3 ): indeed, the inaccuracy scales asfor every fixed, and the number of memory qubits, equal to, grows exactly as

The original state |ψ T 〉⊗n can be retrieved from the compressed state, up to an error that vanishes exponentially fast with n. Owing to the exponential decay of the error, a good compression performance can obtained already for small clocks: for example, n=16 is already in the asymptotic regime for all practical purposes. A compression from 16 clock qubits to four memory qubits can be done with a compression error of 5.5×10−3, in terms of the trace distance, or 3.0×10−5, in terms of the infidelity. Relatively high-quality compression can be obtained also for smaller number of qubits: for example, four clock qubits can be encoded into two memory qubits with fidelity 87.9%.

Summarizing, the state of n identically prepared clock qubits can be compressed into 1 2 log ⁡ n memory qubits without compromising the accuracy. The key ingredient of the compression protocol is the projection of the state (3.1) into the typical subspace spanned by energy eigenstates with oscillation frequencies in an interval of size n around the mean value. We call this technique frequency projection.

4. Extension to mixed states and noisy evolution

We have seen that the optimal trade-off between inaccuracy and memory size can be achieved for pure states with unitary time evolution. A similar result can be obtained also in the noisy case. Let us consider first the case where noise affects the state preparation, while the evolution itself is still unitary. In this model, each clock qubit starts off in the mixed state ρ 0,p =p|ψ 0 〉〈ψ 0 |+(1−p)I/2 and evolves to the state ρ T,p =p|ψ T 〉〈ψ T |+(1−p)I/2. Physically, we can think of these mixed states as the result of dephasing noise on the pure states |ψ T 〉.

In general, the amount of dephasing may vary from one qubit to another. However, as long as the variations are random and affect all qubits equally and independently, the state of the clock can be described as ρ T , p ⊗ n , for some effective p. Even more generally, one could consider some types of correlated noise, where the errors acting on different qubits are part of an (ideally infinite) exchangeable sequence [15]. Physically, this means that each qubit undergoes a random phase kick, possibly correlated with the phase kicks received by the others, but without any systematic bias that makes one qubit more prone to noise than the others. The model of exchangeable dephasing noise includes the correlated errors due to an overall uncertainty on the initial time of the evolution. In general, de Finetti’s theorem [15] implies that exchangeable dephasing errors lead to a mixture of states of the form ρ T + T 0 , p ⊗ n , where T 0 is a random shift of the time origin and p is a random single-qubit dephasing parameter. Owing to this fact, we can focus first on the compression of the clock states ρ T , p ⊗ n , and then include the case of correlated noise by allowing p to vary.

The clock state ρ T , p ⊗ n can be decomposed as a mixture of states with different values of the total spin. The decomposition is implemented by the Schur transform [16], which transforms the original n qubit system into a tripartite system, consisting of a spin register, a rotation register and a permutation register, as in the following equation:

S c h u r ( ρ T , p ⊗ n ) = ∑ J = 0 n / 2 q J , p ( | J ⟩ ⟨ J | ⊗ ρ T , p , J ⊗ ω J ) , 4.1

J,p

{ | J ⟩ } J = 0 n / 2

T,p,J

J

whereis the quantum number of the total spin,is a probability distribution,is an orthonormal basis for the spin register,is a state of the rotation register andis a fixed state of the permutation register, independent ofand

As the states of the spin register are orthogonal, the value of J can be read out without disturbing the state. The problem is then to store the state ρ T,p,J ⊗ω J in the minimum amount of memory. Note also that the permutation register can be discarded, for it contains no information about T. Hence, the problem is actually to store the state ρ T,p,J . This can be done through the technique of frequency projection, which is realized here by projecting the state into the subspace spanned by eigenstates of the total Hamiltonian in an interval of size J around the mean.

It turns out that the error introduced by frequency projection is negligible for large J. Specifically, we showed that the trace distance between the original state and the frequency-projected state is upper bounded as

ϵ proj , J ≤ ( 3 / 2 ) J − ( 1 / 8 ) ln ⁡ ( p / ( 1 − p ) ) + O ( J − ( 1 / 8 ) ln ⁡ J ) , 4.2

J

n

0

(see electronic supplementary material, Note S1 for the details). The error of frequency projection becomes significant whenis small, but fortunately the probability thatis small tends to zero exponentially fast asgrows: indeed, the probability distributionis the product of a polynomial intimes a Gaussian with variance of ordercentred around the value+1)/2 [ 17 ].

Frequency projection squeezes the density matrix into a subspace of size J , which can then be encoded into a quantum memory of approximately 1 2 log ⁡ J qubits. Now, the question is whether 1 2 log ⁡ J is the minimum number of qubits compatible with the quantum memory bound (2.3). Here, we show that the answer is affirmative for all values of J in the high probability region. The argument is based on two observations: First, the inaccuracy for the state ρ T , p ⊗ n , minimized over all possible measurements, has the scaling δ min ( P ) = f ( P ) / n , where f(P) is a suitable function (see Material and methods). Second, the state ρ T , p ⊗ n can be converted into any of the typical states ρ J,T in an approximately reversible fashion, with an error that vanishes in the large n limit [18]. As the inaccuracy is a continuous function of the state (see Material and methods), we obtain that the minimum inaccuracy for the typical state ρ T,J is δ min ( J ) ( P ) = f ( P ) / n at leading order in n. Now, recall that the typical values of J are equal to J 0 =p(n+1)/2, up to a correction of size at most n . Hence, one has

δ min ( J ) ( P ) = p f ( P ) 2 J , 4.3

1 2 log ⁡ J

at leading order. Hence, the quantum memory bound ( 2.3 ) implies that at leastmemory qubits are necessary at leading order. But this is exactly the number of memory qubits used by our compression protocol. This concludes the proof that the protocol is optimal in terms of memory size for every typical value of

Note that the compression protocol does not require any knowledge of the time parameter T, nor it requires knowledge of the dephasing parameter p. Owing to this feature, the protocol applies even in the presence of randomly fluctuating and/or correlated dephasing, as long as dephasing errors on different qubits arise from an exchangeable sequence of random variables.

The protocol can also be applied when the evolution is noisy. Dephasing during the time evolution is described by the master equation [9],

d ρ t d t = i ℏ [ σ z , ρ t ] + γ 2 ( σ z ρ t σ z − ρ t ) , 4.4

z

z

2

ρ T , γ = p T , γ | ψ T ⟩ ⟨ ψ T | + ( 1 − p T , γ ) I 2 , 4.5

T,γ

0

0

5. Applications

(a) Measuring the duration of a sequence of events

whereis the Pauli matrix=|0〉〈0|−|1〉〈1| and≥0 is the decay rate, corresponding to the inverse of the relaxation timein NMR. The state at timeiswhere=(1−)/2, andaccounts for dephasing noise in the state preparation. The only difference with the case of unitary evolution is that now the amount of dephasing depends on. However, since our compression protocol does not require knowledge of the dephasing parameter, all the results shown before are still valid.

An important feature of the compression protocol is that it is approximately reversible, meaning that the original n-qubit state can be retrieved from the memory, up to a small error that vanishes in the large n limit (see electronic supplementary material, Note S2). Owing to this feature, one can engineer a set-up that pauses the time evolution and resumes it on demand.

The set-up, illustrated in figure 2, uses a quantum clock made of n identical qubits. At time t 0 , each qubit is initialized in the state ρ t 0 ,γ . The qubit evolves until time t 0 ′=t 0 +T 0 under the noisy dynamics (4.4). The state of the n clock qubits is then stored in the quantum memory, where it remains until time t 1 . For simplicity, we assume that the memory is ideal, meaning that the state of the memory qubits does not change during the lag time between t 0 ′ and t 1 . Physically, this means that the decoherence time of the memory is long compared to the lag time between one event and the next. At time t 1 , the state of the memory is transferred back to the clock, which resumes its evolution until t 1 ′=t 1 +T 1 . The procedure is iterated for k times, so that in the end the state of the clock records the total duration T=T 0 +T 1 +⋯+T k−1 . Figure 2. Coherent protocol measuring the total duration of k events. The clock starts its time evolution at time t 0 and continues evolving until time t 0 ′, when the first event is concluded. At this point, the time information is transferred to the quantum memory, where it remains until time t 1 , when the information is transferred back to the clock. The procedure is repeated for k times, so that the total duration of the k events is coherently recorded in the state of the memory. Finally, the state of the memory is measured, yielding an estimate of the total duration. (Online version in colour.)

Our coherent set-up offers an advantage over incoherent protocols where the duration of each time interval T j is measured individually. In the noiseless scenario, the comparison is straightforward. The probability distribution for the optimal time measurement on the state |Ψ T j 〉⊗n is approximately Gaussian, and the inaccuracy for the sum of k Gaussian variables grows as k . Instead, the inaccuracy of the coherent protocol is approximately constant in k, up to higher-order terms arising from the compression error (see Material and methods). Hence, performing a single measurement reduces the inaccuracy by a factor k .

The advantage of the coherent protocols persists even after taking into account the error of frequency projection, and even for relatively small n. As a simple example let us consider the case of n=8 and P=0.9. For a sequence of k=4 events, a coherent protocol using three qubits of memory has an inaccuracy 0.787 times that of the incoherent protocol.

The benefits of the coherent protocol are not limited to the noiseless scenario. A performance comparison between coherent and incoherent protocols is presented in figure 3, for the task of measuring the duration of a time interval T, divided into k subintervals of equal length. The figure shows the advantage of the coherent approach for γ=0.2 and for every k larger than 2. In electronic supplementary material, Note S3, we provide a necessary and sufficient condition for the coherent protocol to have better performance than the incoherent protocol. The condition shows that the total duration is better computed coherently whenever the length of each subinterval T/k is small compared to the decoherence time 1/γ. Note that the advantage persists even when the total time T is large, although the performance of both the coherent and the incoherent protocol worsen as T grows. Figure 3. Comparison between coherent and incoherent protocols. (a) Ratio between the inaccuracy of the incoherent protocol and the inaccuracy of the coherent protocol. The figure shows the ratio for clock qubits with decay rate γ=0.2. The quantum advantage grows with the number of time intervals k, with an inaccuracy reduction of about five times for k=50. (b) Dependence ofthe rescaled inaccuracy δ ∗ = n δ on the total time T for γ=0.2. For the coherent protocol (red line), the inaccuracy is independent of k, while incoherent protocols have inaccuracies increasing with k, illustrated by the blue lines for k=10,30 and 50.

In the above discussion, we assumed that the memory is free from noise and that the compression protocol is implemented without errors. Of course, realistic implementations will also involve errors. One way to take into account the noise in the memory is to introduce an effective dephasing rate γ j , which models independent and symmetric errors occurring in the lag time between t j ′ and t j+1 . Overall, the result of this extra dephasing is to reduce the size of the parameter region where the coherent storage of time information offers an advantage over the incoherent strategy. Now, let us consider the errors in the implementation of the compression protocol. Owing to the continuity of the inaccuracy (see Material and methods), the error of the circuit implementation can be analysed independently of estimation inaccuracy. Assuming an independent error model, the errors in the implementation of the encoding and decoding operations will introduce an error ϵ circuit , which is bounded by the error probability of each elementary gate, denoted by ϵ 1 , times the gate complexity of the whole circuit. The overhead of the gate complexity is the complexity of the Schur transform [16], which was recently reduced to n 4 log ⁡ n [19]. For k iterations, the overall error ϵ circuit scales as k ϵ 1 n 4 log ⁡ n , resulting in an additional term ϵ circuit / n to the inaccuracy. Therefore, one can see that the inaccuracy will remain almost unaffected as long as the gate error of the compression circuit ϵ 1 is small compared to ( k n 4 log ⁡ n ) − 1 . This is, of course, a challenging requirement, but it is important to note that the required gate error can be achieved using fault tolerance, without the need of implementing physical gates with an error vanishing with n. In fact, the desired rate of ϵ 1 can be achieved by using physical gates with error below a constant threshold value, by recursively increasing the number of layers of error correction [20–22].

(b) Stabilizing quantum clocks in a network

Networks of clocks are important in many areas, such as GPS technology and distributed computing. Recently, Kómár et al proposed a quantum protocol, allowing multiple nodes in a network to jointly stabilize their clocks with higher accuracy [23,24]. The protocol involves a network of k nodes, each node with a local oscillator used as a time-keeping device. The goal is to guarantee that all local oscillators have approximately the same frequency. To this purpose, a central station distributes a GHZ state | G H Z 〉 = ( | 0 〉 ⊗ k + | 1 〉 ⊗ k ) / 2 to the k nodes. The entanglement is then transferred to k atomic clocks. By interacting with the clock qubits, the k nodes adjust the frequencies of their local oscillators, obtaining a shared time standard with accuracy 1 / ( n k ) , where n is the number of repetitions of the whole procedure. The key ingredient in this last step is a protocol for estimating the sum of the frequencies of the local oscillators.

Overall, the above protocol requires the communication of kn qubits. Using our stopwatch protocol, we can reduce the amount of quantum communication to k log ⁡ n / 2 qubits at the leading order. This can be done in two different ways. The first way is to use a sequential protocol, where the first node lets their local oscillator interact with the atomic clock for a fixed time T 0 , and then encodes the state of the clock into a memory, which is sent to the second node. The second node performs the same operations, and passes the memory to the third node, and so on until the kth node. In the end of the protocol, the memory will contain information about the total phase φ tot =(ω 1 +ω 2 +⋯+ω k )T 0 , where ω j is the frequency of the jth local oscillator. In this way, the sum of the frequencies can be read out with an error 1 / n independently of k, meaning that the average frequency has Heisenberg limited error of size 1 / ( n k ) .

An alternative to the sequential protocol is to use a parallel protocol, where the central station distributes entangled states to the k nodes, as in [23,24]. Using our frequency projection technique, it is possible to reduce the amount of quantum communication also in this case, from kn qubits to k log ⁡ n / 2 qubits in total. The idea is to compress the n copies of the GHZ state into a multipartite entangled state where each node has an exponentially smaller clock of 1 2 log ⁡ n qubits. Exploiting this fact, one can obtain the same precision of [23,24] using an exponentially smaller amount of quantum communication between the nodes and the central station, as illustrated in figure 4. Figure 4. Boosting the performance of quantum sensor networks. A central station C distributes quantum information to k nodes, generating entanglement among k local clocks. Using frequency projection, the central station distributes a quantum state that guarantees the same precision of n GHZ states, while requiring an exponentially smaller amount of quantum communication of 1 2 log ⁡ n qubits per node. (Online version in colour.)

6. Conclusion

The compression of clock states is a versatile technique. In the addition to advantages in measuring the total duration and in stabilizing quantum clocks in a network, it offers the opportunity to transform product states of n qubits into entangled states of n qubits, allowing one to reversibly switch from an encoding where the information can be accessed locally to a more compact encoding where the information is available globally. Quite interestingly, this approach works also for mixed states and in the presence of noise, thus defining a new set of mixed states achieving the Heisenberg limit.

In view of the applications, it is natural to ask what ingredients would be needed to implement our compression protocol experimentally. The protocol requires a quantum computer capable of implementing the encoding and decoding operations. The question is how large the computer should be and how many elementary operations it should perform. In terms of size, we have seen that the large n regime can be already probed for values around n=16, a number that is likely to be within reach in the near future. In terms of complexity, one can break down the compression protocol in two parts: the Schur transform and the frequency projection. The Schur transform can be efficiently realized by a quantum circuit of at most polynomially many gates [16], scaling as n 4 log ⁡ n according to the most recent proposal [19]. The circuit is simpler in the noiseless case [25] and has been recently implemented in a prototype photonic set-up [26], which however is hard to scale to larger number of qubits. NMR and ion trap systems are another good candidate for prototype demonstrations of the Schur transform with small numbers of qubits, such as n=10. The frequency projection can be efficiently implemented with a technique introduced in [25], whereby the spin eigenstate |J,m〉 is encoded into a (2J+1)-qubit state, with the mth qubit is in the state |1〉 and all the other qubits are in the state |0〉. In this encoding, projecting on a restricted range of values of m is the same as throwing away some of the qubits. The encoding operations and their inverses can be implemented using O(J2) elementary gates [25]. In summary, all the components of the quantum stopwatch can be implemented with a moderate amount of elementary gates. The main challenge for the experimental realization of our protocol is the required accuracy in the encoding and decoding operations, whose fault tolerant realization requires additional layers of error corrections. Our protocol provides an additional motivation to the realization of fault-tolerant quantum computers, showing an example of application where the aid of a quantum computer could significantly enhance the precision of time measurements.

7. Material and methods

(a) Properties of the inaccuracy

The results of this paper take advantage of three basic properties of the inaccuracy, presented in the following:

(i) Continuity. Suppose that the states ρ T and ρ T ′ are close in trace distance for every value of the parameter T. Operationally, this means that the outcome probabilities for every measurement performed on ρ T are close to the outcome probabilities for the same measurement on ρ T ′. If the trace distance is smaller than ϵ, then one has

P ( δ , T ) − ϵ ≤ P ′ ( δ , T ) ≤ P ( δ , T ) + ϵ , 7.1

δ ( P − ϵ , T ) ≤ δ ′ ( P , T ) ≤ δ ( P + ϵ , T ) , 7.2

T

T

ρ T , γ ⊗ n

δ ( P , T ) = f ( P ) / n

ρ T , γ ⊗ n

δ ′ ( P ) = f ( P ) / n

ϵ / n

where) (respectively,′()) is the probability that the estimate falls within an interval of sizearound the true value. In turn, equation ( 7.1 ) implies the following bound in the inaccuracy:where) and′() are the inaccuracies for the statesand′, respectively. When the probability distribution is sufficiently regular, these bounds guarantee that the inaccuracy is a continuous function of the state. For example, we will see that the accuracy for an-qubit quantum clock in the stateis equal toat the leading order, where) is an analytical function of. A state that is-close towill also have accuracy, up to a correction of size. In the case of our compression protocol, the compression protocol vanishes with, meaning that the correction does not affect the leading order.

(ii) Data-processing inequality. Suppose that the system S, used to encode the parameter T, is transformed into another system S′ by some physical process. Let ρ T ′ be the state generated by the process acting on the state ρ T . Then, every measurement M′ on the output system S′ defines a measurement M on the input system S, obtained by first transforming S into S′ and then performing the measurement M′. By construction, the two measurements have the same statistics and, in particular, the same inaccuracy. By minimizing the inaccuracy over all measurements, one obtains the inequality

δ min ′ ( P ) ≥ δ min ( P ) , 7.3

expressing the fact that physical processes cannot reduce the minimum inaccuracy.

(iii) Symmetry. For quantum clocks, the accuracy is maximized by covariant measurements [7], that is, measurements described by positive operator valued measures of the form M T ^ = e − i T ^ H M e i T ^ H . For covariant measurements, one can show that mixing increases the inaccuracy:

Proposition 7.1 For a convex mixture ρ = ∑ i p i ρ i , one has the inequality δ min ( P ) ≥ min i δ min ( i ) ( P ) , where δ min ( P ) (respectively, δ min ( i ) ( P ) ) is the minimum inaccuracy for the state ρ (respectively, ρ i ).

The argument is simple. For every covariant measurement, the probability to find the estimate in an interval of size δ around the true value T is independent of T and will be denoted simply as P(δ). For measurements on the state ρ = ∑ i p i ρ i , the probability is the convex combination P ( δ ) = ∑ i p i P i ( δ ) , where P i (δ) is the corresponding probability for the state ρ i . Setting δ = min i δ min ( i ) ( P ) , one has the inequality P ( δ ) ≤ ∑ i p i P = P , with equality if and only if all the inaccuracies δ min ( i ) ( P ) are equal. Hence, the inaccuracy for the mixture ρ cannot be smaller than δ.

(b) Accuracy of time measurements on identically prepared clock states

We now construct a measurement strategy that estimates the parameter T from the state ρ T , p ⊗ n with inaccuracy δ ( P ) = O ( 1 / n ) . In this strategy, each clock qubit is measured independently, projecting the jth qubit on the eigenstates of the observable O j = cos ⁡ τ j σ x + sin ⁡ τ j σ y , where τ j is an angle, chosen uniformly at random between 0 and 2π. The measurement has two possible outcomes, +1 and −1. If the outcome of the measurement is +1, one records the value τ j , if the outcome is −1, one records the value τ j +π. Mathematically, the measurement strategy is described by the positive operator-valued measure {M τ } τ∈[0,2π) with

M τ = 1 2 π 1 e − i τ e i τ 1 . 7.4

T,p

τ

T,p

F loc = 1 − 2 p ( 1 − p ) . 7.5

σ = 1 / n F loc

T ^

P r o b | T ^ − T | ≤ δ 2 = erf δ n F loc 8 + O 1 n , 7.6

δ loc ( P ) = 8 n F loc erf − 1 ( P ) + O 1 n . 7.7

The probability density that the measurement yields the outcomewhen the input state isis)=Tr[]. Explicit calculation shows that the classical Fisher information of this probability distribution isNow, sincequbits are measured independently, one can collect the results of the measurements and use classical statistics to generate an estimate of. Using the maximum-likelihood estimator, one obtains an estimate that is approximately Gaussian-distributed with averageand standard deviation. The probability that the estimatedeviates from the true value by less than/2 is [ 27 where erf() is the error function. Hence, the inaccuracy can be expressed as

The same argument applies to the states ρ T,γ , generated by the noisy time evolution. The only difference is that, in this case, the classical Fisher information is

F loc = 1 − γ 2 − 1 − e − 2 γ T + γ 2 1 − e − 2 γ T , 7.8

F loc = 1 − 1 − e − 2 γ T , 7.9

Data accessibility

when the decay rateis known, andwhenis unknown (see electronic supplementary material, Note S4 for the derivation).

All electronic supplementary material notes were submitted together with the article.

Authors' contributions

All the authors contributed to the entire work and helped drafting the manuscript. All the authors gave their final approval for publication.

Competing interests

We declare we have no competing interests.

Funding

This work is supported by the National Natural Science Foundation of China through grant no. 11675136, by the Hong Kong Research Grant Council through grant no. 17326616, by the Croucher Foundation, by the Canadian Institute for Advanced Research (CIFAR), and by the HKU Seed Funding for Basic Research. Y.Y. is supported by a Microsoft Research Asia Fellowship and a Hong Kong and China Gas Scholarship. M.H. was supported in part by a MEXT Grant-in-Aid for Scientific Research (B) no. 16KT0017, a MEXT Grant in-Aid for Scientific Research (A) no. 23246071, the Okawa Research Grant and Kayamori Foundation of Informational Science Advancement. Centre for Quantum Technologies is a Research Centre of Excellence funded by the Ministry of Education and the National Research Foundation of Singapore. This publication was made possible through the support of a grant from the John Templeton Foundation. The opinions expressed in this publication are those of the authors and do not necessarily reflect the views of the John Templeton Foundation.

Acknowledgements We thank Lorenzo Maccone for useful comments and Xinhui Yang for drawing the figures.

Footnotes

1 This can be shown by applying Markov inequality to the squared deviation from the mean.

Electronic supplementary material is available online at https://doi.org/10.6084/m9.figshare.c.4093169.