<<

Adaptive Circuit Learning for Quantum Metrology Ziqi Ma*1, Pranav Gokhale1, Tian-Xing Zheng2, Sisi Zhou2, Xiaofei Yu2, Liang Jiang2, Peter Maurer2, and Frederic T. Chong †1 1Department of Computer Science, University of Chicago 2Pritzker School of Molecular Engineering, University of Chicago

Abstract Quantum advantage is enabled by entanglement, which al- Quantum metrology is an important application of emerging lows for higher sensitivity than what can be achieved by a clas- quantum technologies. We explore whether a hybrid system of sical parallelization of the sensing , called the classical quantum sensors and quantum circuits can surpass the clas- limit. As shown in Figure1, the classical limit gives a square sical limit of sensing. In particular, we use a circuit learning root scaling of Signal-to-Noise Ratio (SNR) versus the number approach to search for encoder and decoder circuits that scal- of sensing qubits. By contrast, the theoretical limit—called ably improve sensitivity under given application and noise the Heisenberg limit—achieves linear scaling [1, 8, 9, 10]. In characteristics. recent years, there has been exciting experimental progress Our approach uses a variational algorithm that can learn beyond the classical limit in areas ranging from spectroscopy a quantum sensing circuit based on platform-specific control [3] to precision measurement [11, 12] to the famous LIGO ex- capacity, noise, and signal distribution. The periment for detection [13, 14]. While the is composed of an encoder which prepares the optimal sensing state-of-the-art shows great promise in achieving quantum ad- state and a decoder which gives an output distribution con- vantage in sensing, we still expect further improvement—the taining information of the signal. We optimize the full circuit of entangled states is large and existing protocols to maximize the Signal-to-Noise Ratio (SNR). Furthermore, only explore a small set of sensing states. Furthermore, the this learning algorithm can be run on real hardware scalably current state-of-the-art in entanglement-enhanced sensing is by using the “parameter-shift” rule which enables gradient still mostly proof-of-concept experiments, and such protocols evaluation on noisy quantum circuits, avoiding the exponential do not necessarily yield good performance on real hardware— cost of quantum system simulation. We demonstrate a 1.69x each platform is subject to a unique set of noise and control SNR improvement over the classical limit on a 5- IBM constraints. Given the constraints of limited and imperfect con- quantum computer. More notably, our algorithm overcomes trol, device-specific noise, and readout errors of practical hard- the plateauing (or even decreasing) performance of existing ware, theoretically-optimal sensing protocols yield suboptimal entanglement-based protocols with increased system sizes. performance. For example, the Greenberger–Horne–Zeilinger state (GHZ state) is optimal without noise but decoheres easily 1. Introduction in noisy cases. Another theoretically optimal state, called the In recent years, we have seen enormous growth in emerging -squeezed state, is hard to create if we do not have global quantum technologies that exploit for var- interaction or all-to-all qubit connectivity [7]. We believe ious applications, such as computation, communication, and that a circuit learning approach, which optimizes the sensing sensing. The sensitivity of quantum states to changes in the ex- apparatus circuit based on characteristics of the underlying ternal environment, while seen as an obstacle in computation hardware, noise model, and signal can provide a solution. and communication, becomes a valuable advantage in sensing. Our circuit learning algorithm is inspired by recent works Quantum sensing is believed to have the most immediate real- in quantum computation. A class of quantum-classical hybrid

arXiv:2010.08702v1 [quant-ph] 17 Oct 2020 world impacts, likely before other quantum technologies [1]. algorithms, called variational algorithms, have been proposed The applications span a wide range of areas, including time- for Noisy Intermediate-Scale Quantum hardware [15, 6, 16]. keeping [2], spectroscopy [3], tests of fundamental physics [4], Variational algorithms operate by alternating between exe- and probing nanoscale systems such as condensed matter and cution on quantum hardware and execution on a classical biological systems [5]. There has been exciting experimental optimizer which guides subsequent iterations of quantum op- progress on various physical platforms, such as atomic vapor, erations. By limiting the number of operations on quantum trapped ions, Rydberg atoms, superconducting circuits, and hardware per iteration, variational methods reduce errors while nitrogen-vacancy centers in diamond. Even today, practical maintaining the quantum advantage. Such algorithms also al- quantum sensors such as SQUID magnetometers [6], atomic low us to leverage classical computing power to aid in quantum vapors, and atomic clocks [2] have already become the state- computation. of-the-art in magnetometry and timekeeping [7]. There have been recent proposals on extending the vari- *[email protected] ational approach to sensing [17, 18, 19]. However, these †[email protected] proposals: Signal-to-Noise Ratio Scaling the exponentially large Hilbert space of all possible entangled states, we propose circuit templates based on both physics principles and hardware capacities. The circuit template pa- Heisenberg Limit Entanglement rameterizes a circuit into a real-valued vector, framing circuit enhanced design into a multivariate optimization problem. We use an

SNR objective function based on estimation theory, as well as prior Optimized results on noisy gradient estimation [21], which allows for

Existing efficient and scalable search evaluated on real hardware. Classical Limit We achieve 1.75x SNR improvement over the best baseline Number of Qubits protocol under realistic simulation. We experimentally vali- date our technique on a 5-qubit IBM quantum computer and Figure 1: SNR scaling. The classical parallel scheme (Classi- measure a 1.69x improvement from the classical limit, with cal Limit) gives square root scaling of SNR versus the num- larger gains expected for increased system size. More impor- ber of sensing qubits. The theoretical upper bound of quan- tantly, we are able to overcome the plateauing/decreasing tum sensing is the Heisenberg Limit, which gives linear scal- performance of known entanglement-based protocols, ob- ing. Shaded region corresponds to entanglement-enhanced taining consistent sensitivity gain from additional qubits. sensing. Existing and optimized curves are based on exper- Compared to the classical limit, our result is equivalent to iments on IBM hardware (dotted lines are extrapolations)— 3x savings in the number of qubits needed, or 3x savings in circuit learning is able to overcome the plateauing/decreasing total sensing time to achieve the same SNR. Considering the performance of existing protocols. increasing difficulty of engineering large quantum systems, a • have fixed circuit structures; 3x reduction in system size has significant practical benefits. • require deep circuits or global interactions which are not Furthermore, a smaller system size also allows for smaller practical on many platforms; sensing volume, which is key in invasive applications such as • consider limited noise sources; biological sensing. Reduction of the sensing tim, in addition, • assume noise-free or limited “decoding” procedures for ex- allows for improved precision in sensing any time-dependent traction of into classical information; signal. • are not evaluated on hardware, which often varies consider- We enable quantum sensing to be implemented with high ably from simulation, e.g. in the difficulty of convergence. fidelity on real near-term noise-prone quantum hardware. Our We address these problems by proposing a flexible, solution considerably extends the state-of-the-art by incorpo- architecture-aware circuit structure design and a hardware- rating noise-awareness, realistic classical-quantum interfacing, based learning procedure that could be run under device noise. and adaptivity to diverse physical platforms and applications. The algorithm schematic is shown in Figure2. We divide The main contributions of this work are as follows: the sensing circuit into four components: encoder, signal ac- • Enabling a guided exploration of a larger space of entangled cumulation, decoder, and measurement. Given the available states than existing protocols; control gateset, platform-specific noise, and gate/readout er- • Leveraging platform-specific information via on-device rors, our approach aims to find the optimal encoder/decoder training under realistic hardware and noise constraints; pair. The encoder prepares the sensing state prior to exposure • Optimizing full sensing circuit including information ex- to the signal by applying superposition and entanglement to traction (rather than just state preparation), which we show the initial state. to have important effects on performance, especially given Then the sensing qubit(s) will be exposed to the signal gate noise and readout errors; for a certain amount of time, which results in changes to the • Considering a holistic noise model including gate noise, in- state due to the signal as well as interrogation noise (noise terrogation noise, and readout noise, and demonstrating au- during signal accumulation). A long probing time magnifies tomatic adaptation to different relative magnitudes of these the signal but also brings in more noise. noises; The decoder’s function is to transform the post-signal state • Exploiting non-uniform signal distributions to further im- into some other state such that measurement of the qubits prove sensitivity; yields the greatest information about the signal. • Designing the algorithm to be scalable to large sys- Prior work [17, 19, 20] focuses much more on the encoder tems and generalizable to different sensing platforms and for preparing a sensing state, and not so much on the decoder applications—from nanoscale field sensing to timekeeping for extracting quantum information into classical information. to testing physics beyond the standard model. However, as we show in this paper, given imperfect control The rest of the paper is organized as follows: Section2 and readout errors, decoder design has considerable effects on covers the background of quantum sensing including quantum sensitivity. operations and the theoretical framework, as well as introduces Our circuit learning approach is as follows: to constrain existing protocols. Section3 describes our circuit learning

2 CLASSICAL COMPONENT Input: Gateset U, Connectivity Graph G

Propose Circuit Template Parameterize Circuit θ=(θ1, θ2, θ3, θ4, θ5, θ6) Decoder EncoderEncoder Decoder QUANTUM COMPONENT θ2 θ5 Signal Measure θ1 θ3 θ4 θ6

Evaluate objective function under device noise

Optimize objective function

Figure 2: Algorithm schematic. Given available gateset and connectivity graph, multiple circuit templates are proposed. Each template parameterizes a circuit into a continuous vector, upon which we run optimization to maximize sensitivity. Objective function under real device noise can be obtained via the “parameter-shift” rule for gradient evaluation. Optimization across different circuit structures converges upon a final optimized output. algorithm in detail, discussing the tradeoffs we need to balance |0⟩ as well as our design decisions. Section4 shows simulation results under different noise combinations and with different signal distributions, and Section5 shows experimental results on IBM hardware. Section6 discusses various sensing plat- y forms and applications on which our methodology can be x applied, as well as future directions. |1⟩

2. Background Figure 3: Bloch Sphere representation and projective mea- θ iφ θ surement. A single-qubit state |φi = cos 2 |0i + e sin 2 |1i 2.1. Quantum Gates and Measurement could be represented geometrically as a vector (θ,φ) on the 2.1.1. Quantum States and Measurement Quantum infor- unit sphere (green vector). When we measure in the compu- mation is embodied in the . Compared to a tation basis, it geometrically corresponds to a projection onto classical bit which only contains binary information, a qubit the Z-axis, and the probability of measuring 0 is equal to the contains the information of two complex numbers (modu- square of the projection (yellow). lus squares normalized to 1), and likewise, N qubits contain N iments will allow an estimation of a and b. For quantum the information of 2 complex numbers (modulus squares sensing, we aim to design a circuit whose measurement output normalized to 1). A qubit could be represented as a state distribution allows us to estimate the signal with high precision | i = θ | i+eiφ θ | i a| i+b| i vector φ cos 2 0 sin 2 1 (or 0 1 subject to [22]. |a|2 + |b|2 = 1). It could be geometrically represented as a 2.1.2. Quantum Gates Quantum gates are operations to point on the Bloch sphere, specified by the angles θ,φ, as change quantum states. Single-qubit gates, which are math- shown in Figure3. ematically represented as arbitrary 2x2 matrices, correspond Quantum information is extracted by quantum measure- to arbitrary rotations on the Bloch sphere. Rx,Ry,Rz rotation ment, which outputs not a deterministic result but a random N gates correspond to rotations about the x, y, or z-axis on the variable whose probabilistic distribution (over 2 possible Bloch sphere by a given angle. Any unitary operation on a outcomes for N qubits) is dependent on the quantum state. single qubit could be determined by three parameters, and Each experiment only yields one outcome, and by repeating we call this operation a U3 gate. Two special examples are the experiment multiple times we could recover the output the X gate which inverts |0i and |1i and the Hadamard gate distribution, which contains the information of interest. In which rotates the |0i state to √1 (|0i + |1i) and |1i state to this paper, we consider the standard computation-basis projec- 2 √1 (|0i − |1i). Entanglement gates make the states of two or tive measurement, which means a projection onto the |0i,|1i 2 basis (for each qubit). Geometrically, this corresponds to a more qubits correlated. One example is the CNOT gate which Z-axis projection on the Bloch Sphere. This measurement applies X gate to the target qubit if the control qubit is in |1i, 1 0  and has no effect if the control qubit is in |0i. corresponds to the Pauli Z matrix . For 0 −1 For the simulations and experiments in this paper, we mainly a one-qubit state |φi = a|0i+b|1i, the probability of obtaining consider magnetometry-based sensing, where the signal is a 2 2 result |0i is |a| , and obtaining |1i is |b| . Repeated exper- Rz rotation, the angle of which is the product of a frequency

3 value dependent on the magnetic field and probing time t. The 2.3. Parameter-Shift Rule for CFI Evaluation encoder and decoder in our circuit are sequences of parame- terized single-qubit or entanglement gates. As shown in Section 2.2, CFI evaluation requires gradient evaluation. Note that even if we don’t use a gradient-based 2.2. Theoretical Framework: Classical and Quantum optimizer, evaluation of our learning objective still requires Fisher Information gradient. The “parameter-shift” rule makes such evaluations possible on noisy hardware. When running on real hardware, Given a specific signal ω, the objective of quantum sensing we do not have the analytic form of output probabilities and is to maximize the Signal-to-Noise Ratio (SNR), ω . SNR, σωˆ only have access to the noisy sensing circuit. Numerical deriva- however, is not a good metric for a sensing circuit since it is tives via finite differences fail to work since the shot noise signal-dependent. If we view the sensing problem as parame- and machine noise result in larger fluctuation than a slight ter estimation, i.e. constructing an estimator of the unknown change in the signal. A method called the “parameter-shift” signal based on measured outcomes, we could use concepts rule, similar to backpropagation in neural networks, resolves from estimation theory as better metrics. Based on estimation this problem by enabling analytic gradient evaluation [21, 19]. theory, Classical Fisher Information (CFI) and Quantum Fisher As shown in Figure4, the gradient at angle value θ can be Information (QFI) are used as signal-independent metrics that estimated with function values at θ + π and θ − π , and this is quantify information [23, 24]. In particular, QFI quantifies 2 2 proven to be true even with noise2 [19]. Mathematically, in our information carried by the quantum state whereas CFI quan- application, gradient of probability of measuring n on signal ω tifies information in the classical distribution obtained after 2 dPr(n|ω) = t ( (n| + π )− (n| − π ))3 repeated quantum measurements. could be written as dω 2 Pr ω 2 Pr ω 2 . Because noise causes attenuation of signal information, QFI The “parameter-shift” rule allows for macroscopic step sizes decreases monotonically after each noisy operation. A noise- instead of microscopic step sizes and is therefore robust to less measurement in an optimal basis can extract full . information into classical information, in which case the CFI � � � � + �� − � � � � + − � � − 2 2 is equal to QFI of the final state. However, when measure- � � ≈ � � ≈ �� 2 ment cannot be performed on an arbitrary basis or is noisy, the quantum information cannot be fully extracted, and thus CFI is lower than QFI. We find this to be the case in practical sensing applications. Therefore, while prior works such as [17] focus on QFI, we adopt CFI as a more practical metric. Mathematically, CFI provides a lower bound on the variance � � of signal estimator σωˆ via the Cramér-Rao Bound [25], there- � � + �� � − � � + 2 2 fore upper-bounding SNR. This bound tells us how good the Numerical Gradient Analytic Gradient (Parameter Shift) SNR could be given perfect post-processing. With M repeated experiments, the full relation is written as: Figure 4: Parameter-shift rule for gradient estimation on noisy circuits: to estimate the derivative of a quantum observ- 1 1 σωˆ ≥ √ ≥ √ (1) able, the naive finite-difference approximation fails on practi- M × CFI M × QFI cal hardware—true derivative is overshadowed by noise. The where CFI is defined as “parameter-shift” rule proves that gradient at θ could be esti- mated with function values at θ + π and θ − π , which resolves  d log(Pr(X|ω))  2 2 CFI(ω) = E ( )2 (2) this problem. dω where X is the measurement outcome with a distribution over 2N possible values for a N-qubit circuit. Whereas we find the 2.4. Baseline Protocols CFI-QFI bound hard to saturate on practical hardware, we 2.4.1. The Ramsey Experiment and Classical Limit A find it easy to saturate the first bound via a local 2-degree canonical sensing protocol is the Ramsey Experiment [7], 1 polynomial fit . Therefore, in this work, we study QFI to a one-qubit sensing protocol. The experiment is shown in Fig- understand the signal attenuation at each operation, but use ure5. Running independent Ramsey experiments on multiple CFI for the final learning objective because it’s more practical. sensing qubits gives the classical limit, which is a square root Note that the definition of CFI in Equation2 requires gradi- scaling of SNR (based on the Central Limit Theorem). Since ent evaluation, which is challenging on noisy hardware. This could be resolved by using the “parameter-shift” rule detailed 2under noise assumptions detailed in Appendix A of [19]. Noises such as in Section 2.3. dephasing and depolarizing channels satisfy this assumption. 3This formula is for the single-qubit case. For an N-qubit sensing circuit, 1Since we are only estimating one signal parameter, this bound is saturated we use a simple extension with 2N additional circuit evaluations, each time π by the Maximum-Likelihood Estimator. adding/subtracting 2 to one qubit and keeping other qubits constant.

4 Ramsey Experiment GHZ: Uniform-H Decoder

|0⟩ |0⟩ |0⟩ H • Rz(φ) H

• Rz(φ) H

y y y Rz(φ) H x x x

|1⟩ |1⟩ |1⟩ GHZ: Inverse-symmetric Decoder Encode Signal Accumulation Decode H • Rz(φ) • H Figure 5: Ramsey experiment. Ramsey experiment is a ba- sic one-qubit sensing protocol. The encoder is a Hadamard • Rz(φ) • gate which rotates the initial state |0i onto x-axis, resulting in |+i = √1 (|0i + |1i). The signal, a small-angle R rotation, is R (φ) 2 z z then applied to the sensing qubit, yielding √1 (|0i + eiωt |1i). 2 Figure 6: Two GHZ decoders. Both are optimal in the noise- The decoder is another Hadamard gate which rotates the state less case, but in practical scenarios, they are subject to dif- back, although not exactly back to |0i because of the signal ferent noise tradeoffs. The uniform-H decoder avoids higher- ωt ωt rotation, yielding cos 2 |0i − isin 2 |1i. Standard measure- error CNOT gates but requires parity readout, which is suscep- 2 ωt ment gives cos 2 probability of measuring 0. Repeated ex- tible to readout errors. The inverse-symmetric decoder uses periments with computational-basis measurements allows us more CNOT gates, but concentrates information on one qubit, to infer signal ωt. and is thus more robust to readout errors. A comparison of the two shows that different noise combinations favor differ- ent decoder designs, and it is not sufficient to only consider this is a classical parallel scheme, we denote this as “parallel QFI of the encoded state. Ramsey” in the following sections. 3. Circuit Learning 2.4.2. GHZ Protocols When we have more than one sens- In Section 2.4 we introduced three baseline protocols: parallel ing qubits, we could exploit entanglement to achieve im- Ramsey (independent Ramsey experiments on each sensing proved sensitivity. The Greenberger–Horne–Zeilinger state qubit), GHZ with uniform-H decoder (GHZ-H), and GHZ (GHZ state) [26] is a maximally-entangled state, written with inverse-symmetric decoder (GHZ-INV). These protocols as √1 (|00...0i + |11...1i). The encoder is GHZ state cre- 2 are suboptimal on practical hardware: parallel Ramsey only ation from the all-zero state, which could be done with one gives classical (square-root) scaling, and GHZ states tend to Hadamard and a chain of N − 1 CNOT gates. The sig- decohere easily in noise. Considering imperfect control, inter- nal Rz rotation applies to all sensing qubits, resulting in rogation noise, and readout error of each specific platform, we √1 (|00...0i + eiNφ |11...1i). 2 believe an architecture-aware and noise-aware circuit learning Two types of decoder could be constructed for GHZ approach can achieve the highest sensitivity under practical states, both optimal in the noiseless case, as shown in Fig- constraints. In all our experiments and simulations, we com- ure6. The first construction is a uniform Hadamard ro- pare our algorithm with the above three baselines. N N−1 tation on all qubits, resulting in √1 (cos φ ∑2 −1 |2 ji − 2N 2 j=0 3.1. Objective Function N−1 isin Nφ 2 −1 |2 j + 1i). This decoder transforms quantum 2 ∑ j=0 As mentioned in Section 2.2, we base the objective function information into the parity of measurement outcome. on CFI. The signal is a Rz rotation on the sensing qubit(s) Another decoder is inverse-symmetric to the encoder, i.e. proportional to time, with angle φ = ωt. Since we ultimately a chain of CNOT gates followed by Hadamard on the qubit care about signal ω rather than φ, this means an extra factor which contains the information. Each CNOT dis-entangles of t2: CFI(ω) = t2CFI(φ). Based on Equation1, maximizing a qubit while keeping the amplitude in the remaining qubits, SNR per unit time is equivalent to maximizing ultimately giving cos φ |0i − isin Nφ |1i on one qubit. 2 2 2 −2 t CFI(φ) In the noiseless case, the GHZ state is optimal, achieving σωˆ ≤ Nexp ·CFI(ω) = (3) t +toverhead the Heisenberg Limit of linear SNR scaling [7]. Practically, however, we show in Figure 11 that GHZ protocols suffer where t is signal accumulation time, a parameter we can con- plateauing/decreasing performance under noise and imper- trol, and toverhead is the time overhead for encoding, decoding fect control, and decoder design has important performance and measurement, a parameter determined by hardware. We implications. use Equation3 as the objective function for optimization.

5 Due to noise, there is a tradeoff between CFI(φ) and t. Both Algorithm 1 Circuit Learning (with IBM gateset) terms contribute positively to the objective function, yet a large For N-qubit system, given hyper-parameters k,l,m t means longer exposure to interrogation noise, which causes a for i = 1, ..., itermax do decrease in CFI(φ). We aim to balance this tradeoff by finding // Circuit Template Construction a state whose CFI(φ) decreases slowly with t, meaning the for j = 1, ...l do state decoheres slowly in the given noise channel. 1. Randomly choose k out of N qubits, q1,...qk to The objective function Equation3 provides a direct bound apply a single-qubit U3 gate on each. U3 gate on qp on SNR and requires a joint optimization of circuit and probe parameterized by (θ j,p,0,θ j,p,1,θ j,p,2) (p=1,...k). time t in the noisy case. 2. Based on connectivity graph G, randomly choose m 3.2. Constraining the Design Space non-repeating (control, target) pairs out of N qubits to do an entanglement operation on each pair. If j = 1, The Hilbert space of entangled states is exponentially large. make sure control qubit either 1) has been chosen in To explore such a space, the first step is to constrain the de- step 1, or 2) has been chosen as the target in a prior sign space by proposing circuit templates. A circuit template, entanglement operation in the current step. (called “ansatz” in quantum computation), specifies the en- end for coder and decoder structures. Seen from an optimization per- // Continuous Optimization spective, a circuit template creates a one-to-one mapping from 1. Initialize θ ∈ [0,2π]6kl, t ← 10 µs (or some value a parameter vector θ to a sensing circuit. Thus, for a fixed 1 between 10 T2 and T2). circuit template, any circuit metric Cθ is simply a function 2. Use a classical optimizer (e.g. Powell, COBYLA) 2 of θ , and circuit design becomes a multivariate optimization to obtain max C = t CFI(φ) . CFI(φ) obtained via θ ,t θ ,t t+toverhead problem. 2N + 1 circuit runs using the “parameter-shift” rule. The generation rules for circuit templates are based on both 3. If Cθ ,t higher than previous max, record optimal θ ,t, physics principles and hardware capacities. From a physics Cθ ,t perspective, since both the initial state and the final measure- end for ment are in Z-basis, we stipulate the encoder and decoder return optimal θ ,t, Cθ ,t structures (though not parameters) to be symmetric. From a co-design perspective, we base our circuit templates on the recovered. Similarly, if we specify l = 1 layer, k = 1 single- native gates and connectivity graph of hardware. We define qubit gates per layer, and m = n − 1 entanglement gates per three hyperparameters: l circuit layers, k single-qubit gates layer, with the correct order of entanglement gates the global per layer, and m entanglement gates per layer. By setting GHZ protocol could be recovered. Choosing different values these hyperparameters, we could control how local/global we of l,k,m, we could obtain arbitrary entangled states. However, want the entanglement to be, and sequentially explore circuits a circuit that is too deep will likely incur high gate errors. In with increasing depths. Circuit templates that contain redun- our simulations as well as experiments, one layer is usually dant, canceling, or spurious gates are discarded. These design sufficient. choices, while preserving structural flexibility, constrains pos- sible circuit structures to a tractable amount. 4. Results under Different Platform Conditions 3.3. Circuit Learning Algorithm 4.1. Circuit Learning with Different Noises Combining the components in the sections above, we have In this section, we demonstrate that our learning algorithm can the full circuit learning procedure in Algorithm1. In each automatically adapt to different types of noise, and achieve iteration, a circuit template is proposed and then optimized better sensitivity scaling than fixed baseline protocols. with evaluation on real hardware using the “parameter-shift” 4.1.1. Noise Decomposition Noise is incurred by each rule. operation—encoding, signal accumulation, decoding, and Here we describe the algorithm in more detail using the readout. The contribution of each noise component depends on example of the IBM machine gateset and connectivity. Note specific circuit parameters (encoder/decoder depth, accumula- that this could be easily generalized to other platforms, de- tion time, whether the output distribution is “concentrated” on tailed in Section 6.1. The native gateset of IBM machines is some qubits, etc.). As mentioned in Section 2.2, QFI quanti- comprised of general U3 gates on single qubits (with three free fies the amount of information contained in the quantum state parameters), and CNOT gates for entanglement operations. and decreases monotonically under noisy quantum channels. A combination of U3 gates and CNOT gates per layer allows Calculating the QFI at different points in the circuit allows us for the flexibility of creating parallel (or weakly entangled) to see how much information is lost at each (noisy) step, as local structures—for N qubits, if we specify l = 1 layer, k = N shown in Figure7. single-qubit gates per layer, and m = 0 entanglement gates 4.1.2. Results In this section, we consider four different noise per layer, then a scheme similar to Parallel Ramsey could be scenarios: full noise model including gate noise, interrogation

6 Decomposing Noise Effects Baseline Protocol Tradeoffs

8 Protocol Advantage Disadvantage

6 Encoder Parallel Robust Only square root scaling Interrogation Ramsey

QFI 4 Decoder Readout GHZ-H Linear scaling Decoheres quickly, suceptible Final(=CFI) if no noise to readout noise 2 GHZ-INV Linear scaling Decoheres quickly, susceptible 0 if no noise to gate noise Parallel Ramsey GHZ-H GHZ-INV Optimized

Figure 7: Decomposition of noise effects from each step: encoder, interrogation, decoder, readout 4. Although these noise sources are independent, their effects need to be considered holistically—a state that is robust to one noise type usually is vulnerable to others. Our algorithm aims to balance the tradeoff of these noise effects via on-device learning. The orange (bottom) part shows the final QFI after all noises, equal to CFI, which is our optimization objective. Each colored region shows the additional QFI improvement of given circuit if the labeled operation is perfect. Total height denotes QFI in the ideal case. The optimized circuit has less total QFI than GHZ states because we are optimizing for the highest practical (orange) region. Our learning algorithm found a protocol that performs 2-3x better specifically under the given constraints.

SNR (Full Noise) CFI (Full Noise) Optimal Interrogation Time (Full Noise) 80 80 3.0 70 70

60 2.5 60

50 2.0 50

40 1.5 40 CFI

30 30 1.0 Time (us)

20 20 0.5 SNR (per second) 10 10

0.0 0 0 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 Number of Qubits Number of Qubits Number of Qubits

Classical GHZ-Uniform H Decoder GHZ-Inverse-symmteric Decoder Optimized

5 t2CFI(φ) Figure 8: Results with full noise . The learning objective is (Equation3) with a hardware-determined toverhead. Optimiza- t+toverhead tion requires balancing the tradeoff between CFI and interrogation time t. In addition to SNR derived from our objective function, we also plot out the optimal CFI and t which maximize the optimization objective. noise, and readout noise, and removing (or suppressing) each parity-readout for the uniform-H decoder outweigh the errors noise source. In each noisy scenario, we run our learning from the N − 1 extra CNOT gates of the inverse-symmetric algorithm to maximize SNR and compare the optimized results decoder. with baseline sensing protocols: parallel Ramsey, GHZ state Circuit learning yields up to 1.75x SNR gain. The opti- with uniform-H decoder, GHZ state with inverse-symmetric mized circuit obtains higher SNR largely by achieving a high decoder. The optimization target is Equation3. For each CFI, at the cost of a relatively short probe time. The opti- baseline circuit, we only optimize on the interrogation time mized results all come from one-layer circuit templates. For parameter. For the optimized result, we jointly optimize circuit 1 to 3 qubits, the optimized results entangle the full system, and interrogation time. whereas for 4-qubit and 5-qubit systems the optimal solutions As shown in Figure8, under full noise, the classical parallel are two entangled subsystems. The reason is probably twofold: circuit allows for the longest probe time, although with a rela- gate errors during encoding/decoding accumulate when we tively low CFI. GHZ states give higher CFI but are limited to entangle too many qubits, and a large entangled state might a much shorter probe time. The parallel scheme gives square decohere more quickly, leaving us with a shorter probe time root scaling, and the scaling of GHZ states approximately sat- which hurts sensitivity. The relatively low sensitivity given urates. It is also notable that GHZ with an inverse-symmetric by GHZ state can be seen as an extreme case of both these decoder achieves much higher sensitivity than the uniform- effects. H decoder, which shows that readout errors incurred by the To better understand the effects of each noise source, we 4This plot is based on a simulation of a 3-qubit sensor with a 10kHz signal also removed/suppressed each noise type, keeping the other and a fixed probing time of 20µs. two sources constant. Gate and readout noises can be removed 5 Noise statistics are based on IBM superconducting hardware: single qubit by simulating perfect gates/readout. Interrogation noise is 1% depolarizing channel, CNOT 3% (independent) depolarizing channels on decoherence both qubits, readout 5% error, T1 52.2µs, T2 62.8µs (averaged across qubits noise coming from the characteristic lifetimes from hardware calibration data). Signal strength is 10kHz. of the qubit, called T1 and T2. Shorter interrogation times

7 SNR-No Gate Noise SNR-No Readout Noise SNR-Supress T1/T2 Noise

240 70

60 220 60 200

50 50 180

160 40 40

140

30 30 120 SNR (per second) SNR (per second) SNR (per second) 100 20 20

80 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 Number of Qubits Number of Qubits Number of Qubits

Classical GHZ-Uniform H Decoder GHZ-Inverse-symmteric Decoder Optimized

Figure 9: Results removing/suppressing each noise source. Optimized circuit outperforms all existing protocols in each scenario, yielding up to 1.75x, 1.74x, 1.15x SNR improvement respectively.

CFI under Different Signal Distribution (relative to T1 and T2) lead to lower decoherence error. To 2.5 suppress interrogation noise, we simulate T1 and T2 as 10 times their actual value. Results are shown in Figure9. We 2.0 obtain 1.75x,1.74x,1.15x SNR improvements when removing 1.5 Classical GHZ-H gate noise, removing readout noise, and suppressing T /T CFI 1 2 1.0 GHZ-INV noise, respectively. Optimized on Uniform 0.5 Note that GHZ with inverse-symmetric decoder outper- Optimized on Actual Distribution 0.0 forms the classical scheme once we remove gate noise, which Uniform (∞) 0.5 0.4 0.3 0.2 0.1 shows the effects of CNOT gate errors. What is surprising Signal Standard Deviation at first sight is that after removing readout error, inverse- Figure 10: Results under different signal distributions 6. Since symmetric decoder still performs better than uniform-H de- the signal is non-constant, we use CFI rather than the signal- coder for GHZ states, even with the N − 1 extra CNOT gates. dependent SNR as the metric (see Section 2.2). The data is A closer QFI analysis shows that although an H rotation before taken from a simulation of three qubits under the full noise measurement is optimal in the noiseless case, with interroga- model. We compare baseline protocols, a circuit optimized on tion noise H is no longer the best rotation direction. Rotating uniformly-distributed signal (“Optimized on Uniform”, orange), each qubit in a suboptimal direction, in this case, results in less and a circuit optimized on the actual signal distribution (“Opti- system QFI compared to a chain of CNOT gates followed by a mized on Actual”, purple). Optimizing on actual data gives the rotation of one qubit in a suboptimal direction. The advantage highest sensitivity, which shows that our algorithm can take of circuit learning becomes smaller if we suppress interro- advantage of non-uniform signal distributions, yielding up to gation errors while keeping gate and readout error constant. 1.51x CFI improvement. This shows our algorithm mainly targets interrogation noise, which is the largest noise component shown in Figure7. When shown in Figure 10, circuit learning run on non-uniform sig- interrogation noise is suppressed, the dominant noise source nal distributions gives the best results (up to 1.51x CFI im- comes from the control itself, and simple protocols are highly provement), with increasing gain at small variances. This is favored. Our circuit learning technique provides the greatest especially well-suited to applications where the signal has gain when the control noise is not highly dominant, meaning frequency peaks, such as NMR spectroscopy [27]. we can afford to create interesting (and probably slightly more 4.3. Learning with limited control complex) states. The other important flexibility given by our circuit learning 4.2. Learning with different signal distributions technique is that we could tailor to the available control of each platform. On some platforms, the control is greatly limited. Different sensing applications concern input signals with dif- Since our circuit learning technique takes gateset and connec- ferent distributions. By adaptively optimizing on the actual sig- tivity map as inputs and proposes circuit templates based on nal, our circuit learning algorithm can exploit the non-uniform these constraints, it is also suitable for such applications. signal distribution and find a circuit that works especially well with the given distribution. In this section, we compare base- 4.3.1. Collective Control For certain sensing applications, line circuits with circuit learning run on uniform as well as e.g. dark spins of nitrogen-vacancy (NV) platform [28] (de- Gaussian signal distributions with different variances. We tailed in Section 6.1.1), we do not have individual addressabil- observe that optimizing with different distributions yields the ity of the probe spins. Each reporter spin will undergo roughly same circuit structure, but different circuit parameters. As the same transformations given the drive field, and thus the available control is an arbitrary rotation uniformly applied 6Signal angles are modeled as Gaussians with unit mean and varying to all probes. Likewise, the Sz-Sz entanglement operation be- standard deviation, as seen on the x-axis. tween NV and probes also applies simultaneously to all probes,

8 which could be modeled as simultaneous controlled-Rz gates converge. Due to these practical constraints, in order to limit with different rotation angles, and thus easily interface into on-device training to finish within a reasonable time, we first our circuit learning framework. run the algorithm in simulation and initialize on-device learn- 4.3.2. Limited Connectivity On certain platforms, the qubit ing with simulation results. The COBYLA optimizer [31] connectivity is severely limited. Although in principle, by is chosen for its efficiency in objective function evaluations. “relaying” operations we are able to perform entanglement on Considering the difficulty of convergence due to queue time an arbitrary pair of qubits, the gate error and time overhead and machine variability, the maximum values across iterations could be considerable, and thus a good model should take are chosen as the final output. the connectivity constraints into consideration. For example, We observe that for GHZ states, CFI starts to decrease when nuclear spins around the NV center [29] could only entangle we have more than three qubits, probably due to errors from with each other via the NV center. Such connectivity con- the chained CNOT gates and the short time of multi- straints are entirely handled by our circuit learning framework qubit GHZ states. For the 4-qubit case, the circuit learning in Algorithm1 which specifies the circuit template based on algorithm outputs two 2-qubit entangled states, whereas for the connectivity map. the 5-qubit case the algorithm outputs a 2-qubit entangled state in parallel with a 3-qubit entangled state. By creating parallel 5. Experiment Results locally-entangled structures, the circuit learning technique achieves up to 1.69x SNR gain from the classical limit.

SNR Scaling on IBM Hardware 6. Outlook 700

600 6.1. Applications

500 Classical Parallel Based on the variational optimization method’s capability of GHZ-H 400 GHZ-INV achieving high sensing performance while considering noise,

300 Optimized gate error, and limited control, our method could be widely SNR (per second)

200 applied to different sensing platforms and applications. 1 2 3 4 5 6.1.1. Nitrogen-Vacancy Sensing The nitrogen-vacancy number of qubits (NV) center in diamond is a promising sensing platform due Figure 11: SNR scaling of baseline and optimized circuits on to its long coherence time in room temperature [32] and pho- IBM’s 5-qubit machine “Essex”. Each set of parameters is toluminescence property, which allows for easy initialization evaluated in six repeated experiments, with the error bars plot- and readout [33]. NV centers can be used to sense magnetic ting the max and min values. GHZ protocols yield plateauing field [34, 35], electric field [36] and temperature [37, 38, 39]. (inverse-symmetric decoder), even decreasing (uniform-H de- Circuit learning could be used to exploit probe spins near the coder) performance at ≥ 3 qubits. The optimized circuit em- diamond surface for sensitivity enhancement. Surface reporter ploys local entangled structures and overcomes this problem, spins [40, 41] and NV ensemble sensing [42] show promise achieving up to 1.69x SNR gain from the classical limit. The in increasing sensitivity and reducing sensing volume. Ab- SNR is higher in magnitude than simulation results (Figure8) stracted to a sensing circuit, this is equivalent to having a because we are applying a stronger signal (1.5MHz) to ensure constrained gateset of a time-dependent probes-NV entangle- consistent behaviors of the hardware. ment gate and uniform controls on probe spins. Via circuit learning, we could adjust the circuit to the material-determined We demonstrate the circuit learning algorithm on the 5- distribution of probe spins, utilize the dipolar-dipolar interac- qubit IBM quantum computer “Essex”. Circuit learning out- tion between the probe spins, and adjust the orientation of the performs all existing baseline protocols, achieving up to 1.69x sensing state as well as entanglement duration. SNR gain from the classical limit. The setup for our experi- 6.1.2. Dark Matter Detection Dark Matter is one of the most ment is slightly different from the simulation scenarios—to important unsolved problems in physics; about 85% of the ensure consistent behavior of the hardware, we specify a fixed, matter in today’s universe consists of dark matter and dark relatively short interrogation time of 0.355 µs and use the energy [43]. Axions are one of the most promising dark matter echo technique to cancel detuning error (applying X gate and candidates [44, 45], and can be detected by the resonance reverting signal at midpoint [30]). We also make the signal frequency shift of the qubit coupling to the superconducting stronger so that the rotation angle will not be smaller than 0.5 cavity [4]. However, axion detection is difficult since long- radians. This corresponds to a scenario where we are sensing distance entanglement is required [46], and one main challenge a stronger magnetic field for a shorter amount of time. is the photon loss in long-distance fiber [47]. Our method Due to the high queueing time of experiment runs and time- could help alleviate photon loss by optimizing for the optimal variability of the machine, circuit learning done on real hard- entangled photon state in spatially separated superconducting ware is much less efficient than in simulation and hard to cavity detectors [48].

9 6.1.3. Squeezed States Squeezed states improve sensitiv- which would be possible if we design some heuristics to guide ity by suppressing the uncertainty on one quadrature ob- circuit template selection. The current algorithm does rule servable while amplifying the uncertainty over another non- out some obviously bad circuit structures, but by considering commutative quadrature observable. Experimental progress permutation symmetry, circuit transformation/simplification, includes LIGO for gravitational wave detection [13, 14] and we could make the template construction step smarter, thereby spin-squeezing using cold atoms for spectroscopy [11, 12, 49]. saving optimization cost. Building upon previous works [18, 50], our method can be We also hope to investigate whether having ancilla qubits used to optimize for twisting time, signal direction, and mea- that are not exposed to the signal could help improve sensi- surement scheme for higher sensitivity. tivity. This is relevant in some sensing applications, such as 6.1.4. Atomic Clocks Atomic clocks are currently used to the NV sensing platform, where we have control over nuclear define a second with the precision of 10−18 (which means it spins close to the NV center [29]. will err by 1 second within the age of our universe) [51], and Finally, to make circuit learning more applicable to real play a central role in precision measurement applications such sensing applications, we would like to consider more realistic as global positioning system (GPS). Finding and using various physical models, such as interactions between probe qubits. techniques to keep the atomic transition stable is crucial to We would also like to consider more complex and practical sensitivity [2]. Atomic clocks use a feedback loop to lock the signal distributions, for example in NMR spectroscopy ap- frequency of a local oscillating field to the atomic transition plications. Our adaptive circuit learning could also fit into a frequency, and the oscillating field frequency is defined as the Bayesian framework to fully take advantage of prior knowl- reference clock. Our circuit learning can be applied to the feed- edge of the signal. back loop system to potentially stabilize the atomic transition and the laser frequency beyond the current limitations. 7. Conclusions 6.2. Future Directions Quantum sensing is an emerging area of quantum technol- ogy, which exploits quantum mechanical effects on different We demonstrate a circuit learning algorithm which surpasses hardware platforms to achieve enhanced sensitivity. Quan- the classical limit and overcomes the plateauing or decreas- tum sensing already has practical impacts in areas such as ing performance of existing entanglement-based protocols at magnetometry [54] and timekeeping [2]. Recent experi- increased system sizes. We believe the algorithm could be mental progress such as LIGO demonstrates the power of further improved by considering the following areas. entanglement-enhanced sensing [13, 14]. We are entering One of the challenges of running circuit learning on hard- the exciting transition from proof-of-concept experiments to ware is the difficulty of obtaining convergence since device practical applications [1]. noise fluctuates with time, and the optimal circuit at each given On practical hardware, where we have limited control ca- time is different. For this reason, it is key that the training pacity over a relatively small number of qubits and noise from routine does not take too long (so that the noise does not fluc- various sources, we find existing protocols that are optimal in tuate too much), and that the optimized sensing circuit should ideal cases to perform poorly. Thus, it is important to adopt be updated periodically. This means an optimizer that is effi- a co-design approach: find sensing circuits tailored to the cient in the number of objective function evaluations is highly specific underlying hardware and exploit application-specific important. In our study, we did a preliminary comparison of noise and signal characteristics. We demonstrate a quantum- different optimizers, including Nelder-Mead [52], Powell [53], classical hybrid algorithm for sensing circuit learning. Our COBYLA [31], and in general observed a tradeoff between approach mirrors the myriad of recent work [55] on applying speed of convergence and solution quality. The simulation re- machine learning approaches to improve classical system and sults in this paper are based on Powell, which converges slowly design optimization. Our algorithm surpasses the classical but outputs high-quality solutions, whereas experiment results limit and overcomes the plateauing/decreasing performance of are based on COBYLA which is more evaluation-efficient (by existing protocols, both in simulation and in experiment. We doing polynomial interpolation with points explored in the also show that the algorithm is especially advantageous when parameter space) but sometimes outputs suboptimal solutions. trained on a highly non-uniform signal distribution, which For the circuit learning algorithm to be run in real sensing applies to various sensing applications such as NMR spec- applications, we hope to find a robust optimizer which strikes troscopy. The circuit learning method could easily be gener- a good balance of convergence speed and solution quality. alized to different platforms with different types of control, Another way to speed up learning is to reduce the number even going beyond the gate model abstraction and directly pa- of proposed circuit templates. The advantage of our algorithm rameterizing the control Hamiltonians. We propose extensions comes largely from the flexibility of constructing various cir- of our method for different sensing applications range from cuit structures based on available gateset and connectivity. nanoscale field sensing to testing physics beyond the standard However, without losing this flexibility, we would benefit model and timekeeping. We believe that a systems design from automatically “ruling out” suboptimal circuit templates, approach with noise-awareness, realistic classical-quantum

10 interfacing, and adaptivity to diverse physical platforms and [19] Johannes Jakob Meyer, Johannes Borregaard, and Jens Eisert. A variational toolbox for quantum multi-parameter estimation. arXiv applications is essential to achieving quantum advantage on preprint arXiv:2006.06303, 2020. practical sensing hardware. [20] Xiaodong Yang, Jayne Thompson, Ze Wu, Mile Gu, Xinhua Peng, and Jiangfeng Du. Probe optimization for quantum metrology via 8. Acknowledgments closed-loop learning control. , 6(1):1–7, 2020. [21] Maria Schuld and Nathan Killoran. learning in This work is funded in part by EPiQC, an NSF Expedition feature hilbert spaces. Physical review letters, 122(4):040504, 2019. in Computing, under grants CCF-1730449; in part by STAQ [22] Michael A Nielsen and Isaac Chuang. Quantum computation and under grant NSF Phy-1818914; in part by DOE grants DE- quantum information, 2002. [23] Samuel L Braunstein and Carlton M Caves. Statistical distance and SC0020289 and DE-SC0020331; in part by NSF grant OMA- the geometry of quantum states. Physical Review Letters, 72(22):3439, 1936118, SNSF PP00P2_176875, and the Packard Foundation 1994. [24] Ronald Aylmer Fisher. Theory of statistical estimation. In Mathemati- (2013-39273). cal Proceedings of the Cambridge Philosophical Society, volume 22, pages 700–725. Cambridge University Press, 1925. References [25] Harald Cramér. Mathematical methods of statistics, volume 43. Prince- ton university press, 1999. [1] Luca Pezze, Augusto Smerzi, Markus K Oberthaler, Roman Schmied, [26] Daniel M Greenberger, Michael A Horne, and Anton Zeilinger. Go- and Philipp Treutlein. Quantum metrology with nonclassical states of ing beyond bell’s theorem. In Bell’s theorem, quantum theory and atomic ensembles. Reviews of , 90(3):035005, 2018. conceptions of the universe, pages 69–72. Springer, 1989. [2] Andrew D Ludlow, Martin M Boyd, Jun Ye, Ekkehard Peik, and Piet O [27] Raymond John Abraham, Julie Fisher, and Philip Loftus. Introduction Schmidt. Optical atomic clocks. Reviews of Modern Physics, 87(2):637, to NMR spectroscopy, volume 2. Wiley New York, 1998. 2015. [3] D Leibfried, Murray D Barrett, T Schaetz, J Britton, J Chiaverini, [28] G Goldstein, P Cappellaro, JR Maze, JS Hodges, L Jiang, Anders Sønd- Wayne M Itano, John D Jost, Christopher Langer, and David J berg Sørensen, and MD Lukin. Environment-assisted precision mea- Wineland. Toward heisenberg-limited spectroscopy with multiparticle surement. Physical Review Letters, 106(14):140502, 2011. entangled states. Science, 304(5676):1476–1478, 2004. [29] CE Bradley, J Randall, MH Abobeih, RC Berrevoets, MJ Degen, [4] Akash Dixit, Aaron Chou, and David Schuster. Detecting axion dark MA Bakker, M Markham, DJ Twitchen, and TH Taminiau. A ten- matter with superconducting qubits. In Microwave Cavities and Detec- qubit solid-state spin register with up to one minute. tors for Axion Research, pages 97–103. Springer, 2018. Physical Review X, 9(3):031045, 2019. [5] MH Abobeih, J Randall, CE Bradley, HP Bartling, MA Bakker, MJ De- [30] Jeronimo Maze, Paul Stanwix, Jonathan Hodges, S Hong, Jacob Taylor, gen, M Markham, DJ Twitchen, and TH Taminiau. Atomic-scale Paola Cappellaro, Liang Jiang, Gurudev Dutt, E Togan, A. Zibrov, Amir imaging of a 27-nuclear-spin cluster using a . Nature, Yacoby, R. Walsworth, and M Lukin. Nanoscale magnetic sensing with 576(7787):411–415, 2019. an individual electronic spin in diamond. Nature, 455(7213):644–647, [6] Edward Farhi, Jeffrey Goldstone, and Sam Gutmann. A quantum 2008. approximate optimization algorithm. arXiv preprint arXiv:1411.4028, [31] Michael JD Powell. A view of algorithms for optimization without Mathematics Today-Bulletin of the Institute of Mathematics 2014. derivatives. [7] Christian L Degen, F Reinhard, and Paola Cappellaro. Quantum and its Applications, 43(5):170–174, 2007. sensing. Reviews of modern physics, 89(3):035002, 2017. [32] Nir Bar-Gill, Linh M Pham, Andrejs Jarmola, Dmitry Budker, and [8] Vittorio Giovannetti, Seth Lloyd, and Lorenzo Maccone. Quantum- Ronald L Walsworth. Solid-state electronic spin coherence time ap- enhanced measurements: beating the standard . Science, proaching one second. Nature communications, 4(1):1–6, 2013. 306(5700):1330–1336, 2004. [33] Marcus W Doherty, Neil B Manson, Paul Delaney, Fedor Jelezko, Jörg [9] Vittorio Giovannetti, Seth Lloyd, and Lorenzo Maccone. Advances in Wrachtrup, and Lloyd CL Hollenberg. The nitrogen-vacancy colour quantum metrology. Nature photonics, 5(4):222, 2011. centre in diamond. Physics Reports, 528(1):1–45, 2013. [10] Géza Tóth and Iagoba Apellaniz. Quantum metrology from a quantum [34] Jens M Boss, KS Cujia, Jonathan Zopes, and Christian L De- information science perspective. Journal of Physics A: Mathematical gen. Quantum sensing with arbitrary frequency resolution. Science, and Theoretical, 47(42):424006, 2014. 356(6340):837–840, 2017. [11] Monika H Schleier-Smith, Ian D Leroux, and Vladan Vuletic.´ States [35] John F Barry, Jennifer M Schloss, Erik Bauch, Matthew J Turner, of an ensemble of two-level atoms with reduced quantum uncertainty. Connor A Hart, Linh M Pham, and Ronald L Walsworth. Sensitiv- Physical review letters, 104(7):073604, 2010. ity optimization for nv-diamond magnetometry. Reviews of Modern [12] Jürgen Appel, Patrick Joachim Windpassinger, Daniel Oblak, U Busk Physics, 92(1):015004, 2020. Hoff, Niels Kjærgaard, and Eugene Simon Polzik. Mesoscopic [36] Florian Dolde, Helmut Fedder, Marcus W Doherty, Tobias Nöbauer, atomic entanglement for precision measurements beyond the stan- Florian Rempp, Gopalakrishnan Balasubramanian, Thomas Wolf, dard quantum limit. Proceedings of the National Academy of Sciences, Friedemann Reinhard, Lloyd CL Hollenberg, Fedor Jelezko, and Jörg 106(27):10960–10965, 2009. Wrachtrup. Electric-field sensing using single diamond spins. Nature [13] The LIGO Scientific Collaboration. Enhanced sensitivity of the Physics, 7(6):459–463, 2011. gravitational wave detector by using squeezed states of light. Nature [37] Philipp Neumann, Ingmar Jakobi, Florian Dolde, Christian Burk, Rolf Photonics, 7(8):613–619, 2013. Reuter, Gerald Waldherr, Jan Honert, Thomas Wolf, Andreas Brunner, [14] Haocun Yu, L. McCuller, M. Tse, N. Kijbunchoo, L. Barsotti, N. Maval- Jeong Hyun Shim, Dieter Suter, H. Sumiya, Junichi Isoya, and Jörg vala, and members of the LIGO Scientific Collaboration. Quantum Wrachtrup. High-precision nanoscale temperature sensing using single correlations between light and the kilogram-mass mirrors of ligo. Na- defects in diamond. Nano letters, 13(6):2738–2742, 2013. ture, 583(7814):43–47, Jul 2020. [38] Georg Kucsko, Peter C Maurer, Norman Ying Yao, MICHAEL Kubo, [15] Abhinav Kandala, Antonio Mezzacapo, Kristan Temme, Maika Takita, Hyun Jong Noh, Po Kam Lo, Hongkun Park, and Mikhail D Lukin. Markus Brink, Jerry M Chow, and Jay M Gambetta. Hardware-efficient Nanometre-scale thermometry in a living cell. Nature, 500(7460):54– variational quantum eigensolver for small molecules and quantum 58, 2013. magnets. Nature, 549(7671):242–246, 2017. [39] Hannah Clevenson, Matthew E Trusheim, Carson Teale, Tim Schröder, [16] Eric Anschuetz, Jonathan Olson, Alán Aspuru-Guzik, and Yudong Cao. Danielle Braje, and Dirk Englund. Broadband magnetometry and Variational quantum factoring. In International Workshop on Quantum temperature sensing with a light-trapping diamond waveguide. Nature Technology and Optimization Problems, pages 74–85. Springer, 2019. Physics, 11(5):393–397, 2015. [17] Bálint Koczor, Suguru Endo, Tyson Jones, Yuichiro Matsuzaki, and Si- [40] AO Sushkov, I Lovchinsky, N Chisholm, Ronald Lee Walsworth, mon C Benjamin. Variational-state quantum metrology. arXiv preprint Hongkun Park, and Mikhail D Lukin. Magnetic resonance detection arXiv:1908.08904, 2019. of individual proton spins using quantum reporters. Physical review [18] Raphael Kaubruegger, Pietro Silvi, Christian Kokail, Rick van Bijnen, letters, 113(19):197601, 2014. Ana Maria Rey, Jun Ye, Adam M Kaufman, and Peter Zoller. Varia- [41] Marcus Schaffry, Erik M Gauger, John JL Morton, and Simon C tional spin-squeezing algorithms on programmable quantum sensors. Benjamin. Proposed spin amplification for magnetic sensors employing Physical Review Letters, 123(26):260505, 2019. crystal defects. Physical review letters, 107(20):207210, 2011.

11 [42] David R Glenn, Dominik B Bucher, Junghyun Lee, Mikhail D Lukin, Hongkun Park, and Ronald L Walsworth. High-resolution mag- netic resonance spectroscopy using a solid-state spin sensor. Nature, 555(7696):351–354, 2018. [43] Varun Sahni. 5 dark matter and dark energy. In The Physics of the Early Universe, pages 141–179. Springer, 2004. [44] John Preskill, Mark B Wise, and Frank Wilczek. Cosmology of the invisible axion. Physics Letters B, 120(1-3):127–132, 1983. [45] Pierre Sikivie. Experimental tests of the" invisible" axion. Physical Review Letters, 51(16):1415, 1983. [46] M Pospelov, Szymon Pustelny, MP Ledbetter, DF Jackson Kimball, Wojciech Gawlik, and D Budker. Detecting domain walls of axion- like models using terrestrial experiments. Physical review letters, 110(2):021803, 2013. [47] MS Safronova, D Budker, D DeMille, Derek F Jackson Kimball, A Derevianko, and Charles W Clark. Search for new physics with atoms and molecules. Reviews of Modern Physics, 90(2):025008, 2018. [48] Wenchao Ge, Kurt Jacobs, Zachary Eldredge, Alexey V Gorshkov, and Michael Foss-Feig. Distributed quantum metrology with linear networks and separable inputs. Physical review letters, 121(4):043604, 2018. [49] Boris Braverman, Akio Kawasaki, Edwin Pedrozo-Peñafiel, Simone Colombo, Chi Shu, Zeyang Li, Enrique Mendez, Megan Yamoah, Leonardo Salvi, Daisuke Akamatsu, Yanhong Xiao, and Vladan Vuletic.´ Near-unitary spin squeezing in yb 171. Physical Review Letters, 122(22):223203, 2019. [50] Marius Schulte, Victor J Martínez-Lahuerta, Maja S Scharnagl, and Klemens Hammerer. Ramsey interferometry with generalized one-axis twisting echoes. Quantum, 4:268, 2020. [51] Tobias Bothwell, Dhruv Kedar, Eric Oelker, John M Robinson, Sarah L Bromley, Weston L Tew, Jun Ye, and Colin J Kennedy. Jila sri optical lattice clock with uncertainty of 2 × 10−18. Metrologia, 56(6):065004, 2019. [52] John A Nelder and Roger Mead. A simplex method for function minimization. The computer journal, 7(4):308–313, 1965. [53] Michael JD Powell. An efficient method for finding the minimum of a function of several variables without calculating derivatives. The computer journal, 7(2):155–162, 1964. [54] RL Fagaly. Superconducting quantum interference device instruments and applications. Review of scientific instruments, 77(10):101101, 2006. [55] Drew D Penney and Lizhong Chen. A survey of machine learning applied to computer architecture design. arXiv preprint arXiv:1909.12373, 2019.

12