A search algorithm for quantum state engineering and metrology

In this paper we present a search algorithm that finds useful optical quantum states which can be created with current technology. We apply the algorithm to the field of quantum metrology with the goal of finding states that can measure a phase shift to a high precision. Our algorithm efficiently produces a number of novel solutions: we find experimentally-ready schemes to produce states that show significant improvements over the state-of-the-art, and can measure with a precision that beats the shot noise limit by over a factor of 4. Furthermore, these states demonstrate a robustness to moderate/high photon losses, and we present a conceptually simple measurement scheme that saturates the Cram\'er-Rao bound.


Introduction
The field of optical quantum information has the potential to transform technology with a broad range of applications, including quantum computing [1,2], quantum cryptography [3] and quantum metrology [4,5]. In order for these applications to benefit from quantum-enhanced performance, non-classical states of light must be prepared, and it is an ongoing challenge to find methods to engineer quantum states with the desired properties [6][7][8][9][10][11]. In this paper we explore an alternative approach and design an algorithm to find experimentally accessible methods of engineering states with the properties we require. Here we focus on using the algorithm for quantum metrology, a field which has been instrumental in enhancing the precision of gravitational wave detectors [12][13][14] and can be used to measure biological systems with minimal disturbance [15][16][17][18]. As with a recent (independent) algorithm that performed an automated search for new quantum experiments [19], our algorithm produces a range of novel, and sometimes counter-intuitive, solutions.
In this paper our aim is to find experimentally realisable states, with small photon numbers, that can measure a phase shift to a high precision. This is important for measurements on fragile systems such as spin ensembles [20], biological systems [15][16][17][18] and atoms [21,22]. There is a large literature on the theory and experiment of creating non-classical optical states for quantum metrology, and a wide range of states have been considered including NOON states [23][24][25], squeezed states [26][27][28][29], and more recently squeezed cat states and squeezed entangled states [30][31][32][33][34]. The results of our algorithm surpass all of these: we find a number of states which attain a precision that beats the classical shot noise limit (SNL) by more than a factor of 4, and can improve over the precision attainable by all other practical states (known to the author) by at least a factor of 6 (see figure 1). The states we introduce can be made with today's technology, are robust to moderate/high photon losses, and can be used to measure a phase shift with a conceptually simple measurement scheme that saturates the Cramér-Rao bound (CRB).

A quantum state engineering algorithm
The state-engineering scheme we use is shown in figure 2. Firstly, two input states, y ñ | a 0 and y ñ | b 0 , are input into the two modes. The two modes then pass through a sequence of operatorsÔ i , where = i m 1 ,.., , and the final step is to perform a heralding measurement on one mode, producing the final state y ñ | f . With appropriate choices of input states, operators, and measurements this scheme is able to replicate a wide range of the quantum state engineering protocols in the literature, such as [8,10,[31][32][33]. The main difference between the present paper and the current literature is that we do not choose the input states, operators, and measurements, but instead allow a simulation to perform a random search for states with the desired properties. We use this technique because systematically sorting through all possible combinations of input states, operators, and measurements is not possible with current computing power-it can be shown that the number of combinations soon becomes intractable. Contrary to this, our algorithm quickly and efficiently provides new and sometimes counter-intuitive methods to create useful quantum states.
As our objective is to find practical states for quantum metrology, we construct our state engineering protocols from elements of an experimentally ready toolbox of quantum optics states, operators, and measurements, which is summarised in table 1. Here we only introduce the important details of the toolbox; more details can be found in appendix A. Firstly, the input states we include are the squeezed vacuum (SV) ñ |z , the coherent state añ | , and Fock states ñ |n ; the parameters z, α and n are constrained by what is possible experimentally [7,29,[35][36][37][38].
We next introduce the operators, of which the most important is the beam splitterÛ T , where T is the probability of transmission (in %), which serves to mix and entangle the two modes. Without this the final state would just be a set of single-mode linear operators acting on an input state. The states this would create, such as displaced Fock states and squeezed coherent states, have been studied before [4,39,40] and are therefore not of interest here. Other operators we use are the displacement operator b ( ) D , the phase shift q e n i p , and the identity operator; the latter is included because we are promoting the easiest-to-implement schemes which would contain as many identities as possible. The final operator is constructed by performing a measurement and then Here we compare different states using the quantum Fisher information (QFI). The QFI is plotted against the average photon number (n) for two of the quantum states found by our algorithm: y ñ | T1 and y ñ | T 2 (labelled T1 and T2). A state with a large QFI can measure to a high precision, and hence y ñ | T1 and y ñ | T 2 give significant improvements over the squeezed vacuum (SV) and the classical shot noise limit (SNL). This operator works by firstly implementing any one of the heralding measurements described below, and then inputting one of the allowed input states y ñ | 0 into this mode. The final step of the state engineering scheme is to perform a heralding measurement on one mode of the final state. If, for example, we wish to herald with the one photon state, we can perform a photon-number resolving detection (PNRD), and only keep runs which measure one photon. A measurement outcome of one photon therefore heralds the desired final state; later we discuss the consequences of this probabilistic heralding for the application of quantum metrology. The heralding measurement corresponds to acting on the two-mode, pre-measurement state with á Ä | 1 , followed by normalisation. We are then left with the single mode final state y ñ | f . Recent progress in PNRD has made detections of larger numbers of photons possible, and transition edge sensors can now resolve at least four photons to a reasonable efficiency [8,41], whereas simpler detectors can reliably measure one or two photons [42][43][44]. The heralding number measurements we include in the toolbox are therefore á | 1 , á | 2 , á | 3 and á | 4 . Alternatively we can perform a quadrature measurement, á l | x , which is achieved with Homodyne detection, preceded by a phase shift which allows the quadrature phase to be controlled.
We have described the elements of the quantum optics toolbox; we now introduce our algorithm-which uses the main principles of an evolutionary algorithm-for combining the various elements to engineer quantum states with the desired properties. Evolutionary algorithms [45][46][47][48] begin by creating an initial population of 'chromosomes': each chromosome is a string which encodes a potential solution to the problem at hand. A fitness function, which returns a fitness value, is then used to identify the solutions which best solve the problem. The solutions with a large fitness value are retained and labeled the 'parents', whereas the solutions with insufficient fitness values are discarded. The parents then breed the next generation of 'offspring' which is achieved by 'mutating' (making random changes to) the chromosomes of the parents. Often in evolutionary algorithms the chromosomes of two parents are combined, but we choose not to include this step in our algorithm. Our algorithm is therefore similar to a random search, but we retain the language of evolutionary algorithms for clarity of explanation.
After generating the offspring, the fitness function is applied to the offspring, and again the best solutions are selected from their fitness values. This identifies the next set of parents, and the process repeats until a collection of the 'fittest' individuals remain. Evolutionary algorithms [45][46][47] have been successfully utilised to design antennas [49,50], shape laser pulses [51], and find new quantum algorithms [48,52].
A flow chart of our algorithm, which we name Tachikoma, is given in figure 3. Our initial population is created by randomly selecting inputs, operators and measurements from the quantum optics toolbox in table 1, and suitable elements of the initial population are selected according to their fitness value. The fitness function should therefore be chosen based on the properties the user desires for their quantum states. In this paper our fitness function is the quantum Fisher information (QFI), as a state with a large QFI can measure a phase shift to a high precision.
As shown in figure 3, once a suitable parent is selected from the initial population we mutate it to create an offspring. If the fitness value of the offspring is greater than that of the parent, the offspring becomes the new parent for the next generation, and if not we revert back to the parent and repeat this process. If the offspring repeatedly fail to surpass their parent (an evolutionary dead-end) then we have likely reached a local maxima and so we store the details of the parent for further analysis and go back to the start of the algorithm. In this manner Tachikoma mimics natural selection by progressively 'evolving' quantum states which become increasingly suited for their purpose. Table 1. This table summarises the quantum optics toolbox we use. Our algorithm selects elements from this toolbox and inserts them into the scheme in figure 2 in order to engineer non-classical states with the desired properties. See main text and appendix A for details of the input states, operators and heralding measurements.
Application to optical quantum metrology We now show how our algorithm Tachikoma can be used to find states for optical quantum metrology. Specifically, we wish to find experimentally accessible states with low photon numbers. This is of relevance for measurements on fragile systems, with examples including spin ensembles [20], biological systems [15][16][17][18] and atoms [21,22]. In these examples, the number of photons we are able to interact with our system should be limited to prevent damage to the sample [20,53]. The relevant resource here is therefore the number of photons in the probe state: to compare different states we look at their phase-measuring capabilities, given the same average photon number. Other methods of resource counting can be relevant, such as the total number of photons used to prepare a quantum state, but we choose not to include these methods here.  table 1 to engineer quantum states, as described in the main text. To assess the suitability of different states we use a fitness function: in this paper we use the quantum Fisher information as the fitness function in order to find states suitable for quantum metrology, but in principle any fitness function can be used which would allow us to find states for different applications. For the states we consider the optimal measurement scheme is mixing the modes on a balanced (50:50) beam splitter (BS), followed by photon number counting. When photon losses are included these can be modeled by 'fictitious' variable transmissivity beam splitters after the phase shift.
We consider the standard optical phase estimation problem of measuring a phase difference f between two optical modes containing unknown linear phase shifts, as shown in figure 4. The fundamental limit to the precision with which a state ρ can measure the phase f is given by the quantum CRB [54,55]: where μ is the number of independent repeats of the experiment and r ( ) F Q is the QFI of ρ. For pure states yñ | the QFI is given by [56,57] n a (n b ) is the photon number operator in mode a (b), and the expectation values are taken with respect to the state yñ | . The QFI is used as our fitness function for the algorithm; we aim to maximise the QFI, which is equivalent to minimising the phase uncertainty.
We now introduce the SNL-the best that can be done classically-and the current state-of-the-art in optical quantum metrology. The SNL can be obtained by inputting a coherent state into a Mach-Zehnder interferometer. In the schematic in , where = á + ñˆn n n a b is the total number of photons in the interferometer. A wide range of quantum states have been shown to surpass this, but to the best knowledge of the author the highest precision attainable by a practical state (a state that can be or has been made experimentally) is given by a pair of mode-separable SV yñ = ñ | |z z , , where ñ |z is the SV state which again is defined in appendix A [4,39]. This state can, among others, surpass Caves's squeezed state scheme [26,27], the NOON state [23][24][25], and the recently produced squeezed cat states [30][31][32][33] (see appendix B for a discussion of this). The QFI of the SV and the SNL are shown in figure 1; it is our goal in this paper to find practical states that can out-perform the SV.
The algorithm we constructed excelled in this task and quickly found a number of states that have a significantly larger QFI than the SV. We highlight two states which stand out because they combine a large QFI with relative simplicity and experimental feasibility: where the subscript a represents the first mode in figure 2 and  is the normalisation. We need a two-mode state to make a phase measurement using the scheme in figure 4, so we use y y y ñ = ñ Ä ñ | | | T T i i . The QFI of these states is plotted in figure 1. We see that y ñ | T1 improves over the SV by a factor of 3 and, while being more difficult to implement, y ñ | T 2 improves over the SV by a factor of 6. Specific values of the parameters, such as the phases and magnitudes of the squeezed states, are required for the results in figure 1, and these parameter values were found by numerically optimising for eachn. For example, for y ñ | T1 with » n 1 we take z 1 =0.97, = p z 0.97e 2 i and T=0.95, and for y ñ | T 2 with » n 1 we take = z 0.3e 1 5.3i , = z 1.24e 2 2.2i and b = 1.4e 2.7i . All of the states found by Tachikoma involve heralding, which is inherently probabilistic. The probabilities of success in producing y ñ | T1 and y ñ | T 2 are approximately 0.1 and 0.09, respectively, with the exact probabilities depending onn. Furthermore, the input state y y ñ Ä ñ | | T T i i is needed for the scheme in figure 4, which requires two identical input states y ñ | T i , resulting in a probability of success of around 0.01. A quantum metrology scheme using these states should produce them offline, and when the state is heralded by the appropriate measurement they can be used by the interferometer to measure the phase shift. This could be enhanced by using a quantum memory [58,59], which could store the first state until the second is successfully produced. The downside of probabilistic heralding is more than made up for by the large precision gains achieved by the states found by Tachikoma. Indeed, we ran the algorithm without heralding and were unable to find a state with a QFI (per average photon number) that surpasses the SV. This is in agreement with results in the literature: without the Fock state inputs in table 1 only Gaussian states can be made, and the optimal Gaussian state is known to be the SV [39]. Alternatively, a Fock state can be used to create a non-Gaussian state, but (to the best of our knowledge) the non-Gaussian states in the literature that are created from the input states and operators in table 1 cannot outperform the SV (for example see [60]).
While a large QFI does amount to a high precision it is not always the most revealing way to compare states. In this paper we are concerned with reducing the total number of photons that interact with the system being measured. We label the total number of photons (resources) R, which is given by m =R n , wheren is the average number of photons in the probe state and μ is the number of times this states is sent through the sample. We can then define a new measure which is more suited to the above restrictions: G =F n Q . Then the CRB can be written as: We see that by fixing R we can use Γ to compare the performance of different states. In figure 5 we plot Γ against n for y ñ | T1 and y ñ | T 2 . We see that y ñ | T 2 can improve over the SNL by more than 19 times, which corresponds to more than a four-fold precision gain. Figure 5 illustrates that with y ñ | T 2 a large enhancement is possible for small states ( » n 0.4), which require smaller squeezed states to create and therefore are more practical. Figure 5 also shows that y ñ | T 2 is optimal for » n 1.5 (this is not immediately clear by looking at the QFI). The reason that y ñ | T 2 peaks around » n 1.5 is that at this point the squeezing amplitude needed to make this states is r=1.3, which corresponds to the maximum squeezing allowed by the algorithm (limited by what is experimentally feasible [29], see appendix A). In order to create y ñ | T 2 for larger photon numbers, while still retaining a large value of Γ, larger squeezed states would be required (similar restrictions apply to the size of the other states y ñ -| T1 6 ). Tachikoma also found the following states: All these states improve over the SV by at least a factor of two. We will see below that y ñ | T3 is the most robust to photon losses, and without loss it has a QFI between y ñ | T1 and y ñ | T 2 . y ñ | T 4 has a QFI even greater than y ñ | T 2 but involves resolving four photons, whereas states y ñ | T5 and y ñ | T6 are the easiest to implement. The results of the algorithm are sometimes unexpected. For example, the operator y y ñá | | new meas did not give a significant enhancement and the simpler schemes were just as effective. States y ñ -| T1 6 therefore only require linear operators and heralding measurements to be made. Also, we experimented with between m=2 and m=12 operatorsÔ i in the engineering scheme, but increasing the number of operators only made small improvements, and in y ñ -| T1 6 only one or two operators are needed. Tachikoma is efficient to run: after calibration it only took a few days of running on a single node of the HPC cluster at the University of Sussex to produce all the states presented in this paper. Longer runs just produced more copies of the same states. . Equation (5) shows that this measure can be used to directly compare the phase-measuring potential of different states. We see that y ñ | T1 and y ñ | T 2 give significant improvements over the alternatives; in particular y ñ | T 2 can beat the SNL by more than 19 times.

The measurement scheme
We wish to use our states to measure a phase shift using the setup in figure 4. We therefore require a pair of identical states to input into the two paths, y y y | T i is one of the states produced by Tachikoma, or can be an SV for comparison (note that in this paper we taken to be the total number of photons in the state y y ñ Ä ñ | | T T i i ). We have quantified the performance of different states using the QFI and CRB, but it is important to now address the limitations of using the QFI as a figure of merit in quantum metrology [61][62][63].
In general, the precision as obtained by the QFI is achievable with an asymptotically large number of repeats, μ. However, from a practical point of view it is clear that only some finite number of repeats μ will be possible. To factor this in we have performed a Bayesian simulation of the proposed experiment. Using the measurement scheme in figure 4, which involves mixing the modes on a balanced beam splitter followed by PNRD (see appendix A for details of the PNRD), we have determined the phase shift, from a flat prior knowledge, using the Bayesian approach described in [30]. For all path-symmetric pure states (i.e. the states in this paper) the measurement scheme in figure 4 is optimal and saturates the QFI [64]. Indeed, our Bayesian simulation confirms that we come close to saturating the absolute bound given by the QFI for m = ( ) O 10 2 . In such regimes it is then clear that the states produced by Tachikoma can significantly outperform the SNL and SV, in terms of absolute phase precision, when assuming the same average photon number.

The effects of loss
We next investigate the effects of loss on the states produced by Tachikoma. Loss can be modeled by adding 'fictitious' beam splitters after the phase shift [65,66], as shown in figure 4, and results in a mixed state ρ which typically has a reduced non-classical enhancement. The QFI for a general density matrix ρ can be expressed as [54,55,67] å r l l l r f f l where l i are the eigenvalues and l ñ | i a corresponding set of orthonormal eigenvectors of ρ. The states y ñ -| T1 6 have an intrinsic robustness to loss because they contain small numbers of photons and they are separable between the modes. As a result they all improve over the SV up to at least 15% loss, which is the relevant loss rate for a number of experiments: losses as low as 10% have already been achieved in table top interferometry experiments [68], and near-future gravitational wave detectors are expected to have total losses of Figure 6. The transmission probability through the interferometer, η, is plotted against the precision, df (scaled by μ), for various states. The precision is found using equation (1). We see that the state y ñ | T3 , found by our algorithm, shows significant improvements over the SNL and SV, even with moderate to high photon losses. We explain in the main text why we include two different-sized SV states. The parameters used here for y ñ | T3 are: b = 1.22e 1 3i , b = 0.38e 2 6.2i and = z 0.62e 2.8i . 9%-17% [69]. The most robust state is y ñ | T3 , which is shown in figure 6. We see that y ñ | T3 improves over the SV for losses up to 30% and can beat the SNL with up to 50% loss.
In figure 6 we have included two different SV states because there are a number of valid comparisons that can be made. The first SV (z=0.42) has the same average numbern as y ñ | T3 . However, it can be disputed whether this is a fair comparison, because in order to create y ñ | T3 an SV is required with z=0.62, and we therefore also plot this state. We see in figure 6 that y ñ | T3 provides a significant precision enhancement over both of these SV states.

Discussion
We have seen that our algorithm Tachikoma has been constructed so that it can be easily edited to find quantum states for applications other than quantum metrology. The crucial change would be to the fitness function that we use to select successful states: here we use the QFI, but other measures can be used in order to make states suitable for quantum cryptography [3], quantum computing [1,2,70], quantum teleportation [71], or boson sampling [72]. We could also extend Tachikoma to utilise quantum state engineering techniques that we have omitted in this paper, mainly due to practicality: we could create a three-mode entangled state before heralding [6], include feed forwarding [73], or look at cavity systems which allow for different operations to be performed [74].
In conclusion, we have created an algorithm that can be used to find optical quantum states with specific properties. In this paper we have focused on using the algorithm for quantum metrology, and we have found states that can surpass the best-known practical states by a factor of 6 in the precision, which amounts to over a four-fold improvement over the classical shot noise limit. The states are experimentally accessible, robust to photon losses, and can be utilised for precise phase-measurements using a conceptually simple measurement scheme. We therefore expect that an experiment could confirm these results in the near future.