How to best sample a periodic probability distribution, or on the accuracy of Hamiltonian finding strategies
Projective measurements of a single two-level quantum mechanical system (a qubit) evolving under a time-independent Hamiltonian produce a probability distribution that is periodic in the evolution time. The period of this distribution is an important parameter in the Hamiltonian. Here, we explore how to design experiments so as to minimize error in the estimation of this parameter. While it has been shown that useful results may be obtained by minimizing the risk incurred by each experiment, such an approach is computationally intractable in general. Here, we motivate and derive heuristic strategies for experiment design that enjoy the same exponential scaling as fully optimized strategies. We then discuss generalizations to the case of finite relaxation times, .
Introduction. Measurement adaptive tomography has recently been suggested as an efficient means of performing partial quantum process tomography (11); (5). Little is known about optimal protocols when realistic experimental restrictions are imposed — as opposed to the case where one is allowed arbitrary quantum resources
Within the nuclear magnetic resonance (NMR) community, similar concerns have motivated the examination of the use of maximum entropy (1) and maximum likelihood (3) methods for obtaining spectra. Recently, computational power has become available such as to make these methods feasible for use in analyzing non-uniform data obtained from high-dimensional NMR experiments (8). These studies have produced qualitatively similar strategies for how to best design experiments when each sample is expensive to collect.
The paper is organized as follows. First, we define the model Hamiltonian which we want to estimate the parameters of, along with our metric of success. Then we give both frequentist and Bayesian lower bounds on the risk derived from this metric. Finally, we derive strategies which achieve the asymptotic scaling of these bounds.
Problem statement. The model we consider is a qubit evolving under the Hamiltonian
Here is the unknown parameter whose value we want to ascertain. We make the problem dimensionless by assuming . An experiment consists of preparing a single known input state , evolving under the Hamiltonian for a controllable time and performing a measurement in the basis. We emphasize here that we are assuming strong projective measurements on individual copies of a quantum preparation, rather than weak measurements on physical ensembles such as those studied in NMR experiments.
The outcomes of the measurement we label , where and refer to and , respectively. An experiment design consists of a specification of the time that we evolve a qubit under before we measure. The likelihood function for a given experiment is then given by the Born rule and . Using our model Hamiltonian, we can express the likelihood more simply as:
Note that this model does not include noise. Below, we somewhat generalize this model by including limited visibility and a dephasing process.
If we desire an estimate of the true value , a commonly used figure of merit is the squared error loss:
The risk of an estimator, which is a function that takes data sets to estimates , is its expected performance with respect to the loss function:
For squared error loss, the risk is also called the mean squared error (MSE).
Mean squared error lower bound. The difficulty here is that the random outcomes of the measurements are not identically distributed. In fact, since they depend on the measurement time, each one could be different. Although, asymptotic results exist for non-identically distributed random variables
Although it is quite difficult to obtain exact expressions for the risk for arbitrary measurement times, in some cases we have obtained an asymptotically tight lower bound. For unbiased estimators, we can appeal to the Cramer-Rao bound (4)
is called the Fisher information. In our particular case, the Fisher information reduces to quite a simple form in
which is conveniently independent of (a derivation is given in Appendix A). Thus, the mean squared error is lower bounded by
Later we show that this bound becomes exponentially suppressed when we include noise in our model. In general, this quantity is dependent on the true parameter .
The Bayesian solution considers the average of the risk, called the Bayes risk, with respect to some prior :
The goal is to find a strategy which minimizes this quantity. Although there exist Bayesian generalizations of the Cramer-Rao bound (6), ours is independent of and thus remains unchanged by integrating equation (5) over the parameter space:
Note also that, in general, Bayesian Cramer-Rao bounds require fewer assumptions to derive than the standard (frequentist) bound. Although they are the same for this model, they differ for a more general model considered later. In broad strokes, the difference in practice between Bayesian and frequentist methods is averaging versus optimization. Below we demonstrate a heuristic strategy which draws from both methods to achieve the goal of determining the measurement times which give the lowest possible achievable bound on the Bayes risk (6).
Looseness of the Cramer-Rao bound. As useful as the Bayesian Cramer-Rao lower bound (6) is, it is simple to see that it is not always achievable. We can obtain a lower bound by considering the best protocol we could possibly hope for in any two-outcome experiment. In such a protocol, one bit of experimental data provides exactly one bit of certainty about the parameter . If we learn the bits of in sequence, at each step , our risk is upper bounded by the worst-case where all the remaining bits of are either all 0 or all 1. In either case, the error incurred by estimating a point between the two extremes is given by , leading to the best possible MSE after measurements being , even though we can make a smaller Cramer-Rao bound by choosing times that grow faster than this exponential function. Note that this risk is achievable via the standard phase estimation protocol (2), but that this protocol requires quantum resources which are not part of our model.
Examples. Let us consider a couple of examples for which the lower bound can be further simplified. First, consider the case when all the measurement times are the same. This is by far the simplest case, since the outcomes become identically distributed. Recall . Then, the measurement time should be less then the first Nyquist time, , or the data will be consistent with more than one . That is, for (but less than , say), the likelihood function will have two equally likely maxima. We minimize the risk, then, by choosing . Then, the maximum likelihood estimator (MLE), for example, will be asymptotically efficient (9) achieving the Cramer-Rao lower bound
Now consider a uniform grid of times. Since , we should choose the Nyquist sampling rate: . Then, for any estimator using data collected at these measurement times, the Cramer-Rao bound gives
Again, the maximum likelihood estimator will be asymptotically efficient. However, since the likelihood function will have many local maxima, the maximum likelihood estimator is non-trivial to find as gradient methods are not guaranteed to work. Bayesian estimators were derived in (11), where simulations yielded risk scaling which is asymptotically efficient.
Note that since we are considering a uniform spacing of times, we can apply a Fourier estimation technique without worrying about spectral aliasing introduced by non-uniformity (10). That is, we apply the discrete Fourier transform and estimate the peak of the power spectrum. Since the resolution in the frequency domain is , we expect the Bayes risk to be
The sampling theorem requires that we sample from a deterministic function, not a probability distribution. In practice, this condition is often approximately satisfied by sampling some stable statistic such as the mean value of the distribution at each time. This can be achieved by measuring at the same time until a sufficiently accurate estimate of the mean at that time is obtained, then repeating this for many other times. But as we have shown, this method can be quadratically improved by performing every single measurement at a different time.
Exponentially achievable lower bound. It has been shown that Bayesian adaptive solutions lead to risk decreasing exponentially with the number of measurements (11). However, these results are given by fits to numerical data. Here, we give an analytic lower bound on the risk of these protocols.
The local (in time) Bayesian adaptive protocol can be described as follows: (1) begin with a uniform prior and determine the first measurement time which minimizes the average (over the two possible outcomes) variance of the posterior distribution; (2) perform a measurement at , record the outcome , and update the distribution via Bayes’ rule; (3) repeat step (1) replacing the current prior with the current posterior. Note that the expected variance in the posterior is the Bayes risk. Thus, the protocol attempts to minimize the risk assuming the next measurement is the last. Strategies that are local in this sense are called a greedy strategies, as opposed to strategies which attempt to minimize the risk over all future experiments.
For some choices of measurement times, including those given by the protocol above, the posterior will be approximately normally distributed
with some arbitrary mean and variance implied by . The expected posterior variance (which is equal to the Bayes risk) of the probability distribution of the next measurement is
(derived in Appendix B) which oscillates with frequency within an envelope . Asymptotically, the minimum risk will approach the minimum of the envelope for all , but will be a lower bound on the risk otherwise. This minimum occurs at with a risk of , which is also the variance of the updated probability distribution since both outcomes are equally probable at . Thus, at each measurement step we reduce the risk by . Thus, the risk scales exponentially as and is achieved at measurement times which scale as
These times are guaranteed to be optimal only in the asymptotic limit. For finite numbers of samples, we suggest two simple heuristics. First, we suggest the use of exponentially increasing times, where the base of the exponent is optimized offline, followed by the use of the maximum likelihood estimator for these times. Second, we suggest a simpler adaptive scheme based on the assumption that the distribution remains Gaussian after each measurement. Making use of this normality assumption, we only need update equations for the mean and variance of the distribution over . In deriving the update equations, we also take into account the oscillations of the expected Bayes risk by finding the nearest achievable minima to the one given by the lower bound. We provide the update equations in Appendix C.
Generalization to finite . In practice, we will have to consider not only experimental restrictions but also noise and relaxation processes. Processes which do not affect the quantum state can be effectively modeled by random bit-flip errors occurring with probability . Processes which do affect the quantum state (decoherence) are modeled by an exponential decay of phase coherence
The Cramer-Rao bound is now given by
Note that unlike the Cramer-Rao bound (5) for the noiseless case, the above bound is not independent of and thus we must appeal to the Bayesian Cramer-Rao bound so that the measurement times can be chosen independently of the true parameter. However, the Bayesian bound turns out to be very loose. A sharper bound is given by first upper bounding each term in the denominator to give
The noise term (or visibility) simply gives a constant reduction in the achievable accuracy. The relaxation process provides a more interesting dynamic as we see that the gains from longer times are exponentially suppressed. In other words, strategies are restricted to explore . We can thus do no better than
The adaptive strategy discussed above can be generalized to include noise and relaxation but the expressions are more lengthy (see Appendix B). To illustrate the performance of our adaptive strategy, we simulate the adaptive strategy along with offline strategies using identical times (), linearly spaced times () and exponentially sparse times (). For each strategy, we perform simulations for experiments consisting of different numbers of samples , up to , and repeat each such simulation to obtain an estimate of the Bayes risk for that strategy and experiment size. In Fig. 1, we present the results of these simulations for the noiseless case, and for the cases and .
Note that in all cases, the adaptive strategy achieves exponential scaling until the times selected reach . At that point, the risk will then scale linearly if the remaining measurement times are . However, if the protocol continues to select larger measurement times, the information gained from those measurements will tend to zero and the risk will remain constant.
Summary and conclusions. By using the Cramer-Rao bound along with analytic expressions for the variance of each posterior distribution, we have motivated a heuristic method for choosing experiment designs that asymptotically admits exponentially small error scaling in the number of measurements. For finite measurements, we have relied on numerical simulation to demonstrate that this scaling is well-achieved even for . Numerical simulations for finite , moreover, have suggested that we can enjoy exponential scaling of the risk until the measurement times saturate the bound, at which point the risk scaling switches to the asymptotic scaling of . In both cases, the heuristics used to design experiments are quite computationally tractable, thus motivating the utility of our heuristics to actual experimental practice.
Acknowledgements. We thank Miriam Diamond for assistance in testing and developing the simulation software. CF thanks Josh Combes for helpful discussions. This work was financially supported by NSERC and CERC.
Appendix A Appendix A: Derivation of Cramer-Rao Bounds
In this Appendix, we show that for the simple model represented by the likelihood function presented in equation (1), the Fisher information given by (3) reduces to the form claimed in (4). To show this, we first note that the likelihood for a vector of observations at times is given by a product of the likelihoods for each individual measurement,
Thus, the log-likelihood function is simply a sum over the individual log-likelihoods. Since the derivative operator commutes with summation, we obtain that
This in turn implies that the Fisher information for a vector of measurements is given by the sum for each measurement of that measurement’s Fisher information.
To calculate the single-measurement Fisher information, we find the second derivative of the log-likelihood for a single measurement is given by
Thus, we find that the single-measurement Fisher information is given by
We conclude that , as claimed.
The expected value of this derivative then gives us the Fisher information for a single measurement in the finite- model,
Taking the sum of this information then produces the Cramer-Rao bound given in (9).
Appendix B Appendix B: Asymptotic Scaling of the Bayes Risk
In this Appendix, we derive expressions for posterior distributions under the assumption of a normally-distributed prior, and then apply these expressions to show the asymptotic scaling of the Bayes risk. We also derive update rules that allow for expedient implementation of the greedy algorithm described in the main text.
Under the assumption of a normally-distributed prior, all prior information about the parameter can be characterized by the mean and variance of the prior distribution. Thus, we shall write our priors as to reflect the assumption of normality. Then, the probability of obtaining a datum at time given such prior information is then given by
Applying Bayes’ rule then produces the posterior distribution
The mean and variance of this distribution are given by:
To chose optimal times, we wish to pick so as to minimize the expected value over of the variance, where this expectation is taken over possible data. Based on the previous expressions, we find that
in agreement with Equation (7).
This expected variance, which describes our risk incurred by measuring at a given , is bounded below by an envelope . A pair of examples of the envelope and achievable risk is illustrated in Figure 2.
Note that the envelope is minimized by . Moreover, the expected variance saturates the lower bound at intervals in of , but the width of the envelope’s minimum grows as , so that as more measurements are performed, the bound becomes a good approximation for the minimum achievable risk. Thus, in the asymptotic limit of large numbers of experiments, we have that the risk at scales with each step as the minimum of the envelope,
We conclude that in the asymptotic limit, the risk decays as , where is the number of measurements performed.
Appendix C Appendix C: Update Equations for ,
In this Appendix, we state without derivation the update rules for and after obtaining a measurement result from an experiment performed at time , under the assumption of an normal prior. For the simple model described by Equation (1),
where is used to pick the intersection of and to the minimum of , as described in Appendix B.
For the finite- model, the updated mean and variance are given by
where in this case,
- As in the standard phase estimation protocol. See e.g. (2).
- The frequentist reference is (7), while a useful Bayesian reference is (12).
- This is true asymptotically and higher order corrections can be used if required (12).
- We do not include amplitude damping in our model since our populations remain equal throughout evolution and thus only manifests as a contribution to .
- J. C. J. Barna, E. D. Laue, M. R. Mayger, J. Skilling, and S. J. P. Worrall. Exponential sampling, an alternative method for sampling in two-dimensional NMR experiments. Journal of Magnetic Resonance (1969), 73(1):69–77, June 1987. doi:10.1016/0022-2364(87)90225-3.
- Andrew M. Childs, John Preskill, and Joseph Renes. Quantum information and precision measurement. Journal of Modern Optics, 47(2):155–176, 2000. arXiv:quant-ph/9904021.
- Roger A. Chylla and John L. Markley. Theory and application of the maximum likelihood principle to NMR parameter estimation of multidimensional NMR data. Journal of Biomolecular NMR, 5, April 1995. doi:10.1007/BF00211752.
- Thomas M. Cover and Joy A. Thomas. Elements of Information Theory. Wiley-Interscience, second edition, July 2006.
- Christopher Ferrie, Christopher E Granade, and D. G Cory. Adaptive Hamiltonian estimation using Bayesian experimental design. AIP Conf. Proc. 1443:165–173, 2011. doi:10.1063/1.3703632. arXiv:1107.4333.
- Richard D. Gill and Boris Y. Levit. Applications of the van Trees Inequality: A Bayesian Cramér-Rao Bound. Bernoulli, 1(1/2), 1995. http://projecteuclid.org/euclid.bj/1186078362.
- Bruce Hoadley. Asymptotic Properties of Maximum Likelihood Estimators for the Independent Not Identically Distributed Case. The Annals of Mathematical Statistics, 42(6), 1971. http://www.jstor.org/stable/2240126.
- Sven G. Hyberts, Haribabu Arthanari, and Gerhard Wagner. Applications of Non-Uniform sampling and processing. Topics in Current Chemistry, July 2011. PMID: 21796515. doi:10.1007/128_2011_187.
- E. L. Lehmann and George Casella. Theory of Point Estimation. Springer, second edition, September 1998.
- Mark W. Maciejewski, Harry Z. Qui, Iulian Rujan, Mehdi Mobli, and Jeffrey C. Hoch. Nonuniform sampling and spectral aliasing. Journal of Magnetic Resonance, 199(1):88–93, July 2009. doi:10.1016/j.jmr.2009.04.006.
- Alexandr Sergeevich, Anushya Chandran, Joshua Combes, Stephen D. Bartlett, and Howard M. Wiseman. Characterization of a qubit Hamiltonian using adaptive measurements in a fixed basis. Physical Review A, 84:052315, 2011. doi:10.1103/PhysRevA.84.052315.
- Ruby C. Weng. A Bayesian Edgeworth expansion by Stein’s Identity. Bayesian Analysis, 5:741–764, 2010. doi:10.1214/10-BA526.