---
title: Quantum Shadow Enumerators
url: https://www.emergentmind.com/topics/quantum-shadow-enumerators
type: topic
---

# Quantum Shadow Enumerators

Searching arXiv for the cited papers and closely related work on quantum shadow enumerators.
Quantum shadow enumerators are quantum weight enumerators that encode alternating-sign combinations of subsystem-overlap or correlation data and impose positivity constraints on multipartite states and quantum codes. Across the literature, they appear in several equivalent or closely related forms: as Rains’ shadow coefficients indexed by subsets \(T\subseteq[n]\), as weight-indexed coefficients such as \((e)_g\), \(\tilde a_i\), or \(D_j\), and, in mixed-dimensional settings, as multiset-indexed coefficients \(S_{\mathbf w}\) [2406.18280]. Their importance is twofold. On the one hand, they are linearly related to Shor–Laflamme enumerators, sector lengths, and averaged subsystem purities, so they are part of the algebraic infrastructure of quantum coding theory and multipartite entanglement [2507.12680]. On the other hand, several recent works give them direct operational meaning: each normalized shadow enumerator can be realized as a measurement probability in a parallelized SWAP test, and weight-indexed shadow enumerators can be measured as triplet-count probabilities in two-copy Bell sampling [2408.16914].

## 1. Definitions, normalizations, and basic objects

Quantum shadow enumerators are defined in multiple but structurally related conventions. For positive operators \(M,N\) on an \(n\)-partite system, one form recalled in recent work is
\[
S_T(M,N)=\sum_{S\subseteq [n]} (-1)^{|S\cap T|} \operatorname{Tr}\!\big(\operatorname{Tr}_{S^c}(M)\,\operatorname{Tr}_{S^c}(N)\big),
\]
with normalized state version
\[
s_T(\rho,\sigma)=\frac{1}{2^n}\sum_{S\subseteq[n]}(-1)^{|S\cap T|}\operatorname{Tr}(\rho_S\sigma_S),
\]
and the shadow inequality \(s_T(\rho,\sigma)\ge 0\) [2406.18280].

In the multiqubit Pauli-expansion formalism, the same structure is expressed through sector lengths. For an \(N\)-qubit state \(\rho\), the Pauli coefficients are \(x_{\boldsymbol\mu}=\operatorname{Tr}(\rho\,\sigma_{\boldsymbol\mu})\), and the sector lengths are
\[
S_m=\sum_{wt(\sigma_{\boldsymbol\mu})=m}x_{\boldsymbol\mu}^2.
\]
The corresponding quantum shadow enumerators are
\[
(e)_g(\rho)=\frac{1}{2^N}\sum_{m=0}^N(-1)^m K_g(m,N)\,S_m(\rho)\ge 0,
\]
where \(K_g(m,N)\) are Kravchuk polynomials [2507.12680].

A third common convention is weight-indexed and Bell-sampling oriented. For an \(n\)-qubit state \(\rho\), one defines the spin-flipped state
\[
\tilde\rho=Y^{\otimes n}\rho^*Y^{\otimes n},
\]
and the shadow coefficients
\[
\tilde a_i[\rho]=\frac{1}{2^n}\sum_{\substack{P\in\{I,X,Y,Z\}^{\otimes n}\\ \mathrm{wt}(P)=i}}\operatorname{Tr}[\rho P\tilde\rho P].
\]
The same paper places these alongside the Shor–Laflamme coefficients
\[
a_i[\rho]=\frac{1}{2^n}\sum_{\substack{P\in\{I,X,Y,Z\}^{\otimes n}\\ \mathrm{wt}(P)=i}}\operatorname{Tr}[\rho P]^2
\]
and the averaged purity distribution
\[
a'_i[\rho]=\frac{1}{\binom ni}\sum_{\substack{S\subseteq\{1,\ldots,n\}\\ |S|=i}}\operatorname{Tr}[\rho_S^2]
\]
[2408.16914].

For quantum codes with projector \(P\), another standard convention is
\[
\tilde P=\sum_{\alpha\in E_n}(-1)^{\mathrm{wt}(\alpha)}\alpha P\alpha
=\sigma_y^{\otimes n}\overline P\,\sigma_y^{\otimes n},
\]
and
\[
D_j=
\begin{cases}
\displaystyle \frac{1}{\operatorname{Tr}(P\tilde P)}\sum_{\beta\in E_j}\operatorname{Tr}(\beta P\beta\tilde P), & \text{if } \operatorname{Tr}(P\tilde P)\neq 0,\\[2ex]
\displaystyle \sum_{\beta\in E_j}\operatorname{Tr}(\beta P\beta\tilde P), & \text{otherwise}.
\end{cases}
\]
In entanglement-assisted settings these refine to split coefficients \(D_{i,j}\) [2311.07111].

These conventions differ in indexing and normalization, but they share the same role: they are linear transforms of other enumerator data and satisfy nonnegativity constraints. A plausible implication is that “quantum shadow enumerator” is best understood as a family of equivalent shadow-basis descriptions rather than a single universally normalized object.

| Family | Representative definition | Immediate meaning |
|---|---|---|
| \(s_T(\rho,\sigma)\) | Alternating sum of subsystem overlaps | Subset-indexed normalized shadow coefficient |
| \((e)_g(\rho)\) | Kravchuk transform of sector lengths | Weight-indexed shadow enumerator for multiqubit states |
| \(\tilde a_i[\rho]\) | Pauli sum with spin-flipped state | Weight-indexed shadow coefficient in Bell-sampling form |
| \(D_j\) | \(\operatorname{Tr}(\beta P\beta\tilde P)\) sum over weight \(j\) | Code shadow enumerator |
| \(S_{\mathbf w}(M,N)\) | Multiset-grouped shadow coefficient | Mixed-dimensional shadow enumerator |

## 2. Transform relations, MacWilliams structure, and positivity

Quantum shadow enumerators are embedded in a web of MacWilliams-type transforms. For multiqubit pure states, the direct and inverse relations between sector lengths and shadow enumerators are
\[
(e)_g(\rho)=\frac{1}{2^N}\sum_{m=0}^N(-1)^mK_g(m,N)\,S_m(\rho),
\qquad
S_m=\frac{(-1)^m}{ }2^N\sum_{g=0}^N K_m(g,N)(e)_g,
\]
which makes the shadow coefficients precisely the shadow-basis coordinates of the sector-length vector [2507.12680].

The coding-theoretic formulation connects these quantities to Shor–Laflamme and Rains enumerators. For Hermitian \(M_1,M_2\),
\[
A_m(M_1,M_2)=\sum_{wt(\sigma_{\boldsymbol\mu})=m}\operatorname{Tr}(\sigma_{\boldsymbol\mu}M_1)\operatorname{Tr}(\sigma_{\boldsymbol\mu}M_2),
\]
\[
B_m(M_1,M_2)=\sum_{wt(\sigma_{\boldsymbol\mu})=m}\operatorname{Tr}(\sigma_{\boldsymbol\mu}M_1\sigma_{\boldsymbol\mu}M_2),
\]
and Rains’ shadow enumerator is defined by \(C_m(M_1,M_2)=B_m(M_1,\tilde M_2)\), with coefficient identity
\[
C_m=\frac{1}{2^N}\sum_{i=0}^N(-1)^i K_m(i,N)A_i\ge 0.
\]
For \(M_1=M_2=\rho\), one has \(A_m(\rho,\rho)=S_m(\rho)\) and \(C_m(\rho,\rho)=(e)_m(\rho)\), so sector lengths are the Shor–Laflamme enumerators for a one-dimensional code, and \((e)_g\) are the corresponding quantum shadow enumerators [2507.12680].

The same transform appears in code-based notation. For a quantum code with projector \(P\), the shadow enumerator satisfies
\[
D_j=
\begin{cases}
\displaystyle \frac{M}{2^n}\sum_{i=0}^n(-1)^iK_j(i,n)A_i, & \text{if } \operatorname{Tr}(P\tilde P)\neq 0,\\[2ex]
\displaystyle \frac{M^2}{2^n}\sum_{i=0}^n(-1)^iK_j(i,n)A_i, & \text{if } \operatorname{Tr}(P\tilde P)=0,
\end{cases}
\]
with \(D_j\ge 0\) [2311.07111].

Recent work also emphasizes that the shadow basis is structurally special. In the Bell-sampling formulation, the MacWilliams transform for the shadow or triplet-probability basis is diagonal:
\[
\tilde M=\mathrm{diag}(( -1)^n,\ldots,-1,1,-1,1),
\]
whereas the Shor–Laflamme basis uses the full MacWilliams matrix \(M\), and the averaged-purity basis becomes anti-diagonal [2408.16914].

For pure \(N\)-qubit states, the double-copy interpretation makes positivity especially transparent. Writing \(S_m=\langle\Psi|\hat S_m|\Psi\rangle\) with \(|\Psi\rangle=|\psi\rangle\otimes|\psi\rangle\), one diagonalizes
\[
\hat S_m=\sum_{g=0}^N \lambda_{m,g}\hat Q_g,
\qquad
\lambda_{m,g}=(-1)^mK_m(g,N),
\]
so that \(S_g^{(e)}=2^NQ_g\), where \(Q_g=\langle\Psi|\hat Q_g|\Psi\rangle\). Because the \(\hat Q_g\) are projectors, \(S_g^{(e)}\ge 0\), \(S_g^{(e)}=0\) for \(N-g\) odd, and \(\sum_{g=0}^N S_g^{(e)}=2^N\). Thus only \(\lfloor N/2\rfloor\) shadow enumerators are linearly independent for pure \(N\)-qubit states [2507.12680].

A common misconception is that shadow enumerators are merely auxiliary transforms with no intrinsic significance beyond positivity. The recent literature suggests a stronger statement: they are a preferred basis in which MacWilliams duality simplifies, and in several frameworks they coincide with directly measurable probabilities [2408.16914].

## 3. Operational interpretations and direct measurement

One major development is the identification of shadow enumerators with experimentally accessible probabilities. In the \(n\)-qubit parallelized SWAP test, two multipartite states \(\rho\) and \(\sigma\) are loaded into registers \(B_1,\dots,B_n\) and \(C_1,\dots,C_n\), controlled-SWAP tests are applied in parallel using ancillas \(A_1,\dots,A_n\), and the ancillas are measured in the computational basis. If \(\mathbf z\in\mathbb Z_2^n\) is the outcome and \(T=(\mathbf z)\), then
\[
p(\mathbf z)=\frac{1}{2^n}\sum_{S\subseteq[n]}(-1)^{|S\cap T|}\operatorname{Tr}(\rho_S\sigma_S),
\]
hence
\[
s_T(\rho,\sigma)=p(\mathbf z),\qquad (\mathbf z)=T.
\]
This provides a bijective operational interpretation of all normalized shadow enumerators as SWAP-test probabilities and yields an immediate proof of the shadow inequalities from probability nonnegativity [2406.18280].

A complementary experimental interpretation uses two-copy Bell sampling. For an \(n\)-qubit state \(\rho\), Bell measurements are performed on each pair of corresponding qubits of \(\rho\otimes\rho\). If \(\tilde W_i\) projects onto Bell strings with exactly \(i\) triplets, then
\[
\tilde a_i[\rho]=\operatorname{Tr}\!\left[(\rho\otimes\rho)\tilde W_i\right]
\]
is the probability of observing exactly \(i\) triplets, equivalently \(n-i\) singlets [2408.16914]. The empirical triplet-count histogram is therefore an unbiased estimator of the shadow enumerator distribution.

This Bell-sampling framework also supplies direct estimators and sample-complexity guarantees. For any fixed shadow coefficient \(\tilde a_i[\rho]\), because \(\tilde W_i\) is a projector with \(\Delta[\tilde W_i]=1\),
\[
N\le \frac{1}{2\varepsilon^2}\ln\!\left(\frac{2}{\delta}\right)
\]
samples suffice for additive error \(\varepsilon\) and failure probability \(\delta\), independent of \(n\) [2408.16914]. The same work gives robustness guarantees against experimental imperfections by bounding the systematic bias through
\[
\varepsilon=\|\Omega_i\|_\infty\|\sigma-\rho\otimes\rho\|_1,
\]
with \(\|\tilde W_i\|_\infty=1\) for shadow observables [2408.16914].

The operational viewpoint extends beyond direct Bell or SWAP experiments. In classical-shadow measurement protocols based on two-layer brickwork circuits, the exact diagonalization of the shadow channel depends on a refined support invariant \(\partBW(v)\), the partition of the brickwork support of a Pauli string \(W(v)\). The channel eigenvalue is
\[
(v|S|v)=
\begin{cases}
\Sigma_{\mathrm{pb}(n)}, & \partBW(v)=(n/2),\\[1ex]
\displaystyle\prod_{l\in\partBW(v)}\Sigma_{\mathrm{ob}(2l+2)}, & \text{otherwise},
\end{cases}
\]
so Pauli strings are grouped by geometry-sensitive support classes rather than ordinary Hamming weight [2211.09835]. This is not termed a quantum shadow enumerator in that paper, but it supports an enumerator-style interpretation in which support classes on the interaction graph replace weight classes. This suggests that shadow-enumerator ideas are not confined to coding theory; they also organize estimation complexity for shallow random-circuit measurement ensembles.

## 4. Sector lengths, monogamy relations, and optimization for pure multiqubit states

For pure multiqubit states, quantum shadow enumerators are closely tied to the geometry of the sector-length vector \(\mathbf S=(S_1,\dots,S_N)\). Sector lengths satisfy nonnegativity, \(S_0=1\), and for pure states
\[
\sum_{m=0}^N S_m=2^N.
\]
For odd \(N\), orthogonality of \(|\tilde\psi\rangle\) and \(|\psi\rangle\) implies
\[
\sum_{m=0}^N(-1)^m S_m=0.
\]
The same framework incorporates purity equalities for reduced states that are presented as an alternative formulation of the MacWilliams identity [2507.12680].

The main recent structural advance is a set of monogamy inequalities derived from reduced-state purities and time-reversal overlaps that go beyond the standard shadow inequalities. For a pure state and any \(k\)-qubit subsystem family, the paper derives
\[
\frac{2^k}{2^{\min(k,N-k)}}\binom Nk
\le
\sum_{m=0}^k\binom{N-m}{k-m}S_m
\le
2^k\binom Nk,
\]
\[
0\le
\sum_{m=0}^k(-1)^m\binom{N-m}{k-m}S_m
\le
2^k\binom Nk,
\]
and
\[
\sum_{m=0}^{\lfloor (k-1)/2\rfloor}\binom{N-2m}{k-2m}S_{2m}
\le
2^{k-2}\bigl(3+(-1)^k\bigr)\binom Nk.
\]
Together with the shadow inequalities, these define a polyhedral region \(R=R_2\cap R_3\) that contains the pure-state sector-length set \(S\) [2507.12680].

The significance for shadow enumerators is immediate because each \((e)_g\) is linear in \(S_m\). For \(N\le 5\), the allowed region is characterized by a convex polytope, and the extremal values of any physical quantity expressed as a linear combination of \(S_m\), including shadow enumerators, are reached at vertices [2507.12680]. This reduces shadow-enumerator optimization to vertex evaluation.

For \(N=4\), the allowed region in \((S_1,S_2)\) is the triangle
\[
0\le S_1\le S_2-2\le 4,
\]
with vertices corresponding to \(|\mathrm{tetra}\rangle\), \(|\mathrm{GHZ}(4)\rangle\), and \(|0\rangle^{\otimes 4}\). The explicit shadow-enumerator formulas are
\[
(e)_0=\frac14(-2-S_1+S_2),
\qquad
(e)_2=\frac12(18-3S_1-S_2).
\]
Accordingly, \((e)_0\) is maximized by \(|\mathrm{GHZ}(4)\rangle\), while \((e)_2\) is maximized by \(|\mathrm{tetra}\rangle\) [2507.12680].

For \(N=5\), the feasible triangle is
\[
0\le S_1\le 5,\qquad 2S_1\le S_2\le 10,
\]
with vertices \(|\mathrm{AME}(5,2)\rangle\), \(|\mathrm{GHZ}(5)\rangle\), and \(|0\rangle^{\otimes 5}\). The independent shadow enumerators are
\[
(e)_1=\frac12(-2S_1+S_2),
\qquad
(e)_3=-2S_1-S_2+20.
\]
The explicit formulas support \(|\mathrm{GHZ}(5)\rangle\) as maximizing \((e)_1\) and \(|\mathrm{AME}(5,2)\rangle\) as maximizing \((e)_3\) [2507.12680]. The same source notes a sentence claiming that \((e)_3\) is maximized not only by \(|\mathrm{AME}(5,2)\rangle\) states but also by the 5-qubit GHZ state; this is inconsistent with the displayed formula and the summary table. The formula-based conclusion therefore appears to be the internally consistent one.

For \(N=6\), the situation becomes substantially more complex. The linearly independent shadow enumerators are
\[
(e)_0=\frac18(8+2S_1-S_3),\qquad
(e)_2=\frac18(-30S_1+8S_2+3S_3),\qquad
(e)_4=\frac18(360-10S_1-16S_2-3S_3),
\]
but numerical evidence indicates \(S\subsetneq R\), additional empirical constraints such as \(S_4\ge 5\) arise, and it remains open whether the exact pure-state region is polyhedral [2507.12680]. The paper explicitly concludes that for larger systems current shadow inequalities and the new monogamy inequalities are complementary but insufficient.

## 5. Coding-theoretic roles, CWS interpretations, and mixed-dimensional generalization

Quantum shadow enumerators retain their original coding-theoretic role as constraints on quantum error-correcting codes. In the normalized-projector formalism, they are part of the standard family consisting of Shor–Laflamme \(A\)- and \(B\)-type enumerators and their shadow transforms \(D_j\), with detectability expressed through low-weight equalities \(A_j=B_j\) and shadow positivity supplying additional linear constraints [2311.07111]. For entanglement-assisted codes, the natural refinement is to split the weight into sender and receiver parts, producing \(D_{i,j}\) and the split shadow identities
\[
\sum_{u=0}^n\sum_{v=0}^c(-1)^{u+v}K_i(u,n)K_j(v,c)A_{u,v}\ge 0.
\]

In codeword stabilized (CWS) codes, recent work gives a particularly concrete interpretation. If \(S\) is the CWS group, \(W\) the set of word operators, and \(|\overline S\rangle=\zeta|S\rangle\) with \(\zeta\) a tensor product of \(I\)'s and \(Z\)'s, then the shadow enumerator \(\{D_j\}\) is the distance enumerator between \(WS\) and \((\sigma_y^{\otimes n}\zeta)WS\), up to a normalization depending on whether \(\sigma_y^{\otimes n}\zeta\in\pm S\) [2311.07111]. This converts the shadow enumerator from an abstract trace transform into a group- and coset-distance quantity. The same paper reports that, for standard CWS or stabilizer codes, shadow identities can be strong enough that semidefinite programming does not improve linear-programming bounds once these shadow constraints are included, whereas for entanglement-assisted CWS codes SDP can still improve LP bounds [2311.07111].

The relation to absolutely maximally entangled states and \(k\)-uniformity is equally direct. In one formulation, a pure state \(|\psi\rangle\) has \(S_m=0\) iff it defines a pure \(((N,1,m+1))\) quantum error-correcting code, and low-weight vanishing sectors therefore enforce highly constrained shadow-enumerator behavior [2507.12680]. In another formulation, the parallelized SWAP test permits extracting Rains unitary enumerators and then Shor–Laflamme enumerators, giving a route to determine code distance and \(k\)-uniformity from one measurement architecture [2406.18280].

A further extension replaces scalar support weight by a dimension multiset in heterogeneous systems \(\mathbb H=\bigotimes_{i=1}^n \mathbb C^{D_i}\). For a multiset \(\mathbf w\subseteq\mathbf N=\mathcal D([n])\), the mixed-dimensional shadow coefficient is
\[
S_{\mathbf w}(M,N)=
\sum_{\mathcal D(T)=\mathbf w}
\sum_{S\subseteq[n]}
(-1)^{|S\cap T^c|}
\operatorname{Tr}_S\!\big(\operatorname{Tr}_{S^c}M\,\operatorname{Tr}_{S^c}N\big),
\]
with \(S_{\mathbf w}(M,N)\ge 0\) [2604.25790]. The associated shadow polynomial
\[
S_{MN}(\vec x,\vec y)
=
\sum_{\mathbf w\subseteq\mathbf N}
S_{\mathbf w}(M,N)
\prod_{d\in\mathbb D}
x_d^{m_d(\mathbf N)-m_d(\mathbf w)}
y_d^{m_d(\mathbf w)}
\]
satisfies the mixed-dimensional shadow identity
\[
S_{MN}\!\left(\{x_d\},\{y_d\}\right)
=
A_{MN}\!\left(
\left\{\frac{(d-1)x_d+(d+1)y_d}{d}\right\},
\left\{\frac{y_d-x_d}{d}\right\}
\right),
\]
equivalently
\[
S_{MN}(\vec x,\vec y)=A'_{MN}(\vec x+\vec y,\vec y-\vec x).
\]
This generalization preserves the role of shadow positivity while resolving support composition by local dimension rather than only by cardinality [2604.25790].

## 6. Experimental status, limitations, and current directions

Quantum shadow enumerators are no longer only theoretical quantities. A trapped-ion experiment implemented two-copy Bell sampling on a 16-qubit processor and directly measured triplet-count distributions, averaged-purity distributions, and Shor–Laflamme enumerators for several six-qubit states and for the \(\llbracket 7,1,3\rrbracket\) color code [2408.16914]. The study reports that shadow or triplet-probability distributions closely matched theory, that the protocol distinguished product, Bell-pair, GHZ, graph-state, and AME structure, and that for the color code the data already allowed inference of \(d=3\) and nondegeneracy from raw Bell-sampling outcomes [2408.16914]. A plausible implication is that shadow enumerators have entered the regime of direct experimental diagnostics rather than indirect theoretical postprocessing.

The most favorable complexity results concern shadow and unitary enumerators rather than Shor–Laflamme coefficients. Bell-sampling shadow observables are projectors, so their sample complexity is independent of \(n\) in the worst-case additive-error guarantee, whereas low-weight Shor–Laflamme coefficients can become costly because inverse transforms amplify noise [2408.16914]. Likewise, in classical-shadow protocols with brickwork circuits, the estimation cost of Pauli observables is governed by geometry-sensitive channel eigenvalues indexed by \(\partBW(v)\), and brickwork shadows outperform local Clifford shadows for sufficiently dense or clustered support while remaining less favorable for sparse or half-supported patterns [2211.09835].

Several limitations are explicit in the recent literature. For the multiqubit pure-state geometry, the exact characterization is complete only for \(N\le 5\), with \(N=5\) supported by strong numerical evidence and a conjecture of exactness, while for \(N\ge 6\) the feasible region is not fully captured by current inequalities [2507.12680]. For Bell-sampling methods, the strongest scalability guarantees apply to shadow and unitary enumerators; worst-case estimation of full Shor–Laflamme data can still be expensive [2408.16914]. For parallelized SWAP tests, the operational equivalence \(s_T(\rho,\sigma)=p(\mathbf z)\) is exact, but the papers do not provide a full shot-complexity theorem for estimating the entire \(2^n\)-outcome distribution to high precision [2406.18280]. For brickwork-circuit shadows, the exact analytic solution currently covers one round of a one-dimensional brickwork circuit on an even number of qubits with open or periodic boundary conditions, and deeper circuits remain analytically difficult because of nontrivial intertwinings between layers [2211.09835].

Taken together, these developments place quantum shadow enumerators at the intersection of coding theory, entanglement theory, classical-shadow tomography, and direct multi-copy experiments. They function simultaneously as transform coefficients, positivity witnesses, optimization coordinates, and measurable probability distributions. This suggests that future progress is likely to come from unifying three themes already visible in the current literature: sharper geometric constraints on attainable enumerator vectors, broader operational realizations beyond Bell and SWAP sampling, and support-sensitive generalizations adapted to interaction graphs and heterogeneous local dimensions.

Source: https://www.emergentmind.com/topics/quantum-shadow-enumerators