\section*{Introduction}

Material defects have a manifold of microscopic origins such as impurities in solids or adsorbates hosted on surfaces~\cite{Muller:2017}. Their detrimental role was identified already in first experiments with superconducting quantum bits (qubits)~\cite{Simmonds04}. Strong interaction with a long-known defect type, charged two-level systems (TLS)~\cite{Anderson:PhilMag:1972,Phillips:JLTP:1972}, residing in the tunnel barrier of a qubit's Josephson junction gives rise to avoided level crossings and resonant energy absorption~\cite{Cooper04}. This form of dielectric loss could be mitigated by reducing the amount of lossy dielectrics, e.g. by incorporating smaller Josephson junctions~\cite{Martinis:PRL:2005} and by avoiding insulating layers. Another strategy is to enlarge the footprint of device capacitors in order to dilute the electric field induced by the qubit, which excites defects by coupling to their electric dipole moments~\cite{Wang:APL:2015,Gambetta17}. As a consequence of significantly enhanced coherence times, qubits became sensitive also to weakly coupling defects residing on the surfaces and interfaces of circuit electrodes~\cite{Barends13}. Since these are limiting the performance of state-of-the-art circuits~\cite{klimov2018,Schloer2019,Burnett2019}, further progress towards scaled-up quantum processors requires strong efforts to prevent the appearance of defects, e.g. by using better materials, improved fabrication procedures~\cite{Schoelkopf2016,Pappas2017,Dunsworth2017,RigettiFab}, and surface treatment to avoid contamination and parasitic adsorbates~\cite{Kumar16,deGraaf17}. This endeavor needs to be guided by careful analysis of defect properties such as densities, electric dipole moments, and positions, in order to identify and improve the manufacturing steps that reduce defect formation, and to analyze the microscopic structure of defects.\\

In this Letter, we present a method to extract information on the spatial positions of defects at the profile of the film edge in a qubit circuit. For doing this, we exploit the tunability of a charged defect's resonance frequency $\omega$ by an electric field $\mathbf{E}$,
\begin{equation}
\omega = \sqrt{\mathnormal{\Delta}^2 + \varepsilon^2}/\hbar, \ \ \ \ \varepsilon = \varepsilon_i + 2\mathbf{p}\mathbf{E},
\label{eq:TLSfreq}
\end{equation}
where $\hbar$ is the reduced Planck constant, and $\mathbf{p}$ is the defect's electric dipole moment. The offset energy $\varepsilon_i$ is given by local strain and electric fields from surrounding atoms, and $\mathnormal{\Delta}$ is the defect's (constant) tunneling energy~\cite{Anderson:PhilMag:1972,Phillips87}. In our experiment, $\mathbf{E}$ is composed of electric fields $\mathbf{E}_\text{t}$ and $\mathbf{E}_\text{b}$ generated by two gate electrodes placed above (t) and below (b) the sample chip, respectively. The qubit is used to monitor the defect's resonance frequency and their responses to DC voltages $V_\text{t}$ and $V_\text{b}$ applied to the respective top and bottom electrode.
Comparing the response to the spatial variation of the applied electric fields obtained from finite element simulations, the position $\mathbf{x}$ of a defect can be deduced by solving the equation
\begin{equation}
	\gamma_\text{t} V_\text{t}/\gamma_\text{b} V_\text{b} = \mathbf{p}\mathbf{E}_\text{t}(V_\text{t},\mathbf{x})/\mathbf{p}\mathbf{E}_\text{b}(V_\text{b},\mathbf{x}).
	\label{eq:ratio}
\end{equation}
Here, $\gamma_\text{t}$ and $\gamma_\text{b}$ are the defect's tunability coefficients by the respective top and bottom fields, which are obtained by fitting the measured resonance frequency dependence of each defect
\begin{equation}
\omega=\sqrt{\mathnormal{\Delta}^2+\left( \varepsilon_\text{i} + \gamma_\text{t} V_\text{t} + \gamma_\text{b} V_\text{b} \right) ^2}/\hbar
\label{eq:hyperbola}
\end{equation}\\
derived from Eq.~\eqref{eq:TLSfreq} using the identities $2\mathbf{pE}_\text{t}=\gamma_\text{t} V_\text{t}$ and $2\mathbf{pE}_\text{b}=\gamma_\text{b} V_\text{b}$. Since DC electric fields approach metallic electrodes always perpendicular to their surface, Eq.~(\ref{eq:ratio}) can be reduced by dropping the dipole moment projections onto each field, and regarding the absolute field values. Thus, at metal film interfaces the defect locations are deduced from the simplified equation $\gamma_\text{t}/\gamma_\text{b}=|\mathbf{E}_\text{t}|/|\mathbf{E}_\text{b}|$.
At the substrate-vacuum interface however, the applied fields are not necessarily parallel, which requires accounting for the defect's dipole moment orientation, as described below.\\
\begin{figure}[htbp]
	\centering
	\includegraphics[width=\columnwidth]{Fig1.png}
	\caption{\textbf{Experimental setup for E-field tuning of defects and simulation results.} \textbf{a} Qubit picture with sketched top (red) and bottom (blue) electrodes which are controlled by two independent voltage sources referenced to the on-chip ground plane. \textbf{b} Photograph of the opened sample housing without qubit chip, and illustration of the top (red) and annular bottom electrode (blue). The cross mark denotes the location of the investigated qubit. \textbf{c} Sketch of a cross-section through the substrate and the qubit electrode near the film edge, showing the interfaces of interest: the substrate-metal (SM) and substrate-vacuum (SV) interfaces, the native AlO$_x$ layer (Ox), and the oxide-vacuum interface (OxV). Colored arrows define the coordinate systems along each interface, which have their origins close to the substrate-metal-vacuum edge. \textbf{d} Directions of the simulated DC fields $\mathbf{E}_\text{t}$ and $\mathbf{E}_\text{b}$ generated by top and bottom electrodes, and of the qubit's plasma oscillation field $\mathbf{E}_\text{q}$. \textbf{e},\textbf{f} Simulated electric field strengths for a voltage of $-0.5\,\mathrm{V}$ applied to either top or bottom electrodes.}
	\label{fig:1}
\end{figure}
\section*{Experiment}
We connect each of the two electrodes to a DC voltage source that is referenced to the common ground of the sample housing and the on-chip groundplane as sketched in Fig.~\ref{fig:1}\textbf{a}.  A photograph of the opened aluminum sample housing is shown in Fig.~\ref{fig:1}\textbf{b}, where red and blue structures indicate the real dimensions of the DC electrodes. The top electrode consists of a copper/Kapton-foil sandwich glued to the lid of the sample housing. The bottom electrode is integrated in the PCB backplane. Its circular shape allows a piezo-mechanical transducer to exert mechanical force onto the center of the qubit chip, which allows one to tune defects by elastic strain~\cite{Lisenfeld2015, Grabovskij12}. In this work, the piezo is not used, and we refer to Ref.~\cite{Lisenfeld19} for a study comparing the defect response to mechanical strain and electric fields that was performed with the same setup. Further technical details of the sample housing are provided in Supp. Mat. 1.\\

The employed qubit sample is an aluminum-based transmon qubit~\cite{KochTransmon} consisting of a cross-shaped capacitor electrode that is connected to ground by a split Josephson junction~\cite{Barends13}. The applied E-field is expected to be constant along the film edges of the qubit island and of the surrounding groundplane due to the qubit's geometric symmetry and its central position relative to the electrodes (see Supp. Mat.~1). Accordingly, the problem to simulate the spatial dependence of the electric field can be limited to a 2-dimensional cross-section focusing on the film edge where the fields are strongest. This region is illustrated in Figure~\ref{fig:1}\textbf{c}, labeling the interfaces of interest which are the substrate-vacuum (SV), and the three film interfaces: substrate-metal (SM) interface, the inside of the native aluminum oxide layer (Ox), and the oxide-vacuum interface (OxV). The colored arrows indicate the spatial coordinates along each interface that have their origins at the substrate-metal-vacuum edge. As confirmed by SEM investigation, the edge of the film is rounded because it was patterned using isotropic reactive ion etching.\\

The E-field distribution that results from simulations is shown in Figs.~\ref{fig:1}\textbf{d}-\textbf{f}. In Fig.~\ref{fig:1}\textbf{d}, the direction of applied fields and of the qubit's AC electric field $\mathbf{E}_\text{q}$ at the different circuit interfaces are indicated by colored arrows. Figures~\ref{fig:1}\textbf{e} and \textbf{f} show the electric field strengths generated by applying a voltage of $-0.5\,\mathrm{V}$ to one of the electrodes. These show that the top and bottom fields are supposed to be focused in different regions, which is the key point to resolve locations of defects from their response to each gate electrode. Furthermore, the qubit AC field is concentrated in the same region as the DC fields, which implies that all defects residing at the investigated interfaces and detectable by the qubit couple to the global electrodes, as detailed in Supp. Mat.~1.\\
\begin{figure}[htbp]
	\centering
	\includegraphics[width=\columnwidth]{Fig2_AB.pdf}
	\caption{\textbf{Tuning defects by electric fields.}
	\textbf{a} Frequency-dependent energy relaxation rate $1/T_1$ of the qubit, measured by a swap spectroscopy protocol sketched in the left inset of \textbf{b}. Distinct peaks stem from resonant interaction with individual defects. \textbf{b} Dependence of defect resonance frequencies (dark traces) on applied voltage ramps alternating the top (red margins) and the bottom electrode (blue margins). The right inset contains the underlying ramp path in the voltage plane. Colored curves in the main figure highlight hyperbolic fits to Eq.~(\ref{eq:hyperbola}) with asymptotic slopes $\gamma_\text{t/b}$ which reflect the asymmetry tunability of defects by each electrode, characteristic of their position. The red vertical line indicates the exemplary trace shown in \textbf{a} where red arrows denote resonances of the highlighted defect traces. Horizontal black lines stem from defects hosted in the qubit's stray Josephson junction as explained in a previous work~\cite{Lisenfeld19}.} 
	\label{fig:2}
\end{figure}

The resonance frequencies of defects are detected by qubit swap spectroscopy~\cite{Cooper04,Lisenfeld2015} using the protocol shown in the left inset of Fig.~\ref{fig:2}\textbf{b}. This provides a measurement of the qubit's energy relaxation rate $1/T_1$ whose frequency dependence displays Lorentzian peaks due to resonant interaction with defects, as visible in Fig.~\ref{fig:2}\textbf{a}. To obtain the defects' response coefficients $\gamma_\text{t}$ and $\gamma_\text{b}$ required to solve Eq.~(\ref{eq:ratio}), we alternate measurements where the voltage on either the top or the bottom electrodes is swept upwards. The right inset of Fig.~\ref{fig:2}\textbf{b} illustrates such a sweeping path in the $V_\textbf{t}$-$V_\textbf{b}$ space, and the main figure shows resulting data. Segmented hyperbolic traces of individual defects exhibit unequal slopes in reaction to the two gates. According to Figs.~\ref{fig:1} \textbf{e} and \textbf{f}, these slopes reflect different local field strengths $\mathbf{E}_\text{t}$ and $\mathbf{E}_\text{b}$. A few exemplary fits to Eq.~\eqref{eq:hyperbola} are indicated by highlighted curves in Fig.~\ref{fig:2}\textbf{b}. Horizontal traces indicate defects which most probably reside inside the qubit's stray Josephson junction
where they do not experience any applied DC fields, as further detailed in the previously mentioned work~\cite{Lisenfeld19}.\\

A distribution of measured $\gamma_\text{t}/\gamma_\text{b}$ ratios is plotted in Fig.~\ref{fig:3}\textbf{a}, comprising data from 218 field-dependent defects that could be detected with this qubit in a frequency range of $0.7\,\mathrm{GHz}$ (between $5.6\,\mathrm{GHz}$ and $6.3\,\mathrm{GHz}$) and an applied voltage range of $V_\text{t},V_\text{b} \in [-100..100]\,\mathrm{V}$. As expected, all defects are more strongly tuned by the top electrode that induces a larger field at the qubit position, due to its geometry (cf. Fig.~\ref{fig:1}\textbf{b}).\\
\begin{figure*}[htbp]
	\includegraphics[width=\textwidth]{Fig3.pdf}
	\caption{\textbf{Deduction of defect positions.}
	 \textbf{a} Measured ratios $\gamma_\text{t}/\gamma_\text{b}$ of defect tunability coefficients by the top and bottom electrodes. \textbf{b} Ratio of the simulated electric field strengths $|\mathbf{E}_\text{t}|/|\mathbf{E}_\text{b}|$ along the different interfaces as indicated by the axes labels. Since the applied DC fields are parallel at these interfaces, the field ratio does not depend on $\alpha$ which defines the defect's dipole moment orientation (see inset of \textbf{c}). \textbf{c} Right side of Eq.~\eqref{eq:ratio} for some $\alpha$ values, where $\zeta(\alpha,\mathbf{x})\equiv\cos(\alpha-\alpha_\textbf{tb}(\mathbf{x})/2)/\cos(\alpha+\alpha_\textbf{tb}(\mathbf{x})/2)$ is the ratio of dipole moment projections onto the fields, and $\alpha_\textbf{tb}$ is the angle between $\mathbf{E}_\text{t}$ and $\mathbf{E}_\text{b}$. The horizontal violet line through \textbf{b} and \textbf{c} provides graphical solutions of Eq.~\eqref{eq:ratio} for possible positions of an exemplary defect (black dots), of which those requiring nonphysically large electric dipole moments $>10\,\mathrm{Debye} \approx 2 e \mathrm{\AA}$ are discarded (red points).}
	\label{fig:3}
\end{figure*}
\section*{Results}

As stated before, defect locations at film interfaces (SM, Ox, and OxV) are given by solutions of $\gamma_\text{t}/\gamma_\text{b}=|\mathbf{E}_\text{t}|/|\mathbf{E}_\text{b}|$. The ratio of simulated electric field strengths is shown in Fig.~\ref{fig:3}\textbf{b} along the respective coordinates defined in Fig.~\ref{fig:1}\textbf{c}. The horizontal violet line through Fig.~\ref{fig:3}\textbf{b} provides graphical solutions of Eq.~\eqref{eq:ratio} for an exemplary defect with measured ratio $\gamma_\text{t}/\gamma_\text{b}\approx3.5$. The two solutions at the Ox and OxV interfaces are indicated by red and black dots, respectively, and correspond to a defect's distance of $\sim 15\,\mathrm{nm}$ from the
substrate-metal-vacuum edge. Since the applied fields are parallel at film interfaces, the solutions are degenerate in the dipole moment orientation $\alpha\in[0..\pi]$ defined in the inset of Fig.~\ref{fig:3}\textbf{c}. At the SV interface, the tunability ratio depends in addition on $\alpha$, as visualized in Fig.~\ref{fig:3}\textbf{c} where the right term of Eq.~\eqref{eq:ratio} is plotted for some $\alpha$ values. Hereby, $\zeta(\alpha,\mathbf{x})\equiv\cos(\alpha-\alpha_\text{tb}(\mathbf{x})/2)/\cos(\alpha+\alpha_\text{tb}(\mathbf{x})/2)$ is the ratio of dipole moment projections on the fields, and $\alpha_\text{tb}$ is the angle between $\mathbf{E}_\text{t}$ and $\mathbf{E}_\text{b}$. The red and black dots indicate anticipated locations of the exemplary defect at the SV interface.\\



The defect's electric dipole moment component $p_\parallel$ parallel to the applied fields is calculated from each solution $\mathbf{x}$ and a corresponding field strength $\mathbf{E_\textbf{t/b}}(\mathbf{x})$, as reported in Supp. Mat. 1. Inside the oxide layer (Ox), electric fields are reduced by about a factor of 10 due to the materials' permittivity. A possibility for the exemplary defect ($\gamma_\text{t}=102\,\mathrm{\hbar MHz/V}$, $\gamma_\text{b}=29\,\mathrm{\hbar MHz/V}$) to reside at this interface would require an electric dipole moment of $p_\parallel \approx 30\,\mathrm{Debye}$, which is unrealistic. Therefore, we discard in our analysis all solutions that imply dipole moments $p_\parallel > 10\,\mathrm{Debye} \approx 2 e \mathrm{\AA}$ which is a maximum imaginable number in solids~\cite{Yu2020}. The cutoff value is discussed in Supp. Mat.~3. In Figs.~\ref{fig:3}\textbf{b} and \textbf{c}, valid and truncated solutions from the current example are indicated by black and red dots, respectively.
Regarding possible locations at the SV interface, only angles $\alpha \in[0.1..0.4]\,\mathrm\pi$ lead to reasonable dipole moment sizes for this defect, corresponding to distances $x^\text{SV} \in 
[40..5]\,\mathrm{nm}$ from the substrate-metal-vacuum edge. The probability for a given defect to reside at a particular interface is defined by the range of allowed $\alpha$. Here, $\alpha$ spans over $0.4\,\mathrm{\pi}$ at the SV, and over $\mathrm{\pi}$ at the OxV interfaces, resulting in $P_\mathrm{SV} = 0.4 \pi / (\pi + 0.4 \pi)\approx 0.29$ and $P_\mathrm{OxV} = \pi /  (\pi + 0.4 \pi)\approx 0.71$, respectively. This calculation is repeated for each field-tunable defect using hundreds of interpolated $\alpha$ values to increase the probability precision.\\
\begin{figure}[htbp]
	\centering
	\includegraphics[width=\columnwidth]{Fig4.pdf}
	\caption{\textbf{Defect positions and coupling strengths.}
	\textbf{a} Histograms of deduced defect locations, whose relative weights reveal the probability of finding a field-tunable defect at the respective interface (see legend). The probability errors are deduced from the estimation error of the electrode distances to the qubit film as detailed in Sup.~3. The interface to air (OxV, SV) hosts most detectable defects, possibly due to fabrication contaminants and adsorbates. Further, detected defects are concentrated within $50\,\mathrm{nm}$ from the substrate-metal-vacuum edge since the qubit fields are focused in this region. \textbf{b} Distribution of extracted defect-qubit coupling strengths $g$, which is in good agreement to direct measurements using the same sample~\cite{Lisenfeld19}.
	}
	\label{fig:4}
\end{figure}
The main result of this work is presented in Fig.~\ref{fig:4}\textbf{a}, showing the histogram of extracted positions of field-tunable defects weighted by the average probability to reside at a certain interface (colors). Most of such defects are located within a distance of about $50\,\mathrm{nm}$ to the substrate-metal-vacuum edge ($x=0$). This is expected since the qubit AC-electric field is mainly concentrated in this region. More distant defects couple too weakly to be detected with the given qubit coherence time. With highest probability, defects reside at open surfaces of the sample, i.e. at the OxV and SV interfaces. Due to the reduced strength of applied fields inside the native oxide, most solutions at the Ox interface resulted in unrealistic dipole moment sizes, and were discarded. The SV histogram appears particularly broad and smoothed due to tracing out the dipole moment orientation $\alpha$ which is assumed isotropic.\\

Once the defect positions are identified, we can calculate their coupling strengths to the qubit $g = \mathbf{pE}_\text{q}(\mathbf{x})$ from the deduced dipole moment projections on the applied fields and the simulated qubit AC field $\mathbf{E}_\text{q}$. Figure~\ref{fig:4}\textbf{b} shows the resulting distribution of $g$, which is very similar to an independent and direct measurement of the coupling strengths reported in Ref.~\cite{Lisenfeld19}.\\

We note that our analysis does not resolve defect locations along the qubit film edge, especially it disregards the possibility that defects reside on the narrow electrodes of the qubit's split Josephson junction. However, this region may be particularly critical because of the concentrated qubit field, and the additional lithography steps required to deposit sub-micron junctions, which may promote defect formation by substrate surface amorphisation and processing residuals~\cite{Dunsworth2017}. Nevertheless, we expect that the field strength ratio remains unchanged at the edges of junction-forming films so that the analysis remains valid in this region.
\\

Overall, in this sample, we detected on average 16 defects per GHz hosted in the Josephson junctions, and 26 field-tunable defects per GHz at any applied electric field. Further 5 field-tunable defects per GHz could not be located since some defects appeared only in one data segment (red and blue framed windows in Fig.~\ref{fig:2}\textbf{b}). This effect can be minimized by choosing sufficiently narrow segments. Assuming an equal distribution of field-tunable defects along the 3mm-long edge of the qubit film, we obtain a density of $\approx 10$ defects per (GHz $\cdot$ mm). We note that the sample was stored for several years while it was covered by photoresist. Incorporation of resist atoms and residuals due to inadequate cleaning may explain the degradation of qubit coherence caused by an increased number of surface defects detected in this work.\\

\section*{Conclusions}

The demonstrated technique to determine the position of defects on the surface of a quantum circuit provides a viable tool to verify the material quality and to optimize micro-fabrication steps. Our technique requires only few externally placed gate electrodes and is thus applicable directly to existing qubit chips. Since the junction's tunnel barrier is free of applied DC electric fields, junction defects can be easily identified by zero field-tunability. While this technique presumably applies to all qubit geometries built in a coplanar architecture, the analysis of our sample is certainly least time-consuming due to its geometric symmetry. This method can be further improved by performing independent measurements of the qubit-defect coupling strengths $g$ and thus their effective dipole moment sizes~\cite{Lisenfeld19}, hereby reducing uncertainties concerning the interface at which a defect resides.\\

We have found that $46\,\%$ of all defects reside on the surface of the qubit sample, and $10\,\%$ are hosted inside the native oxide or at the metal-substrate interface. The location of another $10\,\%$ could not be resolved, and $34\,\%$ of defects reside in the tunnel barrier of the qubit's stray Josephson junctions. Hereby, the amount of defects in the weak junctions is negligible. While the redundant stray junctions can be simply shorted \cite{Dunsworth2017}, qubit surfaces remain another dominant and inherent source of dielectric losses. Decreasing this loss requires rigorous studies of fabrication processes and surface treatments during or after sample fabrication in order to improve the surface quality. The reported technique can be used to examine dielectric losses at film edges in suspended or trenched qubit samples, where electric fields can be more diluted while, on the other side, a larger surface for hosting adsorbates is available. In future experiments, additional on-chip gate electrodes can provide enhanced spatial resolution helping to distinguish defects in the immediate vicinity of the tunnel junctions.\\

\subsection*{Methods}

The supplementary material contains details on the experimental setup, simulations of the electric fields, plots of complete measured data sets, and the analysis method with error estimation. Further details can be found in the PhD thesis of AB~\cite{Bilmes19}.

\subsection*{Data availability}

The supplementary material contains details on the experimental setup, simulations of the electric fields, plots of complete measured data sets, and the analysis method with error estimation. The datasets generated and analysed during the current study are available from AB on request.

