Estimation of the expectation value of observables is a key subroutine in quantum computing and is also the bottleneck of the performance of many near-term quantum algorithms. Many methods have been proposed to reduce the number of measurements needed for this task by designing measurement schemes that decide the measurements to perform; however, these schemes are usually constructed from hand-crafted heuristics, which limits the measurement efficiency they can achieve. In this paper, we propose a framework for learning measurement schemes directly from the observable, using machine learning techniques including stochastic gradient descent and a two time-scale update rule. As a concrete realization of this framework, we introduce Composite-Locally Biased Classical Shadow (C-LBCS), which learns a mixture of locally-biased classical shadows and their mixing weights end-to-end. We numerically demonstrate C-LBCS on molecular systems up to $\mathrm{CO}_2$ (30 qubits) and show that C-LBCS outperforms the previous state-of-the-art methods despite its simplicity. We believe our approach opens up a reliable and scalable path toward efficient observable estimation on large quantum systems.
Estimation of the expectation value of observables is a key subroutine in quantum computing and is also the bottleneck of the performance of many near-term quantum algorithms. Many methods have been proposed to reduce the number of measurements needed for this task by designing measurement schemes that decide the measurements to perform; however, these schemes are usually constructed from hand-crafted heuristics, which limits the measurement efficiency they can achieve. In this paper, we propose a framework for learning measurement schemes directly from the observable, using machine learning techniques including stochastic gradient descent and a two time-scale update rule. As a concrete realization of this framework, we introduce Composite-Locally Biased Classical Shadow (C-LBCS), which learns a mixture of locally-biased classical shadows and their mixing weights end-to-end. We numerically demonstrate C-LBCS on molecular systems up to CO2 (30 qubits) and show that C-LBCS outperforms the previous state-of-the-art methods despite its simplicity. We believe our approach opens up a reliable and scalable path toward efficient observable estimation on large quantum systems.
Accurately estimating expectation values of quantum observables with as few measurements as possible is crucial to many quantum computing applications. We introduce a framework that covers many of existing measurement strategies and introduce heuristics that can be used to enhance randomized schemes, including those based on Pauli grouping with inverse probability weighting and variants of the classical shadow algorithm. We show how to maximize information gain from such schemes, while carefully optimizing the distribution of possible measurements, and show that simple grouping algorithms can get close to, and in some cases exceed, state-of-the-art accuracy for unbiased estimation of expectation values on a standard quantum chemistry benchmark. We show how these randomized methods may be compared to more recent measurement schemes, such as shadow grouping, derandomized shadow, and overlapped grouping measurement, we show how the same strategies can be used to augment these schemes, and we demonstrate that we can reduce measurement costs by up to a factor of two by allowing Clifford measurement circuits for otherwise Clifford-less methods.
There is growing interest in constructing quantum devices that control increasingly large numbers of quantum systems. There is a tremendous need for methods that can measure the quality and other properties of these devices. Such measurements often amount to learning the expectation value of a quantum observable with respect to the quantum state of the device. Learning expectation values is also a key component in many well-known applications such as quantum machine learning and quantum optimization algorithms. Because of the large system sizes involved, it is essential to find methods for learning expectation values that are efficient with respect to the system size. Existing methods that have rigorous guarantees and are practical to implement are often not optimal for observables of interest. Other methods are heuristic, or require the use measurement protocols that are challenging to implement experimentally with current technology. In this study, we propose an estimation procedure, The Optimal Observable expectation value Learner or TOOL, that can learn the expectation values of observables using the outcomes of any given measurement protocol. We show that there is a seminorm on the set of all observables, which we call the minimax norm, that characterizes the smallest possible estimation error for learning a given observable using the outcomes of a given non-adaptive measurement protocol to a specified confidence level in the worst case over all states. We prove that TOOL is minimax optimal for every observable by showing that it can achieve an estimation error to within a small constant factor of the minimax norm. For many applications, one wishes to learn the expectation value of more than one observable from the same experiment. A popular method for learning the expectation values of one or many observables with rigorous guarantees is classical shadows. Classical shadows has near-optimal performance in the worst case over all observables. We prove that TOOL always performs at least as well as classical shadows. Moreover, we show by example that TOOL dramatically outperforms classical shadows for many observables of interest. This highlights the need to characterize the optimal performance for the task of simultaneously learning the expectation values of many observables. Under a mild assumption, we give such a characterization using the minimax norm and prove that TOOL is nearly minimax optimal for this task. We also study the applications of TOOL to fidelity estimation. Using experimental data from a trapped-ion quantum computer, we show that TOOL performs well in practice and matches the estimates obtained from Maximum Likelihood Estimation (MLE), but with rigorous guarantees on the estimation error unlike MLE. We also compare TOOL with another popular method called direct fidelity estimation, which estimates the fidelity by judiciously sampling Pauli observables and measuring them. We show that there is a different importance sampling scheme for Pauli measurements for which TOOL performs as well as, or better than, direct fidelity estimation. Since TOOL constructs an estimator using only the observable, the measurement protocol, and the confidence level, it provides the flexibility to perform estimation for experiments that have already been performed and experiments that will be performed in the future. Similarly, since the minimax norm can be computed beforehand, it can be used to compare the performance of different measurement protocols and allow minimax optimal design of experiments.
Accurate estimation of observables in quantum systems is a central challenge in quantum information science, yet practical implementations are fundamentally constrained by the limited number of measurement shots. In this work we explore a variation of the classical shadows protocol in which the measurements are kept local while allowing the resulting classical shadows themselves to be correlated. By constructing locally optimal shadows, we obtain unbiased estimators that are competitive with state-of-the-art methods in terms of measurement overhead, while requiring only single-qubit measurements and allowing for the estimation of any observable in pure post-processing, reducing estimation errors by orders of magnitude over standard classical shadows. We validate our approach through numerical experiments on molecular Hamiltonians with up to 40 qubits consistently observing significant reductions in estimation errors, including for estimations of multiple chemically relevant observables simultaneously.
Obtaining the expectation value of an observable on a quantum computer is a crucial step in the variational quantum algorithms. For complicated observables such as molecular electronic Hamiltonians, one of the strategies is to present the observable as a linear combination of measurable fragments. The main problem of this approach is a large number of measurements required for accurate estimation of the observable's expectation value. We consider three previously studied directions that minimize the number of measurements: (1) grouping commuting operators using the greedy approach, (2) involving non-local unitary transformations for measuring, and (3) taking advantage of compatibility of some Pauli products with several measurable groups. The last direction gives rise to a general framework that not only provides improvements over previous methods but also connects measurement grouping approaches with recent advances in techniques of shadow tomography. Following this direction, we develop two measurement schemes that achieve a severalfold reduction in the number of measurements for a set of model molecules compared to previous state-of-the-art methods.
A crucial subroutine for various quantum computing and communication algorithms is to efficiently extract different classical properties of quantum states. In a notable recent theoretical work by Huang, Kueng, and Preskill [Nat. Phys. 16, 1050 (2020)NPAHAX1745-247310.1038/s41567-020-0932-7], a thrifty scheme showed how to project the quantum state into classical shadows and simultaneously predict M different functions of a state with only O(log_{2}M) measurements, independent of the system size and saturating the information-theoretical limit. Here, we experimentally explore the feasibility of the scheme in the realistic scenario with a finite number of measurements and noisy operations. We prepare a four-qubit GHZ state and show how to estimate expectation values of multiple observables and Hamiltonians. We compare the measurement strategies with uniform, biased, and derandomized classical shadows to conventional ones that sequentially measure each state function exploiting either importance sampling or observable grouping. We next demonstrate the estimation of nonlinear functions using classical shadows and analyze the entanglement of the prepared quantum state. Our experiment verifies the efficacy of exploiting (derandomized) classical shadows and sheds light on efficient quantum computing with noisy intermediate-scale quantum hardware.
Within the context of hybrid quantum-classical optimization, gradient descent based optimizers typically require the evaluation of expectation values with respect to the outcome of parameterized quantum circuits. In this work, we explore the consequences of the prior observation that estimation of these quantities on quantum hardware results in a form of stochastic gradient descent optimization. We formalize this notion, which allows us to show that in many relevant cases, including VQE, QAOA and certain quantum classifiers, estimating expectation values with k measurement outcomes results in optimization algorithms whose convergence properties can be rigorously well understood, for any value of k. In fact, even using single measurement outcomes for the estimation of expectation values is sufficient. Moreover, in many settings the required gradients can be expressed as linear combinations of expectation values - originating, e.g., from a sum over local terms of a Hamiltonian, a parameter shift rule, or a sum over data-set instances - and we show that in these cases k-shot expectation value estimation can be combined with sampling over terms of the linear combination, to obtain "doubly stochastic" gradient descent optimizers. For all algorithms we prove convergence guarantees, providing a framework for the derivation of rigorous optimization results in the context of near-term quantum devices. Additionally, we explore numerically these methods on benchmark VQE, QAOA and quantum-enhanced machine learning tasks and show that treating the stochastic settings as hyper-parameters allows for state-of-the-art results with significantly fewer circuit executions and measurements.