Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

# A variational toolbox for quantum multi-parameter estimation

## Abstract

With an ever-expanding ecosystem of noisy and intermediate-scale quantum devices, exploring their possible applications is a rapidly growing field of quantum information science. In this work, we demonstrate that variational quantum algorithms feasible on such devices address a challenge central to the field of quantum metrology: The identification of near-optimal probes and measurement operators for noisy multi-parameter estimation problems. We first introduce a general framework that allows for sequential updates of variational parameters to improve probe states and measurements and is widely applicable to both discrete and continuous-variable settings. We then demonstrate the practical functioning of the approach through numerical simulations, showcasing how tailored probes and measurements improve over standard methods in the noisy regime. Along the way, we prove the validity of a general parameter-shift rule for noisy evolutions, expected to be of general interest in variational quantum algorithms. In our approach, we advocate the mindset of quantum-aided design, exploiting quantum technology to learn close to optimal, experimentally feasible quantum metrology protocols.

## Introduction

Quantum metrology exploits non-classical effects to extend the sensitivity of sensing and parameter estimation methods beyond classical limits. The achievable precision in quantum metrology depends on the interplay of quantum correlations of the probe states, the unavoidable quantum noise present in the scheme, the geometry of the parameters to be estimated, and the information that is gained by possibly intricate measurements1,2. Carefully designing suitable quantum probes and measurements is therefore a frontier of quantum metrology3,4 and can lead to significantly improved sensitivity as has been demonstrated in numerous works5,6,7,8,9. Such methods have recently been generalized to a multi-parameter setting where a set of spatially distributed sensors is used to simultaneously estimate a number of distinct parameters or a function thereof10,11,12,13,14, a setting that is relevant for a broad range of applications, including nanoscale NMR15, multi-dimensional field and gradient estimation16,17, and quantum networks for atomic clocks18 or astronomical imaging19.

Designing close to optimal quantum protocols for a specific metrological task is, however, highly challenging. Identifying suitable probes and measurement schemes can be a classically intractable task even in the absence of errors. It requires optimizing over quantum states of high dimension, which soon becomes infeasible in practice due to the exponential growth of dimension with the system size. To add insult to injury, the solution of this task is even less obvious when realistic constraints such as experimental imperfections and decoherence are taken into account: Such decoherence processes, however, are at the heart of the matter when designing realistic quantum metrological protocols in the first place. This observation gives rise to the insight that in many relevant and meaningful scenarios, one cannot help but resort to quantum tools to find such protocols.

The increasing body of tools originating from the study of near-term noisy intermediate-scale quantum (NISQ) computers20 may come to the rescue here: variational quantum algorithms21 have been proposed to solve one part of the metrology puzzle—namely to optimize quantum probes for single-parameter metrology in qubit-based systems22,23,24.

In this work, we provide a toolbox that allows quantum-aided design of the entire metrology process as a whole. Our unified framework allows us to optimize quantum probes and measurements for the more general multi-parameter-sensing problems while taking into account limited experimental capabilities. The method can account for post-processing of the data, recognizing that the physical variables measured are usually only surrogates for the actual quantities of interest. The approach is sufficiently general to be executed on both discrete- and continuous-variable systems. We detail how our algorithm can be implemented on the target platform or on NISQ computers, bringing forth a promising application of these devices.

We consider the generic task of estimating a multi-variate function of the sensing parameters and use the multi-parameter Cramér-Rao bound to quantify the quality of probe state and measurement as it provides for a saturable lower bound on the quality of any unbiased estimator. Importantly, we describe how this is extracted experimentally based on an insight regarding the parameter-shift rule25 in a noisy setting, an idea that has arisen in the context of quantum optimal control26 and learning applications of quantum circuits27 and which we develop further, expected to be interesting in its own right. Due to the variational nature of our quantum algorithm—involving a quantum circuit in its core instead of a possibly inefficient classical prescription—we can tailor estimation strategies to the specific experimental capabilities and dominating noise sources. Our techniques are very general and can be applied to both discrete variable architectures based on atomic systems28,29, superconducting qubits30 or optical systems31 and continuous-variable architectures based on Gaussian light sources32,33. As such, we add quantum metrology to the possible applications of NISQ devices while at the same time providing a solution to the challenging problem of optimizing quantum metrological prescriptions.

## Results

### The structure of the algorithm

A high-level description of our algorithm is sketched in Fig. 1. In each step of the algorithm, a probe quantum state ρ0(θ) is generated by a quantum circuit parametrized by θ. It undergoes a quantum channel $${\mathcal{E}}({\mathbf{\phi }})$$ that encodes the parameters, which are the arguments of f, the multi-variate function representing the post-processing. In this work, we will consider multiple ways to parametrize the encoding channel. The state of the system before the measurement is

$${\mathcal{E}}({\mathbf{\phi }})[{\rho }_{0}({\mathbf{\theta }})]=\rho ({\mathbf{\theta }},{\mathbf{\phi }}).$$
(1)

The subsequent measurement is most generally described by a parametrized positive-operator valued measure (POVM) $${\mathcal{M}}=\{{{{\Pi }}}_{l}({\mathbf{\mu }})\}$$ resulting in measurement output probabilities

$${p}_{l}={\mathrm{Tr}}\,\{{{{\Pi }}}_{l}({\mathbf{\mu }})\rho ({\mathbf{\theta }},{\mathbf{\phi }})\},$$
(2)

with μ being the POVM parametrization. This concludes the part of the protocol that runs on the quantum device. This step is repeated a number of times to get accurate estimates of the outcome probabilities. These are then used to classically compute a cost function quantifying the estimation quality achieved by the protocol. From this, both the state preparation circuit and the measurement procedure are updated to further increase the estimation quality based on gradient-descent techniques34. The entire procedure is iterated until a minimum is reached, yielding a close to optimal sensing protocol within the variational manifold of probe state preparation and measurement procedure.

### Cost function

The central challenge when constructing a variational quantum algorithm is to identify a cost function that captures the nature of the problem and that can be effectively evaluated and differentiated on actual quantum hardware. We want to quantify the performance of an estimator for a general multi-variate function f(ϕ) of the parameters ϕ. We therefore consider the classical Fisher information matrix (CFIM)35f = JTIϕJ, where J is the Jacobian of f with entries Jj,k = ∂ϕj/∂fk and

$${[{I}_{{\mathbf{\phi }}}]}_{j,k}:= \mathop{\sum}\limits_{l}\frac{({\partial }_{j}{p}_{l})({\partial }_{k}{p}_{l})}{{p}_{l}},$$
(3)

where we have used ∂j as a shorthand notation for ∂/∂ϕj. The CFIM gives a fundamental lower bound to the covariance matrix of any unbiased estimator $$\hat{{\bf{f}}}$$ of f(ϕ) according to the Cramér-Rao bound

$${\mathrm{Cov}}\,[\hat{{\bf{f}}}]\ge \frac{1}{n}{I}_{{\bf{f}}}^{-1},$$
(4)

where n is the number of samples. The Cramér-Rao bound is the definite measure of estimation precision because it can always be saturated in the limit n →  by maximum-likelihood estimation36. Previous variational approaches to quantum metrology relied on surrogate quantities for the quantum Fisher information (QFI) as their cost function. The QFI provides a bound on the achievable classical Fisher information when optimizing over all possible measurement schemes and as such does not quantify the performance of the current incarnation of the sensing protocol. As experimental capabilities are usually limited and not every intricate measurement can be performed, it is actually a misleading quantifier—there is no guarantee that a state with maximum QFI also achieves the maximum CFI over the set of possible measurements.

For single-parameter estimation, the CFIM reduces to a scalar quantity and the Cramér-Rao bound can directly be used as a cost function. For the multi-variate setting, we will follow the approach of ref. 10 and apply a positive semi-definite weighting matrix W to both sides of the Cramér-Rao bound (4) and perform a trace to obtain the scalar inequality

$${\mathrm{Tr}}\,\{W{\mathrm{Cov}}\,[\hat{{\bf{f}}}]\}\ge \frac{1}{n}{\mathrm{Tr}}\,\{W{I}_{{\bf{f}}}^{-1}\}.$$
(5)

The right-hand side is the natural choice for the cost function

$${C}_{W}({\mathbf{\theta }},{\mathbf{\phi }},{\mathbf{\mu }}):= {\mathrm{Tr}}\,\{W{I}_{{\bf{f}}}^{-1}\}.$$
(6)

While the outcome probabilities {pl} can be readily estimated through repeated measurements, the CFIM also contains their derivatives with respect to the encoded parameters. These derivatives are at the heart of our algorithm and we will detail how to obtain them for multiple variants of quantum encoding processes.

We note that as the most common elementary operations considered both in the discrete variable and the Gaussian continuous-variable case admit a parameter-shift rule, we will assume that the circuits parametrizing the state preparation and the POVM in our scheme can be trained using the parameter-shift rule.

### On the sensing platform

The difficulty of running the variational algorithm naturally depends on the capabilities of the quantum device available. If we have the opportunity to perform the parametrized state preparation and measurement on the sensing platform, we can use it directly to run the algorithm. This is of course desirable since it circumvents the need to simulate the encoding and noise channel on another device. To be able to execute the algorithm we have to assume some structure about the encoding evolution $${\mathcal{E}}$$. We will consider the case where a unitary encoding is followed by a parameter-independent quantum channel as

$${\mathcal{E}}({\mathbf{\phi }})[{\rho }_{0}]={\mathcal{N}}[U({\mathbf{\phi }}){\rho }_{0}{U}^{\dagger }({\mathbf{\phi }})].$$
(7)

We stress that this model does not only capture noise processes happening after the parameter encoding. It is valid for all processes where the noise commutes with the encoding unitary, which covers many practically relevant scenarios such as lossy optical phase estimation, depolarizing noise in discrete variable systems, and dephasing and amplitude-damping noise in Ramsay spectroscopy23.

While initially derived for unitary quantum circuits, we prove in the Supplementary Methods that the parameter-shift rule extends to unitaries interleaved with noise channels. Consequently, all necessary derivatives of expectation values can be computed analytically on quantum hardware from the expectation values evaluated at different points in parameter space25,37 even in the presence of realistic noise as detailed above.

To apply the parameter-shift rule it will, however, be necessary to be able to re-run the same evolution with the parameter in question shifted by a fixed amount. On the sensing platform, direct control over the physical parameters is usually not possible, but we can exploit the composition of unitary evolutions to synthesize a shift of the parameter in question as shown in Fig. 2a. We give a detailed explanation of how the parameter-shift rule should be applied in the Supplementary Methods.

### Emulating the sensing platform

If the necessary level of control is not achievable on the sensing platform directly, another quantum system with more control can be used to run the algorithm and optimize a sensing strategy. In particular, NISQ devices with high levels of control could be employed. We stress, however, that the inherent errors of the NISQ device need to be sufficiently low to provide for a faithful emulation of the sensing platform. The noise of the sensing platform can be recreated either through the use of ancillary qubits or repeated sampling of unitaries, an approach that we explain in detail in the Supplementary Methods.

If a noise process of the form of Eq. (7) is hard to emulate on the NISQ device, or if the parameter-shift rule cannot be implemented for the encoding process, part of the algorithm can be moved from the quantum device to the classical hardware. This can alleviate the requirements for the NISQ device for a, in many realistic cases, modest overhead on the classical computation. In the Supplementary Methods, we provide observables $${{\Pi }}^{\prime}$$ and $${{{\Delta }}}_{l}^{j}$$ whose expectation values model the noisy output probabilities pl and their derivatives ∂jpl. The procedure in this situation is shown in Fig. 2b.

Emulating the sensing platform also opens up the possibility to analyze more intricate encoding evolutions. The Stinespring dilation theorem38 guarantees that any quantum channel can be modeled via a unitary evolution on the system along with an environment in some state σ:

$${\mathcal{E}}({\mathbf{\phi }})[{\rho }_{0}]={{\mathrm{Tr}}\,}_{\text{E}}\{{U}_{\text{SE}}({\mathbf{\phi }})({\rho }_{0}\otimes \upsigma ){U}_{\,\text{SE}\,}^{\dagger }({\mathbf{\phi }})\}.$$
(8)

If the unitary has the particular form

$${U}_{\text{SE}}({\mathbf{\phi }})=\exp \left(-{\rm{i}}t\left[{H}_{\text{SE}}+\mathop{\sum}\limits_{j}{\upalpha }_{j}{H}_{j}\right]\right),$$
(9)

where the encoded parameters are given by ϕj = tαj, we can apply a generalized parameter-shift rule to calculate the derivative $$\frac{\partial }{\partial {\alpha }_{j}}{\mathcal{E}}({\mathbf{\phi }})$$ and hence the derivative with respect to ϕj37. Finally, the Suzuki-Trotter formalism can be used to decompose the evolution into elementary quantum gates that depend on ϕ and use the parameter-shift rule for these gates to calculate the derivative.

### Numerical experiments

To showcase possible applications of our variational approach, we numerically investigate two exemplary noisy estimation problems. The experiments have been implemented using the PennyLane library for quantum machine learning39 and the QuEST mixed state simulator40.

We first employ the setting of Ramsay spectroscopy, a widely used technique for quantum metrology with atoms and ions. The metrological parameters are phase shifts ϕ arising from the interaction of probe ions modeled as two-level systems with an external driving force. We follow ref. 41 and model the noise in the parameter encoding as local dephasing with dephasing probability p. We consider a pure probe state and a projective measurement, where the computational basis is parametrized by local unitaries.

We optimize a sensing strategy for a system of three ions and instead of estimating the phases independently, we analyze the task of estimating their average $$\frac{1}{N}{\sum }_{j}{\upphi }_{j}$$. We first reproduce known results to validate the performance of our approach. Reference 10 has shown that generalized GHZ states are optimal when the encoding is noise-free. We have emulated the sensing task with $${\upphi }_{j}=\frac{\pi }{6}$$, the sweet spot for GHZ sensing and performed co-optimization of state preparation and measurement. The parametrization was chosen so that it can produce any three qubit quantum state and any local measurement. Figure 3 shows that we recover the optimality of the GHZ-sensing procedure with a measurement in the Hadamard basis for p = 0. At increasing noise levels, the advantage of GHZ sensing disappears as expected41 and we find sensing procedures that outperform both GHZ and standard Ramsay spectroscopy. In the Supplementary Methods, we analyze the optimized sensing schemes and find that the optimal probe states continue to have non-classical correlations even for a high dephasing probabilities of up to 40%.

As a second task, we will apply our algorithm to the setting of spin imaging. This is at the heart of nanoscale NMR, which has a wide range of applications within chemistry and biological imaging. In particular, nanoscale sensors based on nitrogen-vacancy (NV) centers have shown great potential15,42,43,44,45 and we will consider the task of determining the position of a spin by triangulation with three NV center probes. In short, the dipole–dipole interaction between the NV centers and the spin shifts the energy levels of the NV centers resulting in a position dependent phase shift. From measurements of this phase, the position of the spin can be determined. We neglect the dipole–dipole interaction between the three NV centers assuming that they can be decoupled by appropriate pulse sequences46. Furthermore, we perform a secular approximation, simplifying the interaction to a Pauli rotation about the symmetry axis of the NV centers47. We model the encoding noise as local dephasing with a fixed probability of pe = 0.1. We refer to the Supplementary Methods for a more detailed derivation of our model.

We use our algorithm to study the influence of noise that is incurred by performing additional quantum gates in the state preparation on the quality of the sensing protocol. We model the noise as depolarizing noise with depolarization probability pg. Specifically, we study the trade-off between additional noise induced by performing entangling operations and the sensitivity enhancement from the generated entanglement by comparing a purely local probe with a probe that has two additional entangling operations. The measurement is always kept local. The “shallow entangled” probe constitutes the minimal example of a circuit that can generate generic three-particle entanglement between the NV probes. The exact structure of the sensing protocols is detailed in the Supplementary Methods. Figure 4 shows that the shallow entangled probe yields an advantage in the absence of gate noise. But even at very small gate noise levels, the additional noise from the entangling operations will make the entangled probe inferior to the local probe. Although we only consider one specific ansatz for an entangled probe, this sheds light on the importance of gate noise in realistic probe preparations. In the Supplementary Methods, we further analyze the optimized sensing schemes and show that entanglement causes the advantage in the noiseless case and is still present in the optimized probes at small noise levels (1%). However, the probes quickly become separable as the gate noise is increased.

## Discussion

In this work, we have introduced a variational approach that can be applied to a wide variety of metrological problems to optimize multi-parameter estimation schemes both on sensing platforms and on quantum devices. These approaches can be tailored to specifically match the available hardware and the sensing problem in question. Instead of addressing the challenges of noisy quantum metrology by classically computing optimal probes and measurements, we have shown how to learn variational parameters of a quantum circuit for this purpose. The proposed machinery can also be used to improve upon an already good guess. The variational nature of our approach naturally causes a dependence of the quality of the optimized protocol on the choice of parametrization and optimization method. It is therefore complementary to analytic approaches that broaden our understanding of optimal sensing schemes in realistic scenarios which in turn can inform good choices for the parametrization of probes and measurements.

While the approach outlined in the main text is widely applicable, covering arbitrary noise models and post-processing functions, it still does not cover all possible metrological tasks. In the Supplementary Methods, we therefore present extensions of our algorithm that take into account prior knowledge about the underlying parameters, handle mutual time dependence of unitary evolution and noise, and outline how we can benchmark our results against the ultimately attainable precision given by the quantum Cramér-Rao bound. The results about parameter-shift rules for quantum channels furthermore allow the extension of our method to the metrology of error channel parameters. We hope that the present work contributes to a shift in mindset—somewhat reminiscent of the idea of quantum computer-aided design of physical platforms48—so that not all sensing protocols have to be designed classically, but that one can make use of quantum technologies themselves to actually learn improved quantum protocols.

## Data availability

The datasets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request.

## Code availability

The code used to generate the data analyzed during the current study is available from the corresponding author on reasonable request.

## References

1. 1.

Giovannetti, V., Lloyd, S. & Maccone, L. Quantum metrology. Phys. Rev. Lett. 96, 010401 (2006).

2. 2.

Demkowicz-Dobrzański, R., Kołodyński, J. & Guţă, M. The elusive Heisenberg limit in quantum-enhanced metrology. Nat. Commun. 3, 1063 (2012).

3. 3.

Braun, D. et al. Quantum-enhanced measurements without entanglement. Rev. Mod. Phys. 90, 035006 (2018).

4. 4.

Pezzè, L. Twisting the noise away. Quantum Views 4, 36 (2020).

5. 5.

Aasi, J. et al. Enhanced sensitivity of the ligo gravitational wave detector by using squeezed states of light. Nat. Photonics 7, 613–619 (2013).

6. 6.

Liu, G.-Q. et al. Demonstration of entanglement-enhanced phase estimation in solid. Nat. Commun. 6, 6726 (2015).

7. 7.

Facon, A. et al. A sensitive electrometer based on a Rydberg atom in a Schrödinger-cat state. Nature 535, 262–265 (2016).

8. 8.

Chabuda, K., Dziarmaga, J., Osborne, T. J. & Demkowicz-Dobrzański, R. Tensor-network approach for quantum metrology in many-body quantum systems. Nat. Commun. 11, 1–12 (2020).

9. 9.

Pezzè, L., Smerzi, A., Oberthaler, M. K., Schmied, R. & Treutlein, P. Quantum metrology with nonclassical states of atomic ensembles. Rev. Mod. Phys. 90, 035005 (2018).

10. 10.

Proctor, T. J., Knott, P. A. & Dunningham, J. A. Multiparameter estimation in networked quantum sensors. Phys. Rev. Lett. 120, 080501 (2018).

11. 11.

Qian, K. et al. Heisenberg-scaling measurement protocol for analytic functions with quantum sensor networks. Phys. Rev. A 100, 042304 (2019).

12. 12.

Sekatski, P., Wölk, S. & Dür, W. Optimal distributed sensing in noisy environments. Phys. Rev. Res. 2, 023052 (2020).

13. 13.

Guo, X. et al. Distributed quantum sensing in a continuous-variable entangled network. Nat. Phys. 16, 281–284 (2020).

14. 14.

Xia, Y. et al. Demonstration of a reconfigurable entangled radio-frequency photonic sensor network. Phys. Rev. Lett. 124, 150502 (2020).

15. 15.

DeVience, S. J. et al. Nanoscale NMR spectroscopy and imaging of multiple nuclear species. Nat. Nanotechnol. 10, 129–134 (2015).

16. 16.

Baumgratz, T. & Datta, A. Quantum enhanced estimation of a multidimensional field. Phys. Rev. Lett. 116, 030801 (2016).

17. 17.

Apellaniz, I., Urizar-Lanz, I. N., Zimborás, Z., Hyllus, P. & Tóth, G. Precision bounds for gradient magnetometry with atomic ensembles. Phys. Rev. A 97, 053603 (2018).

18. 18.

Kómár, P. et al. A quantum network of clocks. Nat. Phys. 10, 582–587 (2014).

19. 19.

Khabiboulline, E. T., Borregaard, J., De Greve, K. & Lukin, M. D. Optical interferometry with quantum networks. Phys. Rev. Lett. 123, 070504 (2019).

20. 20.

Preskill, J. Quantum computing in the NISQ era and beyond. Quantum 2, 79 (2018).

21. 21.

McClean, J. R., Romero, J., Babbush, R. & Aspuru-Guzik, A. The theory of variational hybrid quantum-classical algorithms. New J. Phys. 18, 023023 (2016).

22. 22.

Kaubruegger, R. et al. Variational spin-squeezing algorithms on programmable quantum sensors. Phys. Rev. Lett. 123, 260505 (2019).

23. 23.

Koczor, B., Endo, S., Jones, T., Matsuzaki, Y. & Benjamin, S. C. Variational-state quantum metrology. New J. Phys. 22, 083038 (2020).

24. 24.

Yang, X. et al. Probe optimization for quantum metrology via closed-loop learning control. npj Quantum Inf. 6, 1–7 (2020).

25. 25.

Schuld, M., Bergholm, V., Gogolin, C., Izaac, J. & Killoran, N. Evaluating analytic gradients on quantum hardware. Phys. Rev. A 99, 032331 (2019).

26. 26.

Li, J., Yang, X., Peng, X. & Sun, C.-P. Hybrid quantum-classical approach to quantum optimal control. Phys. Rev. Lett. 118, 150503 (2017).

27. 27.

Mitarai, K., Negoro, M., Kitagawa, M. & Fujii, K. Quantum circuit learning. Phys. Rev. A 98, 032309 (2018).

28. 28.

Bernien, H. et al. Probing many-body dynamics on a 51-atom quantum simulator. Nature 551, 579–584 (2017).

29. 29.

Zhang, J. et al. Observation of a many-body dynamical phase transition with a 53-qubit quantum simulator. Nature 551, 601–604 (2017).

30. 30.

Arute, F. et al. Quantum supremacy using a programmable superconducting processor. Nature 574, 505–510 (2019).

31. 31.

Pirandola, S., Bardhan, B. R., Gehring, T., Weedbrook, C. & Lloyd, S. Advances in photonic quantum sensing. Nat. Photonics 12, 724–733 (2018).

32. 32.

Larsen, M. V., Guo, X., Breum, C. R., Neergaard-Nielsen, J. S. & Andersen, U. L. Deterministic generation of a two-dimensional cluster state. Science 366, 369–372 (2019).

33. 33.

Asavanant, W. et al. Generation of time-domain-multiplexed two-dimensional cluster state. Science 366, 373–376 (2019).

34. 34.

Sweke, R. et al. Stochastic gradient descent for hybrid quantum-classical optimization. Quantum 4, 314 (2020).

35. 35.

Lehmann, E. L. & Casella, G. Theory of Point Estimation (Springer Science+Business Media, 2006).

36. 36.

Fisher, R. A. On the mathematical foundations of theoretical statistics. Philos. Trans. R. Soc. Lond. A 222, 309–368 (1922).

37. 37.

Banchi, L. & Crooks, G. E. Measuring analytic gradients of general quantum evolution with the stochastic parameter shift rule. Quantum 5, 386 (2021).

38. 38.

Wilde, M. M. Quantum Information Theory (Cambridge University Press, Cambridge, 2013).

39. 39.

Bergholm, V. et al. Pennylane: Automatic differentiation of hybrid quantum-classical computations Preprint at https://arxiv.org/abs/1811.04968 (2018).

40. 40.

Jones, T., Brown, A., Bush, I. & Benjamin, S. C. Quest and high performance simulation of quantum computers. Sci. Rep. 9, 1–11 (2019).

41. 41.

Huelga, S. F. et al. Improvement of frequency standards with quantum entanglement. Phys. Rev. Lett. 79, 3865 (1997).

42. 42.

Shi, F. et al. Single-protein spin resonance spectroscopy under ambient conditions. Science 347, 1135–1138 (2015).

43. 43.

Aslam, N. et al. Nanoscale nuclear magnetic resonance with chemical resolution. Science 357, 67–71 (2017).

44. 44.

Lovchinsky, I. et al. Nuclear magnetic resonance detection and spectroscopy of single proteins using quantum logic. Science 351, 836–841 (2016).

45. 45.

Schmitt, S. et al. Submillihertz magnetic spectroscopy performed with a nanoscale quantum sensor. Science 356, 832–837 (2017).

46. 46.

Abobeih, M. H. et al. Atomic-scale imaging of a 27-nuclear-spin cluster using a quantum sensor. Nature 576, 411–415 (2019).

47. 47.

Sushkov, A. et al. Magnetic resonance detection of individual proton spins using quantum reporters. Phys. Rev. Lett. 113, 197601 (2014).

48. 48.

Kyaw, T. H. et al. Quantum computer-aided design: digital quantum simulation of quantum processors. Preprint at https://arxiv.org/abs/2006.03070 (2020).

49. 49.

Scientific co2nduct. Raising awareness for the climate impact of science. https://scientific-conduct.github.io (2019).

## Acknowledgements

The authors endorse Scientific CO2nduct49 and provide a CO2 emission table in the Supplementary Notes.

## Funding

This work has been supported by the BMWi (PlanQK), the MATH+ excellence cluster (EF1-7), the Templeton Foundation, and the DFG (CRC 183, B01). J.B. acknowledges funding from the NWO Gravitation Program Quantum Software Consortium. Open Access funding enabled and organized by Projekt DEAL.

## Author information

Authors

### Contributions

J.J.M. conceived the method and performed the numerical experiments. J.B. and J.E. supported research and development. All authors contributed to the manuscript.

### Corresponding authors

Correspondence to Johannes Jakob Meyer or Johannes Borregaard or Jens Eisert.

## Ethics declarations

### Competing interests

The authors declare no competing interests.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and Permissions

Meyer, J.J., Borregaard, J. & Eisert, J. A variational toolbox for quantum multi-parameter estimation. npj Quantum Inf 7, 89 (2021). https://doi.org/10.1038/s41534-021-00425-y