\section{Introduction}

In this paper we survey and refine some existing formulas expressing a connection between affine Lie algebras, Young diagram combinatorics and singularity theory as investigated in \cite{gyenge2015announcement,gyenge2015euler}. This connection is in the context of Hilbert schemes of points on orbifold surface singularities.

Let $G \subset SL(2,\mathbb{C})$ be a finite subgroup. The equivariant Hilbert scheme $\mathrm{Hilb}([\SC^2/G])$ is the moduli space of $G$-invariant finite colength subschemes of $\SC^2$, the invariant part of $\mathrm{Hilb}(\SC^2)$ under the lifted action of~$G$.
This space decomposes as
\[ \mathrm{Hilb}([\SC^2/G])=\bigsqcup_{\rho \in {\mathop{\rm Rep}}(G)}\mathrm{Hilb}^{\rho}([\SC^2/G])\]
where
\[\mathrm{Hilb}^{\rho}([\SC^2/G])=  \{ I \in \mathrm{Hilb}(\SC^2)^G \colon H^0(\mathcal{O}_{\SC^2}/I) \simeq_G \rho \}\]
for any finite-dimensional representation $\rho\in {\mathop{\rm Rep}}(G)$ of $G$;
here $\mathrm{Hilb}(\SC^2)^G$ is the set of $G$-invariant ideals of $\SC[x,y]$, and $\simeq_G$ means $G$-equivariant isomorphism. Being components of fixed point sets of a finite group acting on smooth quasiprojective varieties, the orbifold Hilbert schemes themselves are smooth and quasiprojective \cite{cartan1957quotient}.

The topological Euler characteristics of the equivariant Hilbert scheme can be collected into a generating function. Let $\rho_0,\ldots,\rho_n\in\mathop{\rm Rep}(G)$ denote the (isomorphism classes of) irreducible representations of $G$, with $\rho_0$ the trivial representation.
The \textit{orbifold generating series} of the orbifold $[\SC^2/G]$ is
\[Z_{[\SC^2/G]}(q_0,\ldots, q_n)= \sum_{m_0,\dots,m_n=0}^\infty \chi\left(\mathrm{Hilb}^{m_0 \rho_0 + \ldots +m_n \rho_n}([\SC^2/G]) \right)   q_0^{m_0}\cdots q_n^{m_n}\]
where $\rho_0,\ldots,\rho_n$ are the irreducible representations of $G_\Delta$, and  $q_0,\dots,q_n$ are formal variables.

It turns out that if $\SC^2/G$ is a simple (Kleinian, DuVal) singularity, then the series $Z_{[\SC^2/G]}(q_0,\ldots, q_n)$ is closely connected to character formulas of certain affine Lie algebras. In general, for an affine Lie algebra $\tilde\mathfrak{g}$, denote by $\widetilde{\mathfrak{g}\oplus\SC}$ the  Lie algebra that is
the direct sum of it and an infinite Heisenberg algebra $\mathfrak{heis}$,
with their centers identified. Let $V_0$ be the basic representation of $\tilde\mathfrak{g}$.
Let $\CF$ be the standard
Fock space representation of $\mathfrak{heis}$, having central charge 1. Then $V=V_0\otimes \CF$ is a representation of
$\widetilde{\mathfrak{g}\oplus\SC}$ that is called the {\em extended basic representation}.
A distinguished basis of this representation is was introduced by Kashiwara in the context of
the associated quantum groups; this is known as the ``crystal basis''.

Suppose that the affine Lie algebra $\tilde\mathfrak{g}$ is the extended loop algebra of a simple finite dimensional Lie algebra of simply laced type.
The simply laced finite type Lie algebras are classified into three families: type $A_n$ for $n\geq 1$, type $D_n$ for $n \geq 4$  and type $E_n$ for $n=6,7,8$.
To each type (or root system) $\Delta$ there also corresponds a finite subgroup of $SL(2, \mathbb{C})$; this will be denoted by $G_{\Delta}$.

It is known that the equivariant Hilbert schemes $\mathrm{Hilb}^{\rho}([\SC^2/\Gamma])$ for all finite dimensional representations $\rho$ of $G$ are Nakajima quiver varieties~\cite{nakajima2002geometric} associated to $\widetilde\Delta$, with dimension vector determined by $\rho$, and a specific stability condition (see \cite{fujii2005combinatorial, nagao2009quiver} for more details for type $A$).
The results of~\cite{nakajima2002geometric} on the relation between the cohomology of quiver varieties and affine Lie algebras, specialized to this case, imply that the direct sum of all cohomology groups $H^*(\mathrm{Hilb}^{\rho}([\SC^2/G]))$ is graded isomorphic to the extended basic representation~$V$ of the corresponding extended affine Lie algebra $\widetilde{\mathfrak{g}\oplus\SC}$.
This result combined with the Weyl-Kac character formula for the extended basic representation gives the following formula (see \cite[Appendix A]{gyenge2015euler}):
\begin{gather} Z_{[\SC^2/G_\Delta]}(q_0,\dots,q_n)= \\\left(\prod_{m=1}^{\infty}(1-q^m)^{-1}\right)^{n+1}\cdot\sum_{ \mathbf{m}=(m_1,\dots,m_n) \in \SZ^n } q_1^{m_1}\cdots q_n^{m_n}(q^{1/2})^{\mathbf{m}^\top \cdot C_\Delta \cdot \mathbf{m}}\label{eq:orbi_main_formula}
\end{gather}
where $q=\prod_{i=0}^n q_i^{d_i}$ with $d_i=\dim\rho_i$,
and $C_\Delta$ is the finite type Cartan matrix corresponding to $\Delta$.

At least in types A and D an even stronger statement can be obtained. In these cases the elements of the crystal basis are in bijection with certain combinatorial objects called Young walls of type $\Delta$. The set of Young walls of type $\Delta$ will be denoted as $\mathcal{Z}_{\Delta}$; these are endowed with an $n+1$ dimensional multi-weight: $\mathbf{wt}(\lambda)=(\mathrm{wt}_0(\lambda),\dots, \mathrm{wt}_n(\lambda))$. The multi-variable generating series of objects in $\mathcal{Z}_{\Delta}$ is
\[Z_{\Delta}(q_0,\dots,q_n) = \sum_{\lambda\in \CZ_\Delta} \mathbf{q}^{\mathbf{wt}(\lambda)}\]
where we used the multi-index notation
\[\mathbf{q}^{\mathbf{wt}(\lambda)}=\prod_{i=0}^nq_i^{\mathrm{wt}_i(\lambda)}.\]
An important property of Young walls in types A and D is that there is a bijection
\begin{equation} \CZ_\Delta  \longleftrightarrow  {\mathcal P}^{n+1}  \times  \SZ^n\end{equation}
where ${\mathcal P}$ is the set of ordinary partitions and $n$ is the rank of the root system. In type A this goes back to \cite{james1981representation}; for the type D case see Proposition \ref{prop:dncoredecomp} below. This serves as the starting point of the following enhancement of \eqref{eq:orbi_main_formula}.
\begin{theorem} Let $\Delta$ be of type A or D.
\label{thm:main}
\begin{enumerate}
\item
\begin{gather*} Z_{\Delta}(q_0,\dots,q_n)= \\ \left(\prod_{m=1}^{\infty}(1-q^m)^{-1}\right)^{n+1}\cdot\sum_{ \mathbf{m}=(m_1,\dots,m_n) \in \SZ^n } q_1^{m_1}\cdots q_n^{m_n}(q^{1/2})^{\mathbf{m}^\top \cdot C_\Delta \cdot \mathbf{m}}.\end{gather*}
\item There exist a locally closed decomposition
of $\mathrm{Hilb}([\SC^2/G_\Delta])$ into strata indexed by the elements of $\CZ_\Delta$.
Each stratum is isomorphic to an affine space.
\item In particular,
\[Z_{[\SC^2/G_\Delta]}(q_0,\dots,q_n)=Z_{\Delta}(q_0,\dots,q_n).\]
\end{enumerate}
\end{theorem}
The type A case of this statement was proved in \cite{fujii2005combinatorial}.
Part (2) for type D was proved in \cite{gyenge2015euler}. The statement of part (1) in type D was also stated in \cite{gyenge2015euler}, and a proof was sketched in \cite{gyenge2016phdthesis}; we flesh this out in Sections \ref{sect:dnabacus}--\ref{seq:enumyw} below.

One can also consider a motivic enhancement of the series considered above. Let $K_0(\mathrm{Var})$ be Grothendieck ring of quasi-projective varieties over the complex numbers. The \emph{motivic Hilbert zeta function} of the orbifold $[\SC^2/G_\Delta]$ is
\[ \mathcal{Z}_{[\SC^2/G_\Delta]}(q_0,\ldots, q_n)= \sum_{m_0,\dots,m_n=0}^\infty [\mathrm{Hilb}^{m_0 \rho_0 + \ldots +m_n \rho_n}([\SC^2/G_\Delta]) ]   q_0^{m_0}\cdots q_n^{m_n}. \]
Here $[X]$ denotes the class of $X$ in $K_0(\mathrm{Var})$, and it is not to be confused with orbifold quotients. The series $\mathcal{Z}_{[\SC^2/G_\Delta]}(q_0,\ldots, q_n)$ is an element in $K_0(Var)[[q_0,\dots,q_n]]$.

The combination of \cite[Corollary 1.11]{bryan2019g} with Theorem \ref{thm:main} gives an explicit representation for the motivic Hilbert zeta function.
\begin{corollary} Let $\Delta$ be of type A or D.
\label{thm:motive}
\begin{gather*}\mathcal{Z}_{[\SC^2/G_\Delta]}(q_0,\dots,q_n)= \\ \left(\prod_{m=1}^{\infty}(1-\mathbb{L}^{m+1}q^m)^{-1}(1-\mathbb{L}^{m}q^m)^{-n}\right)\cdot\sum_{ \mathbf{m}=(m_1,\dots,m_n) \in \SZ^n } q_1^{m_1}\cdots q_n^{m_n}(q^{1/2})^{\mathbf{m}^\top \cdot C_\Delta \cdot \mathbf{m}}
\end{gather*}
where $\mathbb{L}  = [\mathbb{A}^{1}]\in
K_{0}(\mathrm{Var})$.
\end{corollary}
Once again, in type A this statement was proved in \cite{fujii2005combinatorial}. The above series has further specializations giving formulas for the  Hodge polynomials and
Poincar\'e polynomials of the equivariant Hilbert schemes.

Let $Y \subset \SC^2$ be a closed subvariety invariant under the action of $G_\Delta$. One can consider the moduli space $\mathrm{Hilb}([\SC^2/G_\Delta],Y)\subset \mathrm{Hilb}([\SC^2/G_\Delta])$ of points supported on $Y$. The corresponding motivic generating series is
\[ \mathcal{Z}_{([\SC^2/G_\Delta],Y)}(q_0,\ldots, q_n)= \sum_{m_0,\dots,m_n=0}^\infty [\mathrm{Hilb}^{m_0 \rho_0 + \ldots +m_n \rho_n}([\SC^2/G_\Delta],Y) ]   q_0^{m_0}\cdots q_n^{m_n}. \]
The techniques of \cite{gusein2004power} imply that
\begin{equation*}\label{eq:hilbmot} \mathcal{Z}_{[\SC^2/G_\Delta]}(q_0,\dots,q_n)=\mathcal{Z}_{([\SC^2/G_\Delta],Y)}(q_0,\dots,q_n)\cdot \mathcal{Z}_{[(\SC^2\setminus Y)/G_\Delta]}(q_0,\dots,q_n). \end{equation*}
This allows one to obtain further formulas from Corollary \ref{thm:motive}. For example,
\begin{gather*}\mathcal{Z}_{([\SC^2/G_\Delta],0)}(q_0,\dots,q_n)=
\frac{\mathcal{Z}_{[\SC^2/G_\Delta]}(q_0,\dots,q_n)}{\mathcal{Z}_{[(\SC^2\setminus 0) /G_\Delta]}(q_0,\dots,q_n)}\\
=
\frac{\mathcal{Z}_{[\SC^2/G_\Delta]}(q_0,\dots,q_n)}{\mathcal{Z}_{(\SC^2\setminus 0) /G_\Delta}(q)}
=\frac{\mathcal{Z}_{[\SC^2/G_\Delta]}(q_0,\dots,q_n)}{\prod_{m=1}^{\infty}(1-\mathbb{L}^{m+1}q^m)^{-1}(1-\mathbb{L}^{m-1}q^m)}=
\\ \left(\prod_{m=1}^{\infty}(1-\mathbb{L}^{m-1}q^m)^{-1}(1-\mathbb{L}^{m}q^m)^{-n}\right)\cdot\sum_{ \mathbf{m}=(m_1,\dots,m_n) \in \SZ^n } q_1^{m_1}\cdots q_n^{m_n}(q^{1/2})^{\mathbf{m}^\top \cdot C_\Delta \cdot \mathbf{m}},
\end{gather*}
where at the second equality we have used that $G_\Delta$ acts freely away from the origin, and at the third equality we have used the main result of \cite{gottsche1990betti} and that $[(\SC^2 \setminus {0}) /G_\Delta]=[\mathbb{L}^2]-[pt]$ in $K_0(\mathrm{Var})$.

Suppose that $\Delta$ is of type D. Let $E \subset \SC^2$ be the divisor defined by the ideal $(xy)$. This is invariant under the action of $G_\Delta$. Then
\begin{gather*}\mathcal{Z}_{([\SC^2/G_\Delta],E)}(q_0,\dots,q_n)=
\mathcal{Z}_{([\SC^2/G_\Delta],0)}(q_0,\dots,q_n)\cdot \mathcal{Z}_{([\SC^2/G_\Delta],E \setminus {0})}(q_0,\dots,q_n)\\
=\mathcal{Z}_{([\SC^2/G_\Delta],0)}(q_0,\dots,q_n)\cdot \mathcal{Z}_{(\SC^2/G_\Delta,(E \setminus {0})/G_\Delta)}(q)\\
=\mathcal{Z}_{([\SC^2/G_\Delta],0)}(q_0,\dots,q_n)\cdot \prod_{m=1}^{\infty}(1-\mathbb{L}^{m}q^m)^{-1}(1-\mathbb{L}^{m-1}q^m)
\\ =\left(\prod_{m=1}^{\infty}(1-\mathbb{L}^{m}q^m)^{-n-1}\right)\cdot\sum_{ \mathbf{m}=(m_1,\dots,m_n) \in \SZ^n } q_1^{m_1}\cdots q_n^{m_n}(q^{1/2})^{\mathbf{m}^\top \cdot C_\Delta \cdot \mathbf{m}},
\end{gather*}
where again at the second equality we have used that $G_\Delta$ acts freely away from the origin, and at the third equality we have used $[(E \setminus {0}) /G_\Delta]=[\mathbb{L}]-[pt]$ in $K_0(\mathrm{Var})$.
\begin{corollary}
\begin{enumerate}
	\item
There exist a locally closed decomposition
of $\mathrm{Hilb}([\SC^2/G_\Delta],E)$ into strata indexed by the elements of $\CZ_\Delta$.
Each stratum is isomorphic to an affine space.
\item The class in  $K_0(\mathrm{Var})$ of the stratum $\mathrm{Hilb}([\SC^2/G_\Delta],E)_Y$ corresponding to a Young wall $Y=(\lambda_1,\dots,\lambda_{n+1},\mathbf{m}) \in \CZ_\Delta \cong {\mathcal P}^{n+1}  \times  \SZ^n$ is
\[[\mathrm{Hilb}([\SC^2/G_\Delta],E)_Y]=[\mathbb{L}]^{\sum_{i=1}^{n+1} |\lambda_i|},\]
where $|\lambda_i|=\sum_j\lambda_i^j$.
\end{enumerate}
\end{corollary}
\begin{proof}
The proof of Part (1) is very similar to that of \cite[Theorem 4.1]{gyenge2015euler}. The divisor $E$ is preserved by the diagonal torus action on $\SC^2$ used in \cite{gyenge2015euler} for the stratification of $\mathrm{Hilb}([\SC^2/G_\Delta])$. It follows that the torus action on $\mathrm{Hilb}([\SC^2/G_\Delta],E)$ has the same fixed points as the torus action on $\mathrm{Hilb}([\SC^2/G_\Delta])$. By \cite[Theorem 4.3]{gyenge2015euler},
\[\mathrm{Hilb}([\SC^2/G_\Delta])^{\SC^{\ast}}=\bigsqcup_{Y \in \CZ_\Delta}Z_Y\]
where each $Z_Y$ is an affine space. Let $\mathrm{Hilb}([\SC^2/G_\Delta],E)_Y \subset \mathrm{Hilb}([\SC^2/G_\Delta],E)$ denote the locus of ideals which flow to $Z_Y$ under the torus action.
Since $(E \setminus {0}) /G_\Delta \cong \SC^{\ast}$, the Zariski locally trivial fibration
$\mathrm{Hilb}([\SC^2/G_\Delta])_Y \to Z_Y$ explored in \cite[Theorem 4.1]{gyenge2015euler} restricts to a Zariski locally trivial fibration $\mathrm{Hilb}([\SC^2/G_\Delta],E)_Y \to Z_Y$ with affine space fibers, and a compatible torus action on the fibers. By \cite[Sect.3, Remarks]{bialynicki1973some} this fibration is an algebraic vector bundle over $Z_Y$, and hence trivial (Serre–Quillen–Suslin).

Part (2) follows from Part (1) and the formula for $\mathcal{Z}_{([\SC^2/G_\Delta],E)}(q_0,\dots,q_n)$ above.
\end{proof}

The aim of the current paper is twofold. First, we give an exposition about the combinatorics of the Young walls in type D. Second, we give a complete proof of Theorem \ref{thm:main} (1) (and hence (3)) in the type D case.

The structure of the rest of the paper is as follows.
In Section 2 we review the combinatorics of the Young walls in type D. In Section 3 we introduce an associated combinatorial tool called the abacus. Using this we will calculate the generating series $Z_{\Delta}(q_0,\dots,q_n)$ of Young walls of type D and prove Theorem \ref{thm:main} (1) in Section 4.

\subsection*{Acknowledgement} The author is thankful to Jim Bryan, Andr\'as N\'emethi and Bal\'azs Szendr\H{o}i for fruitful conversations about the topic.

\begin{comment}
\section{Young walls of type \texorpdfstring{$A_n$}{An}}
\label{Dnidealsect}

One proof of Theorem \ref{thm:main} in type A  is based on the decomposition of Young diagrams into cores and quotients as developed in \cite[Section 2.7]{james1981representation}. We quickly review the main argument since it also serves as the basis for the type D case.

It can be shown that the $(\mathbb{C}^{\ast})^2$ action on $\mathbb{C}^2$ lifts to an action on $\mathrm{Hilb}^2([\mathbb{C}^2/G])$.
\begin{proposition}{\cite[Proposition 5.7]{sam2014combinatorial}} The $T$-fixed points of $\mathcal{M}(\underline{v},\underline{w})$ are indexed by $|\underline{w}|$-tuples of diagonally colored Young diagrams $\underline{Y}$ such that $|\underline{Y}|=|\underline{v}|$, the $i$-th diagram $Y_i$ in $\underline{Y}$ is given the $a_i$-coloring, and $\underline{\mathrm{wt}}(\underline{a},\underline{Y})=\underline{v}$.
\end{proposition}

The \emph{$n$-core} of a diagonally colored Young diagram is the diagonally colored Young diagram obtained by successively removing border strips of length $n$, until this is no longer possible. Here a {\em border strip} is a skew Young diagram which does not contain $2 \times 2$ blocks and
which contains exactly one $c$-labelled block for all labels $c \in \SZ/n\SZ$. The removal of border strips from a diagonally colored Young diagram can be traced on another combinatorial object, the \emph{abacus} of type $A_n$. The abacus for $n$ colors consists of \emph{rulers} corresponding to the residue classes in $\SZ/n\SZ$.  The $i$-th ruler consists of integers in the $i$-th residue class modulo $n$ in increasing order from top to bottom. Several \emph{beads} are placed on these rulers, at most one on each integer.
In particular, to a Young diagram corresponding to the partition $\lambda=(\lambda_1,\dots,\lambda_k)$ place a bead in position $\lambda_i-i+1$ for all $i$, interpreting $\lambda_i$ as 0 for $i>k$.
The removal of a border strip from the Young diagram corresponds to moving a bead up on one of the rulers. It turns out that shifting of beads on different rulers is independent from each other. In this way, the core of a partition corresponds to the bead configuration in which all the beads are shifted up as much as possible. Let us denote by $\mathcal{C}$ the set of $n$-core partitions.
It can be shown that the configuration of the beads on a ruler is described by a partition. The collection of these is called the \emph{$n$-quotient}. Hence, we get a bijection
\begin{equation}\label{eq:corequot} {\mathcal P} \longleftrightarrow {\mathcal C} \times {\mathcal P}^{n}, \end{equation}
 compatible with the diagonal coloring.

Given an $n$-core, one can read the $n$ runners of its abacus representation
separately. The lowest bead on the $i$-th ruler will have the position $j_i$, which is negative if the shift is
toward the negative positions (upwards), and positive otherwise. These numbers are the same that appear in our proof in \eqref{eq:z0coeff}, and they have to satisfy
$\sum_{i=0}^{n-1} j_i=0$.
The set $\{j_0,\dots,j_{n-1}\}$ completely determines the core Young diagram, so we get a bijection
\begin{equation*}\label{typeA-cores}
{\mathcal C} \longleftrightarrow \left\{\sum_{i=0}^{n-1} j_i=0\right\}\subset\SZ^{n}.\end{equation*}

The decomposition \eqref{eq:corequot} reveals the structure of the
formula of Theorem \ref{thm:coldiaggen}; the first term is the generating series of $n$-tuples of
(uncolored) partitions, whereas the second term is exactly a sum over
$\underline{j}=(j_0,\dots,j_{n-1})\in {\mathcal C}$, i.e. the multi variable generating series of the $n$-core Young diagrams (see the correspondence \eqref{eq:mjcorr} below).
\end{comment}

\section{Young walls of type \texorpdfstring{$D_n$}{Dn}}
\label{Dnidealsect}

\begin{comment}
\subsection{The binary dihedral group}
Fix an integer $n\geq 4$, and let~$\Delta$ be the root system of type $D_n$.
For $\varepsilon$ a fixed primitive $(2n-4)$-th root of unity, the corresponding subgroup
$G_\Delta$ of $SL(2,\SC)$ can be generated by the following two elements $\sigma$ and $\tau$:
\[ \sigma=
\begin{pmatrix}
\varepsilon & 0\\
0 & \varepsilon^{-1} \\
\end{pmatrix}, \qquad
\tau=\begin{pmatrix}
0 & 1\\
-1 & 0 \\
\end{pmatrix}.
\]
The group $G_\Delta$ has order $4n-8$, and is often called the binary dihedral group.
We label its irreducible representations as shown in Table \ref{dnchartable}. There is a distinguished
2-dimensional representation, the defining representation $\rho_{\mathrm{nat}}=\rho_2$.
See \cite{ito1999hilbert, decelis2008dihedral} for more detailed information.

We will often meet the involution on the set of representations of $G_\Delta$
which is given by tensor product with the sign representation
$\rho_1$: on the set of indices $\{0,\dots,n\}$, this is the involution $j\mapsto \kappa(j)$ which swaps $0$ and $1$ and $n-1$
and $n$, fixing other values $\{2,\dots, n-2\}$.
Given $j \in \{0,\dots,n\}$, we denote $\kappa(j,k)=\kappa^{kn}(j)$;
this is an involution which is nontrivial when $k$ and $n$ are odd, and trivial otherwise.
The special case $k=1$ will also be denoted as $\underline{j}=\kappa^n(j)$.

The following identities will be useful:
\begin{equation}
\label{eq:repstensor}
\rho_{n-1}^{\otimes 2} \cong \rho_{n}^{\otimes 2} \cong \rho_{\underline{0}}, \ \ \rho_{n-1} \otimes \rho_{n} \cong \rho_{\underline{1}}, \ \ \rho_1 \otimes \rho_{n-1} \cong \rho_{n}, \ \ \rho_1 \otimes \rho_{n} \cong \rho_{n-1}, \ \ \rho_1^{\otimes 2}\cong \rho_0.
\end{equation}

\begin{table}
\begin{center}
\begin{tabular}{|c|c c c|}
\hline
$\rho$ & $\mathrm{Tr}(1)$ & $\mathrm{Tr}(\sigma)$ & $\mathrm{Tr}(\tau)$ \\
\hline
$\rho_0$ & 1 & 1 & 1\\
$\rho_1$ & 1 & 1 & $-1$ \\
$\rho_2$ & 2 & $\varepsilon+\varepsilon^{-1} $ & 0\\
\vdots & & \vdots & \\
$\rho_{n-2}$ & 2 & $\varepsilon^{n-3}+\varepsilon^{-(n-3)} $ & 0\\
$ \rho_{n-1}$ & 1 & $-1$ & $-i^n$\\
$ \rho_{n}$ & 1 & $-1$ & $i^n$\\
\hline
\end{tabular}
\vspace{0.2in}
\caption{Labelling the representations of the group $G_\Delta$}
\label{dnchartable}
\end{center}
\end{table}
\end{comment}

It is known that when $\Delta=A_n$, $n\geq 1$, the Young wall $\mathcal{Z}_{\Delta}=\mathcal{P}$, the set of all Young diagrams/partitions equipped with the diagonal coloring (see \cite{gyenge2017enumeration}). We describe here the type $D$ analogue of the set of diagonally colored partitions used in type $A$, following \cite{kang2004crystal,kwon2006affine}.

First we define the {\em Young wall pattern of type
 $D_n$}.
This is the following infinite
pattern, consisting of two types of blocks: half-blocks carrying possible labels
$j\in\{0,1,n-1, n\}$, and full blocks carrying possible labels $1<j<n-1$:

\begin{center}
\begin{tikzpicture}[scale=0.6, font=\footnotesize, fill=black!20]
  \foreach \x in {1,2,3,4,5,6,7,8}
    {
      \draw (\x, 0) -- (\x,11+0.2);
    }
     \draw (0, 0) -- (0,12);
   \foreach \y in {1,2,3.5,4.5,5.5,6.5,8,9,10,11}
    {
         \draw (0,\y) -- (8.2,\y);
    }
    \draw (0,0) -- (9,0);
    \foreach \x in {0,1,2,3,4,5,6,7}
    {

    	\draw (\x,4.5) -- (\x+1,5.5);
    	\draw (\x,9) -- (\x+1,10);
    	\draw (\x+0.5,1.5) node {2};
    	\draw (\x+0.5,4) node {$n$$-$$2$};
    	\draw (\x+0.5,6) node {$n$$-$$2$};
    	\draw (\x+0.5,8.5) node {2};
    	\draw (\x+0.5,10.5) node {2};
    	\draw(\x+0.5,2.85) node {\vdots};
    	\draw(\x+0.5,7.35) node {\vdots};
    	\filldraw (\x,0) -- (\x+1,1) -- (\x+1,0) -- cycle ;
    }
     \foreach \x in {0,2,4,6}
        {
        	\draw (\x+0.25,0.65) node {0};
        	\draw (\x+0.75,0.35) node {1};
        	\draw (\x+0.49,5.28) node  {$n$$-$$1$};

        	\draw (\x+0.75,4.72) node {$n$};
        	\draw (\x+0.25,9.65) node {0};
        	\draw (\x+0.75,9.35) node {1};
        }
       \foreach \x in {1,3,5,7}
             {
             	\draw (\x+0.25,0.65) node {1};
             	\draw (\x+0.75,0.35) node {0};
             	\draw (\x+0.25,5.28) node {$n$};
             	\draw (\x+0.52,4.72) node {$n$$-$$1$};
             	\draw (\x+0.25,9.65) node {1};
             	\draw (\x+0.75,9.35) node {0};
             }

       \draw (9,5) node {\dots};
       \draw (4,12) node {\vdots};
\end{tikzpicture}
\end{center}

A {\em Young wall\footnote{In \cite{kang2004crystal,kwon2006affine}, these arrangements are called {\em proper Young walls}. Since we will not meet any other Young wall, we will drop the adjective {\em proper} for brevity.} of type $D_n$} is a
subset~$Y$ of the infinite Young wall of type $D_n$, satisfying the following rules.
\begin{enumerate}
\item[(YW1)] $Y$ contains all grey half-blocks, and a finite number of the white blocks and half-blocks.
\item[(YW2)] $Y$ consists of continuous columns of blocks, with no block placed on top of a missing block or half-block.
\item[(YW3)] Except for the leftmost column, there are no free
  positions to the left of any block or half-block. Here the rows of
  half-blocks are thought of as two parallel rows; only half-blocks of the same orientation have to be present.
\item[(YW4)] A full column is a column with a full block or both half-blocks present at its top; then no two full columns
have the same height\footnote{This is the properness condition of \cite{kang2004crystal}.}.
\end{enumerate}

Let $\CZ_\Delta$ denote the set of all Young walls of type $D_n$. For any $Y\in \CZ_\Delta$ and label $j\in \{0, \ldots, n\}$ let $wt_j(Y)$ be the number of white half-blocks, respectively blocks, of label $j$. These are collected into the multi-weight vector $\mathbf{wt}(Y)=(wt_0(Y), \ldots, wt_n(Y))$. The total weight of $Y$ is the sum
\[|Y|=\sum_{j=0}^{n} wt_j(Y),
\]
and for the formal variables $q_0,\dots,q_n$,
\[\mathbf{q}^{\mathbf{wt}(Y)}=\prod_{j=0}^{n}q_j^{wt_j(Y)}.\]
\begin{example}
\label{ex:ywall}
The following is an example of a Young wall for $\Delta=D_4$:
\begin{center}
\begin{tikzpicture}[scale=0.6, font=\footnotesize, fill=black!20]

\draw (0, 0) -- (0,8) -- (1,9)--(1,8);
\draw (1, 0) -- (1,8) -- (2,9)--(2,8);
\draw (2, 0) -- (2,8) -- (3,9)--(3,8);
\draw (3, 0) -- (3,8);
\draw (4, 0) -- (4,8) -- (0,8);
\draw (5, 0) -- (5,7) -- (0,7);
\draw (6, 0) -- (6,6) -- (0,6);
\draw (7, 0) -- (7,5) -- (0,5);
\draw (7, 5) -- (8,5);
\draw (8, 0) -- (8,4);
\draw (0, 4) -- (8,4);
\draw (0, 3) -- (8,3);
\draw (0, 2) -- (8,2);
\draw (0, 1) -- (8,1);
\draw (9, 0) -- (9.3,0);

\draw (0,0) -- (9,0);
\foreach \x in {0,1,2,3,4,5,6,7}
{

	\draw (\x,2) -- (\x+1,3);
	\draw (\x,4) -- (\x+1,5);
	\draw (\x+0.5,1.5) node {2};
	\draw (\x+0.5,3.5) node {2};
	\filldraw (\x,0) -- (\x+1,1) -- (\x+1,0) -- cycle ;
}
\filldraw (8,0) -- (9,1) -- (9,0) -- cycle ;
\draw (8.75,0.35) node {1};
\foreach \x in {0,2,4,6}
{
	\draw (\x+0.25,0.65) node {0};
	\draw (\x+0.75,0.35) node {1};
	\draw (\x+0.25,2.65) node {3};
\draw (\x+0.75,2.35) node {4};
	\draw (\x+0.25,4.65) node {0};
	\draw (\x+0.75,4.35) node {1};
}
\foreach \x in {1,3,5}
{
	\draw (\x+0.25,0.65) node {1};
	\draw (\x+0.75,0.35) node {0};
	\draw (\x+0.25,2.65) node {4};
\draw (\x+0.75,2.35) node {3};
	\draw (\x+0.25,4.65) node {1};
	\draw (\x+0.75,4.35) node {0};
}
	\draw (7.25,0.65) node {1};
\draw (7.75,0.35) node {0};
\draw (7.25,2.65) node {4};
\draw (7.75,2.35) node {3};
\draw (7.25,4.65) node {1};

\foreach \x in {0,2}
{
	\draw (\x+0.25,6.65) node {3};
	\draw (\x+0.75,6.35) node {4};
	\draw (\x+0.75,8.35) node {1};
	\draw (\x,6) -- (\x+1,7);
}
\draw (1.25,6.65) node {4};
\draw (1.75,6.35) node {3};
\draw (1.75,8.35) node {0};
\draw (3.25,6.65) node {4};
\draw (3.75,6.35) node {3};
\draw (1,6) -- (2,7);
\draw (3,6) -- (4,7);
\draw (4.25,6.65) node {3};
\draw (4.75,6.35) node {4};
\draw (4,6) -- (5,7);
\foreach \x in {0,1,2,3}
{

	\draw (\x+0.5,5.5) node {2};
	\draw (\x+0.5,7.5) node {2};
}
\draw (4.5,5.5) node {2};
\draw (5.5,5.5) node {2};
\draw (9.8,0.5) node {\dots};
\end{tikzpicture}
\end{center}
\end{example}

\section{Abacus combinatorics}
\label{sect:dnabacus}

Recalling the Young wall rules (YW1)-(YW4), it is clear that every $Y\in \CZ_\Delta$ can be decomposed as
$Y=Y_1 \sqcup Y_2$, where $Y_1\in \CZ_\Delta$ has full columns only, and $Y_2\in \CZ_\Delta$ has all its columns
ending in a half-block. These conditions define two subsets $\CZ^f_\Delta, \CZ^h_\Delta\subset \CZ_\Delta$.
Because of the Young wall rules, the pair $(Y_1, Y_2)$ uniquely reconstructs $Y$, so we get a bijection
\begin{equation}\label{decomp_D_YW}\CZ_\Delta \longleftrightarrow \CZ^f_\Delta\times \CZ^h_\Delta.\end{equation}

Given a Young wall $Y \in \mathcal{Z}_\Delta$ of type $D_n$, let $\lambda_k$ denote the number of
blocks (full or half blocks both contributing 1) in the $k$-th vertical
column. By the rules of Young walls, the resulting positive integers
$\{\lambda_1,\dots,\lambda_r\}$ form a partition $\lambda=\lambda(Y)$ of weight equal to the total weight $|Y|$,
with the additional property that
its parts $\lambda_k$ are distinct except when $\lambda_k \equiv 0\;\mathrm{mod}\; (n-1)$.
Corresponding to the decomposition~\eqref{decomp_D_YW}, we get a decomposition
$\lambda(Y) = \mu(Y)\sqcup \nu(Y)$. In $\mu(Y)$, no part is congruent to $0$ modulo $(n-1)$, and there
are no repetitions; all parts in $\nu(Y)$ are congruent to $0$ modulo $(n-1)$ and repetitions are allowed.
Note that the pair $(\mu(Y), \nu(Y))$ does almost, but not quite, encode $Y$, because of the ambiguity
in the labels of half-blocks on top of non-complete columns.

We now introduce another combinatorial object, \emph{the abacus of type
$D_n$} (\cite{kang2004crystal, kwon2006affine}).
This is the arrangement of positive integers, called positions, in the following pattern:

\vspace{.1in}
\begin{center}
\begin{tabular}{c c c c c c c c}
1 & \dots & $n-2$ & $n-1$ & $n$ & \dots & $2n-3$ & $2n-2$  \\
$2n-1$ & \dots & $3n-4$ & $3n-3$ & $3n-2$ & \dots & $4n-5$ & $4n-4$\\
\vdots & &\vdots & \vdots & \vdots& &\vdots & \vdots
\end{tabular}
\end{center}
\vspace{.1in}

For any integer $1 \leq k \leq 2n-2$, the set of positions in the $k$-th column of the abacus is the \emph{$k$-th
ruler}, denoted $R_k$. Several \emph{beads} are placed on these rulers. For $k \not\equiv 0\; \mathrm{mod}\; (n-1)$,
the rulers $R_k$ can only contain normal (uncolored) beads,
with each position occupied
by at most one bead. On the rulers $R_{n-1}$ and $R_{2n-2}$, the beads are colored white and black.
An arbitrary number of white or black beads can be put on each such position,
but each position can only contain beads of the same color.

Given a type $D_n$ Young wall $Y \in \mathcal{Z}_\Delta$, let $\lambda=\mu\sqcup \nu$ be the corresponding
partition with its decomposition. For each nonzero part $\nu_k$ of $\nu$, set
\[ n_k=\#\{1 \leq j \leq l(\mu)\;|\;\mu_j < \nu_k \}\]
to be the number of full columns shorter than a given non-full column.
The abacus configuration of the Young wall $Y$ is defined to be the set of beads placed at positions
$\lambda_1,\dots,\lambda_r$. The beads at positions $\lambda_k=\mu_j$ are uncolored; the
color of the bead at position $\lambda_k=\nu_l$ corresponding to a column $C$ of $Y$ is
\[
\begin{cases}
\textrm{white,} & \textrm{if the block at the top of } C \textrm{ is }
\begin{tikzpicture}
 \draw (0, 0) -- (0.3,0.3);
 \draw (0, 0) -- (0.3,0);
 \draw (0.3, 0) -- (0.3,0.3);
\end{tikzpicture}
\textrm{ and } n_l \textrm{ is even;} \\
\textrm{white,} & \textrm{if the block at the top of } C \textrm{ is }
\begin{tikzpicture}
 \draw (0, 0) -- (0.3,0.3);
 \draw (0, 0) -- (0,0.3);
 \draw (0, 0.3) -- (0.3,0.3);
\end{tikzpicture}
\textrm{ and } n_l \textrm{ is odd;}\\
\textrm{black,} & \textrm{if the block at the top of } C \textrm{ is }
\begin{tikzpicture}
 \draw (0, 0) -- (0.3,0.3);
 \draw (0, 0) -- (0,0.3);
 \draw (0, 0.3) -- (0.3,0.3);
\end{tikzpicture}
\textrm{ and } n_l \textrm{ is even;} \\
\textrm{black,} & \textrm{if the block at the top of } C \textrm{ is }
\begin{tikzpicture}
 \draw (0, 0) -- (0.3,0.3);
 \draw (0, 0) -- (0.3,0);
 \draw (0.3, 0) -- (0.3,0.3);
\end{tikzpicture}
\textrm{ and } n_l \textrm{ is odd.}\\
\end{cases}
\]
One can check that the abacus rules are satisfied, that all abacus configurations satisfying the above rules,
with finitely many uncolored, black and white beads, can arise, and that the Young wall $Y$ is uniquely determined
by its abacus configuration.

\begin{example} \label{ex:abacusY}
The abacus configuration associated with the Young wall  of Example \ref{ex:ywall} is
\begin{center}
\begin{tikzpicture}

\draw (0,5) node {$R_1$};
\draw (1,5) node {$R_{2}$};
\draw (2,5) node {$R_{3}$};
\draw (3,5) node {$R_{4}$};
\draw (4,5) node {$R_{5}$};
\draw (5,5) node {$R_{6}$};

\draw (-0.5,4.8) -- (5.5,4.8);
\draw (2.5,5.3) -- (2.5,2.5);
\draw (1.5,5.3) -- (1.5,2.5);
\draw (4.5,5.3) -- (4.5,2.5);
\draw (5.5,5.3) -- (5.5,2.5);

\node at ( 0,4.5)  {1};
\node at ( 1,4.5)  {2};
\node at ( 2,4.5)  {3};
\node at ( 3,4.5)  {4};
\node at ( 4,4.5)  {5};
\node at ( 5,4.5) [circle,draw,inner sep=0pt,minimum size=12pt,fill=gray!50] {6};
\node at ( 0,4) [circle,draw,inner sep=0pt,minimum size=12pt] {7};
\node at ( 1,4) [circle,draw,inner sep=0pt,minimum size=12pt] {8};
\node at ( 2,4) {9};
\node at ( 3,4) [circle,draw,inner sep=0pt,minimum size=12pt] {10};
\node at ( 4,4) [circle,draw,inner sep=0pt,minimum size=12pt] {11};
\node at ( 5,4) [circle,draw,inner sep=0pt,minimum size=12pt] {12};
\node at ( 5,4)  {$\phantom{1222}^3$};
\node at ( 0,3.5)  {13};
\node at ( 1,3.5)  {14};
\node at ( 2,3.5)  {15};
\node at ( 3,3.5)  {16};
\node at ( 4,3.5)  {17};
\node at ( 5,3.5)  {18};
\node at ( 0.5,3) {\vdots};
\node at ( 3.5,3) {\vdots};
\end{tikzpicture}
\end{center}
The superscript at 12 indicates that there are 3 white beads at that position.
\end{example}

We now introduce certain distinguished Young walls of type $D_n$, and
a method to obtain them with moving the beads on the abacus. On the Young wall side, define a {\em bar} to be a connected set of blocks
and half-blocks, with each half-block occurring once and each block occurring twice. A Young wall
$Y\in\mathcal{Z}_\Delta$ will be called a {\em core} Young wall, if no bar can be removed from it without
violating the Young wall rules. For an example of bar removal, see \cite[Example 5.1(2)]{kang2004crystal}. Let ${\mathcal C}_\Delta\subset\mathcal{Z}_\Delta$ denote the set of all
core Young walls.

Based on the calculations of \cite{kang2004crystal, kwon2006affine} the following result was obtained in \cite[Proposition 7.2]{gyenge2015euler}. For completeness we include also its proof.
\begin{proposition}
\label{prop:dncoredecomp}
Given a Young wall
$Y\in \mathcal{Z}_\Delta$, any complete sequence of bar removals through Young walls results in the same
core $\mathrm{core}(Y)\in {\mathcal C}_\Delta$, defining a map of sets
\[ \mathrm{core}\colon \mathcal{Z}_\Delta\to {\mathcal C}_\Delta.\]
The process can be described on the abacus, respects the decomposition~\eqref{decomp_D_YW}, and results
in a bijection
\begin{equation} \CZ_\Delta  \longleftrightarrow  {\mathcal P}^{n+1}  \times  \CC_\Delta\label{Dpart_biject}\end{equation}
where ${\mathcal P}$ is the set of ordinary partitions.
Finally, there is also a bijection
\begin{equation}\label{Dcore_biject} \CC_\Delta\longleftrightarrow \SZ^n.\end{equation}
\end{proposition}
\begin{proof} Decompose $Y$ into a pair of Young walls $(Y_1, Y_2)$ as above. Let us first consider $Y_1$.
On the corresponding rulers $R_k$, $k \not\equiv 0\; \textrm{ mod}\; (n-1)$,
the following steps correspond to bar removals \cite[Lemma 5.2]{kang2004crystal}.
\begin{enumerate}
 \item[(B1)] If $b$ is a bead at position $s>2n-2$, and there is no bead at position $(s-2n+2)$, then move $b$
one position up and switch the color of the beads at
positions $k$ with $k \equiv 0\; \textrm{ mod}\; (n-1)$, $s-2n+2 < k < s$.
 \item[(B2)] If $b$ and $b'$ are beads at position $s$ and $2n-2-s$ ($1 \leq s \leq n-2$) respectively, then
remove $b$ and $b'$ and switch the color of the beads
at positions $k \equiv 0\; \textrm{ mod}\; (n-1), s< k < 2n-2-s$.
\end{enumerate}
Performing these steps as long as possible results in a configuration of beads on the rulers $R_k$ with
$k \not\equiv 0\; \textrm{ mod}\; (n-1)$ with no gaps from above, and for $1 \leq s \leq n-2$, beads on only one
of $R_s$, $R_{2n-2-s}$. This final configuration can be uniquely described by an ordered set of
integers $\{z_1, \ldots, z_{n-2}\}$, $z_s$ being the number of beads on $R_s$ minus the number of beads
on $R_{2n-2-s}$ \cite[Remark 3.10(2)]{kwon2006affine}. In the correspondence \eqref{Dcore_biject} this gives $\SZ^{n-2}$. It turns out that the reduction steps in this part of the algorithm can be encoded
by an $(n-2)$-tuple of ordinary partitions, with the summed weight of these
partitions equal to the number of bars removed \cite[Theorem 5.11(2)]{kang2004crystal}.

Let us turn to $Y_2$, represented on the rulers $R_k$, $k \equiv 0\; \textrm{ mod}\; (n-1)$.
On these rulers the following steps correspond to bar removals \cite[Sections 3.2 and 3.3]{kwon2006affine}.
\begin{enumerate}
\item[(B3)] Let $b$ be a bead at position $s\geq 2n-2$. If there is no bead at position $(s-n+1)$, and the beads at position $(s-2n+2)$ are of the same color as $b$, then shift $b$ up to position $(s-2n+2)$.
 \item[(B4)] If $b$ and $b'$ are beads at position $s\geq n-1$, then move them up to position $(s-n+1)$. If $s-n+1>0$ and this position already contains beads, then $b$ and $b'$ take that same color.
\end{enumerate}
During these steps, there is a boundary condition: there is an imaginary position $0$ in the rightmost column,
which  is considered to contain invisible white beads; placing a bead there means
that this bead disappears from the abacus.
It turns out that the reduction steps in this part of the algorithm can be described
by a triple of ordinary partitions, again with the summed weight of these
partitions equal to the number of bars removed \cite[Proposition 3.6]{kwon2006affine}. On the other hand, the final result can be encoded by a pair of ordinary partitions, or Young diagrams, which have the additional property of being a pyramid.

The different bar removal steps (B1)-(B4) construct the map $c$ algorithmically and uniquely. The stated
facts about parameterizing the steps prove the existence of the bijection~\eqref{Dpart_biject}.
To complete the proof of~\eqref{Dcore_biject}, we only need to remark further that the set
of ordinary Young diagrams having the shape of a pyramid is in bijection with the set of integers.
(see \cite[Remark 3.10(2)]{kwon2006affine}). This gives the remaining $\SZ^{2}$ factor in the bijection \eqref{Dcore_biject}.
\end{proof}

\begin{example}
A possible sequence of bar removals on the abacus and Young wall of Examples \ref{ex:ywall} and \ref{ex:abacusY} is as follows. Perform step (B1) on the beads at positions 7, 8, 10, 11. Perform step (B2) on the pairs of beads at positions (1,5) and (2,4). Perform step (B4) four times on two beads at position 12 by moving them consecutively to positions 9, 6 (where they take the color black), 3 and then 0 (which means removing them from the abacus). The resulting abacus configuration is then
\begin{center}
\begin{tikzpicture}

\draw (0,5) node {$R_1$};
\draw (1,5) node {$R_{2}$};
\draw (2,5) node {$R_{3}$};
\draw (3,5) node {$R_{4}$};
\draw (4,5) node {$R_{5}$};
\draw (5,5) node {$R_{6}$};

\draw (-0.5,4.8) -- (5.5,4.8);
\draw (2.5,5.3) -- (2.5,3);
\draw (1.5,5.3) -- (1.5,3);
\draw (4.5,5.3) -- (4.5,3);
\draw (5.5,5.3) -- (5.5,3);

\node at ( 0,4.5)  {1};
\node at ( 1,4.5)  {2};
\node at ( 2,4.5)  {3};
\node at ( 3,4.5)  {4};
\node at ( 4,4.5)  {5};
\node at ( 5,4.5) [circle,draw,inner sep=0pt,minimum size=12pt,fill=gray!50] {6};
\node at ( 0,4) {7};
\node at ( 1,4) {8};
\node at ( 2,4) {9};
\node at ( 3,4) {10};
\node at ( 4,4) {11};
\node at ( 5,4) [circle,draw,inner sep=0pt,minimum size=12pt] {12};
\node at ( 0.5,3.5) {\vdots};
\node at ( 3.5,3.5) {\vdots};
\end{tikzpicture}
\end{center}
This configuration describes the following core Young wall:
\begin{center}
	\begin{tikzpicture}[scale=0.6, font=\footnotesize, fill=black!20]

	\draw (0, 0) -- (0,8) -- (1,9)--(1,0);
	\draw (2,5)--(1,5);
	\draw (0, 8) -- (1,8);
	\draw (0, 7) -- (1,7);
	\draw (0, 6) -- (1,6);
	\draw (0, 5) -- (1,5);
	\draw (0, 4) -- (2,4);
	\draw (0, 3) -- (2,3);
	\draw (0, 2) -- (2,2);
	\draw (0, 1) -- (2,1);
	\draw (2, 0) -- (2,4);

	\draw (0,0) -- (3.3,0);
	\foreach \x in {0,1}
	{

		\draw (\x,2) -- (\x+1,3);
		\draw (\x,4) -- (\x+1,5);
		\draw (\x+0.5,1.5) node {2};
		\draw (\x+0.5,3.5) node {2};
		\filldraw (\x,0) -- (\x+1,1) -- (\x+1,0) -- cycle ;
	}
	\filldraw (2,0) -- (3,1) -- (3,0) -- cycle ;
	\filldraw (1,0) -- (2,1) -- (2,0) -- cycle ;
	\draw (2.75,0.35) node {1};
	\foreach \x in {0}
	{
		\draw (\x+0.25,0.65) node {0};
		\draw (\x+0.75,0.35) node {1};
		\draw (\x+0.25,2.65) node {3};
		\draw (\x+0.75,2.35) node {4};
		\draw (\x+0.25,4.65) node {0};
		\draw (\x+0.75,4.35) node {1};
	}
	\draw (1.25,0.65) node {1};
	\draw (1.75,0.35) node {0};
	\draw (1.25,2.65) node {4};
	\draw (1.75,2.35) node {3};

	\draw (1.25,4.65) node {1};

	\foreach \x in {0}
	{
		\draw (\x+0.25,6.65) node {3};
		\draw (\x+0.75,6.35) node {4};

		\draw (\x+0.75,8.35) node {1};
		\draw (\x,6) -- (\x+1,7);
	}

	\foreach \x in {0}
	{

		\draw (\x+0.5,5.5) node {2};
		\draw (\x+0.5,7.5) node {2};
	}
	\draw (3.8,0.5) node {\dots};

	\end{tikzpicture}
\end{center}
\end{example}

\section{Enumeration of Young walls}
\label{seq:enumyw}

We next determine the multi-weight of a Young wall $Y$ in terms
of the bijections \eqref{Dpart_biject}-\eqref{Dcore_biject}.
The quotient part is easy: the multi-weight of each bar is $(1,1,2,\ldots, 2, 1,1)$,
so the $(n+1)$-tuple of partitions contributes a factor of
\[ \left(\prod_{m=1}^{\infty}(1-q^m)^{-1}\right)^{n+1}. \]
Turning to
cores, under the bijection $\CC_\Delta\leftrightarrow \SZ^n$, the total weight of a core Young wall $Y\in \CC_\Delta$ corresponding
to $(z_1, \ldots, z_n)\in\SZ^n$ is calculated in \cite[Remark 3.10]{kwon2006affine}:
\begin{equation}
\label{eq:dncoreweight}
|Y|=\frac{1}{2}\sum_{i=1}^{n-2} \left((2n-2)z_i^2-(2n-2i-2)z_i\right)+(n-1)\sum_{i=n-1}^n\left(2z_{i}^2+z_{i}\right).
\end{equation}
The next result gives a refinement of this formula for the multi-weight of $Y$.
\begin{theorem}
\label{thm:orbiserdn}
Let $q=q_0q_1q_2^2\dots q_{n-2}^2q_{n-1}q_n$, corresponding to a single bar.
\begin{enumerate}
\item Composing the bijection~\eqref{Dcore_biject} with an appropriate $\SZ$-change of coordinates in the lattice~$\SZ^n$,
the multi-weight of a core Young wall $Y\in\CC_\Delta$ corresponding to an element $\mathbf{m}=(m_1,\dots,m_n) \in \SZ^n$
can be expressed as
\[q_1^{m_1}\cdot\dots\cdot q_n^{m_n}(q^{1/2})^{\mathbf{m}^\top \cdot C \cdot \mathbf{m}},\]
where $C$ is the Cartan matrix of type $D_n$.

\item The multi-weight generating series
\[ Z_{\Delta}(q_0,\dots,q_n) = \sum_{Y\in \CZ_\Delta} \mathbf{q}^{\mathbf{wt}(Y)}\]
of Young walls for $\Delta$ of type $D_n$ can be written as
\begin{equation*} Z_{\Delta}(q_0,\dots,q_n)=\frac{\displaystyle\sum_{ \mathbf{m}=(m_1,\dots,m_n) \in \SZ^n }^\infty q_1^{m_1}\cdot\dots\cdot q_n^{m_n}(q^{1/2})^{\mathbf{m}^\top \cdot C \cdot \mathbf{m}}}{\displaystyle\prod_{m=1}^{\infty}(1-q^m)^{n+1}}.
\end{equation*}

\item The following identity is satisfied between the coordinates $(m_1,\dots,m_n)$ and $(z_1, \ldots, z_n)$ on~$\SZ^n$:
\begin{equation*}
\sum_{i=1}^n m_i = -\sum_{i=1}^{n-2}(n-1-i)z_i-(n-1)c(z_{n-1}+z_n)-(n-1)b.
\end{equation*}
Here $z_1+\dots+z_{n-2}=2a-b$ for integers $a \in \SZ$, $b \in \{0,1\}$, and $c=2b-1 \in \{-1,1\}$.
\end{enumerate}
\end{theorem}

Statement (2) clearly follows from (1) and the discussion preceding Theorem \ref{thm:orbiserdn}.  Statement (3) is used to achieve additional results in \cite{gyenge2015euler}.

Let us write $z_I=\sum_{i \in I}z_i$ for $I\subseteq\{1,\dots,n-2\}$. Each such number decomposes uniquely as $z_I=2a_I-b_I$, where $a_I \in \SZ$ and $b_I \in \{0,1\}$. Let us introduce also $c_I=2b_I-1 \in \{-1,1\}$. We will make use of the relations
\[a_I=\sum_{i\in I}a_i-\sum_{i_1\in I, i_2 \in I\setminus\{i_1\}}b_{i_1}b_{i_2}+\sum_{i_1\in I, i_2 \in I\setminus\{i_1\},i_3 \in I\setminus\{i_1,i_2\}}2b_{i_1}b_{i_2}b_{i_3}-\dots\;, \]
\[b_I=\sum_{i\in I}b_i-\sum_{i_1\in I, i_2 \in I\setminus\{i_1\}}2b_{i_1}b_{i_2}+\sum_{i_1\in I, i_2 \in I\setminus\{i_1\},i_3 \in I\setminus\{i_1,i_2\}}4b_{i_1}b_{i_2}b_{i_3}-\dots\;. \]
To simplify notations let us introduce
\[r_I:=a_I-\sum_{i\in I}a_i=-\sum_{i_1\in I, i_2 \in I\setminus\{i_1\}}b_{i_1}b_{i_2}+\sum_{i_1\in I, i_2 \in I\setminus\{i_1\},i_3 \in I\setminus\{i_1,i_2\}}2b_{i_1}b_{i_2}b_{i_3}-\dots\;.\]

Using these notations the colored refinement of the weight formula \eqref{eq:dncoreweight} is the following.
\begin{lemma}
\label{lem:dncorecolorweight}
Given a core Young wall $Y\in\CC_\Delta$ corresponding to $(z_i)\in \SZ^n$ in the bijection of~\eqref{Dcore_biject},
its content is given by the formula
\begin{gather*}
\mathbf{q}^{\mathbf{wt}(Y)}=q_1^{-\sum_{i=1}^{n-2}b_i}q_2^{-2a_1-\sum_{i=2}^{n-2}b_i}\dots q_{n-2}^{-\sum_{i=1}^{n-3}2a_i-b_{n-2}}(q_0q_1^{-1}q_{n-1}q_n)^{-\sum_{i=1}^{n-2}a_i} (q_0q_1^{-1})^{a_{1\dots n-2}}\\
\cdot q^{\frac{1}{2}\sum_{i=1}^{n-2}(z_i^2+b_i)+z_{n-1}^2+z_n^2 } \\\cdot (q^{b_{1\dots n-2}} (q_1^{-1}\dots q_{n-2}^{-1} q_{n-1}^{-1})^{c_{1\dots n-2}})^{z_{n-1}}(q^{b_{1\dots n-2}} (q_1^{-1}\dots q_{n-2}^{-1} q_{n}^{-1})^{c_{1\dots n-2}})^{z_{n}}.
\end{gather*}
\end{lemma}
When forgetting the coloring a straightforward check shows that Lemma \ref{lem:dncorecolorweight} gives back \eqref{eq:dncoreweight}. Notice also that $z_i^2+b_i=4a_i^2-4a_ib_i+2b_i$ is always an even number, so the exponents are always integers.
\begin{proof}[Proof of Lemma \ref{lem:dncorecolorweight}]
Suppose that we restrict our attention to blocks of color $i$ by substituting $q_j=1$ for $j\neq i$.
Clearly,
\[ wt_i(Y) \leq \sum_j wt_j(Y) =|Y| \]
where $|Y|$ is the total weight of $Y$.
This inequality is true for each $0\leq i \leq n$, and $|Y|$ is a linear combination of the parameters $\{z_i\}_{1 \leq i \leq n}$, their squares and a constant.
It follows from the definition of the $\{z_i\}_{1\leq i \leq n}$ that each $wt_i$
is a convex, increasing function of them. These imply that, when considered over the reals, each
$wt_i$ are at most quadratically growing, convex analytic functions of $\{z_i\}_{1\leq i \leq n}$. As
a consequence, each $wt_i$ is again a linear combination of constants, the parameters $\{z_i\}_{1\leq i \leq n}$ and
their products. It is enough to check that the claimed formula is correct in two cases:
\begin{enumerate}
\item when any of the $z_i$'s is set to a given number and the others are fixed to 0; and
\item when all of the parameters are fixed to 0 except for an arbitrary pair $z_i$ and $z_j$, $i\neq j$.
\end{enumerate}

First, consider that $z_i\neq 0$ for a fixed $i$, and $z_j=0$ in case $j\neq i$.
\begin{enumerate}
\item[(a)] When $1 \leq i \leq n-2$, then the colored weight of the corresponding core Young wall is
\[(q_1 \dots q_i)^{-b_i}(q_{i+1}^2 \dots q_{n-2}^2q_{n-1}q_n)^{-a_i}q^{2a_i^2-2a_ib_i+b_i}\;.\]
\item[(b)] When $i \in \{n-1, n\}$, then the associated core Young wall has colored weight
\[q^{z_i^{2}}(q_1 q_2\dots q_{n-2} q_{i})^{z_i}\;.\]
\end{enumerate}
Both of these follow from (\ref{eq:dncoreweight}) and its proof in \cite{kwon2006affine} by taking into account the colors of the blocks in the pattern.

Second, assume that $z_i$ and $z_j$ are nonzero, but everything else is zero. Then the total weight is not the product of the two individual weights, but some correction term has to be introduced. The particular cases are:
\begin{enumerate}
\item[(a)] $1 \leq i,j \leq n-2$. There can only be a difference in the numbers of $q_0$'s and $q_1$'s which comes from the fact that in the first row there are only half blocks with 0's in the odd columns and 1's in the even columns. Exactly $-r_{ij}$ blocks change color from 0 to 1 when both $z_i$ and $z_j$ are nonzero compared to when one of them is zero. In general, this gives the correction term $(q_0q_1^{-1})^{r_{1\dots n-2}}=(q_0q_1^{-1})^{a_{1\dots n-2}-\sum_{i=1}^{n-2}a_i}$.
\item[(b)] $1 \leq i \leq n-2$, $j \in \{n-1,n\}$. For the same reason as in the previous case the parity of $z_i$ modifies the colored weight of the contribution of $z_j$, but not the total weight of it. If $z_i$ is even, then the linear term of the contribution of $z_j$ is $q_1 q_2\dots q_{n-2} q_{j}$. In the odd case it is $q_0 q_2\dots q_{n-2} q_{\kappa(j)}$. This is encoded in the correction term $(q^{b_{1\dots n-2}} (q_1^{-1}\dots q_{n-2}^{-1} q_{j}^{-1})^{c_{1\dots n-2}})^{z_j}$.
\item[(c)] $i=n-1$, $j=n$. $z_{n-1}$ and $z_{n}$ count into the total colored weight completely independently, so no correction term is needed.
\end{enumerate}

Putting everything together gives the claimed formula for the colored weight of an arbitrary core Young wall.

\end{proof}

Now we turn to the proof of Theorem \ref{thm:orbiserdn}. After recollecting the terms in the formula of Lemma \ref{lem:dncorecolorweight} it becomes
\begin{gather*}q_1^{-b_{1\dots n-2}-c_{1\dots n-2}(z_{n-1}+z_n)}\prod_{i=2}^{n-2}q_i^{-2a_{1\dots i-1}+c_{1\dots i-1}b_{i\dots n-2}-c_{1\dots n-2}(z_{n-1}+z_n)} \\
\cdot q_{n-1}^{-a_{1\dots n-2}-c_{1\dots n-2}z_{n-1}}q_{n}^{-a_{1\dots n-2}-c_{1\dots n-2}z_{n}} \\
\cdot q^{\sum_{i=1}^{n-2} (2a_i^2-2a_ib_i+b_i)+b_{1\dots n-2} z_{n-1}+z_{n-1}^2+b_{1\dots n-2} z_{n}+z_{n}^2+r_{1\dots n-2}}
\end{gather*}

Let us define the following series of integers:
\[
\begin{array}{r c l}
m_1 & = & -b_{1\dots n-2}-c_{1\dots n-2}(z_{n-1}+z_n)\;, \\
m_2 & = & -2a_1+c_1b_{2\dots n-2}-c_{1\dots n-2}(z_{n-1}+z_n)\;, \\
& \vdots & \\
m_{n-2} & = & -2a_{1 \dots n-3}+c_{1\dots n-3}b_{n-2}-c_{1\dots n-2}(z_{n-1}+z_n)\;, \\
m_{n-1} & = & -a_{1 \dots n-2}-c_{1\dots n-2}z_{n-1}\;, \\
m_{n} & = & -a_{1 \dots n-2}-c_{1\dots n-2}z_n \;.
\end{array}
\]
It is an easy and enlightening task to verify that the map
\[ \SZ^n \rightarrow \SZ^n, \quad (z_1,\dots,z_n) \mapsto (m_1,\dots,m_n)\]
is a bijection, which is left to the reader.

\begin{proof}[Proof of Theorem \ref{thm:orbiserdn}] (1): One has to check that
\begin{multline*} \sum_{i=1}^n m_i^2-m_1m_2-m_2m_3-\dots-m_{n-2}(m_{n-1}+m_n)=\\
=\sum_{i=1}^{n-2} (2a_i^2-2a_ib_i+b_i)+b_{1\dots n-2} z_{n-1}+z_{n-1}^2+b_{1\dots n-2} z_{n}+z_{n}^2+r_{1\dots n-2}\;.
\end{multline*}

The terms containing $z_{n-1}$ or $z_n$ on the left hand side are
\begin{gather*}  (n-2)(z_{n-1}+z_n)^2+z_{n-1}^2+z_n^2-(n-3)(z_{n-1}+z_n)^2-z_{n-1}^2-z_n^2-2 z_{n-1}z_n\\
+\left(2b_{1\dots n-2}+\sum_{i=1}^{n-3}2(2a_{1 \dots i}-c_{1\dots i}b_{i+1 \dots n-2})+2a_{1 \dots n-2}\right)c_{1\dots n-2}(z_{n-1}+z_n)\\
-\left(b_{1\dots n-2}+\sum_{i=1}^{n-3}2(2a_{1 \dots i}-c_{1\dots i}b_{i+1 \dots n-2})+2a_{1 \dots n-2}\right)c_{1\dots n-2}(z_{n-1}+z_n)\\
=b_{1\dots n-2} z_{n-1}+z_{n-1}^2+b_{1\dots n-2} z_{n}+z_{n}^2\;,
\end{gather*}
since $b_{1\dots n-2}c_{1\dots n-2}=b_{1\dots n-2}$.

The terms containing neither $z_{n-1}$ nor $z_n$ on the left hand side are
\begin{gather*}
b_{1\dots n-2}+\sum_{i=1}^{n-3}(2a_{1 \dots i}-c_{1\dots i}b_{i+1 \dots n-2})^2+2a_{1 \dots n-2}^2 -b_{1\dots n-2}(2a_1-c_1b_{2\dots n-2}) \\
-\sum_{i=1}^{n-4}(2a_{1 \dots i}-c_{1\dots i}b_{i+1 \dots n-2})(2a_{1 \dots i+1}-c_{1\dots i+1}b_{i+2 \dots n-2}) \\
-2(2a_{1 \dots n-3}-c_{1\dots n-3}b_{n-2})a_{1 \dots n-2}\;.
\end{gather*}
\begin{lemma}
\label{lem:abc}
\[ 2a_{1 \dots i}-c_{1\dots i}b_{i+1 \dots n-2}=\sum_{j=1}^{i}(2a_{j}-b_{j})+b_{1 \dots n-2}\;,\]
\end{lemma}
\begin{proof}
\begin{gather*} 2a_{1 \dots i}-c_{1\dots i}b_{i+1 \dots n-2} \\ =2a_{1\dots i-1}+2a_{i}-2b_{1\dots i-1}b_{i}+c_{1\dots i-1}c_{i}b_{i+1 \dots n-2} \\
=2a_{1\dots i-1}+2a_{i}-2b_{1\dots i-1}b_{i}+2c_{1\dots i-1}b_{i}b_{i+1 \dots n-2}-c_{1\dots i-1}b_{i+1 \dots n-2} \\
=2a_{1\dots i-1}+2a_{i}-b_{i}-c_{1\dots i-1}(b_{i+1 \dots n-2}+b_{i}-2b_{i}b_{i+1 \dots n-2})\\
= 2a_{1\dots i-1}-c_{1\dots i-1}b_{i \dots n-2}+2a_{i}-b_{i}\;,
\end{gather*}
and then use induction.
\end{proof}

Applying Lemma \ref{lem:abc} and the last intermediate expression in its proof to the terms considered above, they simplify to
\begin{gather*}
b_{1\dots n-2}+\sum_{i=1}^{n-3}(2a_{1 \dots i}-c_{1\dots i}b_{i+1 \dots n-2})^2+2a_{1 \dots n-2}^2 -b_{1\dots n-2}(2a_1-c_1b_{2\dots n-2}) \\
-\sum_{i=1}^{n-4}(2a_{1 \dots i}-c_{1\dots i}b_{i+1 \dots n-2})(2a_{1\dots i}-c_{1\dots i}b_{i+1 \dots n-2}+2a_{i+1}-b_{i+1})\\
-2(2a_{1 \dots n-3}-c_{1\dots n-3}b_{n-2})a_{1 \dots n-2} \\
=b_{1\dots n-2}+(2a_{1 \dots n-3}-c_{1\dots n-3}b_{n-2})^2+2a_{1 \dots n-2}^2 -b_{1\dots n-2}(2a_1-c_1b_{2\dots n-2}) \\
-\sum_{i=1}^{n-4}(2a_{1 \dots i}-c_{1\dots i}b_{i+1 \dots n-2})(2a_{i+1}-b_{i+1})-2(2a_{1 \dots n-3}-c_{1\dots n-3}b_{n-2})a_{1 \dots n-2} \\
=b_{1\dots n-2}+(2a_{1 \dots n-3}-c_{1\dots n-3}b_{n-2})(2a_{1 \dots n-3}-c_{1\dots n-3}b_{n-2}-2a_{1 \dots n-2})\\
+2a_{1 \dots n-2}^2 -b_{1\dots n-2}(2a_1-c_1b_{2\dots n-2})-\sum_{i=1}^{n-4}(2a_{1 \dots i}-c_{1\dots i}b_{i+1 \dots n-2})(2a_{i+1}-b_{i+1})\\
=b_{1\dots n-2}+2a_{1 \dots n-2}^2 -b_{1\dots n-2}(2a_1-c_1b_{2\dots n-2}) \\
-\sum_{i=1}^{n-3}(2a_{1 \dots i}-c_{1\dots i}b_{i+1 \dots n-2})(2a_{i+1}-b_{i+1}) \\
=2a_{1 \dots n-2}^2 -b_{1\dots n-2}(2a_1-b_1)-\sum_{i=1}^{n-3}\left(\sum_{j=1}^{i}(2a_{j}-b_{j})+b_{1 \dots n-2}\right)(2a_{i+1}-b_{i+1})\;.
\end{gather*}
Let us denote this expression temporarily as $s_{n-2}$. Taking into account that
\[a_{1 \dots n-2}=a_{1\dots n-3}+a_{n-2}-b_{1 \dots n-3}b_{n-2}\;,\]
\[b_{1 \dots n-2}=b_{1\dots n-3}+b_{n-2}-2b_{1 \dots n-3}b_{n-2}\;,\]
$s_{n-2}$ can be rewritten as
\begin{gather*}
2a_{1\dots n-3}^2+2a_{n-2}^2+2b_{1\dots n-3}b_{n-2}+4a_{1\dots n-3}a_{n-2} \\
-4a_{1\dots n-3}b_{1\dots n-3}b_{n-2}-4a_{n-2}b_{1\dots n-3}b_{n-2}\\
-(b_{1\dots n-3}+b_{n-2}-2b_{1\dots n-3}b_{n-2})(2a_1-b_1) \\
-\sum_{i=1}^{n-4}\left(\sum_{j=1}^{i}(2a_{j}-b_{j})+b_{1 \dots n-3}\right)(2a_{i+1}-b_{i+1})\\
-\sum_{i=1}^{n-3}(b_{n-2}-2b_{1\dots n-3}b_{n-2})(2a_{i+1}-b_{i+1})\\
-\left(\sum_{j=1}^{n-3}(2a_{j}-b_{j})+b_{1 \dots n-3}\right)(2a_{n-2}-b_{n-2})\\
=s_{n-3}+2a_{n-2}^2+2b_{1\dots n-3}b_{n-2}+4a_{1\dots n-3}a_{n-2} \\
-4a_{1\dots n-3}b_{1\dots n-3}b_{n-2}-4a_{n-2}b_{1\dots n-3}b_{n-2}\\
-(b_{n-2}-2b_{1\dots n-3}b_{n-2})\left(\sum_{i=1}^{n-2}2a_i-b_i \right)-\left( \sum_{j=1}^{n-3}(2a_j-b_j)+b_{1\dots n-3}\right)(2a_{n-2}-b_{n-2})\\
=s_{n-3}+2a_{n-2}^2-2a_{n-2}b_{n-2}+b_{n-2}+2a_{n-2}\left(2a_{1\dots n-3}-\sum_{j=1}^{n-3}(2a_j-b_j)\right)\\
+b_{1\dots n-3}b_{n-2}-2a_{n-2}b_{1\dots n-3}\\
=s_{n-3}+2a_{n-2}^2-2a_{n-2}b_{n-2}+b_{n-2}-b_{1\dots n-3}b_{n-2}\;,
\end{gather*}
where at the last equality the identity $\sum_{j=1}^{n-3}(2a_j-b_j)=z_{1\dots n-3}=2a_{1\dots n-3}-b_{1\dots n-3}$ was used.

It can be checked that $s_1=2a_{1}^2-2a_{1}b_{1}+b_{1}$, so induction shows that
\[s_{n-2}=\sum_{i=1}^{n-2} (2a_i^2-2a_ib_i+b_i+b_{1\dots i-1}b_{i})\;.\]
It remains to show that
\[\sum_{i=2}^{n-2}b_{1\dots i-1}b_{i}=r_{1\dots n-2}\;,\]
which requires another induction argument, and is left to the reader.

(3): Apply Lemma \ref{lem:abc} on
\[\sum_{i=1}^n m_i = -b_{1\dots n-2}-\sum_{i=1}^{n-2}(2a_{1 \dots i-1}-c_{1 \dots i-1}b_{i \dots n-2})-2a_{1\dots n-2}-(n-1)c_{1\dots n-2}(z_{n-1}+z_{n}).\]

\end{proof}

\begin{comment}


\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.