Circle fit optimization for resonator quality factor measurements: point redistribution for maximal accuracy

The control of material loss mechanisms is playing an increasingly important role for improving coherence times of superconducting quantum devices. Such material losses can be characterized through the measurement of planar superconducting resonators, which reflect losses through the resonance's quality factor $Q_l$. The resonance quality factor consists of both internal (material) losses as well as coupling losses when resonance photons escape back into the measurement circuit. The combined losses are then described as $Q_l^{-1} = \mathrm{Re}\{Q_c^{-1}\} + Q_i^{-1}$, where $Q_c$ and $Q_i$ reflect the coupling and internal quality factors of the resonator, respectively. To separate the relative contributions of $Q_i$ and $Q_c$ to $Q_l$, diameter-correcting circle fits use algebraic or geometric means to fit the resonance signal on the complex plane. However, such circle fits can produce varied results, so to address this issue, we use a combination of simulation and experiment to determine the reliability of a fitting algorithm across a wide range of quality factor values from $Q_i\ll Q_c$ to $Q_c\ll Q_i$. In addition, we develop a novel measurement protocol that can not only reduce fitting errors by factors $\gtrsim 2$ but also mitigates the influence of the measurement background on the fit results. This technique can be generalized for other resonance systems beyond superconducting resonators.


I. INTRODUCTION
Superconducting quantum technologies are the current leading platform for the implementation of scaled quantum computing, and large strides are being made to not only scale up superconducting circuits but also improve their performance by mitigating sources of error [1][2][3][4][5].Coplanar waveguide (CPW) resonators are one of the key components for superconducting-based quantum computing platforms and are used for qubit readout and coupling [6,7].However, resonators can also be used to probe [8][9][10][11][12][13][14] the loss mechanisms that limit qubit coherence times in quantum computing processors.On the other hand, there are several methods used to characterize resonance signals [15,16], and results can vary depending on the method used to characterize the resonance signal.However, a fair comparison between not only the performance of these various resonance fitting models but also the results across the broad spectrum of research that applies these models requires uncertainty quantification for these models and tests of their reliability to accurately apply the model to experimental data.
One of the more popular resonance fitting methods is the diameter corrected circle fit [8,[17][18][19].This method uses either algebraic or geometric methods to fit the circular projection of the resonance signal on the complex plane to extract the resonance properties, such as the internal quality factor Q i , which characterizes material losses.If Q l is the total resonance efficiency (i.e.quality factor) and Q c is the coupling efficiency to the measurement line, then the circle diameter is d = Q l /|Q c |.When Q l is determined from an independent method, such as a geometric fit of the resonance phase signal θ , then d can be used to distinguish Q c from the material loss efficiency factor However, resonances can be difficult to measure or fit in extreme limits when Q c and Q i differ by orders of magnitude.This is further complicated by the measurement setup, which can introduce systematic errors into the analysis [18,19].Fig. 1 shows a measurement of a CPW resonator in a range of signal power levels.As power and the corresponding resonance photon number ⟨n r ⟩ decrease, the resonance signal becomes less sharp as the Q i decreases due to increased twolevel system (TLS) losses [9,10,12,14,[20][21][22][23][24].At the lowest powers, the resonance signal is almost lost into the microwave background signal, which places a limitation on the extraction of Q i at low powers.A method for bypassing this issue is to use slightly or moderately overcoupled resonators to facilitate low-power measurements.However, when Q c is relatively small, the total contribution of Q i to the loaded quality factor also becomes increasingly small.To better understand the limitations imposed by design on Q i determination, we perform a benchmark on the fitting algorithm of Probst et al. [18] and an analysis of the model uncertainties to detail how fitting errors behave under extreme conditions when Q c ≫ Q i .We will also perform tests for potential sources of fit bias and will introduce an alternative measurement point distribution to mitigate such biases.The analytical techniques used here can also be applied to other fitting methods, which is an important first step toward reconciling any differences in results that they may return [16].

II. MODELING
For a notch-type resonator coupled to a transmission line, the frequency-dependent transmission S21 is given by [18,25] where f is the signal frequency, f r is the resonance frequency, and φ is the phase shift of resonance due to impedance mismatch with the transmission line [17].The prefactor ae iα−2πi f τ models the effects of the microwave background FIG. 1. Measurement of a superconducting CPW microwave resonator fabricated on an ALD NbN film.Each curve is measured with N = 4001 points distributed linearly across the measurement bandwidth ∆F and with a specified VNA output power.A powerdependent trace averaging protocol was used as described in Appendix B. VNA signals were attenuated by an approximate -73 dB before propagating into the chip.As on-chip power (P chip ) increases, the resonance grows sharper as the linewidth decreases, signifying an increase in the loaded quality factor.(inset) The loaded quality factor can be devolved into internal and coupling quality factors, Q i and Q c respectively, using a diameter correcting circle fit [18].As the photon number ⟨n r ⟩ decreases, Q i is also observed to decrease due to the presence of TLS losses.⟨n r ⟩ is calculated using Eq.6 derived in Appendix E.
environment, where a, α, and τ are the background transmission amplitude, phase offset, and microwave delay, all of which arise from the specifics of the measurement setup.To assist the reader for this and subsequent sections, we have included a table of variables and their definitions in Appendix A.
An artificial resonance signal can be generated using Eq. 1 and randomly generated noise.In practice, this microwave background can be calibrated out of the measurement [26,27], and since our conclusions are independent of the inclusion of the microwave background, we set a = 1, α = 0, τ = 0 in the first section for analytical simplicity.In later sections, when real measurements are modeled for comparison, these microwave background parameter values will be reconsidered.
To better represent actual resonator measurements, random noise is injected into the artificial resonance data to simulate the effects of measurement noise.Two different types of noise are included.The first and simplest type of noise is Gaussian noise from thermal fluctuations [28,29] in the resistive components of instruments and measurement setup.We assume that this noise is complex and scatters not only the amplitude of the signal but also its phase by some small random degree.In analogy to a more general mathematical study [30] on circle fits, the complex thermal noise is injected into the artificial signal for each frequency point f i as S 21 ( f i ) = S21 ( f i ) + δ i + iε i , where δ i and ε i are each random variables selected from a Gaussian distribution with mean zero and standard deviation σ n .
In addition to thermal noise, the resonance itself exhibits frequency (or phase) noise due to the presence of TLS fluctuators [31,32].Such noise follows a 1/ √ f spectral distribution and can be modeled by small fluctuations of the resonance frequency f r which are caused by time-dependent corrections to the effective dielectric constant of the substrate.In this work, the strength of this effect will be parameterized by the standard deviation of the resonance frequency σ f r , which for the resonance measurements shown here is on the order of tens of Hz.On the complex plane, this noise manifests as a slight rotational jitter for data points on the circle's circumference.As discussed in Appendix C, the inclusion of such frequency noise is necessary for accurately modeling measurements of superconducting resonators.
One of the goals of this study is to determine the reliability of resonance quality factor measurements using a diameter correcting circle fit in the extreme limits where To do this, artificial resonance signals can be generated and then fit to determine fit error.The resonance signals are generated with known or "true" internal quality factors Qi , which can be compared to the Q i returned from the circle fit process.The algorithm from Ref. 18 is used to determine Q i of the artificial S 21 data.A series of artificial signals is generated with varying Q i factors with a fixed Q c = 10 4 e −iφ with φ = π/6 corresponding to a small impedance mismatch [17,18] between the resonator and the measurement line.Because the linewidth ∆ f r = f r /Q l of the resonance signal changes several orders of magnitude, the frequency span ∆F for the simulated data must also be adjusted to accommodate very high quality resonance signals.As we will show in section IV, changes in the ratio ∆F/∆ f r can affect the fitting results.For each resonance signal, a frequency span encompassing ten times the resonance linewidth was chosen (i.e.f ∈ [ f r − 5∆ f r , f r + 5∆ f r ]) to ensure an appropriate fitting range for the resonance signal.
Figure 2(a) shows a comparison of fit Q i values compared to the true Qi values used to generate the artificial signals for a range of Qi / Qc .The relative error |Q i − Qi |/ Qi is the deviation of the fit-determined Q i values from the true Qi and can be measured across a range of coupling ratios Qi / Qc .The behavior of the error is non-monotonic with a minimum near critical coupling Qi / Qc = 1.Away from critical coupling, the error increases linearly with Qi / Qc .Figure 2(a) also shows the calculated relative fit error σ Q i /Q i .As shown, the error curves closely follow the behavior of the relative error, and for most cases track with the upper limit of the relative error.This indicates that the calculated errors of the circle fit adequately cover the range where Qi can be found.We note that in Fig. 2(a), resonance noise is omitted (σ f r = 0).As discussed in detail in Appendix C, when resonance noise is comparable to the background noise, fit errors are increased and overestimate |Q i − Qi |/ Qi .Therefore, while resonance noise increases fit errors, such an increase does not reflect the true error of the fit.Such an overestimation of the fitting error should be universal for all fitting methods that do not distinguish and separate phase and radial degrees of freedom when calculating fit uncertainties.
The relative error can also be studied as a function of the noise level σ n .As shown in Fig. 2, the fit errors increase with increasing noise levels.Indeed, we find that the error on Q i scales geometrically with the measurement noise σ n (see Appendix C).Indeed, when the error is normalized by σ n , they fall onto a common curve (Fig. 5(a)).The same behavior is found when the errors are normalized by N −1/2 , where N is the number of data points used for the fitting process.Therefore, the error is found to behave as ) is a function independent of both the noise level σ n and number of data points N.This result is consistent with a more general analysis for algebraic circle fit errors [30].The geometric dependence of the uncertainty on σ n / √ N implies that, independent from the coupling regime, the uncertainty on a fit of Q i can be reduced by either decreasing the noise level (e.g. through trace averaging or filtering) or by increasing the number of data points of the measurement.

III. MEASUREMENTS
The results shown in the Fig. 2(a) have been verified experimentally using a measurement of a CPW resonator fabricated from an NbN film on a Si substrate.We take advantage of the power and temperature dependence of the internal quality factor for a superconducting resonator.At the lowest temperatures, resonance losses are dominated by two-level system (TLS) losses at the dielectric interface [12,33].Such interface TLSs absorb photons from the resonator, creating a loss mechanism and increasing ∆ f r .At low input power, where the average photon number is low, TLS losses are maximal, but as power increases, TLS states become persistently excited by the greater number of resonator photons.As a result, TLS losses decrease, and the resonator's internal quality factor increases.This is indeed observed experimentally, as shown in the inset of Fig. 1, which shows the internal quality factor of an NbN resonator.
Using the power dependence of the resonator internal quality factor, the coupling ratio Q i /Q c can be tuned.Since the coupling quality factor is affected only by the resonator design and the resonance harmonic [34], it has no expected power dependence, as is consistent with the results of the fitting algorithm.By sweeping input power to the resonator, As previously noted, the errors on Q i are affected by the measurement noise σ n , which changes with input power P in .Trace average number is increased with decreasing power with 920 trace averages at the lowest power (see Appendix B for more details).Since σ n changes from both power and trace averaging, the fit errors are normalized by σ n , and the results are shown in Fig. 2(b).For comparison, we simulated an artificial resonance signal using the fit parameters of the measured resonator (background, φ , Q c , etc.) while tuning Qi .We find good agreement between the analyses of our artificial and real resonance data, demonstrating that the simulated data adequately imitates real measurement data.
Since many of the results here focus on the circle fit errors, we detail here how such uncertainty values are calculated.Additional information can be found in Ref. 18 and the qkit code [25].Circle fit errors themselves are calculated as and φ in the four columns of the matrix.With the total squared error χ 2 = ∑ |χ i | 2 , the covariance matrix is given as σ 2 = χ 2 N−4 ( ĴT Ĵ) −1 , where ĴT is the transpose of Ĵ.The uncertainties on Q l , |Q c |, f r , and φ are then taken as the square roots of the diagonal components of σ 2 .The error on Q i is then derived from the uncertainties on Q l and Q c using standard error propagation techniques.

IV. FITTING BIAS
In the standard vector network analyzer (VNA) transmission measurement, frequency data points are distributed linearly across the measurement span ∆F.However, when a resonance measurement with this standard point distribution (SPD) is projected onto the complex plane, points are distributed inhomogeneously over the circumference of the circle with a qaudratically increasing point density near the offresonant point (see Appendix D for a derivation).As has been shown for the fitting of power-laws [35], nonuniform point distributions can potentially lead to bias in fitting algorithms.To further understand if such biases exist in the circle fit of SPD measurements, we have constructed an alternative homophasal point distribution (HPD), which redistributes the frequency measurement points such that the resonance data is homogeneously distributed around the complex circle (i.e.homogeneous in phase).This redistribution method is similar to one derived for nanomechanical resonators [36].An example comparison of SPD and HPD resonator data is shown in Fig. 3(a).
The HPD is constructed using the frequency-phase relation [18] ), which depends only on the loaded quality factor Q l , the resonance frequency f r , and an offset phase θ 0 (see Ref. 18 for further details).The inverse function is ), and by defining N equidistant points distributed within θ − θ 0 ∈ (−π, π), a new frequency point distribution can be calculated that will spread points uniformly around the circle's circumference.Importantly, this method does not require an explicit prior determination of Q c or Q i and only an approximate determination of Q l , f r , and θ 0 .It should be noted that a least-squares fit of the phase data is already used in the circle-fitting process of Ref. 18 to determine these parameters.
Fitting errors are analyzed in the same manner as the Q i /Q c dependence.An artificial resonance signal was generated with a known Qi and Qc , while the frequency distribution was generated using both SPD and HPD.Equivalent levels of noise were generated independently and then injected into both signals.To test for bias, the point distribution of the SPD is tuned by changing the measurement span ∆F.As discussed in Appendix D, the point density of the SPD becomes more clustered toward the off-resonant point as ∆F grows larger.To test for fit bias, the same resonance signal is repeatedly measured with a steadily increasing ∆F centered around f r .As is shown in Fig. 3(b), the fit value of Q i steadily increases with ∆F.Such an increase does not reflect an actual change in the resonator quality and derives purely from the measurement protocol and fit algorithm.In contrast, an HPD measurement remains consistent over a wide range from 1 ≤ ∆F/∆ f r ≤ 100.
Not only does the HPD remove bias from the measurement, it also minimizes fit error with respect to the SPD. Figure 3(c) shows the Q i fit errors for the SPD and HPD on an artificial overcoupled resonator signal.While the SPD error increases as σ SPD Q i ∝ ∆F/∆ f r , the error on the HPD remains constant, demonstrating that HPD measurements are independent from the choice of measurement span.The constant σ HPD Q i value also corresponds to the minimum σ SPD Q i at ∆F/∆ f r = 1, and therefore the HPD is a more efficient measurement protocol than the SPD.This benefit of the HPD over the SPD is not independent of the resonator properties, however.Figure 3(d) shows a colormap of the error ratio as a function ∆F/∆ f r and resonance frequency noise level σ f r .When σ f r is small, the errors of the SPD and HPD behave as described in Fig. 3(c), but as resonance noise becomes the dominant source of error, , and therefore in this regime there is no benefit of the HPD over the SPD.However, while there are indeed regimes where errors of the HPD match those of the SPD, it should be emphasized that in no regime is the SPD observed to outperform the HPD.

V. DISCUSSION
As demonstrated above, we find that the circle fitting procedure of Probst et al. [18] accurately determines Q i over a wide parameter space.While this study used superconducting notch-type resonators, the methods used here are general and can be applied to any type of resonance system.Although fit errors increase linearly with |Q i /Q c |, the fit values are observed to remain within a standard deviation of the true values over the full range of coupling parameters.Depending on the noise source, fit errors either accurately predict the true error of the fit or overestimate it slightly.Although Q i fit values are still found within the 95% confidence interval, frequency noise increases the calculated fitting error without a corresponding increase in true error (see discussion in Appendix C).The frequency noise leads to rotational error that increases χ 2 but does not affect the calculation of Q i , which is determined only by the radial degrees of freedom.Interestingly, like the systematic errors induced by parasitic Fano resonances in the measurement circuit [19], the effect from frequency noise is strongest in the overcoupled regime (see Fig. 4d), implying that this regime is particularly susceptible to increased errors.Regardless of the regime, this uncertainty overestimation from frequency noise should be present for all fit algorithms that do not distinguish between phase and radial degrees of freedom when calculating fit uncertainties.Therefore, a fit uncertainty calculation that isolates only the radial degrees of freedom may lead to lower errors.
On the other hand, we find that a new type of measurement protocol, specifically one possessing a homophasal point distribution, can reduce fitting errors by redistributing points around the resonance circle.Errors for standard VNA mea- are the errors from the SPD and HPD fits, respectively.At low σ f r , follows the behavior shown in (c) for the case with σ f r = 0.However, near σ f r > 10 Hz, the frequency noise begins to dominate the fit errors and σ SPD Q i /σ HPD Q i rapidly approaches 1.This behavior implies that the benefit of the HPD over the SPD is due to a reduction of σ n error contributions.surements (i.e. the SPD) grow with the square-root of the ratio ∆F/∆ f r .Therefore, for a typical measurement with ∆F ≳ 4∆ f r , a factor of two or greater improvement in accuracy can be expected for circle fit results.Interestingly, SPD errors are minimized when ∆F/∆ f r = 1 (errors grow dramatically for ∆F/∆ f r < 1 for both the SPD and HPD).However, when ∆F = ∆ f r , this is only a measurement of half of the resonance circle [8], implying that under some circumstances a half-circle fit can return better accuracy than a full circle fit for a constant N.An improvement on the fitting error, either by implementing an HPD or by changing ∆F/∆ f r , allows for the possibility for reducing measurement time without a sacrifice accuracy.By implementing these methods, the total number of data points, and therefore time per measurement, can be reduced while maintaining a constant the same accuracy.Indeed, since errors scale inversely with √ N, a factor of two error reduction from an HPD would allow for a factor of four reduction in N and time to maintain an equivalent error with an SPD measurement.
Insight into why the HPD outperforms the SPD can be gained by considering the information that is contained within a microwave transmission measurement.Appendix F details how the information yield of a resonator measurement can be defined in terms of the Shannon entropy H( f ) [37].As shown in Fig. 7(a), the H( f ) peaks at ±∆ f r /2 for an ideal resonance signal, meaning that these points nearest to the resonance linewidth are the most uncertain and therefore contain the most information about the resonance signal once measured.Indeed, as shown in Fig. 7(b), the total entropy H set within a measurement sweep peaks near ∆F/∆ f r ∼ 1.5.The HPD maintains an overall higher information content compared to the SPD, and this corresponds to the decreased fit error (inset Fig. 7(b)).
We note that this simplistic analysis of the information yield only considers amplitude degrees of freedom.Furthermore, the mutual information [38] shared between measurement points may need to be considered when the density of points becomes very high, such as in the regime ∆F < ∆ f r , and correlations between each adjacent measurement point becomes large.A formal theory of the information from a resonance signal measurement may need to include additional degrees of freedom (such as phase/frequency) and the influence of the information shared between data points.The establishment of such a formal theory will be the goal of future work.
As demonstrated, the circle fit is also susceptible to bias from changes to the measurement span ∆F.At relatively modest values of ∆F/∆ f r ≳ 10, a systematic trend which exceeds the error can be observed in the data of Fig. 3(b).For artificial resonance data with an ideal background, we find no bias with ∆F (see Appendix C), indicating that the true source of bias is not the point distribution of the SPD but rather how this distribution weights in favor of influences from the microwave background signal.Because the HPD shifts data points to focus on the resonance signal itself, it minimizes the influence of the microwave background on the fitting procedure and thus the bias.Furthermore, while a small degree of bias can be replicated in our simulated data, the degree of bias is much smaller than found in the actual measurement.This indicates that the majority of bias originates from sources not captured in the model, such as potential parasitic resonances in the measurement setup [19], and while some works [39,40] have indeed presented Q-factor results for measurements with ∆F/∆ f r > 10, the more important and broader conclusion from the study presented here is that since the degree of fit bias is unknown, a systematic measurement protocol needs to be implemented to ensure such biases do not occur even for the case of ∆F/∆ f r < 10.
The point distribution of the SPD has a more complicated dependence on ∆ f r (see Appendix D).In Fig. 2(b), a slight deviation of the measurement and simulated data is observed.We postulate that this deviation is due to the ∆ f r dependence of the SPD point distribution.Since the point distribution of SPD measurements changes with the resonance linewidth, bias may influence results for wideband measurements with changing resonance quality factors [41][42][43][44][45].We want to emphasize that none of the studies cited here should be regarded as affected by bias, since bias in this study is only demonstrated for one specific measurement setup and fitting algorithm.It is unknown if other fitting algorithms (e.g.those presented in Refs.[8,17,46,47]) are susceptible to the same sources of bias, however this possibility may explain the high variability of results observed in a comparison of fitting methods [16].Because of this, care should be taken when comparing Q-factor measurements across studies with different measurement and fitting procedures for the sake of determining an optimal materials platform for quantum computing.

VI. CONCLUSIONS
As demonstrated here, circle fit analysis remains a robust method for characterizing resonance signals.Even in extreme limits where Q i ≫ Q c , the method can return an accurate measurement of Q i .Away from critical coupling, where σ Q i reaches a minimum, the errors on σ Q i increase only linearly with Q i /Q c .Errors can be mitigated by increasing the number of measurement points and reducing signal noise but have a lower limit due to the intrinsic resonance noise from TLS effects.Furthermore, we have related the fit uncertainty to the information content within a data set and have shown that measurements that are optimized to have more information produce more accurate predictions on Q i .
On the other hand, bias in circle fit results due to the influence of the microwave background has also been demonstrated.By comparing simulation to actual measurements, we find that the degree of bias could not be replicated in the standard resonator model.Therefore, we conclude that a systematic study is required to ensure that such biases are not affecting results from other fitting methods.To resolve this issue for the circle fit method, we have established a new measurement technique (the HPD) that minimizes not only fit bias but also the overall fitting error.For a typical resonance measurement with ∆F ∼ 4∆ f r , we expect a factor of two fit error reduction.Therefore, we conclude that the HPD is an overall improved method for resonance measurement compared to the standard method.Due to its generality, this new protocol can be implemented not only for the study of superconducting notch-type resonators but also other resonance systems such as those in the fields of spin-waves and optics.

ACKNOWLEDGMENTS
This work was supported by Innovate UK (QTools, grant No 79373 and FABU, grant No 50868); the EPSRC Oxford Quantum Computing Hub EP/T001062/1; and the FET Open inititative from the European Union's Horizon 2020 program under N • 899561.We would also like to thank Russ Renzas and Harm Knoops at Oxford Instruments Plasma Technology for advising on the manuscript and providing fruitful discussions on resonator and thin film characterization.

VII. APPENDIX A: TABLE OF VARIABLES
To assist the reader, we have included a table of variables and definitions used to model the resonance signal and noise.

VIII. APPENDIX B: SAMPLE DETAILS AND MEASUREMENT PROTOCOLS
The superconducting CPW microwave resonators used in this study were fabricated from a 55 nm NbN film deposited on a Si substrate using an Oxford Instruments FlexAL Atomic Layer Deposition system.The resonators were designed with Variable Definition S21, S21 S21 is an ideal complex transmission resonance signal with zero measurement noise but potentially affected by the measurement circuit.S21 is a resonance signal under the influence of measurement noise.Qi, Qi The internal quality factor.Qi is used to calculate S21 in the generation of artificial resonance data.Qi is the measured/fitted value.Qc, Qc The complex coupling quality factor Qc = |Qc|e −iφ .Qc is used to calculate S21 in the generation of artificial resonance data.Qc is the measured/fitted value.σ Qi The fit error on Qi. σ SPD Qi and σ HPD Qi denote values specified for SPD and HPD distributions.φ The phase shift of the resonance signal due to impedance mismatch.

Ql
The loaded quality factor The signal frequency used to probe the transmission response.For a set of measurements, fi is the ith frequency of the set.θ The complex phase of S21.N The number of data points in the measurement set.

∆F
The frequency span of the set of the frequencies in the measurement set.fr, ∆ fr The resonance frequency and the resonance linewidth: ∆ fr = fr/Q l .σ fr The standard deviation of the frequency noise introduced to fr. a, α, τ The background transmission amplitude, phase offset, and microwave delay, all of which arise from the specifics of the measurement setup.

δi, εi
Random variables added to S21 calculated at fi and generated on a Gaussian distribution with a zero mean.δi is the real component of the noise and ε is the imaginary component of the noise.σn The standard deviation of the Gaussian distribution used to generate δi and εi.

N
The number of data points within a VNA frequency scan.

Ntr
The number of traces performed by a VNA during a measurement.P V NA , P chip The microwave power applied by the VNA during the measurement and the power applied to the chip under probe, respectively.

H( f )
The Shannon entropy of a probabilistic measurement.

Hset
For a VNA scan of a set of N points, Hset is the total information entropy of the set.⟨nr⟩, ⟨n ph ⟩, ⟨n ′ ph ⟩ The number of photons in the resonator, the VNA output signal, and the VNA return input after traversing the system under probe, respectively.Each curve in Fig. 1 is measured with N = 4001 points distributed linearly across the measurement bandwidth ∆F and a VNA output power P V NA .A power-dependent trace averaging protocol was used to mitigate measurement noise at low powers.For P V NA < −50 dBm, N tr = (P V NA + 50) 2 + 20, where N tr is the number of traces averaged, while N tr = 20 for P V NA > −50 dBm.Before the circle fit, transmission phase was normalized by subtracting the linear delay.

IX. APPENDIX C: COMPARISON OF SIMULATED DATA WITH MEASUREMENTS
As mentioned in the main text, we included resonance frequency noise to better model real resonator measurements.For more realism, the frequency noise was simulated using a 1/ √ f spectrum, as found in Ref.31, however no discernible difference in fit results were found when using pink noise rather than white noise.Figure 4(a) shows a comparison of artificial resonance (arg(S 21 )) data along with measurement data from Fig. 1.As shown, the real measurement data exhibits an increased noise at the phase jump near f r .In simulated data, the standard injection of complex noise does not replicate the increased phase noise shown in the measurement.Instead, by injecting a small random shift on f r with a standard deviation σ f r ≈ 50 Hz, an increased phase noise at f r can be replicated.
The effects of the resonance noise on the circle fit error are shown in Fig. 5.For σ f r = 0, fit errors on Q i agree with the true error |Q i − Qi |/ Qi as shown in Fig. 2(a).In this case, the errors scale linearly with the background noise σ n as shown in Fig. 5(a).However, when σ f r > 0 is included, errors are observed to deviate from this scaling trend.As shown in Fig. 5(c), σ Q i /Q i overestimates the true error in the overcoupled regime.Hence, we can conclude that the increase in fit error is only an artificial increase and not a true increase.In addition, errors no longer scale fully with σ n .Instead, errors scale with σ n when σ n is large, but this trend deviates for small σ n (Fig. 5(d)).The source of the increase is likely the increase in χ i for each data point due to the rotational jitter from phase noise.However, since the noise is only rotational in nature, it does not actually affect the calculation of the circle diameter and thus Q i .A method that distinguishes radial and phase uncertainties may prove beneficial in reducing fit uncertainty in the presence of large frequency noise.
As discussed in Sec.IV, fitting results of SPD data have a dependence on the ratio ∆F/∆ f r .Interestingly, as shown in Fig. 4(b), the strength of the bias is larger for measured data than for simulated data with identical fit parameters and noise levels.Indeed, for simulated signals with an ideal (i.e.calibrated) background, there is virtually no ∆F/∆ f r dependence for fit results.For simulated data with a non-ideal background, a small but perceptible amount of bias is observed as indicated by a slight slope in the results, however, this bias is still much smaller than the bias (i.e.slope) observed in the measurement data.This indicates both that the types of noise modeled here (frequency and amplitude) do not contribute to fitting bias observed in this study and that the majority of this bias stems from effects not captured in Eq. 1.The resonator model used here assumes that the background parameters a, τ, and α are frequency independent locally near f r , however such assumptions may not be applicable for many cryogenic microwave measurement setups.Furthermore, the influence from Fano resonances [19] in the measurement setup is also excluded.Because the source of bias is not captured in the resonator model itself, it is entirely possible for the magnitude of the fit bias to be setup dependent.However, it should be reiterated that the benefit of the HPD is that it removes fit bias even if the source of the bias is seemingly unparameterized and can be implemented without changes to the experimental setup.
For the standard point distribution (SPD) of a VNA sweep, data points are distributed quadratically around the circle with a minimum point density near f r and maximum near the offresonant point.The distribution can be derived from the frequency-phase relation θ ( f ) = θ 0 + 2 arctan(2Q l [1 − f / f r ]) [18].By taking the derivative of θ ( f ) with respect to f and then inverting (or alternatively by taking the derivative of the inverse function f (θ ) and then substituting θ ( f ) back into d f (θ )/dθ ), the expression can be derived.Remembering that Q l = f r /∆ f r , where ∆ f r is the linewidth, the expression simplifies to For the SPD, frequency points are distributed linearly with the separation between points δ f = ∆F/N, where ∆F is the frequency span and N is the number of data points.A continuous to discrete transformation can be made assuming a large N limit and by substituting d f /dθ → δ f /δ θ , where δ θ is the discrete difference between neighboring phase data points.With this substitution, the discrete phasal density ρ θ of data points around the circle is This expression can be confirmed by manually calculating 1/δ θ in simulated data, as shown in Fig. 6(a).Interestingly, while the distribution is tuned by the measurement span ∆F, it also has a more complicated dependence on the resonance linewidth ∆ f r .Therefore, a constant ∆F SPD measurement for a resonance signal with a changing linewidth might also exhibit an unknown bias.However, if such biases exist, the HPD protocol can be expected to eliminate such effects by normalizing the point density around the circle.Aside from bias, SPD fit errors also increase with increasing ∆F/∆ f r , as shown in Fig. 3(c).Fig. 6(b) shows similar data generated on a logarithmic scale.A linear fit of the errors demonstrates how the error σ SPD Q i increases with the square root of ∆F/∆ f r .This simulation result conflicts with the experimental results, which find that errors increase as σ SPD Q i ∝ (∆F/∆ f r ) 1.7 .This difference between simulation and experimental results further emphasizes how the model in Eq. 1 may not fully capture all sources of error in real experiments.Other sources of errors, such as the inclusion of parasitic Fano resonances in the measurement circuit [19] may be necessary to appropriately model resonance signals.
Resonator noise can also be added into the simulated data.This is done by adding a small random deviation (σ f r ≈ 50 Hz) to the resonance frequency for each data point calculated with Eq. 1.The frequency noise increases the fit error (dashed lines) in the overcoupled regime, however, the frequency noise does not affect the true error (scatter points).(d) When normalized by σ n , the errors in (c) scale with σ n for large values of background noise, but this scaling breaks down for small σ n .

XI. APPENDIX E: CALCULATION OF PHOTON
NUMBERS FOR φ > 0 In the inset of Fig. 1, the internal quality factor Q i is plotted against the estimated average photon number ⟨n r ⟩ in the resonator.The calculation of ⟨n r ⟩ includes a corrective term for the case of φ > 0 that reduces the number of photons in the resonator.To derive the modified relation, we follow the method of Ref. 48.Under a steady state condition, the average energy stored within the resonator is ⟨n r ⟩h f r = P loss Q i /2π f r , where h is Planck's constant and P loss is the energy dissipated per resonance cycle.The dissipated power is the difference between the chip input power P chip and the transmitted and reflected powers, which are respectively proportional to the scattering parameters |S 21 | 2 and |S 11 | 2 .The dissipated power is then The expression for |S 21 | 2 and |S 11 | 2 can be simplified by assuming an ideal microwave background and evaluating only at f = f r .In this case and using Eq. 1, the transmission coeffi-cient for power is On the other hand, |S 11 | 2 is independent [49] of φ with , the average photon number can then be calculated as This expression is consistent with the case of an ideal notchtype resonator with φ = 0. Interestingly, this implies that when Q c is purely imaginary, i.e. φ = π/2, then the average photon number goes to zero, however such a scenario is unphysical as it would require an infinite circuit capacitance [17].
This data is similar to those in Fig. 3(c), except it is generated on a logarithmic scale to prevent fit bias [35].The inset shows that the fitting error σ Q i /Q i has an approximate inverse square-root dependence on H set /N with higher amounts of information content corresponding to lower levels of fit uncertainty.

XII. APPENDIX F: THE INFORMATIONAL DENSITY OF A RESONANCE DATA SET
The purpose of a measurement is to gain information about the system under probe.Depending on the measurement details, a data set may contain more or less information about the system.For instance, even for very large N, a measurement centered at f = 4 GHz will contain very little information about a narrow resonance signal at f r = 5 GHz.In this line of reasoning, one may expect that data points measured further and further away from f r will contribute increasingly diminishing amounts of information about the resonance signal itself.As noted in the main text, fitting errors for the SPD are minimal for ∆F = ∆ f r and increase steadily as data points are dispersed further and further away from f r as ∆F increases.Therefore, there is an intuitive relation between fit uncertainty and the information within a data set.Indeed, by calculating the information content of a resonance data set, we will show that such a relation does seem to exist.Furthermore, we will show that for wide ranges the HPD contains more information over the SPD, which helps explain why the HPD returns smaller fit errors.
The resonator system is probed by sending a known electromagnetic signal through a coupled transmission line.The electromagnetic signal sent to the chip by the VNA is a wavepacket consisting of ⟨n ph ⟩ photons at frequency f and phase φ .From a semi-classical standpoint, a change in the number of photons can occur via an interaction with the system under probe, i.e. the resonator.Should no change to the input signal occur, then no information is gained from the measurement.On the other hand, should the number of photons, their frequency, or their phase change, then such a change would indicate that new information has been gained by performing the measurement.This system can be mapped onto a binary communication system in which a constant bit undergoes a random bit-flip process during transmission through a noisy communication channel, as shown in Fig. 7(a).If the photon number is considered in isolation (i.e.no frequency or phase shifts occur in the signal), then the informational yield per photon can be parameterized by the Shannon entropy [37] H(p r ) = −p r log 2 (p r ), where p r is the probability of a singular photon leaving the wavepacket to enter the resonator (or a singular input bit is flipped).For a transmission measurement, the VNA measures the ratio of output to input voltages V out put /V input , which is equivalent to the ratio of the change in the number of photons ⟨n ′ ph ⟩/⟨n ph ⟩, where ⟨n ′ ph ⟩ is the number of photons after transmission through the circuit.Therefore, under these conditions, a VNA transmission measurement is a measurement of the probability p r , which is frequency dependent with a Lorentzian distribution p r ( f i ) = |1 − S 21 | 2 .
H(p r ) is a metric of how unpredictable a measurement's outcome will be [50], and therefore measurements with larger H(p r ) yield more information about the system.Since p r , and therefore H(p r ), is frequency dependent, not all points in a VNA measurement yield equal amounts of information about the resonance signal.Figure 7(a) shows the H( f ) distribution for a slightly overcoupled resonance signal with an ideal background and Q i = 50000, |Q c | = 10000, f r = 5 GHz, and φ = 0. Near f r are two sharp peaks in H( f ), where each is centered at ±0.5∆ f r .At f r itself is a dip with a magnitude that depends on the quality factors.H( f ) is a metric of the "surprise" that a photon will be absorbed by the resonator.In this case, far from f r there is no surprise that a photon is not absorbed, hence the diminishing entropy far from f r .On the other hand, at f r there is little surprise that a photon will be absorbed into the resonator because this is where the peak absorption is.Indeed, for very high quality factor resonators, where the probability of absorption trends toward 1 at f r , the information entropy at f r goes to zero as there will be no surprise for absorption (not shown).The two peaks at ±0.5∆ f r occur because at these values there is an equal 50% probability that a photon will be or not be absorbed into the resonator.Thus the result of a single photon measurement is unpredictable, and therefore these two frequency points have a maximal entropy.
For a measurement, each data point at frequency f i yields a small portion of information corresponding to the entropy H( f i ) = −p r ( f i ) log 2 (p r ( f i )).The total information yield in the data set is then the sum of information yield at each measurement frequency H set = ∑ H( f i ).We normalize H set by the number of data points to find a metric for the total information density H set /N. Figure 7(b) shows H set /N for a series of simulated SPD and HPD resonance data with varying ∆F/∆ f r .Both point distributions have a peak in information density near ∆F/∆ f r ∼ 1.5, which corresponds to a measurement of a little more than half a resonance circle.Interestingly, the SPD has a slightly higher peak in entropy compared to the HPD, however this behavior is seemingly masked by measurement noise in our results in Fig. 3.In any case, as ∆F increases away from ∆ f r , H set /N decreases rapidly for the SPD but only slightly for the HPD.Therefore, the HPD maintains a constant and overall higher information yield at large ∆F.
Since the entropy is a metric of the uncertainty in the system [50], data points with the largest amounts of uncertainty yield the most information when measured.Therefore, increasing H set of a measurement should yield more information, which translates into better fit accuracy.Indeed, we find that H set corresponds well with the fit uncertainty.The inset of Fig. 7(b) shows the dependence of σ Q i /Q i with respect to H set /N.There is an approximate inverse square-root relationship σ Q i /Q i ∝ (H set /N) −1/2 , and as H set /N decreases for both ∆F < ∆ f r and ∆F > ∆ f r , σ Q i /Q i increases.Therefore, there is a good correspondence between the total information entropy of a VNA scan and the minimal uncertainty that can be achieved with a circle fit algorithm.One benefit of the HPD is that it better preserves the maximal entropy of the data set compared to the SPD.We note, however, that the analysis above assumes that there is no phase or frequency shift in the photons after traveling through the circuit.When this assumption is false, i.e. when φ ̸ = 0, then p r ̸ = |1 − S 21 | 2 , since |S 21 ( f i )| > 1 at some f i due to rotation of the circle.Additionally, sources of measurement error, such as additional photons being added or removed by thermal fluctuations in the measurement circuit, are also neglected.Instead, a more complete analysis which takes into consideration measurement noise and the information gained by a phase shift is required.Such an analysis may be an avenue for future research in resonance measurement theory.

FIG. 2 .
FIG.2.Fitting errors on the internal quality factor Q i for simulated resonance data.Simulations assume an ideal or calibrated microwave background (a = 1, α = φ = 0, τ = 0), coupling quality factor Qc = 10 4 , and resonance frequency f r = 5 GHz.Qi is varied from 10 to 10 11 and N = 20001.The measurement bandwidth is maintained at ∆F = 10∆ f r , where ∆ f r = f r /Q l , and is centered around f r .Only complex Gaussian noise with standard deviation σ n is injected into the artificial signal (σ f r = 0).Such noise corresponds to noise in the transmission measurement background.(a) The effects of this noise on the relative fitting error σ Q i /Q i (dashed lines) and the true relative error |Q i − Qi |/ Qi (solid points, corresponding colors).There is close agreement between fit and actual errors, indicating that fit error calculations adequately describe the true error.(b) σ Q i /Q i for the data in Fig.1(red dots).Because measurement noise is power dependent, the fit error is normalized by the background noise level σ n , which is estimated as the standard deviation of data farthest from f r .The dashed blue line represents a fit of artificial resonance data with identical fit and measurement parameters.

FIG. 3 .
FIG. 3. (a) A comparison of two measurements of the same resonator signal using the SPD and HPD (N = 101, ∆F/∆ f r = 10).(inset) The two data sets project onto the complex plane as a circle.Whereas the SPD has an increased point density near the off-resonant point, the HPD has a uniform point density around the circumference of the circle.(b) Fit values for Q i using the SPD and HPD measurements shown in (a) except with N = 10001.The measurement bandwidth ∆F was gradually increased as a means of varying the degree of bias.Aside from the measurement band and point distributions, all other measurement parameters were identical.Whereas the SPD shows a gradual bias toward higher Q i values, the fit of HPD returns a constant Q i , independent of ∆F.(c) As in Fig. 2(a), a systematic fit of simulated data allows for a comparison of the fit uncertainty (dashed lines) and the true error (points).While the SPD error increases as √ ∆F (see Appendix D), the HPD error remains constant at the minimal error of the SPD.In other words, the HPD maximizes fit accuracy relative to the SPD.(d) The increased performance of the HPD over the SPD is dependent on the level of resonance frequency noise σ f r .The relative performance can be parametrized by the error ratio σ SPD Q i /σ HPD Q i , where σ SPD Q i and σ HPD Q i central conductor width S = 10 µm and gap width W = 6 µm.The details of the material growth techniques will be provided in a different manuscript.The designs were etched into the NbN films by an inductively-coupled SF6 plasma on an Oxford Instruments PlasmaPro 100 ICP180, after either optical or electron-beam lithography and respective resist development.The 5 × 5 mm 2 chips were mounted into a microwave measurement box, which itself was mounted onto the mixing chamber stage of a dilution refrigerator.Magnetic shielding was provided by a cryoperm shield.The input microwave lines had ∼ 70 dB of attenuation.After passing through the chip, output signals were amplified by a 4 K high-electronmobility transistor (HEMT) providing ∼ 40 dB amplification.Signals were further amplified an additional 20 or 40 dB room temperature amplifier depending on the setup used.

FIG. 4 .
FIG. 4. (a) A comparison of artificial and measurement arg(S 21 ) data as a function of frequency.The top curve (green) is artificial data with only complex background noise S 21 = S21 + δ + iε added.The middle curve (orange) is generated with both background noise and frequency noise σ f r ≈ 50 Hz.The bottom curve (blue) is the phase data for the -35 dBm measurement of Fig. 1.The two artificial resonance curves are generated with fit parameters derived from a circle fit of the measurement curve.The curves are displaced vertically for clarity.As shown here, the inclusion of f r noise is essential for adequately replicating measurement data.(b) A comparison of fit results for simulated and measured resonance data.Blue data points are Q i fit values for the resonator shown in Fig. 3(a) as a function of span ratio ∆F/∆ f r .The orange curve is a fit result on simulated data with parameters identical to the measurement data with |Q c | ≈ 6.730 × 10 4 , Q i ≈ 5.181 × 10 6 , φ ≈ 0.668, f r ≈ 4.364 GHz, a ≈ 1.149, α ≈ 1.597, and τ ≈ −8.825 × 10 −11 s.The noise levels are σ n = 0.00035 + i0.00016 and σ f r = 50 Hz and comparable to estimates of the noise in the measurement data.The green curve is a similar simulation, except with an ideal background with a = 1, α = 0, and τ = 0.

FIG. 5 .
FIG. 5.The fitting errors on the internal quality factor Q i for simulated resonance data.Simulations assume an ideal or calibrated microwave background (a = 1, α = φ = 0, τ = 0), coupling quality factor Qc = 10 4 , and resonance frequency f r = 5 GHz.Qi is varied from 10 to 10 11 .The measurement bandwidth is maintained at ∆F = 10∆ f r , where ∆ f r = f r /Q l , and is centered around f r .Except where noted otherwise, N = 20001.(a) Shows fitting errors for various background noise levels σ n , similar to the dashed curves of Fig. 2(a).Frequency noise is omitted (σ f r = 0 Hz).When errors are normalized by σ n , they collapse onto a single curve as shown.This indicates that errors scale linearly with the background signal noise.(b) Q i errors for fits with different number of points N. When multiplied by √ N, errors also collapse onto a single curve.Therefore, as noted in the main text,σ Q i /Q i ∝ σ n / √ N. (c)Resonator noise can also be added into the simulated data.This is done by adding a small random deviation (σ f r ≈ 50 Hz) to the resonance frequency for each data point calculated with Eq. 1.The frequency noise increases the fit error (dashed lines) in the overcoupled regime, however, the frequency noise does not affect the true error (scatter points).(d) When normalized by σ n , the errors in (c) scale with σ n for large values of background noise, but this scaling breaks down for small σ n .

FIG. 6 .
FIG. 6. (a)The normalized phasal density of points (ρ θ /N) around the resonance circle as a function of frequency.These curves are calculated manually from artificial resonance data as 1/δ θ , where δ θ is the phase difference between adjacent measurement points.As shown in Eq. 4, the phasal point density of the SPD is quadratic with respect to frequency.As the measurement span ∆F grows, the density of points near f r becomes more disperse while data becomes more concentrated toward near the off-resonant point.For comparison, the uniform ρ θ of the HPD is shown as a dashed line.(b) A linear fit of the σ SPD Q i /Q i for artificial resonance data as a function of ∆F/∆ f r .A linear fit of the errors show that it grows as σ SPD Q i /Q i ∝ ∆F/∆ f r .This data is similar to those in Fig.3(c), except it is generated on a logarithmic scale to prevent fit bias[35].

FIG. 7 .
FIG. 7. (a) The Shannon entropy H as a function of frequency f for a resonance signal with an ideal background and Q i = 50000, |Q c | = 10000, f r = 5 GHz, φ = 0, and N = 201.The spectrum of H has two peaks at ±0.5∆ f r (dashed lines), which correspond to the half-maximum points of the Lorentzian distribution of the resonance signal.These points also correspond to opposite points on the complex resonance circle and are separated by the full diameter of the circle.(b)The normalized information content or information density H set /N for SPD and HPD data sets with N = 10001.H set /N possesses a peak at ∆F/∆ f r ∼ 1.5, implying that a half circle measurement is maximally efficient for information content.The inset shows that the fitting error σ Q i /Q i has an approximate inverse square-root dependence on H set /N with higher amounts of information content corresponding to lower levels of fit uncertainty.

TABLE I .
Table of the variables used in this manuscript and their definitions.