# Fine-Grained Unambiguous Measurements

Quentin Buzet, André Chailloux

► To cite this version:

Quentin Buzet, André Chailloux. Fine-Grained Unambiguous Measurements. 2025. hal-05466830

HAL Id: hal-05466830

https://inria.hal.science/hal-05466830v1

Preprint submitted on 20 Jan 2026

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
# Fine-Grained Unambiguous Measurements

Quentin Buzet† and André Chailloux†

†Inria de Paris

## Abstract

Unambiguous measurements play an important role in quantum information, with applications ranging from quantum key distribution to quantum state reconstruction. Recently, such measurements have also been used in quantum algorithms based on Regev's reduction. The key problem for these algorithms is the S-|LWE⟩ problem in the lattice setting and the Quantum Decoding Problem in the code setting. A key idea for addressing this problem is to use unambiguous measurements to recover $k$ coordinates of a code (or lattice) element $\mathbf{x}$ from a quantum state $|\psi_{\mathbf{x}}⟩$, which corresponds to a noisy word $\mathbf{x}$ with errors in quantum superposition. However, a general theoretical framework to analyze this approach has been lacking.

In this work, we introduce the notion of *fine-grained unambiguous measurements*. Given a family of states $\{|\psi_x\rangle\}_{x \in F_2^n}$, we ask whether there exist measurements that can return, with certainty, $k$ parities about $\mathbf{x}$. We study this question in the setting of symmetric states, which naturally arises in the Quantum Decoding Problem. We show that determining the maximal number of parities that a measurement can output can be formulated as a linear program, and we use its dual formulation to derive several upper bounds. In particular, we establish necessary and sufficient conditions for the existence of fine-grained unambiguous measurements and prove impossibility results showing in particular that such measurements cannot improve upon the approach of [CT24]. Finally, we discuss the implications of these findings for the Quantum Decoding Problem.
# Contents

<table><tr><td>1</td><td>Introduction</td><td>3</td></tr><tr><td>1.1</td><td>Context</td><td>3</td></tr><tr><td>1.2</td><td>Brief overview of contributions</td><td>5</td></tr><tr><td>1.3</td><td>Detailed overview of contributions</td><td>5</td></tr><tr><td>1.3.1</td><td>Expressing ρ(S) as a linear program</td><td>6</td></tr><tr><td>1.3.2</td><td>The dual linear program and upper bounds on ρ(S)</td><td>7</td></tr><tr><td>1.3.3</td><td>Computational hardness</td><td>9</td></tr><tr><td>1.4</td><td>Discussion and Perspectives</td><td>9</td></tr><tr><td>2</td><td>Preliminaries</td><td>9</td></tr><tr><td>2.1</td><td>Quantum computing preliminaries</td><td>10</td></tr><tr><td>2.2</td><td>Binary linear codes</td><td>10</td></tr><tr><td>2.3</td><td>Fine-Grained Unambiguous Measurements on F<sub>2</sub><sup>n</sup></td><td>11</td></tr><tr><td>3</td><td>Reformulation as a linear program</td><td>12</td></tr><tr><td>3.1</td><td>Reformulation of ρ(S) involving the Fourier diagonal elements of F<sub>H,y</sub></td><td>12</td></tr><tr><td>3.1.1</td><td>First simplification</td><td>12</td></tr><tr><td>3.1.2</td><td>Fourier diagonal terms</td><td>14</td></tr><tr><td>3.1.3</td><td>Proof of Theorem 1</td><td>15</td></tr><tr><td>3.2</td><td>Relations between diagonal Fourier coefficients of the matrices F<sub>H,y</sub></td><td>15</td></tr><tr><td>3.2.1</td><td>Full Dual Support</td><td>15</td></tr><tr><td>3.2.2</td><td>Characterizing the {F<sub>H,y</sub>}</td><td>16</td></tr><tr><td>3.3</td><td>Formulation of the linear program</td><td>18</td></tr><tr><td>3.4</td><td>Removing the full support requirement</td><td>20</td></tr><tr><td>4</td><td>Dual Linear Program and Solutions</td><td>21</td></tr><tr><td>4.1</td><td>Formulation of the dual program</td><td>21</td></tr><tr><td>4.2</td><td>The threshold setting</td><td>22</td></tr><tr><td>4.3</td><td>The average number of parities setting</td><td>24</td></tr><tr><td>4.3.1</td><td>Upper bounds</td><td>24</td></tr><tr><td>4.3.2</td><td>Matching primal solutions</td><td>26</td></tr><tr><td>5</td><td>Efficient constructions</td><td>27</td></tr><tr><td>A</td><td>Matching primal solutions for the average setting</td><td>31</td></tr><tr><td>A.1</td><td>Hamming solution</td><td>31</td></tr><tr><td>A.2</td><td>co-Hamming solution</td><td>31</td></tr><tr><td>A.3</td><td>Spike solution</td><td>35</td></tr><tr><td>B</td><td>Full characterization of fine-grained unambiguous measurements on F<sub>2</sub><sup>2</sup> in the average setting</td><td>36</td></tr></table>
# 1 Introduction

## 1.1 Context

Unambiguous measurements play an important role in various areas of quantum information, ranging from the study of quantum key distribution [DJL00, KM19] to quantum state reconstruction [KOYJ22]. Such measurements have been extensively studied since the seminal works by Ivanovic [Iva87], Dieks [Die88], and Peres [Per88]. Recently, and this motivates our work, variants of unambiguous measurements have been used in quantum algorithms based on Regev's reduction [Reg09]. These measurements are used to solve the S-|LWE⟩ problem, which can then be used to find small dual lattice points [CLZ22]. This approach based on Regev's reduction has also been adapted to codes [DRT23, CT24] or structured codes [JSW$^{+}$25, CT25].

In its simplest form, an unambiguous measurement can be described as follows. Assume we are given one of two possible states $|ψ_0⟩$, $|ψ_1⟩$ chosen uniformly at random, and we want to determine which state we have. If the states are not orthogonal, it is impossible to determine which state we have with certainty. An unambiguous measurement is a measurement that always outputs the correct state, but may sometimes output “I don't know”, characterized by the ⊥ outcome. An unambiguous measurement for two pure states can therefore be formally defined as follows:

**Definition 1.** An unambiguous measurement for the states $\{|ψ_0⟩, |ψ_1⟩\}$ is a three-outcome POVM $^{1}$\{|F$_0$ , F$_1$ , F$_⊥$ \}, where $\forall i \in \{0, 1\}$, $\text{Tr}(F_i|ψ_{1-i}⟩⟨ψ_{1-i}|) = 0$. The success probability of this measurement is defined as $p \triangleq \frac{1}{2}(\text{Tr}(F_0|ψ_0⟩⟨ψ_0|) + \text{Tr}(F_1|ψ_1⟩⟨ψ_1|))$.

We know there exists an unambiguous measurement for two pure states $|ψ_0⟩$, $|ψ_1⟩$ with success probability $1 - |⟨ψ_0|ψ_1⟩|$, and this is optimal [JS95]. This problem has also been generalized to cases where the probabilities of receiving $|ψ_0⟩$ and $|ψ_1⟩$ differ [PW91, SHB01], and to mixed states [RLvE03]. For two states, unambiguous measurements are well understood.

Another natural generalization is to consider a larger number of states. We are given one state from the set $\{|ψ_x⟩\}_{x \in \{1, N\}}$ with $N \ge 2$, and the goal is to recover $x$ from $|ψ_x⟩$. An unambiguous measurement will always output the correct $x$ or $⊥$. In this more general setting, much less is known. Chefles [Che98] showed that unambiguous state discrimination is possible if and only if the states are linearly independent. If the states $\{|ψ_x⟩\}$ exhibit certain symmetries, then more can be said about the problem. We present only the case of $\mathbb{F}_2^n$ here, but refer to [CB98, CT24] for more general cases.

**Definition 2.** A set of states $S = \{|ψ_x⟩\}_{x \in \mathbb{F}_2^n}$ is called symmetric iff. we can write

$$|ψ_0⟩ = \sum_{i \in \mathbb{F}_2^n} α_i|i⟩ \quad \text{and} \quad \forall \mathbf{x} \in \mathbb{F}_2^n, |ψ_\mathbf{x}⟩ = \sum_{i \in \mathbb{F}_2^n} α_i|i + \mathbf{x}⟩.$$

This means each $|ψ_\mathbf{x}⟩$ is a shifted version of $|ψ_0⟩$. We work in $\mathbb{F}_2^n$, so we also define the Fourier basis $|\hat{i}\rangle = \frac{1}{\sqrt{2^n}} \sum_{j \in \mathbb{F}_2^n} (-1)^{i \cdot j} |j\rangle$, where $\cdot$ is the canonical inner product in $\mathbb{F}_2^n$. Chefles and Barnett showed the following:

**Proposition 1** ([CB98]). Let $S = \{|ψ_\mathbf{x}⟩\}_{\mathbf{x} \in \mathbb{F}_2^n}$ be a set of symmetric states. There exists an unambiguous measurement for $S$ that succeeds with probability $P = 2^n \min_{\mathbf{x} \in \mathbb{F}_2^n} |⟨\hat{x}|ψ_0⟩|^2$, and this is optimal.

This means we also have a complete answer for the performance of unambiguous measurements in the case of symmetric states.

**An Unexpected Connection: Quantum Algorithms Based on Regev's Reduction.** An exciting new line of research involves the study of quantum algorithms based on Regev's reduction, where unambiguous measurements play an important role. We present here a brief description of this connection for the case of codes.

<footnote>$^{1}$POVM stands for Positive Operator-Valued Measure and describes a general quantum measurement. $F_0, F_1, F_⊥$ here can be any positive semidefinite matrices such that $F_0 + F_1 + F_⊥ = I$.</footnote>
We are given a binary<fnref n="2" /> linear code $\mathcal{C}$ of dimension $k$ and length $n$. We can write $\mathcal{C} = \{\mathbf{x} : \mathbf{M}\mathbf{x} = 0\}$, for some known parity matrix<fnref n="3" /> $\mathbf{M} \in \mathbb{F}_2^{(n-k) \times n}$. The main problem that has to be solved in these quantum algorithms is the following

**Problem 1** (Quantum Decoding Problem a.k.a. S-|LPN⟩). Given $|\psi_{\mathbf{x}}\rangle = \sum_{\mathbf{i} \in \mathbb{F}_2^n} \alpha_{\mathbf{i}} |\mathbf{x} + \mathbf{i}\rangle$, for a random $\mathbf{x} \in \mathcal{C}$, recover $\mathbf{x}$. Here, there is a known description of the $\alpha_{\mathbf{i}}$.

This is exactly a quantum state discrimination problem on symmetric states with the extra promise that $\mathbf{x}$ is a codeword. It can be rephrased as recovering a codeword $\mathbf{x}$ from a noisy version $|\psi_{\mathbf{x}}\rangle \triangleq \sum_{\mathbf{e} \in \mathbb{F}_2^n} f(\mathbf{e})|\mathbf{x} + \mathbf{e}\rangle$ (which corresponds to $f(\mathbf{e}) = \alpha_{\mathbf{e}}$) where the error is on quantum superposition. An adaptation of Regev's reduction for codes [DRT23] can be informally stated as follows:

**Proposition 2** (Informal, [DRT23]). If we have an efficient algorithm to recover $\mathbf{x}$ from $|\psi_{\mathbf{x}}\rangle$, then we can efficiently find non-zero dual codewords in $\mathcal{C}^{\perp}$ with weight concentrated around the typical weight of the distribution associated to the $|\hat{\alpha}_{\mathbf{i}}|^2$, where $\hat{\alpha}_{\mathbf{i}} = \frac{1}{\sqrt{2^n}} \sum_{\mathbf{j} \in \mathbb{F}_2^n} (-1)^{\mathbf{i} \cdot \mathbf{j}} \alpha_{\mathbf{j}}$.

Here, the typical weight of words associated to $|\hat{\alpha}_{\mathbf{i}}|^2$ can be understood as follows: if we measure $\sum_{\mathbf{i} \in \mathbb{F}_2^n} \hat{\alpha}_{\mathbf{i}}|\mathbf{i}\rangle$ in the computational basis, what will be the typical Hamming weight of the measured $\mathbf{i}$? Finding small words in a code (or its dual) is the main hardness assumption used in code-based cryptography. The above proposition also has equivalents in the realm of lattice-based cryptography, but we work in $\mathbb{Z}_q^n$ instead of $\mathbb{F}_2^n$, see for example [CH25].

A natural question is how to incorporate the promise $\mathbf{x} \in \mathcal{C}$ for this quantum state discrimination problem. In [CT24], the authors used the fact that one can recover the whole string $\mathbf{x} = x_1, \dots, x_n$ from only $k(1+o(1))$ randomly chosen coordinates $x_i$ using Gaussian elimination. Indeed, since $\mathbf{x} \in \mathcal{C}$, the relation $\mathbf{M}\mathbf{x} = \mathbf{0}$ already gives $(n-k)$ parities of $\mathbf{x}$, so if we can recover unambiguously $k$ additional parities of $\mathbf{x}$ which are linearly independent with the ones given by $\mathbf{M}$ then one can recover $\mathbf{x}$ using Gaussian elimination. The linear independence condition is satisfied with high probability if we recover $k(1+o(1))$ random parities of $\mathbf{x}$. This motivates the following question

**Problem 2.** Given a set $\{|\psi_{\mathbf{x}}\rangle\}_{\mathbf{x} \in \mathbb{F}_2^n}$ of symmetric states, how many parities of $\mathbf{x}$ can we recover unambiguously?

In [CT24], the authors considered states of the form

$$|\psi_{\mathbf{x}}\rangle = \sum_{\mathbf{i} \in \mathbb{F}_2^n} \alpha_{\mathbf{i}} |\mathbf{x} + \mathbf{i}\rangle = \bigotimes_{i=1}^n (\sqrt{1-t}|x_i\rangle + \sqrt{t}|1-x_i\rangle).$$

Here, each $|\psi_{\mathbf{x}}\rangle$ is a product state over the $n$ single qubit registers. They showed that if we perform an unambiguous measurement on each qubit, we know we can recover each $x_i$ unambiguously with probability $2t^{\perp}$ where $t^{\perp} \triangleq \frac{1}{2} - \sqrt{t(1-t)}$. On the other hand, one can show that the typical weight associated to the $|\hat{\alpha}_{\mathbf{i}}|^2$ is $t^{\perp}n$. If we can recover $k = 2nt^{\perp}$ such coordinates (or slightly more to have total linear independence), then we can recover $\mathbf{x}$. Plugging this into Proposition 2 allows us to find dual codewords of weight $t^{\perp}n \approx \frac{k}{2}$, which is exactly the smallest weight achievable by classical polynomial-time algorithms, in particular with Prange's algorithm [Pra62].

The work of [CT24] has the following limitations

1. The $\alpha_{\mathbf{i}}$ are of a very specific form, and the corresponding states $|\psi_{\mathbf{x}}\rangle$ are product states.

2. The measurements are restricted to learn $k$ independent bits of $\mathbf{x}$ and not $k$ parities of $\mathbf{x}$.

3. Measurements used to unambiguously learn these $k$ bits are product measurements.

These limitations raise the following questions

Can we study Problem 2 in all generality without any restriction on the amplitudes $\alpha_{\mathbf{i}}$?

Can we find better measurements for learning unambiguously $k$ parities of $\mathbf{x}$ from $|\psi_{\mathbf{x}}\rangle$ such that we can surpass Prange's barrier when used in Proposition 2?

We lacked a theoretical framework to do so, and the main purpose of this article is to fill this gap.

<footnote n="2">²We restrict ourselves to the binary setting in this work, but the approach also applies to larger alphabets.</footnote>

<footnote n="3">³The parity matrix of a code is usually denoted $\mathbf{H}$ but we will use this letter in a somewhat different context, so we unconventionally call the parity matrix $\mathbf{M}$ in this section.</footnote>
## 1.2 Brief overview of contributions

In this work, we introduce the notion of fine-grained unambiguous measurements. Instead of asking to recover the entire $\mathbf{x} \in \mathbb{F}_2^n$ from $|\psi_\mathbf{x}\rangle$ or output $\perp$, we ask whether it is possible to recover unambiguously some partial information about $\mathbf{x} = (x_1, \dots, x_n)$. One could naturally consider learning unambiguously a subset $\{x_i\}_{i \in I}$ of the bits of $\mathbf{x}$. This can be generalized to learning different parities $(\mathbf{h}_1 \cdot \mathbf{x}, \dots, \mathbf{h}_k \cdot \mathbf{x})$.

We formalize this by saying that our measurement outputs a pair $(\mathbf{H}, \mathbf{y})$, where $\mathbf{H} \in \mathbb{F}_2^{k \times n}$ is of full rank (for some $k \in [0, n]$) and $\mathbf{y} \in \mathbb{F}_2^k$. The output $(\mathbf{H}, \mathbf{y})$ corresponds to the information: “I know with certainty that $\mathbf{H}\mathbf{x} = \mathbf{y}$” or equivalently $(\mathbf{h}_1 \cdot \mathbf{x} = \mathbf{y}_1, \dots, \mathbf{h}_k \cdot \mathbf{x} = \mathbf{y}_k)$, where the $\mathbf{h}_i$ are the lines of $\mathbf{H}$. The $\perp$ outcome corresponds to the empty matrix/vector pair. Notice that this framework encompasses standard unambiguous measurements, where we only allow full rank matrices $\mathbf{H} \in \mathbb{F}_2^{n \times n}$ (which allows us to recover $\mathbf{x}$ from $(\mathbf{H}, \mathbf{y})$ using Gaussian elimination) and empty matrices which corresponds to the $\perp$ outcome.

As in the work of Chefles and Barnett, and motivated by the application to S-|LPN⟩, we restrict ourselves to sets of symmetric states $S = \{|\psi_\mathbf{x}\rangle\}_{\mathbf{x} \in \mathbb{F}_2^n}$. Our goal is, for a certain $S$, to bound the maximal number of parities that a fine-grained unambiguous measurement can correctly output given a random $|\psi_\mathbf{x}\rangle \in S$. Here is a brief overview of our contributions.

1. We formally introduce the notion of fine-grained unambiguous measurements. We give several theoretical results regarding fine-grained measurements. In particular, we show how the optimization that provides the best fine-grained unambiguous measurement for a symmetric set of states $S$ can be phrased as a linear program.

2. We study the associated dual linear program to derive upper bounds on the number of parities. We provide specific solutions and also discuss the optimal bound. Our results generalize existing bounds for full unambiguous state discrimination. We apply our results to S-|LPN⟩. We show that one cannot break the $\frac{k}{2}$ barrier of Prange's algorithm using fine-grained unambiguous measurements. This shows the inherent limitations of the approach of [CT24]. We discuss the implications for the S-|LPN⟩ problem and, more generally, for state discrimination with prior information.

3. We also discuss the computational efficiency of these measurements. We give sufficient conditions under which we can efficiently compute these fine-grained measurements.

## 1.3 Detailed overview of contributions

We start from a set of symmetric states $S = \{|\psi_\mathbf{x}\rangle\}$. We fix an integer $n$. For $k \in [0, n]$, let $\Lambda_k$ be the set of matrices in $\mathbb{F}_2^{k \times n}$ of full rank $k$. We first define the set $\Gamma(S)$ of fine-grained unambiguous measurements associated to $S$.

**Definition 3.** Let $S = \{|\psi_\mathbf{x}\rangle\}_{\mathbf{x} \in \mathbb{F}_2^n}$ be a set of states. Let $\Gamma(S)$ be the set of measurements $\{F_{\mathbf{H},\mathbf{y}}\}$ satisfying

1. $\forall k \in [0, n], \forall (\mathbf{H}, \mathbf{y}) \in \Lambda_k \times \mathbb{F}_2^k, F_{\mathbf{H},\mathbf{y}} \succeq 0$

2. $\sum_{k=0}^n \sum_{\mathbf{y} \in \mathbb{F}_2^k} F_{\mathbf{H},\mathbf{y}} = I$.

3. $\forall k \in [0, n], \forall (\mathbf{H}, \mathbf{y}) \in \Lambda_k \times \mathbb{F}_2^k, \forall \mathbf{x} \text{ s.t. } \mathbf{H}\mathbf{x} \neq \mathbf{y}, \text{Tr}(F_{\mathbf{H},\mathbf{y}}|\psi_\mathbf{x}\rangle\langle\psi_\mathbf{x}|) = 0$.

The first two conditions ensure that $\{F_{\mathbf{H},\mathbf{y}}\}$ is a valid POVM and the last condition is the unambiguity condition, which means that the outcome $(\mathbf{H}, \mathbf{y})$ corresponds to the statement “I know with certainty that $\mathbf{H}\mathbf{x} = \mathbf{y}$”.

Our goal is to upper bound the number of learned parities, which is given by the quantity $\rho(S)$ below

$$ \rho(S) \triangleq \max_{\{F_{\mathbf{H},\mathbf{y}}\} \in \Gamma(S)} \rho(S, \{F_{\mathbf{H},\mathbf{y}}\}) \\ \text{with } \rho(S, \{F_{\mathbf{H},\mathbf{y}}\}) \triangleq \mathbb{E}_{\mathbf{x} \leftarrow \mathbb{F}_2^n} \left[ \sum_{k \in [0, n]} \sum_{\mathbf{H} \in \Lambda_k} C(k) \text{Tr}(F_{\mathbf{H},\mathbf{y}} |\psi_\mathbf{x}\rangle\langle\psi_\mathbf{x}|) \right], $$
for some function $C: \llbracket 0, n \rrbracket \to \mathbb{R}_+$. The "score" $\rho(S)$ depends on this function $C$ as there are different ways of quantifying the quality of the best fine-grained unambiguous measurement. In this work, we will consider two settings:

* The threshold setting. We are given a certain $\tau \in \llbracket 1, n \rrbracket$ and we want to determine the maximum probability of learning at least $\tau$ parities. This is characterized by the function $C(k) = 1$ if $k \ge \tau$ and $C(k) = 0$ otherwise.

* The average number of parities setting. We want to determine the maximum average number of parities learned. This is characterized by the function $C(k) = k$.

Our focus is on these two scenarios, but our general results will apply for any function $C: \llbracket 0, n \rrbracket \to \mathbb{R}_+$.

### 1.3.1 Expressing $\rho(S)$ as a linear program

Upper bounding $\rho(S)$ and in particular maximizing over measurements that satisfy the fine-grained unambiguity condition seems hard to handle at first glance but we provide several simplifications that will make the problem easier, using the fact that the states $\{|\psi_x\rangle\}$ are symmetric. Ultimately, we show that $\rho(S)$ can be expressed as a maximization linear program, which is much easier to handle. This requires several careful steps.

**1. Simplifying the expression of $\rho(S)$ using the fact that $S$ is a set of symmetric states.**
We introduce the set of symmetric fine-grained measurements, which are defined as follows:

**Definition 4.** Let $S = \{|\psi_x\rangle\}_{x \in \mathbb{F}_2^n}$ be a set of states. We define

$$ \Gamma_s(S) = \{\{F_{H,y}\} \in \Gamma(S) : \forall (H, y) \in \Lambda_k \times \mathbb{F}_2^k, \forall \mathbf{a} \in \mathbb{F}_2^n, X_{\mathbf{a}} F_{H,y} X_{\mathbf{a}} = F_{H,y+H_a}\}, $$

where $X_{\mathbf{a}}$ is the Pauli shift operator in $\mathbb{F}_2^n$ satisfying $X_{\mathbf{a}}|\mathbf{x}\rangle = |\mathbf{x} + \mathbf{a}\rangle$.

Our first result is to prove the following

**Theorem 1.** Let $S = \{|\psi_x\rangle\}_{x \in \mathbb{F}_2^n}$ be a set of symmetric states with $|\psi_0\rangle = \sum_{i \in \mathbb{F}_2^n} \hat{\alpha}_i |\hat{i}\rangle$. Then

$$ \rho(S) = \max \left\{ \sum_{k \in \llbracket 0, n \rrbracket} \sum_{\mathbf{H} \in \Lambda_k} \sum_{\mathbf{y} \in \mathbb{F}_2^k} C(k) |\hat{\alpha}_i|^2 \langle \hat{i} | F_{\mathbf{H},y} | \hat{i} \rangle : \{F_{\mathbf{H},y}\} \in \Gamma_s(S) \right\}. $$

In this new expression, we restricted the set of fine-grained measurements that we maximize on to the set $\Gamma_s(S)$. More importantly, we replaced the quantity $E_{x \leftarrow \mathbb{F}_2^n} [\mathrm{Tr}(F_{H,y}|\psi_x\rangle\langle\psi_x|)]$ with the quantity $\sum_{i \in \mathbb{F}_2^n} |\hat{\alpha}_i|^2 \langle \hat{i} | F_{H,y} | \hat{i} \rangle$ that depends only on the Fourier amplitudes of $|\psi_0\rangle$ as well as on the Fourier diagonal elements of each $F_{H,y}$. To prove this, we use the fact that we work with a set $S$ of symmetric states, and we also exploit the symmetries of the set $\Gamma_s(S)$ we introduce.

**2. Relation on the Fourier diagonal elements of each $F_{H,y}$**. The issue with the above expression is that we still have to maximize over (symmetric) fine-grained unambiguous measurements. An appealing approach would be to define some variables $\lambda_i^{H,y} = \langle \hat{i} | F_{H,y} | \hat{i} \rangle$ and try to translate the condition $\{F_{H,y}\} \in \Gamma_s(S) \subseteq \Gamma(S)$ into linear conditions on the $\lambda_i^{H,y}$. This is actually possible to do and in order to present these linear relations, we have to introduce the notion of dual cosets.

**Definition 5.** For each matrix $H \in \Lambda_k$, we consider an arbitrary matrix $G_H \in \mathbb{F}_2^{n-k \times n}$ such that $\mathrm{Im}((G_H)^\top) = \mathrm{Ker}(H)$. We then define

$$ D_H(s) = \{x \in \mathbb{F}_2^n : G_H \cdot x = s\}. $$

Notice that this definition depends on the choice of $G_H$ but this choice only influences how the dual cosets are labeled. All our results will hold for any choice of $G_H$. We first restrict ourselves to sets $S = \{|\psi_x\rangle\}$ of symmetric states which have full dual support i.e. $\forall \mathbf{i} \in \mathbb{F}_2^n$, $\langle \psi_0 | \hat{i} \rangle \neq 0$, which implies $\forall \mathbf{x}, \mathbf{i} \in \mathbb{F}_2^n$, $\langle \psi_x | \hat{i} \rangle \neq 0$ from the fact that we have a symmetric set of states. We prove the following
**Theorem 2.** Let $S = \{|\psi_x\}\}_{x \in \mathbb{F}_2^n}$ be a set of symmetric states with full dual support. We have

$$ \{F_{\mathbf{H},y}\} \in \Gamma(S) \Rightarrow \forall k \in [0, n], \forall (\mathbf{H}, \mathbf{y}) \in \Lambda_k \times \mathbb{F}_2^k, \forall \mathbf{s} \in \mathbb{F}_2^{n-k}, \forall \mathbf{i}, \mathbf{j} \in D_{\mathbf{H}}(\mathbf{s}), |\hat{\alpha}_{\mathbf{i}}|^2 \lambda_{\mathbf{i}}^{\mathbf{H},y} = |\hat{\alpha}_{\mathbf{j}}|^2 \lambda_{\mathbf{j}}^{\mathbf{H},y}. $$

In order to prove this statement, we look at the matrices $F_{\mathbf{H},y}$. They are positive semidefinite and if we write $F_{\mathbf{H},y} = \sum_i \mu_i |A_i\rangle\langle A_i|$, the unambiguity condition tells us that we have $\forall \mathbf{x}$ s.t. $\mathbf{H}\mathbf{x} \neq \mathbf{y}$, $\langle A_i|\psi_x\rangle = 0$. We provide an explicit orthogonal basis of the space of states orthogonal to each $|\psi_x\rangle$ for $\mathbf{x}$ such that $\mathbf{H}\mathbf{x} = \mathbf{y}$. The basis is expressed in terms of the dual cosets of $\mathbf{H}$ which then allows us to prove our theorem.

**3. Rewriting $\rho(S)$ as a linear program** We now plug in the relation from Theorem 2 into the expression of $\rho(S)$ from Theorem 1. We obtain the following expression

**Definition 6.**

$$ \rho^L(S) \triangleq \max_{(\lambda_i^{\mathbf{H},y})} \rho^L(S; (\lambda_i^{\mathbf{H},y})) \triangleq \left\{ \sum_{k=0}^{n} \sum_{\mathbf{H} \in \Lambda_k} \sum_{\mathbf{y} \in \mathbb{F}_2^n} C(k) |\hat{\alpha}_i|^2 \lambda_i^{\mathbf{H},y} \right\}, $$

where the maximum is over nonnegative real numbers $(\lambda_i^{\mathbf{H},y})$ satisfying

$$ \forall \mathbf{i} \in \mathbb{F}_2^n, \quad \sum_{(\mathbf{H}, \mathbf{y}) \in \mathcal{I}} \lambda_i^{\mathbf{H}, \mathbf{y}} = 1 \qquad (1) $$

$$ \forall k \in [0, n], \forall (\mathbf{H}, \mathbf{y}) \in \Lambda_k \times \mathbb{F}_2^k, \forall \mathbf{s} \in \mathbb{F}_2^{n-k}, \forall \mathbf{i}, \mathbf{j} \in D_{\mathbf{H}}(\mathbf{s}), |\hat{\alpha}_{\mathbf{i}}|^2 \lambda_{\mathbf{i}}^{\mathbf{H},\mathbf{y}} = |\hat{\alpha}_{\mathbf{j}}|^2 \lambda_{\mathbf{j}}^{\mathbf{H},\mathbf{y}}. \qquad (2) $$

Because Theorem 2 is an implication, we have that $\rho(S) \le \rho^L(S)$ when $S$ has full dual support. In order to conclude, we have to deal with two issues:

1. We have to show actually that $\rho(S) = \rho^L(S)$ when $S$ is a set of symmetric states with full dual support. To do so, we start from some $(\lambda_i^{\mathbf{H},y})$ satisfying Equations 2, 1 and from these real numbers, we manage to construct a fine-grained POVM $\{F_{\mathbf{H},y}\}$ such that $\rho(S; \{F_{\mathbf{H},y}\}) \ge \rho^L(S; (\lambda_i^{\mathbf{H},y}))$.

2. We have to remove the full dual support requirement. We show that every set $S$ can be approximated with another set of states that has full dual support and then use density arguments to show that if $\rho(S) = \rho^L(S)$ when $S$ has full dual support then this equality must also for any $S$ that doesn't have full dual support.

Having dealt with these two final issues, we obtain the final theorem of this section

**Theorem 3.** Let $S$ be a set of symmetric states. We have $\rho(S) = \rho^L(S)$.

### 1.3.2 The dual linear program and upper bounds on $\rho(S)$

**1. Formulation of the dual linear program.** Our goal is to provide upper bounds on $\rho(S)$. Since we have an expression of $\rho(S)$ as a linear optimization problem, it is natural to consider the associated dual linear program. We can show that the dual linear program can be expressed as follows

$$ \sigma^L(S) = \min_{(b_i)_{i \in \mathbb{F}_2^n}} \sigma^L(S, (b_i)) \triangleq \sum_{i \in \mathbb{F}_2^n} b_i |\hat{\alpha}_i|^2, $$

where we minimize over nonnegative reals $(b_i)$ such that

$$ \forall k \in [0, n], \forall \mathbf{H} \in \Lambda_k, \forall \mathbf{s} \in \mathbb{F}_2^{n-k}, \sum_{i \in D_{\mathbf{H}}(\mathbf{s})} b_i \ge C(k)2^k. \qquad (3) $$

We have directly by strong duality that $\rho^L(S) = \sigma^L(S)$, so finding nonnegative reals $(b_i)$ that satisfy Equation 3 and computing $\sigma^L(S, (b_i))$ will yield an upper bound on $\rho(S) = \rho^L(S)$.
**2. The threshold setting.** We first consider the threshold setting. Recall that we have a threshold $\tau \in [1, n]$ and choose the function $C(k) = 1$ for $k \ge \tau$ and $C(k) = 0$ otherwise. Let $\rho(S, \tau)$, $\rho^L(S, \tau)$ and $\sigma^L(S, \tau)$ be the (equal) values of the different optimization programs in this setting. Our first result is to prove a necessary and sufficient condition for which $\rho(S, \tau) \ne 0$ in this setting. This is a generalization of the result of Chefles and Barnett for regular unambiguous state discrimination. In order to do so, we have to introduce the notion of $\tau$-universal sets, which are subsets of $\mathbb{F}_2^n$ that intersect every affine subspace of $\mathbb{F}_2^n$ of dimension $\tau$. We then show

**Theorem 4.**

$$ \rho(S, \tau) = 0 \Leftrightarrow \text{There exists a } \tau\text{-universal set } V \text{ s.t. } \forall \mathbf{i} \in V, \hat{\alpha}_{\mathbf{i}} = 0. $$

For the $\Leftarrow$ implication, we actually have a stronger quantitative bound

**Proposition 3.**

$$ \rho(S, \tau) \le \min \left\{ 2^{\tau} \sum_{\mathbf{i} \in V} |\hat{\alpha}_{\mathbf{i}}|^2 : V \text{ is } \tau\text{-universal} \right\}. $$

For both sides of the implication, we use the dual formulation. In particular, for this last proposition, for any $\tau$-independent set $V$, we show that choosing $b_i = 2^\tau 1_V(\mathbf{i})$ satisfies the constraints of Equation 3, which implies that $\sigma^L(S, \tau) \le \sigma^L(S, \tau; (b_i)) = 2^\tau \sum_{\mathbf{i} \in V} |\hat{\alpha}_{\mathbf{i}}|^2$.

We are now ready to prove our main statement related to the original problem of solving $S-|LPN\rangle$ using fine-grained unambiguous measurements. We define $B_d \triangleq \{\mathbf{i} \in \mathbb{F}_2^n : |\mathbf{i}|_H \le d\}$.

**Theorem 5.** Let $S = \{|\psi_x\rangle\}_{x \in \mathbb{F}_2^n}$ be a set of symmetric states with $|\psi_0\rangle = \sum_{\mathbf{i} \in \mathbb{F}_2^n} \hat{\alpha}_{\mathbf{i}}|\hat{\mathbf{i}}\rangle$. Let $\gamma > 2$ be an absolute constant. Let $\varepsilon$ such that $\sum_{\mathbf{i} \notin B_d} |\hat{\alpha}_{\mathbf{i}}|^2 = \varepsilon$. Then $\rho(S, \gamma d) \le \varepsilon(1 + o(1))$, where $o(1)$ is a quantity that goes to 0 as $d, n \to \infty$.

For states $|\psi_x\rangle = \sum_e f(e)|\mathbf{x} + e\rangle$ where $f$ is a Bernoulli function of parameter $t$, if we write $|\psi_0\rangle = \sum_{\mathbf{i} \in \mathbb{F}_2^n} \hat{\alpha}_{\mathbf{i}}|\hat{\mathbf{i}}\rangle$, then $\sum_{\mathbf{i} \notin B_d} |\hat{\alpha}_{\mathbf{i}}|^2 = \text{negl}(n)$ for $d = t^\perp(1 + o(1))$. It was shown in [CT24] that one can learn around $2t^\perp$ coordinates of $\mathbf{x}$ (so in particular parities of $\mathbf{x}$) from $|\psi_x\rangle$. The above proposition shows that this is essentially optimal.

In order to prove this proposition, we need a stronger statement than Proposition 3. What we show using linear algebraic arguments is that $\bar{B}_d$ almost covers any affine subspace $V$ of $\mathbb{F}_2^n$ of dimension $\tau = \lceil \gamma d \rceil$, meaning that $\frac{|\bar{B}_d \cap V|}{|V|} = 1 - o(1)$.

**3. The average number of parities setting.** We also study the average number of parities setting. Recall that here, we choose $C(k) = k$. Let $\rho_{Av}(S)$, $\rho_{Av}^L(S)$, $\sigma_{Av}^L(S)$ the values of the different optimization problems with this choice of $C$. We give 2 families of dual solutions, and we give matching potential primal solutions. The first upper bound can be seen as an equivalent of Proposition 5 and this shows that if the average weight of the dual support is $d$ then one can learn at most $2d$ parities of $\mathbf{x}$ from $|\psi_x\rangle$.

**Theorem 6.** $\rho_{Av}(S) \le 2 \sum_{\mathbf{i} \in \mathbb{F}_2^n} |\mathbf{i}|_H |\hat{\alpha}_{\mathbf{i}}|^2$, where $|\cdot|_H$ is the Hamming weight of a binary vector.

In order to prove this bound, we show using algebraic arguments that the choice $b_i = 2|\mathbf{i}|_H$ is a valid solution of the dual linear program and we immediately have $\sigma_{Av}(S) \le \sigma_{Av}(S; (b_i)) = 2 \sum_{\mathbf{i} \in \mathbb{F}_2^n} |\mathbf{i}|_H |\hat{\alpha}_{\mathbf{i}}|^2$. This proposition implies the following

**Corollary 1.** Let $S = \{|\psi_x\rangle\}_{x \in \mathbb{F}_2^n}$ be a set of symmetric states with $|\psi_0\rangle = \sum_{\mathbf{i} \in \mathbb{F}_2^n} \hat{\alpha}_{\mathbf{i}}|\hat{\mathbf{i}}\rangle$. Assume that $\sum_{\mathbf{i} \notin B_d} |\hat{\alpha}_{\mathbf{i}}|^2 = \varepsilon$. Then

$$ \rho_{Av}(S) \le 2d(1 - \varepsilon) + 2n\varepsilon. $$

This means that if the dual support of $|\psi_0\rangle$ is highly concentrated on words of weight at most $d$, then one cannot unambiguously learn on average much more than $2d$ parities of $\mathbf{x}$ from $|\psi_x\rangle$.

The bound of Theorem 6 is sometimes far from tight. We give another bound based on a different choice of dual solutions

**Proposition 4.** $\rho_{Av}(S) \le (2^n + n - 1)|\hat{\alpha}_0|^2 + (n - 1) \sum_{\mathbf{i} \in \mathbb{F}_2^n \setminus \{0\}} |\hat{\alpha}_{\mathbf{i}}|^2$.

We also provide in Appendix B a more in-depth study of the case $n = 2$ where these two families of solutions span all possible dual solutions (which is not the case as $n$ increases).
### 1.3.3 Computational hardness

Finally, we study the computational hardness of implementing such measurements. We managed to express $\rho(S)$ as a linear maximization program. A natural question is, given solutions $(\lambda_i^{H,y})$ of the primal problem, whether one can efficiently construct fine-grained measurements from these solutions. We positively answer this question if we find a solution which is quantum sampleable.

**Theorem 7.** Let $S$ be a set of symmetric states and let $(\lambda_i^{H,y})$ be a primal solution, i.e. an ensemble of nonnegative reals satisfying Equation 1 and 2. Assume that these numbers are efficiently quantum sampleable i.e. that the unitary

$$U : |\mathbf{i}\rangle|0\rangle \mapsto \sum_{k \in [0,n]} \sum_{\mathbf{H} \in \Lambda_k} \sqrt{\lambda_i^{\mathbf{H}}} \frac{|\hat{\alpha}_i|}{\hat{\alpha}_i} |\mathbf{i}\rangle|\mathbf{H}\rangle, \quad (4)$$

can be computed in time poly(n). Then we can construct a POVM $\{F_{\mathbf{H},y}\} \in \Gamma(S)$ such that

1. $\rho(S; \{F_{\mathbf{H},y}\}) = \rho^L(S; (\lambda_i^H))$.

2. The POVM $\{F_{\mathbf{H},y}\}$ can be efficiently implemented in time poly(n).

## 1.4 Discussion and Perspectives

Let us put these results in perspective.

The main contribution of this work is to introduce fine-grained measurements and to perform an extensive study of these measurements. In the case of symmetric states, we provide a full characterization of the effectiveness of these measurements in terms of a linear program. This characterization allows us in particular to provide necessary and sufficient conditions for the existence of fine-grained unambiguous measurements that succeed with non zero probability, and to give precise upper bounds both in the threshold setting and in the average case setting.

Regarding our original question related to $S-|\text{LPN}\rangle$, Theorem 5 and, to some extent Theorem 6 show that one cannot beat the $\frac{k}{2}$ barrier that we discussed in Section 1.1. However the optimal measurement for $S-|\text{LPN}\rangle$, that uses the Pretty Good Measurement actually breaks this barrier. The way to interpret these two results is that there are actually two variants of the discrimination problem:

1. Given $|\psi_c\rangle$ for $c \in C$ where $C$ is a $k$-dimensional code, recover $c$. This is the actual $S-|\text{LPN}\rangle$ problem.

2. Given $|\psi_x\rangle$ for $x \in \mathbb{F}_2^n$, recover $k$ parities of $x$. This is the problem we consider in our work. We then use the information that $x \in C$ to recover $x$ from these $k$ parities.

The second task is harder than the first one but it allows to work with a discrimination problem independently of the chosen code $C$. The work of [CT24] gave information theoretic bounds for the first problem and we give in this work information theoretic bounds for the second problem. Our main conclusion is that the first task can be significantly easier than the second one, and that one cannot expect to beat Prange's bound if we only consider the second variant.

In other words, the main conclusion of this work is therefore that we have to strongly use the structure of the code $C$ in order to solve the $S-|\text{LPN}\rangle$, way beyond just recovering a codeword from $k$ parities. More generally, we introduced a framework for learning unambiguously $k$-parities of $x$ from a pure state $|\psi_x\rangle$. This is a very natural problem and we provided an extensive study of this question, at least for symmetric states. It would be interesting also to see what results hold if we remove this symmetry requirement. Finally, we believe fine-grained unambiguous measurements can have other applications, for example in the study of Quantum Oblivious Transfer or Quantum Random Access Codes.

# 2 Preliminaries

**Notations.** In this article, we work in the vector space $\mathbb{F}_2^n$. Vectors of $\mathbb{F}_2^n$ will be column vectors and will be written in small bold letters $x, y, \dots$. The canonical inner product in $\mathbb{F}_2^n$ between vectors $x$ and $y$ is denoted $x \cdot y$. Matrices will be written in capital bold letters $G, H, \dots$. We write $x^\top$ (resp.
$M^T$) to denote the transpose of a vector (resp. of a matrix). For a Hermitian matrix $M$, we write $M \ge 0$ when $M$ is positive semidefinite.

For $M \in \mathbb{C}^{F_2^n \times F_2^n}$, we write $(M)_{i,j}$ to denote the entry of $M$ in row $i$ and column $j$. In the bra-ket notation, we can write $(M)_{i,j} = \langle i | M | j \rangle$.

## 2.1 Quantum computing preliminaries

We consider the Hadamard unitary $H : |b\rangle \rightarrow \frac{1}{\sqrt{2}}(|0\rangle + (-1)^b|b\rangle)$ which satisfies $H = H^\dagger$. The Quantum Fourier Transform over $F_2^n$ is just the operation $H^{\otimes n}$.

**Definition 7 (Shift and Phase operators).** For $b$ in $F_2^n$, let $X_b$ be the shift operator $X_b|x\rangle = |x+b\rangle$ and $Z_b$ be the phase operator $Z_b|x\rangle = (-1)^{x \cdot b}|x\rangle$.

Notice that because we work in $F_2^n$, we have $X_b^\dagger = X_b$.

**Definition 8.** For a vector $x \in F_2^n$, we define $|\hat{x}\rangle = H^{\otimes n}|x\rangle = \frac{1}{\sqrt{2^n}} \sum_{y \in F_2^n} (-1)^{x \cdot y} |y\rangle$. For a matrix $M \in \mathbb{C}^{F_2^n \times F_2^n}$, we define $\hat{M} = H^{\otimes n}MH^{\otimes n}$.

Let $M \in \mathbb{C}^{F_2^n \times F_2^n}$. From our definitions, we have that for any $x, y \in F_2^n$, we have $\langle x | \hat{M} | y \rangle = \langle \hat{x} | M | \hat{y} \rangle$. The elements $\langle \hat{x} | M | \hat{x} \rangle$ are called the Fourier diagonal elements of $M$.

**Proposition 5.** We have for all $b$ in $F_2^n$ that $|\hat{x}\rangle$ is an eigenstate of $X_b$ associated to the eigenvalue $(-1)^{x \cdot b}$ and

$$X_b \cdot H^{\otimes n} = H^{\otimes n} \cdot Z_b \qquad (5)$$

$$H^{\otimes n} \cdot X_b = Z_b \cdot H^{\otimes n}. \qquad (6)$$

## 2.2 Binary linear codes

Let $\mathcal{P}_2(n)$ be the set of all subspaces of $F_2^n$ and let $\mathcal{G}_2(n, k)$ be the set of all subspaces of $F_2^n$ of dimension $k$. In particular, we have $\mathcal{P}_2(n) = \bigcup_{k=0}^n \mathcal{G}_2(n, k)$.

A binary linear code $\mathcal{C}$ of dimension $k$ and length $n$ is an element of $\mathcal{G}_2(n, k)$. It can be characterized both by a generator matrix $G \in F_2^{k \times n}$ of rank $k$ or a parity matrix $H \in F_2^{(n-k) \times n}$ of rank $(n-k)$, so that

$$\mathcal{C} = \{G^\top s : s \in F_2^k\} = \{c \in F_2^n : Hc = 0\} = \text{Ker}(H),$$

where again, we use the convention that $\mathcal{C}$ is a column subspace. Notice that the same code $\mathcal{C} \in \mathcal{G}_2(n, k)$ can have many different generator and parity matrices. The dual code of $\mathcal{C}$ is $\mathcal{C}^\perp = \{y \in F_2^n : \forall c \in \mathcal{C}, c \cdot y = 0\}$. One can check that a generator matrix $G$ of $\mathcal{C}$ is also a parity matrix of $\mathcal{C}^\perp$.

**Definition 9.** We denote $\Lambda_{n,k}$ the set of matrices $M \in F_2^{k \times n}$ of full rank $k$. When $n$ is clear from context, we will omit the dependency in $n$ and write $\Lambda_k$ instead of $\Lambda_{n,k}$.

It will be useful to fix a generator matrix associated to a code.

**Definition 10.** $\forall k \in [0, n]$, $\forall \mathcal{C} \in \mathcal{G}_2(n, k)$, we associate to $\mathcal{C}$ a fixed arbitrary matrix $G_C \in \Lambda_k$ such that $\text{span}\{(G_C)^\top s : s \in F_2^k\} = \mathcal{C}$. If the code $\mathcal{C}$ is specified by a parity matrix $H$, we also denote by $G_H$, this associated generator matrix.

**Definition 11.** Let $H \in \Lambda_k$. Let $\mathcal{C} = \text{Ker}(H) \in \mathcal{G}_2(n, n-k)$, which implies that $H(G_C)^\top = H^\top G_C = 0$. We define the dual cosets $\mathcal{D}_H(s)$ associated to $H$ as follows

$$\forall s \in F_2^{n-k}, \mathcal{D}_H(s) \triangleq \{x \in F_2^n : G_C \cdot x = s\}.$$

Let any $v \in F_2^n$ such that $G_C \cdot v = s$. Notice that we can also write

$$\mathcal{D}_H(s) = \{H^\top u + v : u \in F_2^k\}.$$

The following proposition will be very useful throughout this work.
**Proposition 6.** Let $C \in \mathcal{G}_2(n, k)$ be a linear code.

$$ \sum_{\mathbf{c} \in C} (-1)^{\mathbf{v} \cdot \mathbf{c}} = \begin{cases} |C| & \text{if } \mathbf{v} \in C^{\perp} \\ 0 & \text{otherwise} \end{cases} $$

*Proof.* If $\mathbf{v} \in C^{\perp}$, then $\mathbf{v} \cdot \mathbf{c} = 0$ for all $\mathbf{c} \in C$. If $\mathbf{v} \notin C^{\perp}$, then there exists $\mathbf{c}_0 \in C$ such that, $\mathbf{v} \cdot \mathbf{c}_0 = 1$.

$$ \sum_{\mathbf{c} \in C} (-1)^{\mathbf{v} \cdot \mathbf{c}} = \sum_{\mathbf{c} \in C} (-1)^{\mathbf{v} \cdot (\mathbf{c} + \mathbf{c}_0)} = (-1)^{\mathbf{v} \cdot \mathbf{c}_0} \sum_{\mathbf{c} \in C} (-1)^{\mathbf{v} \cdot \mathbf{c}} = - \sum_{\mathbf{c} \in C} (-1)^{\mathbf{v} \cdot \mathbf{c}} $$

Thus, $\sum_{\mathbf{c} \in C} (-1)^{\mathbf{v} \cdot \mathbf{c}} = 0$.

□

## 2.3 Fine-Grained Unambiguous Measurements on $\mathbb{F}_2^n$

We want to capture what it means to learn $k$ parities of $\mathbf{x} = \begin{pmatrix} x_1 \\ \vdots \\ x_n \end{pmatrix}$. A way to capture this is to consider matrices $\mathbf{H} \in \mathbb{F}_2^{k \times n}$ of rank $k$, and to write $\mathbf{Hx} = \mathbf{y}$. For example, if

$$ \mathbf{H} = \begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \end{pmatrix} \quad \text{and} \quad \mathbf{y} = \begin{pmatrix} 1 \\ 0 \end{pmatrix} \quad \text{then} \quad \mathbf{Hx} = \mathbf{y} \Leftrightarrow x_1 \oplus x_3 = 1 \land x_2 \oplus x_3 = 0. $$

Here, we know 2 parities of $\mathbf{x}$. We now define the information sets associated to the knowledge of such parities:

**Definition 12.**

$$ \forall k \in [0, n], \mathcal{I}_k \triangleq \{(\mathbf{H}, \mathbf{y}) \in \Lambda_k \times \mathbb{F}_2^k\} ; \mathcal{I} \triangleq \cup_{k=0}^n \mathcal{I}_k ; \mathcal{I}^* = \mathcal{I} \setminus \mathcal{I}_0. $$

We are now ready to define Fine-Grained Unambiguous Measurements over a set of states $S$.

**Definition 13 (Fine-Grained Unambiguous Measurements on $\mathbb{F}_2^n$).** A fine-grained unambiguous measurement on $\mathbb{F}_2^n$ associated to a set of states $\{|\psi_x\rangle, \mathbf{x} \in \mathbb{F}_2^n\}$ is a POVM $\{F_{\mathbf{H},\mathbf{y}}(\mathbf{H},\mathbf{y}) \in \mathcal{I} \text{ such that}$

$$ \forall (\mathbf{H}, \mathbf{y}) \in \mathcal{I}, \forall \mathbf{x} \in \mathbb{F}_2^n \text{ s.t. } \mathbf{Hx} \neq \mathbf{y}, \mathrm{Tr}(F_{\mathbf{H},\mathbf{y}}|\psi_{\mathbf{x}}\rangle\langle\psi_{\mathbf{x}}|) = 0. $$

When $(\mathbf{H}, \mathbf{y})$ are the null matrix and null vector, the associated POVM element is also denoted $F_{\perp}$. In particular, we can write

$$ F_{\perp} = I - \sum_{(\mathbf{H}, \mathbf{y}) \in \mathcal{I}^*} F_{\mathbf{H}, \mathbf{y}}. $$

The different outcomes $(\mathbf{H}, \mathbf{y})$ correspond to the information: “I know with certainty that $\mathbf{Hx} = \mathbf{y}$.”

**Definition 14.** Given a set of states $S = \{|\psi_x\rangle\}_{\mathbf{x} \in \mathbb{F}_2^n}$, the set of fine-grained unambiguous measurements associated to $S$ is denoted $\Gamma(S)$.

**The associated optimization program.** It is simple to evaluate the quality of a standard unambiguous measurement, just by looking at the probability of success. In our setting, we will have a distribution over the number of parities we obtain. As we can think of, the two most natural settings are the threshold setting, where we ask the measurement to output at least $\tau$ parities and the average parity setting where we look at the average number of parities that the measurement outputs. Both these settings, and many other settings, can be encompassed by the quantity below

**Definition 15.** Let $S = \{|\psi_x\rangle\}_{\mathbf{x} \in \mathbb{F}_2^n}$ be a set of states and $\{F_{\mathbf{H},\mathbf{y}} : (\mathbf{H}, \mathbf{y}) \in \mathcal{I}\} \in \Gamma(S)$. The quality of the measurement $\{F_{\mathbf{H},\mathbf{y}}\}$ on the set $S$ for some function $C: [0, n] \to \mathbb{R}$ is given by the quantity:

$$ \rho(S, \{F_{\mathbf{H},\mathbf{y}}\}) \triangleq \mathbb{E}_{\mathbf{x} \in \mathbb{F}_2^n} \left[ \sum_{k \in [0, n]} \sum_{(\mathbf{H}, \mathbf{y}) \in \mathcal{I}_k} C(k) \cdot \mathrm{Tr}(F_{\mathbf{H},\mathbf{y}}|\psi_{\mathbf{x}}\rangle\langle\psi_{\mathbf{x}}|) \right]. $$

The optimal value of a measurement for this choice of function $C$ then becomes

$$ \rho(S) \triangleq \max_{\{F_{\mathbf{H},\mathbf{y}}\} \in \Gamma(S)} \rho(S, \{F_{\mathbf{H},\mathbf{y}}\}). $$

The threshold setting then corresponds to the case where $C(k) = 1$ for $k \ge \tau$ and $C(k) = 0$ otherwise. The average parity setting corresponds to the case $C(k) = k$.
**Symmetric states.** In this article, we will work on sets of symmetric states.

**Definition 16.** A set $S = \{|\psi_x\}\}_{x \in \mathbb{F}_2^n}$ is called symmetric iff. $\forall \mathbf{x} \in \mathbb{F}_2^n$, $|\psi_x\rangle = X_x|\psi_0\rangle$.

If we write $|\psi_0\rangle = \sum_{i \in \mathbb{F}_2^n} \hat{\alpha}_i |\hat{i}\rangle$, we have $|\psi_x\rangle = \sum_{i \in \mathbb{F}_2^n} \hat{\alpha}_i (-1)^{\mathbf{x} \cdot \mathbf{i}} |\hat{i}\rangle$.

# 3 Reformulation as a linear program

In this section, our goal is to show that the optimization program for $\rho(S)$ can be rephrased in terms of a linear program when $S$ is a set of symmetric states. Our proof will go in three steps:

1. We first provide a simplified expression of $\rho(S)$. We introduce the notion of symmetrized measurements which allows us in particular to express the objective $\rho(S)$ as a function of the diagonal Fourier coefficients of the matrices $\{F_{H,y}\}$.

2. We then show linear relations between the different diagonal Fourier coefficients of the matrices $\{F_{H,y}\}$ using the unambiguity condition of these measurements.

3. We use these relations to relax the optimization program into a linear program with objective $\rho^L(S)$. Finally, we show that this relaxation doesn't change the objective value, namely that $\rho(S) = \rho^L(S)$.

## 3.1 Reformulation of $\rho(S)$ involving the Fourier diagonal elements of $F_{H,y}$

We introduce the set of symmetric fine-grained measurements, which are defined as follows:

**Definition 17.** Let $S$ be a set of states. We define

$$ \Gamma_s(S) = \{ \{F_{H,y}\} \in \Gamma(S) : \forall (\mathbf{H}, \mathbf{y}) \in \mathcal{I}, \forall \mathbf{a} \in \mathbb{F}_2^n, X_{\mathbf{a}} F_{H,y} X_{\mathbf{a}} = F_{H,y+\mathbf{H}\mathbf{a}} \}. $$

The main goal of this section is to prove the following theorem.

**Theorem 1.** Let $S = \{|\psi_x\}\}_{x \in \mathbb{F}_2^n}$ be a set of symmetric states with $|\psi_0\rangle = \sum_{i \in \mathbb{F}_2^n} \hat{\alpha}_i |\hat{i}\rangle$. Then

$$ \rho(S) = \max \left\{ \sum_{k \in [0, n]} \sum_{(\mathbf{H}, \mathbf{y}) \in \mathcal{I}_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} C(k) |\hat{\alpha}_i|^2 \langle \hat{i} | F_{\mathbf{H}, \mathbf{y}} | \hat{i} \rangle : \{F_{\mathbf{H}, \mathbf{y}}\} \in \Gamma_s(S) \right\}. $$

In order to prove this theorem, we first present a simplification of $\rho(S)$, given by the proposition below.

### 3.1.1 First simplification

**Proposition 7.** Let $S = \{|\psi_x\}\}$ be a set of symmetric states. For any $\{F_{H,y}\}$, we define

$$ \rho_2(S, \{F_{H,y}\}) \triangleq \sum_{k \in [0, n]} \sum_{(\mathbf{H}, \mathbf{y}) \in \mathcal{I}_k} C(k) \cdot \mathrm{Tr}(F_{H,y}|\psi_0\rangle\langle\psi_0|). $$

Then $\rho(S) = \max \{\rho_2(S, \{F_{H,y}\}) : \{F_{H,y}\} \in \Gamma_s(S)\}$.

*Proof.* We fix a set $S$ of symmetric states. We start with the following lemma

**Lemma 1.** $\forall \{F_{H,y}\} \in \Gamma_s(S), \rho(S, \{F_{H,y}\}) = \rho_2(S, \{F_{H,y}\})$.
Proof. We fix any {$F_{H,y} \in \Gamma_s(S)$} and write

$$
\begin{align*}
\rho(S, \{F_{H,y}\}) &= \frac{1}{2^n} \sum_{\mathbf{x} \in \mathbb{F}_2^n} \sum_{k \in [0,n]} C(k) \sum_{(\mathbf{H},y) \in \mathcal{I}_k} \mathrm{Tr}(F_{\mathbf{H},y} |\psi_{\mathbf{x}}\rangle\langle\psi_{\mathbf{x}}|) \\
&= \frac{1}{2^n} \sum_{\mathbf{x} \in \mathbb{F}_2^n} \sum_{k \in [0,n]} C(k) \sum_{(\mathbf{H},y) \in \mathcal{I}_k} \mathrm{Tr}(X_{\mathbf{x}} F_{\mathbf{H},y} X_{\mathbf{x}} |\psi_0\rangle\langle\psi_0|) && \text{since } S \text{ is a set of symmetric states} \\
&= \frac{1}{2^n} \sum_{\mathbf{x} \in \mathbb{F}_2^n} \sum_{k \in [0,n]} C(k) \sum_{(\mathbf{H},y) \in \mathcal{I}_k} \mathrm{Tr}(F_{\mathbf{H},y+\mathbf{H}x} |\psi_0\rangle\langle\psi_0|) && \text{since } \{F_{\mathbf{H},y}\} \in \Gamma_s(S) \\
&= \frac{1}{2^n} \sum_{k \in [0,n]} C(k) 2^{n-k} \sum_{(\mathbf{H},y) \in \mathcal{I}_k} \sum_{\mathbf{a} \in \mathbb{F}_2^k} \mathrm{Tr}(F_{\mathbf{H},\mathbf{a}} |\psi_0\rangle\langle\psi_0|) && \text{introducing new variable } \mathbf{a} = \mathbf{y} + \mathbf{H}\mathbf{x} \\
&= \sum_{k \in [0,n]} C(k) \sum_{(\mathbf{H},\mathbf{a}) \in \mathcal{I}_k} \mathrm{Tr}(F_{\mathbf{H},\mathbf{a}} |\psi_0\rangle\langle\psi_0|) \\
&= \rho_2(S, \{F_{\mathbf{H},y}\})
\end{align*}
$$

□

**Lemma 2.** Let {$F_{H,y} \in \Gamma(S)$} and let {$\overline{F}_{H,y}$} such that

$$
\forall (\mathbf{H}, \mathbf{y}) \in \mathcal{I}, \quad \overline{F}_{\mathbf{H}, \mathbf{y}} \triangleq \frac{1}{2^n} \sum_{\mathbf{a} \in \mathbb{F}_2^n} X_{\mathbf{a}} F_{\mathbf{H}, \mathbf{y}+\mathbf{H}\mathbf{a}} X_{\mathbf{a}}.
$$

Then {$\overline{F}_{H,y} \in \Gamma_s(S)$}.

Proof. Regarding non-negativity, we write

$$
\forall (\mathbf{H}, \mathbf{y}) \in \mathcal{I}, \quad \overline{F}_{\mathbf{H}, \mathbf{y}} = \frac{1}{2^n} \sum_{\mathbf{a} \in \mathbb{F}_2^n} X_{\mathbf{a}} F_{\mathbf{H}, \mathbf{y}+\mathbf{H}\mathbf{a}} X_{\mathbf{a}}.
$$

Now, since $\forall \mathbf{a} \in \mathbb{F}_2^n$, $X_{\mathbf{a}} = X_{\mathbf{a}}^{\dagger}$ and each $F_{\mathbf{H},\mathbf{y}+\mathbf{H}\mathbf{a}} \succeq 0$, we directly have that each $X_{\mathbf{a}} F_{\mathbf{H},\mathbf{y}+\mathbf{H}\mathbf{a}} X_{\mathbf{a}} \succeq 0$
hence $\overline{F}_{\mathbf{H},\mathbf{y}} \succeq 0$.

Now fix any $(\mathbf{H}, \mathbf{y}) \in \mathcal{I}$ and $\mathbf{x} \in \mathbb{F}_2^n$ such that $\mathbf{H}\mathbf{x} \neq \mathbf{y}$. We write

$$
\begin{align*}
\mathrm{Tr}(\overline{F}_{\mathbf{H},y} |\psi_{\mathbf{x}}\rangle\langle\psi_{\mathbf{x}}|) &= \frac{1}{2^n} \sum_{\mathbf{a} \in \mathbb{F}_2^n} \mathrm{Tr}(X_{\mathbf{a}} F_{\mathbf{H},y+\mathbf{H}\mathbf{a}} X_{\mathbf{a}} |\psi_{\mathbf{x}}\rangle\langle\psi_{\mathbf{x}}|) \\
&= \frac{1}{2^n} \sum_{\mathbf{a} \in \mathbb{F}_2^n} \mathrm{Tr}(F_{\mathbf{H},y+\mathbf{H}\mathbf{a}} X_{\mathbf{a}} |\psi_{\mathbf{x}}\rangle\langle\psi_{\mathbf{x}}| X_{\mathbf{a}}^{\dagger}) \\
&= \frac{1}{2^n} \sum_{\mathbf{a} \in \mathbb{F}_2^n} \mathrm{Tr}(F_{\mathbf{H},y+\mathbf{H}\mathbf{a}} |\psi_{\mathbf{x}+\mathbf{a}}\rangle\langle\psi_{\mathbf{x}+\mathbf{a}}|) \\
&= 0
\end{align*}
$$

where in the last equality, we use that fact that $\mathbf{H}\mathbf{x} \neq \mathbf{y} \Rightarrow \forall \mathbf{a} \in \mathbb{F}_2^n$, $\mathbf{H}(\mathbf{x} + \mathbf{a}) \neq \mathbf{y} + \mathbf{H}\mathbf{a}$ and the fact
that {$F_{\mathbf{H},y} \in \Gamma(S)$}. Finally, we have

$$
\begin{align*}
\sum_{(\mathbf{H},y) \in \mathcal{I}} \bar{F}_{\mathbf{H},y} &= \frac{1}{2^n} \sum_{\mathbf{a} \in \mathbb{F}_2^n} \sum_{(\mathbf{H},y) \in \mathcal{I}} X_{\mathbf{a}} F_{\mathbf{H},y} X_{\mathbf{a}} \\
&= \frac{1}{2^n} \sum_{\mathbf{a} \in \mathbb{F}_2^n} X_{\mathbf{a}} I X_{\mathbf{a}} \\
&= I
\end{align*}
$$
We proved that {$\overline{F_{H,y}} \in \Gamma(S)$}. For the second requirement of Definition 17, we write

$$
\begin{align*}
X_b \overline{F}_{H,y} X_b &= \frac{1}{2^n} \sum_{\mathbf{a} \in \mathbb{F}_2^n} X_{\mathbf{a}+\mathbf{b}} F_{H,y+\mathbf{H}\mathbf{a}} X_{\mathbf{a}+\mathbf{b}} \\
&= \frac{1}{2^n} \sum_{\mathbf{a}' \in \mathbb{F}_2^n} X_{\mathbf{a}'} F_{H,y+\mathbf{H}\mathbf{b}+\mathbf{H}\mathbf{a}'} X_{\mathbf{a}'} \quad \text{variable change } \mathbf{a}' = \mathbf{a} + \mathbf{b} \\
&= \overline{F}_{H,y+\mathbf{H}\mathbf{b}}
\end{align*}
$$

which concludes the proof of our lemma.

<figure><img src="image_2.png" /></figure>

We can now continue the proof of Proposition 7, and we will prove the equality by proving the inequality both ways. First, we write

$$
\begin{align*}
\rho(S) &= \max \{ \rho(S, \{F_{H,y}\}) : \{F_{H,y}\} \in \Gamma(S) \} \\
&\ge \max \{ \rho(S, F_{H,y}) : \{F_{H,y}\} \in \Gamma_s(S) \} && \text{since } \Gamma_s(S) \subseteq \Gamma(S) \\
&= \max \{ \rho_2(S, \{F_{H,y}\}) : \{F_{H,y}\} \in \Gamma_s(S) \} && \text{from Lemma 1}
\end{align*}
$$

For the reverse inequality, let {$F_{H,y}^{\text{MAX}} \in \Gamma(S)$} such that {$\rho(S) = \rho(S, \{F_{H,y}^{\text{MAX}}\})$}, and let {$\overline{F_{H,y}}$} such that

$$
\forall (\mathbf{H}, \mathbf{y}) \in \mathcal{I}, \quad \overline{F}_{\mathbf{H},\mathbf{y}} \triangleq \frac{1}{2^n} \sum_{\mathbf{a} \in \mathbb{F}_2^n} X_{\mathbf{a}} F_{(\mathbf{H},\mathbf{y}+\mathbf{H}\mathbf{a})}^{\text{MAX}} X_{\mathbf{a}}.
$$

We now write

$$
\begin{align*}
\max\{\rho_2(S, \{F_{H,y}\}) : \{F_{H,y}\} \in \Gamma_s(S)\} &\ge \rho_2(S, \overline{F}_{H,y}) && \text{from Lemma 2} \\
&= \sum_{k \in [0,n]} C(k) \sum_{(H,y) \in \mathcal{I}_k} \operatorname{Tr}(\overline{F}_{H,y} |\psi_0\rangle\langle\psi_0|) \\
&= \sum_{k \in [0,n]} C(k) \sum_{(H,y) \in \mathcal{I}_k} \frac{1}{2^n} \sum_{\mathbf{a} \in \mathbb{F}_n^2} \operatorname{Tr}(X_{\mathbf{a}} F_{H,y+\mathbf{H}\mathbf{a}}^{\text{MAX}} X_{\mathbf{a}} |\psi_0\rangle\langle\psi_0|) \\
&= \frac{1}{2^n} \sum_{\mathbf{a} \in \mathbb{F}_2^n} \sum_{k \in [0,n]} C(k) \sum_{(H,y) \in \mathcal{I}_k} \operatorname{Tr}(F_{H,y+\mathbf{H}\mathbf{a}}^{\text{MAX}} |\psi_{\mathbf{a}}\rangle\langle\psi_{\mathbf{a}}|) \\
&= \frac{1}{2^n} \sum_{\mathbf{a} \in \mathbb{F}_2^n} \sum_{k \in [0,n]} C(k) \sum_{(H,y') \in \mathcal{I}_k} \operatorname{Tr}(F_{H,y'}^{\text{MAX}} |\psi_{\mathbf{a}}\rangle\langle\psi_{\mathbf{a}}|) && (\mathbf{y}' = \mathbf{y} + \mathbf{H}\mathbf{a}) \\
&= \rho(S, \{F_{H,y}^{\text{MAX}}\}) \\
&= \rho(S)
\end{align*}
$$

Putting our two inequalities together, we obtain

$$
\rho(S) = \max \{ \rho_2(S, \{F_{H,y}\}) : \{F_{H,y}\} \in \Gamma_s(S) \}.
$$

<figure><img src="image_3.png" /></figure>

3.1.2 Fourier diagonal terms

**Proposition 8.** Let $S = \{|\psi_x\}\}_{x \in \mathbb{F}_2^n}$ be a set of symmetric states and let $\{F_{H,y}\} \in \Gamma_s(S)$. We define

$$
F_{\mathbf{H}} \triangleq \sum_{\mathbf{y} \in \mathbb{F}_2^k} F_{\mathbf{H}, \mathbf{y}} \quad \forall k \in [0, n], \forall \mathbf{H} \in \Lambda_k.
$$

Then for each $(\mathbf{H}, \mathbf{y}) \in \mathcal{I}$ and $\mathbf{i}, \mathbf{j} \in \mathbb{F}_2^n$, we have

$$
(\widehat{F}_{\mathbf{H}})_{\mathbf{i},\mathbf{j}} = \begin{cases} 0 & \text{if } \mathbf{i} \neq \mathbf{j} \\ 2^k \langle \mathbf{i} | \widehat{F}_{\mathbf{H},\mathbf{y}} | \mathbf{j} \rangle & \text{if } \mathbf{i} = \mathbf{j} \end{cases}
$$

In particular, each $\widehat{F_H}$ is a diagonal matrix, and the diagonal terms $\langle i | \widehat{F_{H,y}} | i \rangle$ are independent of $y$.
Proof. We fix any $(\mathbf{H}, \mathbf{y}) \in \mathcal{I}$. Let any $\mathbf{b} \in \mathbb{F}_2^n$ such that $\mathbf{H}\mathbf{b} = \mathbf{y}$. We write

$$ 
\begin{aligned}
\widehat{F_{\mathbf{H}}} &= H^{\otimes n} F_{\mathbf{H}} H^{\otimes n} = H^{\otimes n} \sum_{\mathbf{y} \in \mathbb{F}_2^k} F_{\mathbf{H}, \mathbf{y}} H^{\otimes n} = \frac{1}{2^{n-k}} \sum_{\mathbf{a} \in \mathbb{F}_2^n} H^{\otimes n} F_{\mathbf{H}, \mathbf{a}} H^{\otimes n} \\
&= \frac{1}{2^{n-k}} \sum_{\mathbf{a} \in \mathbb{F}_2^n} H^{\otimes n} X_{\mathbf{a}+\mathbf{b}} F_{\mathbf{H}, \mathbf{y}} X_{\mathbf{a}+\mathbf{b}} H^{\otimes n} = \frac{1}{2^{n-k}} \sum_{\mathbf{a} \in \mathbb{F}_2^n} Z_{\mathbf{a}+\mathbf{b}} \widehat{F_{\mathbf{H}, \mathbf{y}}} Z_{\mathbf{a}+\mathbf{b}},
\end{aligned}
$$

where we used $F_{\mathbf{H},\mathbf{a}} = X_{\mathbf{a}+\mathbf{b}} F_{\mathbf{H},\mathbf{b}} X_{\mathbf{a}+\mathbf{b}}$ since $\{F_{\mathbf{H},\mathbf{y}}\} \in \Gamma_s(S)$. Now, fix any $\mathbf{i}, \mathbf{j} \in \mathbb{F}_2^n$. We write

$$ 
\begin{aligned}
(\widehat{F_{\mathbf{H}}})_{\mathbf{i},\mathbf{j}} &= \langle \mathbf{i} | \widehat{F_{\mathbf{H}}}| \mathbf{j} \rangle = \langle \mathbf{i} | \frac{1}{2^{n-k}} \sum_{\mathbf{a} \in \mathbb{F}_2^n} Z_{\mathbf{a}+\mathbf{b}} \widehat{F_{\mathbf{H},\mathbf{y}}} Z_{\mathbf{a}+\mathbf{b}} | \mathbf{j} \rangle = \frac{1}{2^{n-k}} \sum_{\mathbf{a} \in \mathbb{F}_2^n} (-1)^{(\mathbf{a}+\mathbf{b}) \cdot (\mathbf{i}+\mathbf{j})} \langle \mathbf{i} | \widehat{F_{\mathbf{H},\mathbf{y}}} | \mathbf{j} \rangle \\
&= \begin{cases} 0 & \text{if } \mathbf{i} \neq \mathbf{j} \\ 2^k \langle \mathbf{i} | \widehat{F_{\mathbf{H},\mathbf{y}}} | \mathbf{i} \rangle & \text{if } \mathbf{i} = \mathbf{j} \end{cases}
\end{aligned}
$$

□

### 3.1.3 Proof of Theorem 1

We can now conclude the proof of our theorem, which we restate below

**Theorem 1.** Let $S = \{|\psi_x\}\}_{\mathbf{x} \in \mathbb{F}_2^n}$ be a set of symmetric states with $|\psi_0\rangle = \sum_{\mathbf{i} \in \mathbb{F}_2^n} \hat{\alpha}_\mathbf{i} |\hat{\mathbf{i}}\rangle$. Then

$$ \rho(S) = \max \left\{ \sum_{k \in [0, n]} \sum_{(\mathbf{H}, \mathbf{y}) \in \mathcal{I}_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} C(k) |\hat{\alpha}_\mathbf{i}|^2 \langle \hat{\mathbf{i}} | F_{\mathbf{H}, \mathbf{y}} | \hat{\mathbf{i}} \rangle : \{F_{\mathbf{H}, \mathbf{y}}\} \in \Gamma_s(S) \right\}. $$

Proof. We fix a set $S$ of symmetric states. From Proposition 7, we have that

$$ 
\begin{aligned}
\rho(S) &= \max \{\rho_2(S, \{F_{\mathbf{H},\mathbf{y}}\}) : \{F_{\mathbf{H},\mathbf{y}}\} \in \Gamma_s(S)\} \\
&\text{with } \rho_2(S, \{F_{\mathbf{H},\mathbf{y}}\}) = \sum_{k \in [1, n]} \sum_{(\mathbf{H}, \mathbf{y}) \in \mathcal{I}_k} C(k) \cdot \operatorname{Tr}(F_{\mathbf{H},\mathbf{y}} |\psi_0\rangle\langle\psi_0|).
\end{aligned}
$$

Now fix any $\{F_{\mathbf{H},\mathbf{y}}\} \in \Gamma_s(S)$ and, for each $(\mathbf{H}, \mathbf{y}) \in \mathcal{I}_k$, we define $F_{\mathbf{H}} = \sum_{\mathbf{y} \in \mathbb{F}_2^k} F_{\mathbf{H},\mathbf{y}}$. We now write

$$ 
\begin{aligned}
\rho_2(S, \{F_{\mathbf{H},\mathbf{y}}\}) &= \sum_{k \in [0, n]} \sum_{(\mathbf{H}, \mathbf{y}) \in \mathcal{I}_k} C(k) \cdot \operatorname{Tr}(F_{\mathbf{H},\mathbf{y}} |\psi_0\rangle\langle\psi_0|) \\
&= \sum_{k \in [0, n]} \sum_{\mathbf{H} \in \Lambda_k} C(k) \cdot \operatorname{Tr}(F_{\mathbf{H}} |\psi_0\rangle\langle\psi_0|) \\
&= \sum_{k \in [0, n]} \sum_{\mathbf{H} \in \Lambda_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} C(k) |\hat{\alpha}_\mathbf{i}|^2 \langle \hat{\mathbf{i}} | F_{\mathbf{H},\mathbf{y}} | \hat{\mathbf{i}} \rangle \\
&= \sum_{k \in [0, n]} \sum_{(\mathbf{H}, \mathbf{y}) \in \mathcal{I}_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} C(k) |\hat{\alpha}_\mathbf{i}|^2 \langle \hat{\mathbf{i}} | F_{\mathbf{H},\mathbf{y}} | \hat{\mathbf{i}} \rangle
\end{aligned}
$$

Since $\rho(S) = \max \{\rho_2(S, \{F_{\mathbf{H},\mathbf{y}}\}) : \{F_{\mathbf{H},\mathbf{y}}\} \in \Gamma_s(S)\}$, we get our theorem. □

## 3.2 Relations between diagonal Fourier coefficients of the matrices $F_{\mathbf{H},\mathbf{y}}$.

We managed to give an expression for $\rho(S)$ where we maximize a quantity over the set of symmetric measurements that depends only on the Fourier diagonal elements of each POVM element. Now, we show that the unambiguity condition of our measurement can be translated into relations between these different Fourier diagonal elements, which in turn will give yet another formulation for $\rho(S)$ as the maximum of a linear program.

### 3.2.1 Full Dual Support

In our proof, we will first have to restrict ourselves to symmetric states $S$ which have full dual support. We will then be able to prove our general bound for any symmetric $S$ using density arguments.
**Definition 18.** A set of symmetric states $S = \{|\psi_x\}\}_{x \in \mathbb{F}_2^n}$ has full dual support iff.

$$ \forall \mathbf{y} \in \mathbb{F}_2^n, \langle \hat{\mathbf{y}} | \psi_0 \rangle \neq 0. $$

Notice that this implies that $\forall \mathbf{x}, \mathbf{y} \in \mathbb{F}_2^n, \langle \hat{\mathbf{y}} | \psi_x \rangle \neq 0$, since from the symmetry condition, we have $\langle \hat{\mathbf{y}} | \psi_x \rangle = (-1)^{\mathbf{x} \cdot \mathbf{y}} \langle \hat{\mathbf{y}} | \psi_0 \rangle$. We first have the following proposition.

**Proposition 9.** Let $S = \{|\psi_x\}\}_{x \in \mathbb{F}_2^n}$ be a set of symmetric states with full dual support. We have

$$ \dim (\operatorname{span}\{|\psi_x\}\}_{x \in \mathbb{F}_2^n}) = 2^n. $$

In other words, the $\{|\psi_x\}\}$ form a basis of $\mathbb{F}_2^n$. This implies that $\forall T \subseteq \mathbb{F}_2^n$, $\dim (\operatorname{span}\{|\psi_x\}\}_{x \in T}) = |T|$.

*Proof.* We fix any $\mathbf{y}_0 \in \mathbb{F}_2^n$ and show that $|\hat{\mathbf{y}}_0\rangle \in \operatorname{span}\{|\psi_x\}\}_{x \in \mathbb{F}_2^n}$ which will imply the desired statement. We write $|\psi_0\rangle$ in the Fourier basis:

$$ |\psi_0\rangle = \sum_{\mathbf{y} \in \mathbb{F}_2^n} \hat{\alpha}_{\mathbf{y}} |\hat{\mathbf{y}}\rangle, $$

where each $\hat{\alpha}_{\mathbf{y}} \neq 0$ since $S$ has full dual support. Now, we compute

$$ \begin{aligned} \sum_{\mathbf{x} \in \mathbb{F}_2^n} (-1)^{\mathbf{x} \cdot \mathbf{y}_0} |\psi_{\mathbf{x}}\rangle &= \sum_{\mathbf{x} \in \mathbb{F}_2^n} (-1)^{\mathbf{x} \cdot \mathbf{y}_0} \sum_{\mathbf{y} \in \mathbb{F}_2^n} (-1)^{\mathbf{x} \cdot \mathbf{y}} \hat{\alpha}_{\mathbf{y}} |\hat{\mathbf{y}}\rangle \\ &= \sum_{\mathbf{y} \in \mathbb{F}_2^n} \hat{\alpha}_{\mathbf{y}} \left( \sum_{\mathbf{x} \in \mathbb{F}_2^n} (-1)^{\mathbf{x} \cdot (\mathbf{y}+\mathbf{y}_0)} \right) |\hat{\mathbf{y}}\rangle \\ &= 2^n \hat{\alpha}_{\mathbf{y}_0} |\hat{\mathbf{y}}_0\rangle. \end{aligned} $$

Since $\sum_{\mathbf{x} \in \mathbb{F}_2^n} (-1)^{\mathbf{x} \cdot \mathbf{y}_0} |\psi_{\mathbf{x}}\rangle \in \operatorname{span}\{|\psi_x\}\}_{x \in \mathbb{F}_2^n}$ and $\hat{\alpha}_{\mathbf{y}_0} \neq 0$, we get that $|\hat{\mathbf{y}}_0\rangle \in \operatorname{span}\{|\psi_x\}\}_{x \in \mathbb{F}_2^n}$. Since this true for each $\mathbf{y}_0$ and the $\{|\hat{\mathbf{y}}_0\}$ form an orthonormal basis of $\mathbb{F}_2^n$, we get our result. $\square$

### 3.2.2 Characterizing the $\{F_{\mathbf{H},\mathbf{y}}\}$

The goal of this section is to take advantage of the fact that we have an unambiguous measurement to characterize the matrices $F_{\mathbf{H},\mathbf{y}}$. In particular, we want to give properties on the diagonal elements of $\widehat{F_{\mathbf{H},\mathbf{y}}}$.

**Definition 19.** Let $S = \{|\psi_x\}\}$ be a set of symmetric states. We define

$$ \forall (\mathbf{H}, \mathbf{y}) \in \mathcal{I}, \quad V_{\mathbf{H},\mathbf{y}}^{\mp} \triangleq \operatorname{span}\{|\psi_x\rangle : \mathbf{H}\mathbf{x} \neq \mathbf{y}\} \quad \text{and} \quad W_{\mathbf{H},\mathbf{y}} \triangleq \{|\phi\rangle : \forall |\psi\rangle \in V_{\mathbf{H},\mathbf{y}}^{\mp}, \langle \phi | \psi \rangle = 0\}. $$

Notice that from Proposition 9, if $S$ has full dual support then for each $k \in [0, n]$ and $\forall (\mathbf{H}, \mathbf{y}) \in \mathcal{I}_k$, we have $\dim(V_{\mathbf{H},\mathbf{y}}^{\mp}) = 2^n(1 - \frac{1}{2^k})$ and hence $\dim(W_{\mathbf{H},\mathbf{y}}) = 2^n - \dim(V_{\mathbf{H},\mathbf{y}}^{\mp}) = 2^{n-k}$.

**Proposition 10.** Let $S = \{|\psi_x\}\}$ be a set of symmetric states with full dual support and let $\{F_{\mathbf{H},\mathbf{y}}\} \in \Gamma(S)$. For each $k \in [0, n]$ and $(\mathbf{H}, \mathbf{y}) \in \mathcal{I}_k$, we can write

$$ F_{\mathbf{H},\mathbf{y}} = \sum_{i=1}^{2^{n-k}} \mu_i |B_i\rangle\langle B_i|, $$

where $\mu_i \ge 0$ and $|B_i\rangle \in W_{\mathbf{H},\mathbf{y}}$ are pairwise orthogonal.

*Proof.* Fix $S = \{|\psi_x\}\}$ a set of symmetric states with full dual support and $\{F_{\mathbf{H},\mathbf{y}}\} \in \Gamma(S)$. Fix also $k \in [0, n]$ and $(\mathbf{H}, \mathbf{y}) \in \mathcal{I}_k$. Since, $\{F_{\mathbf{H},\mathbf{y}}\} \in \Gamma(S)$, we have

$$ \forall \mathbf{x} \in \mathbb{F}_2^n, \text{ s.t. } \mathbf{H}\mathbf{x} \neq \mathbf{y}, \operatorname{Tr}(F_{\mathbf{H},\mathbf{y}} |\psi_{\mathbf{x}}\rangle\langle\psi_{\mathbf{x}}|) = 0. \quad (7) $$

Now because $F_{\mathbf{H},\mathbf{y}} \succeq 0$, we write the spectral decomposition

$$ F_{\mathbf{H},\mathbf{y}} = \sum_i \mu_i |B_i\rangle\langle B_i|, $$
where $\mu_i \ge 0$ and the $|B_i\rangle$ are pairwise orthogonal. From Equation 7, we have that

$$ \forall i, \forall \mathbf{x} \in \mathbb{F}_2^n, \text{ s.t. } \mathbf{H}\mathbf{x} \neq \mathbf{y}, \langle \psi_{\mathbf{x}} | B_i \rangle = 0, $$

which implies that $|B_i\rangle \in W_{H,y}$. Since $\dim(W_{H,y}) = 2^{n-k}$, this concludes the proof. $\square$

The next proposition provides an orthonormal basis for each $W_{H,y}$. This construction will rely on the notion of dual cosets, which was presented in Definition 11.

**Proposition 11.** Let $S = \{|\psi_{\mathbf{x}}\rangle\}$ be a set of symmetric states with full dual support and let $|\psi_0\rangle = \sum_{\mathbf{i} \in \mathbb{F}_2^n} \hat{\alpha}_{\mathbf{i}} |\hat{\mathbf{i}}\rangle$. Let $\{F_{H,y}\} \in \Gamma(S)$. Fix $k \in [0, n]$ and $(\mathbf{H}, \mathbf{y}) \in \mathcal{I}_k$. For each $\mathbf{s} \in \mathbb{F}_2^{n-k}$, let $\mathbf{v}_s \in \mathbb{F}_2^n$ such that we can write

$$ D_{\mathbf{H}}(\mathbf{s}) = \{\mathbf{H}^{\top}\mathbf{u} + \mathbf{v}_s : \mathbf{u} \in \mathbb{F}_2^k\}, $$

(see Definition 11). We now define

$$ \forall \mathbf{s} \in \mathbb{F}_2^{n-k}, \quad |A_{\mathbf{s}}^{\mathbf{H}, \mathbf{y}}\rangle \triangleq \sum_{\mathbf{u} \in \mathbb{F}_2^k} \frac{1}{\hat{\alpha}_{\mathbf{H}^{\top}\mathbf{u} + \mathbf{v}_s}} (-1)^{\mathbf{y} \cdot \mathbf{u}} |\widehat{\mathbf{H}^{\top}\mathbf{u} + \mathbf{v}_s}\rangle. \quad (8) $$

Then $\{|A_{\mathbf{s}}^{\mathbf{H}, \mathbf{y}}\rangle\}_{\mathbf{s} \in \mathbb{F}_2^{n-k}}$ forms an orthogonal basis of $W_{H,y}$.

*Proof.* Fix $k \in [0, n]$ and $(\mathbf{H}, \mathbf{y}) \in \mathcal{I}_k$. First notice that each $|A_{\mathbf{s}}^{\mathbf{H}, \mathbf{y}}\rangle$ has support in $D_{\mathbf{H}}(\mathbf{s})$ hence $\langle A_{\mathbf{s}}^{\mathbf{H}, \mathbf{y}} | A_{\mathbf{s}'}^{\mathbf{H}, \mathbf{y}} \rangle = 0$ when $\mathbf{s} \neq \mathbf{s}'$. Now, we prove that each $|A_{\mathbf{s}}^{\mathbf{H}, \mathbf{y}}\rangle \in W_{H,y}$. It is enough to prove that

$$ \forall \mathbf{x} \in \mathbb{F}_2^n \text{ s.t. } \mathbf{H}\mathbf{x} \neq \mathbf{y}, \forall \mathbf{s} \in \mathbb{F}_2^{n-k}, \langle A_{\mathbf{s}}^{\mathbf{H}, \mathbf{y}} | \psi_{\mathbf{x}} \rangle = 0. $$

So fix an $\mathbf{x} \in \mathbb{F}_2^n$ such that $\mathbf{H}\mathbf{x} \neq \mathbf{y}$ as well as $\mathbf{s} \in \mathbb{F}_2^{n-k}$. We have $|\psi_{\mathbf{x}}\rangle = \sum_{\mathbf{i} \in \mathbb{F}_2^n} \hat{\alpha}_{\mathbf{i}} (-1)^{\mathbf{i} \cdot \mathbf{x}} |\hat{\mathbf{i}}\rangle$. We first rewrite

$$ \begin{aligned} |\psi_{\mathbf{x}}\rangle &= \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} \sum_{\mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s})} \hat{\alpha}_{\mathbf{i}} (-1)^{\mathbf{x} \cdot \mathbf{i}} |\hat{\mathbf{i}}\rangle \\ &= \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} \sum_{\mathbf{u} \in \mathbb{F}_2^k} \hat{\alpha}_{(\mathbf{H}^{\top}\mathbf{u} + \mathbf{v}_s)} (-1)^{\mathbf{x} \cdot (\mathbf{H}^{\top}\mathbf{u} + \mathbf{v}_s)} |\widehat{\mathbf{H}^{\top}\mathbf{u} + \mathbf{v}_s}\rangle \\ &= \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} (-1)^{\mathbf{x} \cdot \mathbf{v}_s} \sum_{\mathbf{u} \in \mathbb{F}_2^k} \hat{\alpha}_{(\mathbf{H}^{\top}\mathbf{u} + \mathbf{v}_s)} (-1)^{\mathbf{x} \cdot \mathbf{H}^{\top}\mathbf{u}} |\widehat{\mathbf{H}^{\top}\mathbf{u} + \mathbf{v}_s}\rangle \\ &= \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} (-1)^{\mathbf{x} \cdot \mathbf{v}_s} \sum_{\mathbf{u} \in \mathbb{F}_2^k} \hat{\alpha}_{(\mathbf{H}^{\top}\mathbf{u} + \mathbf{v}_s)} (-1)^{\mathbf{H}\mathbf{x} \cdot \mathbf{u}} |\widehat{\mathbf{H}^{\top}\mathbf{u} + \mathbf{v}_s}\rangle \end{aligned} $$

From there, we can conclude

$$ \langle A_{\mathbf{s}}^{\mathbf{H}, \mathbf{y}} | \psi_{\mathbf{x}} \rangle = (-1)^{\mathbf{x} \cdot \mathbf{v}_s} \sum_{\mathbf{u} \in \mathbb{F}_2^k} (-1)^{(\mathbf{H}\mathbf{x} + \mathbf{y}) \cdot \mathbf{u}} = 0, \quad \text{since } \mathbf{H}\mathbf{x} \neq \mathbf{y} $$

We can conclude that the set $\{|A_{\mathbf{s}}^{\mathbf{H}, \mathbf{y}}\rangle\}_{\mathbf{s} \in \mathbb{F}_2^{n-k}}$ is a set of pairwise orthogonal states with each state in $W_{H,y}$. Since $\dim(W_{H,y}) = 2^{n-k}$, we conclude that $\{|A_{\mathbf{s}}^{\mathbf{H}, \mathbf{y}}\rangle\}_{\mathbf{s} \in \mathbb{F}_2^{n-k}}$ is an orthogonal basis of $W_{H,y}$. $\square$

**Theorem 2.** Let $\{F_{H,y}\} \in \Gamma(S)$. For each $k \in [0, n]$, for each $(\mathbf{H}, \mathbf{y}) \in \mathcal{I}_k$, for each $\mathbf{s} \in \mathbb{F}_2^{n-k}$ we have

$$ \forall \mathbf{i}, \mathbf{j} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s}), \quad |\hat{\alpha}_{\mathbf{i}}|^2 \langle \hat{\mathbf{i}} | F_{H,y} | \hat{\mathbf{j}} \rangle = |\hat{\alpha}_{\mathbf{j}}|^2 \langle \hat{\mathbf{j}} | F_{H,y} | \hat{\mathbf{i}} \rangle. $$

*Proof.* Fix any $k \in [0, n]$ and $(\mathbf{H}, \mathbf{y}) \in \mathcal{I}_k$. First notice that for each $\mathbf{s} \in \mathbb{F}_2^{n-k}$, we have

$$ |\langle \hat{\mathbf{i}} | A_{\mathbf{s}}^{\mathbf{H}, \mathbf{y}} \rangle|^2 = \begin{cases} |\frac{1}{\hat{\alpha}_{\mathbf{i}}}|^2 & \text{if } \mathbf{i} \in D_{\mathbf{H}}(\mathbf{s}) \\ 0 & \text{if } \mathbf{i} \notin D_{\mathbf{H}}(\mathbf{s}) \end{cases} $$

Now fix any $|\phi\rangle \in W_{H,y}$. From Proposition 11, we have $|\phi\rangle = \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} \gamma_{\mathbf{s}} |A_{\mathbf{s}}^{\mathbf{H}, \mathbf{y}}\rangle$. For all $\mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s})$. We have

$$ \langle \hat{\mathbf{i}} | \phi \rangle \langle \phi | \hat{\mathbf{i}} \rangle = |\gamma_{\mathbf{s}}|^2 \langle \hat{\mathbf{i}} | A_{\mathbf{s}}^{\mathbf{H}, \mathbf{y}} \rangle \langle A_{\mathbf{s}}^{\mathbf{H}, \mathbf{y}} | \hat{\mathbf{i}} \rangle = \frac{|\gamma_{\mathbf{s}}|^2}{|\hat{\alpha}_{\mathbf{i}}|^2} $$
which implies that

$$ \forall \mathbf{i}, \mathbf{j} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s}), \quad \langle \hat{\mathbf{i}} | \phi \rangle \langle \phi | \hat{\mathbf{i}} \rangle | \hat{\alpha}_{\mathbf{i}} |^2 = \langle \hat{\mathbf{j}} | \phi \rangle \langle \phi | \hat{\mathbf{j}} \rangle | \hat{\alpha}_{\mathbf{j}} |^2. $$

We can write $F_{\mathbf{H},\mathbf{y}} = \sum_l \mu_l |B_l\rangle\langle B_l|$ where $|B_l\rangle \in W_{\mathbf{H},\mathbf{y}}$. From the above equality, we immediately obtain that

$$ \forall \mathbf{i}, \mathbf{j} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s}), \quad |\hat{\alpha}_{\mathbf{i}}|^2 \langle \hat{\mathbf{i}} | F_{\mathbf{H},\mathbf{y}} | \hat{\mathbf{i}} \rangle = |\hat{\alpha}_{\mathbf{j}}|^2 \langle \hat{\mathbf{j}} | F_{\mathbf{H},\mathbf{y}} | \hat{\mathbf{j}} \rangle. \quad \square $$

### 3.3 Formulation of the linear program

In Section 3.1, we showed that the quantity $\rho(S)$ can be rewritten by optimizing over symmetric fine-grained measurements $\{F_{\mathbf{H},\mathbf{y}}\}$ but looking only at the Fourier diagonal terms of the matrices $F_{\mathbf{H},\mathbf{y}}$. In Section 3.2, we showed that the unambiguity condition of fine-grained measurements implies a relation on the Fourier diagonal coefficients of $F_{\mathbf{H},\mathbf{y}}$. We now rewrite the optimization program $\rho(S)$ from Section 3.1 by replacing the unambiguity condition with the relation on these diagonal terms. This gives us a linear program which we now present

$$ \text{Let } S = \{ |\psi_{\mathbf{x}}\rangle\}_{\mathbf{x} \in \mathbb{F}_2^n} \text{ be a set of symmetric states with } |\psi_0\rangle = \sum_{\mathbf{i}} \hat{\alpha}_{\mathbf{i}} |\hat{\mathbf{i}}\rangle. $$

#### Final Linear Program

Variables: $\lambda_{\mathbf{i}}^{\mathbf{H}} \in \mathbb{R}_+$ for each $\mathbf{H} \in \Lambda$, $\mathbf{i} \in \mathbb{F}_2^n$.

Objective: $\rho^L(S) \triangleq \max_{\lambda_{\mathbf{i}}^{\mathbf{H}}} \sum_{k=0}^{n} \sum_{\mathbf{H} \in \Lambda_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} C(k) \lambda_{\mathbf{i}}^{\mathbf{H}} |\hat{\alpha}_{\mathbf{i}}|^2$.

Constraints: 
1. $\sum_{\mathbf{H} \in \Lambda} \lambda_{\mathbf{i}}^{\mathbf{H}} = 1$ \quad $\forall \mathbf{i} \in \mathbb{F}_2^n$, 
2. $\lambda_{\mathbf{i}}^{\mathbf{H}} |\hat{\alpha}_{\mathbf{i}}|^2 = \lambda_{\mathbf{j}}^{\mathbf{H}} |\hat{\alpha}_{\mathbf{j}}|^2$ \quad $\forall k \in [0, n], \mathbf{H} \in \Lambda_k, \mathbf{s} \in \mathbb{F}_2^{n-k}, \forall \mathbf{i}, \mathbf{j} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s})$

We constructed this linear program by taking properties of fine-grained unambiguous measurement so we have $\rho(S) \le \rho^L(S)$, which is captured by the proposition below. Notice that we use a more compact linear program, where we consider the variables $\lambda_{\mathbf{i}}^{\mathbf{H}} = \sum_{\mathbf{y}} \lambda_{\mathbf{i}}^{\mathbf{H},\mathbf{y}}$. Proposition 13 shows this actually gives an equivalent linear program.

**Proposition 12.** For any set of symmetric states $S$ with full dual support, $\rho(S) \le \rho^L(S)$

*Proof.* Let $S = \{|\psi_{\mathbf{x}}\rangle\}_{\mathbf{x} \in \mathbb{F}_2^n}$ be a set of states. Let $\{F_{\mathbf{H},\mathbf{y}}\} \in \Gamma_s(S)$ that maximizes the semidefinite program, meaning in particular that

$$ 1. \quad \forall k \in [0, n], \quad \forall (\mathbf{H}, \mathbf{y}) \in \Lambda_k \times \mathbb{F}_2^k, \quad F_{\mathbf{H},\mathbf{y}} \succeq 0, $$

$$ 2. \quad \sum_{k=0}^{n} \sum_{\mathbf{y} \in \mathbb{F}_2^k} F_{\mathbf{H},\mathbf{y}} = I, $$

and

$$ \rho(S) = \rho_2(S, \{F_{\mathbf{H},\mathbf{y}}\}) = \sum_{k \in [0, n]} \sum_{(\mathbf{H},\mathbf{y}) \in \mathcal{I}_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} C(k) |\hat{\alpha}_{\mathbf{i}}|^2 \langle \hat{\mathbf{i}} | F_{\mathbf{H},\mathbf{y}} | \hat{\mathbf{i}} \rangle, $$

Our goal is to define $\lambda_{\mathbf{i}}^{\mathbf{H},\mathbf{y}}$ and $\lambda_{\mathbf{i}}^{\mathbf{H}} = \sum_{\mathbf{y}} \lambda_{\mathbf{i}}^{\mathbf{H},\mathbf{y}}$ that satisfy conditions ①, ② of the linear program and such that $\rho^L(S) = \rho_2(S, \{F_{\mathbf{H},\mathbf{y}}\})$. Choose $\lambda_{\mathbf{i}}^{\mathbf{H},\mathbf{y}} = \langle \hat{\mathbf{i}} | F_{\mathbf{H},\mathbf{y}} | \hat{\mathbf{i}} \rangle$. We derive from 1. that $\lambda_{\mathbf{i}}^{\mathbf{H},\mathbf{y}} \ge 0$ and from 2. that $\sum_{(\mathbf{H},\mathbf{y}) \in \mathcal{I}} \lambda_{\mathbf{i}}^{\mathbf{H},\mathbf{y}} = 1$. From Theorem 2, the unambiguity conditions translate into $\lambda_{\mathbf{i}}^{\mathbf{H},\mathbf{y}} |\hat{\alpha}_{\mathbf{i}}|^2 = \lambda_{\mathbf{j}}^{\mathbf{H},\mathbf{y}} |\hat{\alpha}_{\mathbf{j}}|^2$ for all $k \in [0, n]$, $\mathbf{H} \in \Lambda_k, \mathbf{s} \in \mathbb{F}_2^{n-k}$, for all $\mathbf{i}, \mathbf{j} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s})$. Finally the objective becomes

$$ \rho_2(S, \{F_{\mathbf{H},\mathbf{y}}\}) = \sum_{k \in [0, n]} \sum_{(\mathbf{H},\mathbf{y}) \in \mathcal{I}_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} C(k) |\hat{\alpha}_{\mathbf{i}}|^2 \lambda_{\mathbf{i}}^{\mathbf{H},\mathbf{y}} = \rho^L(S). $$

We conclude that $\rho(S, \{F_{\mathbf{H},\mathbf{y}}\}) \le \rho^L(S)$ using Theorem 1. $\square$
Actually, we can prove that the optimization programs are equal. This is an important property that tell us that there exist fine-grained unambiguous measurements that achieve the value given by the linear program.

**Proposition 13.** For any set of symmetric states $S$ with full dual support, $\rho^L(S) \le \rho(S)$.

*Proof.* Let values $\lambda_i^H \in \mathbb{R}_+$ for each $\mathbf{H} \in \Lambda$ and $\mathbf{i} \in \mathbb{F}_2^n$ that maximize the linear program, meaning that they satisfy conditions ①, ② of the linear program and

$$ \rho^L(S) = \sum_{k=0}^{n} \sum_{\mathbf{H} \in \Lambda_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} C(k) \lambda_i^H |\hat{\alpha}_i|^2. $$

Our goal is to construct a measurement $\{F_{\mathbf{H},y}\} \in \Gamma_s(S)$ such that $\rho_2(S, \{F_{\mathbf{H},y}\}) = \rho^L(S)$, which will imply the desired statement. Each $F_{\mathbf{H},y}$ will be a one dimensional operator, i.e. a scalar times a projector. For each $k \in [0, n]$, for each $(\mathbf{H}, \mathbf{y}) \in \mathcal{I}_k$, we fix

$$ F_{\mathbf{H},y} = |\Phi_{\mathbf{H},y}\rangle\langle\Phi_{\mathbf{H},y}| \quad \text{with} \quad |\Phi_{\mathbf{H},y}\rangle = \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} \beta_{\mathbf{s}}^{\mathbf{H},y} |A_{\mathbf{s}}^{\mathbf{H},y}\rangle, $$

and the goal is to choose proper values of $\beta_s^{\mathbf{H},y}$. First, notice that for any choice of $\beta_s^{\mathbf{H},y} \in \mathbb{C}$, we have $F_{\mathbf{H},y} \succeq 0$. Moreover, $|\Phi_{\mathbf{H},y}\rangle \in W_{\mathbf{H},y}$ hence it will satisfy the fine-grained unambiguous condition. For the amplitudes, we choose them such that

$$ \beta_s^{\mathbf{H},y} \triangleq \sqrt{\lambda_i^H |\hat{\alpha}_i|^2} \quad \text{for any } \mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s}). \qquad (9) $$

Notice that this amplitude is independent of $\mathbf{y}$. Now,

$$ \forall \mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s}), \quad \langle \mathbf{i} | F_{\mathbf{H},\mathbf{y}} | \mathbf{i} \rangle = |\langle \mathbf{i} | \Phi_{\mathbf{H},\mathbf{y}} \rangle|^2 = |\beta_s^{\mathbf{H},\mathbf{y}}|^2 \cdot |\langle \mathbf{i} | A_s^{\mathbf{H},\mathbf{y}} \rangle|^2 = \frac{|\beta_s^{\mathbf{H},\mathbf{y}}|^2}{|\hat{\alpha}_i|^2} = \lambda_i^H, $$

where we used Equation 8. We then obtain

$$ \rho^L(S) = \sum_{k=0}^{n} \sum_{\mathbf{H} \in \Lambda_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} C(k) \langle \hat{\mathbf{i}} | F_{\mathbf{H}, \mathbf{y}} | \hat{\mathbf{i}} \rangle |\hat{\alpha}_i|^2. \qquad (10) $$

We can also write

$$ \sum_{(\mathbf{H}, \mathbf{y}) \in \mathcal{I}^*} F_{\mathbf{H}, \mathbf{y}} = \sum_{\mathbf{H} \in \Lambda^*} \sum_{\mathbf{i} \in \mathbb{F}_2^n} \lambda_i^H |\hat{\mathbf{i}}\rangle\langle\hat{\mathbf{i}}| \le I, $$

using the condition on the $\lambda_i^H$. We proved that $\{F_{\mathbf{H},y}\} \in \Gamma(S)$ but we actually want to prove that $\{F_{\mathbf{H},y}\} \in \Gamma_s(S)$. We write

$$ F_{\mathbf{H},y} = \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} |\beta_{\mathbf{s}}^{\mathbf{H}}|^2 |A_{\mathbf{s}}^{\mathbf{H},y}\rangle\langle A_{\mathbf{s}}^{\mathbf{H},y}|. $$

Now fix any $\mathbf{a} \in \mathbb{F}_2^n$. We have from Equation 8

$$ \begin{aligned} X_a |A_s^{\mathbf{H},y}\rangle &= \sum_{\mathbf{u} \in \mathbb{F}_2^k} \frac{1}{\hat{\alpha}_{\mathbf{H}^\top \mathbf{u} + \mathbf{v}_s}} (-1)^{\mathbf{y} \cdot \mathbf{u}} (-1)^{\mathbf{a} \cdot \mathbf{H}^\top \mathbf{u} + \mathbf{v}_s} |\widehat{\mathbf{H}^\top \mathbf{u} + \mathbf{v}_s}\rangle \\ &= (-1)^{\mathbf{a} \cdot \mathbf{v}_s} \sum_{\mathbf{u} \in \mathbb{F}_2^k} \frac{1}{\hat{\alpha}_{\mathbf{H}^\top \mathbf{u} + \mathbf{v}_s}} (-1)^{\mathbf{y} \cdot \mathbf{u}} (-1)^{\mathbf{H} \cdot \mathbf{u}} |\widehat{\mathbf{H}^\top \mathbf{u} + \mathbf{v}_s}\rangle \\ &= (-1)^{\mathbf{a} \cdot \mathbf{v}_s} |A_s^{\mathbf{H},y+\mathbf{H}a}\rangle. \end{aligned} $$

From there, we obtain

$$ \begin{aligned} X_a \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} \beta_s^{\mathbf{H},y} |A_s^{\mathbf{H},y}\rangle &= \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} (-1)^{\mathbf{a} \cdot \mathbf{v}_s} \beta_s^{\mathbf{H},y} |A_s^{\mathbf{H},y+\mathbf{H}a}\rangle \\ &= \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} (-1)^{\mathbf{a} \cdot \mathbf{v}_s} \beta_s^{\mathbf{H},y+\mathbf{H}a} |A_s^{\mathbf{H},y+\mathbf{H}a}\rangle, \end{aligned} $$
where the last inequality comes from the fact that the $\beta_s^{H,y}$ are actually independent of $y$. From there we conclude that $X_a F_{H,y} X_a = F_{H,y+H_a}$ and hence $\{F_{H,y}\} \in \Gamma_s(S)$.

In conclusion, from the above and Equation 10, we constructed $\{F_{H,y}\} \in \Gamma_s(S)$ such that

$$ \rho^L(S) = \sum_{k=0}^{n} \sum_{\mathbf{H} \in \Lambda_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} C(k) \langle \hat{\mathbf{i}} | F_{\mathbf{H},y} | \hat{\mathbf{i}} \rangle |\hat{\alpha}_{\mathbf{i}}|^2 = \rho_2(S, \{F_{\mathbf{H},y}\}), $$

which allows us to conclude that $\rho^L(S) \le \rho(S)$ using Theorem 1. $\square$

<figure><img src="image_4.png" /></figure>

## 3.4 Removing the full support requirement

In the case of sets $S$ of symmetric states with full support, we defined the value $\rho^L(S)$ and showed that $\rho^L(S) = \rho(S)$. Also, both $\rho^L(S)$ and $\rho(S)$ are well defined when $S$ does not have full support. We will be able to remove this requirement by a simple density argument. We have the following

**Proposition 14.** Let $S$ be a set of symmetric states and let $\varepsilon > 0$. There exists a set of symmetric states $S'$ with full dual support such that

$$ |\rho(S') - \rho(S)| \le \varepsilon \quad \text{and} \quad |\rho^L(S') - \rho^L(S)| \le \varepsilon. $$

*Proof.* Let $\varepsilon > 0$ and let $S = \{|\psi_x\}\}$ be a set of symmetric states with $|\psi_0\rangle = \sum_{\mathbf{i} \in \mathbb{F}_2^n} \hat{\alpha}_\mathbf{i} |\hat{\mathbf{i}}\rangle$. Let $T = \{\mathbf{i} \in \mathbb{F}_2^n : \hat{\alpha}_\mathbf{i} = 0\}$. If $T = \emptyset$, $S$ has full support and the statement is trivial. We now look at the case where $T \ne \emptyset$. Let $\delta = \min\{\frac{\varepsilon}{\rho^L(S)+1}; \frac{\varepsilon}{\rho(S)+1}; \frac{\varepsilon}{C_{Max}}; 1\} > 0$, where $C_{Max} = \max_{k \in [0,n]} C(k) > 0$. We define

$$ |\psi_x'\rangle = \sqrt{1 - \delta} |\psi_x\rangle + \sqrt{\frac{\delta}{|T|}} \sum_{\mathbf{i} \in T} (-1)^{\mathbf{i} \cdot \mathbf{x}} |\hat{\mathbf{i}}\rangle. $$

The set $S' = \{|\psi_x'\}\}$ clearly is symmetric and has full dual support and we write $|\psi_0'\rangle = \sum_{\mathbf{i} \in \mathbb{F}_2^n} \hat{\alpha}_\mathbf{i}' |\hat{\mathbf{i}}\rangle$. This means that $\hat{\alpha}_\mathbf{i}' = \sqrt{1 - \delta}\hat{\alpha}_\mathbf{i}$ for $\mathbf{i} \notin T$ and $\hat{\alpha}_\mathbf{i}' = (-1)^{\mathbf{i} \cdot \mathbf{x}} \sqrt{\frac{\delta}{|T|}}$ for $\mathbf{i} \in T$.

In order to prove the first inequality, let $\{F_{H,y}\} \in \Gamma_s(S')$ that maximizes $\rho(S')$ in the expression of Theorem 1. We write

$$ \begin{aligned} \rho(S') &= \sum_{k \in [0,n]} \sum_{(\mathbf{H},y) \in \mathcal{I}_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} C(k) |\hat{\alpha}_\mathbf{i}'|^2 \langle \hat{\mathbf{i}} | F_{\mathbf{H},y} | \hat{\mathbf{i}} \rangle \\ &= \sum_{k \in [0,n]} \sum_{(\mathbf{H},y) \in \mathcal{I}_k} \sum_{\mathbf{i} \notin T} C(k) |\hat{\alpha}_\mathbf{i}'|^2 \langle \hat{\mathbf{i}} | F_{\mathbf{H},y} | \hat{\mathbf{i}} \rangle + \sum_{k \in [0,n]} \sum_{(\mathbf{H},y) \in \mathcal{I}_k} \sum_{\mathbf{i} \in T} C(k) |\hat{\alpha}_\mathbf{i}'|^2 \langle \hat{\mathbf{i}} | F_{\mathbf{H},y} | \hat{\mathbf{i}} \rangle \\ &\le (1 - \delta) \rho(S) + \frac{\delta}{|T|} C_{Max} \end{aligned} $$

where we used

$$ \sum_{k \in [0,n]} \sum_{(\mathbf{H},y) \in \mathcal{I}_k} \sum_{\mathbf{i} \in T} \langle \hat{\mathbf{i}} | F_{\mathbf{H},y} | \hat{\mathbf{i}} \rangle \le \sum_{k \in [0,n]} \sum_{(\mathbf{H},y) \in \mathcal{I}_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} \langle \hat{\mathbf{i}} | F_{\mathbf{H},y} | \hat{\mathbf{i}} \rangle \le 1. $$

From there, we obtain

$$ \rho(S') - \rho(S) \le -\delta\rho(S) + \delta C_{Max} \le \delta C_{Max} \le \varepsilon, $$

which gives the first part inequality. For the second direction of the first inequality, let $\{F_{H,y}\} \in \Gamma_s(S)$ that maximizes $\rho(S)$. We write

$$ \begin{aligned} \rho(S') &\ge \sum_{k \in [0,n]} \sum_{(\mathbf{H},y) \in \mathcal{I}_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} C(k) |\hat{\alpha}_\mathbf{i}'|^2 \langle \hat{\mathbf{i}} | F_{\mathbf{H},y} | \hat{\mathbf{i}} \rangle \\ &\ge (1 - \delta) \sum_{k \in [0,n]} \sum_{(\mathbf{H},y) \in \mathcal{I}_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} C(k) |\hat{\alpha}_\mathbf{i}'|^2 \langle \hat{\mathbf{i}} | F_{\mathbf{H},y} | \hat{\mathbf{i}} \rangle = (1 - \delta)\rho(S), \end{aligned} $$

which directly implies

$$ \rho(S') - \rho(S) \ge -\delta\rho(S) \ge \frac{-\varepsilon\rho(S)}{\rho(S) + 1} \ge -\varepsilon. $$
For the second inequality, let {$\lambda_i^H$} that maximizes the linear program for $\rho^L(S)$. We now write

$$ \rho^L(S') \geq \sum_{k=0}^{n} \sum_{\mathbf{H} \in \Lambda_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} C(k) \lambda_{\mathbf{i}}^{\mathbf{H}} |\hat{\alpha}_{\mathbf{i}}'|^2 \\ \geq (1 - \delta) \max \sum_{k=0}^{n} \sum_{\mathbf{H} \in \Lambda_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} C(k) \lambda_{\mathbf{i}}^{\mathbf{H}} |\hat{\alpha}_{\mathbf{i}}|^2 = (1 - \delta)\rho^L(S) $$

which gives

$$ \rho^L(S') - \rho^L(S) \geq -\delta\rho^L(S) \geq -\varepsilon\frac{\rho^L(S)}{\rho^L(S) + 1} \geq -\varepsilon. $$

For the second part of the second inequality, consider {$\lambda_i^H$} that maximizes the linear program for $\rho^L(S')$. We write

$$ \rho^L(S') = \sum_{k=0}^{n} \sum_{\mathbf{H} \in \Lambda_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} C(k) \lambda_{\mathbf{i}}^{\mathbf{H}} |\hat{\alpha}_{\mathbf{i}}|^2 \\ \leq (1 - \delta)\rho^L(S) + \sum_{k=0}^{n} \sum_{\mathbf{H} \in \Lambda_k} \sum_{\mathbf{i} \in T} C(k) \lambda_{\mathbf{i}}^{\mathbf{H}} |\hat{\alpha}_{\mathbf{i}}'|^2 \\ \leq (1 - \delta)\rho^L(S) + \frac{\delta}{|T|} C_{Max} $$

which gives

$$ \rho^L(S') - \rho^L(S) \leq -\delta\rho^L(S) + \frac{\delta}{|T|} C_{Max} \leq \delta C_{Max} \leq \varepsilon. \quad \square $$

From there, we immediately obtain

**Theorem 3.** Let $S$ be a set of symmetric states. Then $\rho(S) = \rho^L(S)$.

*Proof.* Assume by contradiction that $\rho^L(S) \neq \rho(S)$. Let $\varepsilon = \frac{|\rho^L(S) - \rho(S)|}{3} > 0$. From the previous proposition, let $S'$ be a set of states of dual support such that

$$ |\rho(S') - \rho(S)| \leq \varepsilon \quad \text{and} \quad |\rho^L(S') - \rho^L(S)| \leq \varepsilon. $$

Now, because $S'$ has full dual support, we have $\rho(S') = \rho^L(S')$. We can therefore conclude

$$ |\rho^L(S) - \rho(S)| \leq |\rho^L(S) - \rho^L(S')| + |\rho^L(S') - \rho(S')| + |\rho(S') - \rho(S)| \leq 2\varepsilon, $$

which contradicts the fact that $|\rho^L(S) - \rho(S)| = 3\varepsilon$ with $\varepsilon > 0$. $\square$

# 4 Dual Linear Program and Solutions

Let $S = \{|\psi_x\}\}_{x \in \mathbb{F}_2^n}$ be a set of symmetric states. We write $|\psi_0\rangle = \sum_{\mathbf{i} \in \mathbb{F}_2^n} \hat{\alpha}_{\mathbf{i}}|\hat{\mathbf{i}}\rangle$. Recall our goal is to give bounds on $\rho(S)$. In the previous section, we showed that $\rho(S) = \rho^L(S)$ where $\rho^L(S)$ can be expressed as a linear maximization problem. In this section, we present the associated dual linear program, and derive upper bounds on the value of $\rho(S)$, both in the threshold regime and in the average parity regime.

## 4.1 Formulation of the dual program

From the linear program with objective function $\rho^L(S)$, we construct the associated dual linear program, with objective $\sigma^L(S)$.
## Dual Linear Program

Variables: $b_i \in \mathbb{R}_+$ for each $i \in \mathbb{F}_2^n$.

Objective: $\sigma^L(S) \triangleq \min_{b_i} \sum_{i \in \mathbb{F}_2^n} b_i |\hat{\alpha}_i|^2$

Constraints: $\sum_{i \in \mathcal{D}_H(s)} b_i \ge C(k)2^k \quad \forall k \in [0, n], \forall \mathbf{H} \in \Lambda_k, \forall \mathbf{s} \in \mathbb{F}_2^{n-k}$.

Remark that we should normally take $b_i \in \mathbb{R}$ but using the constraints for $k = 0, \mathbf{H} = (0 \quad \dots \quad 0)$ and the fact that $C : [0, n] \mapsto \mathbb{R}_+$, we get that $\forall \mathbf{s} \in \mathbb{F}_2^n, b_s = \sum_{i \in \mathcal{D}_H(s)} b_i \ge C(0) \ge 0$.

**Proposition 15 (Strong duality).**

$$ \rho^L(S) = \sigma^L(S). $$

*Proof.* $(\lambda_i^H)_{\mathbf{H} \in \Lambda, i \in \mathbb{F}_2^n} = 0$ is a primal solution whatever the $|\hat{\alpha}_i^2|$. $(b_i) = 2^n \max_{k \in [0, n]} C(k)$ is a dual solution whatever the $|\hat{\alpha}_i^2|$. Thus, by strong duality, the primal has an optimal solution $(\lambda_i^{H,*})$, the dual has an optimal solution $(b_i^*)$ and $\rho^L((\lambda_i^{H,*}), S) = \sigma^L((b_i^*), S)$. $\square$

## 4.2 The threshold setting

Let $\tau \in [1, n]$. We first consider the threshold setting meaning that we fix $C(k) = 1$ if $k \ge \tau$ and $C(k) = 0$ otherwise. This means we want to bound the probability that we can learn unambiguously at least $\tau$ parities of $\mathbf{x}$ given $|\psi_\mathbf{x}\rangle$. We write our objective function $\rho(S; \tau)$ as well as the associated primal and dual objective functions respectively $\rho^L(S; \tau)$ and $\sigma^L(S; \tau)$. From our previous results, we have $\rho(S; \tau) = \rho^L(S; \tau) = \sigma^L(S; \tau)$. First, we give a necessary and sufficient condition for the existence of unambiguous measurements in this setting. The key concept here is the notion of $k$-universal set.

**Definition 20.** Let $\mathcal{A}_2(n, k)$ be the set of affine subspaces of $\mathbb{F}_2^n$ of dimension $k$. $U \in \mathcal{A}_2(n, k)$ if it is of the form $\mathbf{v} + V$ with $\mathbf{v} \in \mathbb{F}_2^n$ and $V \in \mathcal{G}_2(n, k)$.

**Definition 21.** A set $U \subseteq \mathbb{F}_2^n$ is called $k$-universal iff.

$$ \forall V \in \mathcal{A}_2(n, k), U \cap V \neq \emptyset. $$

This means that $U$ intersects every $k$-dimensional affine subspace of $\mathbb{F}_2^n$. An equivalent formulation is given below.

**Proposition 16.** $U$ is $k$-universal iff.

$$ \forall \mathbf{H} \in \Lambda_k, \forall \mathbf{s} \in \mathbb{F}_2^{n-k}, U \cap \mathcal{D}_H(\mathbf{s}) \neq \emptyset. $$

*Proof.* This comes directly from the fact that an affine space $V \in \mathcal{A}_2(n, k)$ can be written $V = \{\mathbf{x} \in \mathbb{F}_2^n : \mathbf{Gx} = \mathbf{s}\}$ for some $\mathbf{G} \in \Lambda_{n-k}$ and $\mathbf{s} \in \mathbb{F}_2^{n-k}$. $\square$

We show the following

**Theorem 4.** Let $S = \{|\psi_\mathbf{x}\}\}_{\mathbf{x} \in \mathbb{F}_2^n}$ be a set of symmetric states with $|\psi_0\rangle = \sum_{i \in \mathbb{F}_2^n} \hat{\alpha}_i |\hat{\mathbf{i}}\rangle$.

$$ \rho(S, \tau) = 0 \Leftrightarrow \text{There exists a } \tau\text{-universal set } V \text{ s.t. } \forall \mathbf{i} \in V, \hat{\alpha}_i = 0. $$

We prove both directions of the equivalence. For the first direction, we actually prove a quantitative statement.

**Proposition 17.**

$$ \rho(S; \tau) = \sigma^L(S; \tau) \le \min \left\{ 2^\tau \sum_{i \in V} |\hat{\alpha}_i|^2 : V \text{ is } \tau\text{-universal} \right\}. $$
Proof. Fix a threshold $\tau$ and an $\tau$-universal set $V$. As a dual solution, we fix $b_i = 2^\tau$ if $\mathbf{i} \in V$ and $b_i = 0$ otherwise. We clearly have as objective $2^\tau \sum_{\mathbf{i} \in V} |\hat{\alpha}_i|^2$. We now have to check the constraints. We require that

$$ \forall k \in [\tau, n], \forall \mathbf{H} \in \Lambda_k, \forall \mathbf{s} \in \mathbb{F}_2^{n-k}, \sum_{\mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s})} b_i \ge 2^k. \quad (11) $$

For each $\mathbf{H} \in \Lambda_k$, we associate a matrix $\mathbf{G}_{\mathbf{H}} \in \Lambda_{n-k}$ such that $D_{\mathbf{H}}(\mathbf{s}) = \{\mathbf{i} \in \mathbb{F}_2^n : \mathbf{G}_{\mathbf{H}} \cdot \mathbf{i} = \mathbf{s}\}$. With our choice of $(b_i)$, the requirement of Equation 11 is equivalent to

$$ \forall k \in [\tau, n], \forall \mathbf{H} \in \Lambda_k, \forall \mathbf{s} \in \mathbb{F}_2^{n-k}, |\{\mathbf{i} \in V : \mathbf{G}_{\mathbf{H}} \cdot \mathbf{i} = \mathbf{s}\}| \ge 2^{k-\tau}. $$

Fix $k \in [\tau, n]$, $\mathbf{H}, \mathbf{s}$. We fix the associated matrix $\mathbf{G}_{\mathbf{H}} \in \mathbb{F}_2^{(n-k) \times n}$. We add lines to $\mathbf{G}_{\mathbf{H}}$ so that we have a matrix $\mathbf{M} \in \Lambda_{n-\tau}$. From the $\tau$-universality condition, we know that for any $\mathbf{s}' \in \mathbb{F}_2^{k-\tau}$, there exists $\mathbf{y} \in V$ such that $\mathbf{My} = \mathbf{s} ||\mathbf{s}'$. Since this condition implies that $\mathbf{G}_{\mathbf{H}} \cdot \mathbf{y} = \mathbf{s}$, we constructed $2^{k-\tau}$ different strings $\mathbf{y} \in V$ such that $\mathbf{G}_{\mathbf{H}} \cdot \mathbf{y} = \mathbf{s}$ which concludes the proof. $\square$

As a direct corollary, we have the following

**Corollary 2.** If there exists an $\tau$-universal set $V$ such that $\forall \mathbf{i} \in V$, $\hat{\alpha}_i = 0$ then $\rho(S; \tau) = 0$.

We now prove the reverse implication.

**Proposition 18.** If $\rho(S; \tau) = \sigma^L(S; \tau) = 0$, then there exists an $\tau$-universal set $V$ such that $\forall \mathbf{i} \in V$, $\hat{\alpha}_i = 0$.

*Proof.* We assume $\sigma^L(S) = 0$. Let $(b_i)_{\mathbf{i} \in \mathbb{F}_2^n}$ be an optimal dual solution meaning that $\sum_{\mathbf{i} \in \mathbb{F}_2^n} b_i |\hat{\alpha}_i|^2 = 0$. Let $T = \{\mathbf{i} : b_i \neq 0\}$. Since the $(b_i)_{\mathbf{i} \in \mathbb{F}_2^n}$ satisfies the dual constraints, we have that

$$ \forall k \ge \tau, \forall \mathbf{H} \in \Lambda_k, \forall \mathbf{s} \in \mathbb{F}_2^{n-k}, \sum_{\mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s})} b_i \ge 2^k > 0. $$

This in particular implies that

$$ \forall k \ge \tau, \forall \mathbf{H} \in \Lambda_k, \forall \mathbf{s} \in \mathbb{F}_2^{n-k}, T \cap \mathcal{D}_{\mathbf{H}}(\mathbf{s}) \neq \emptyset, $$

which implies that $T$ contains a $\tau$-universal set $V$. Now, because $\sigma^L(S) = \sum_{\mathbf{i} \in T} b_i |\hat{\alpha}_i|^2 = 0$, we have that $\forall \mathbf{i} \in T$, $\hat{\alpha}_i = 0$, which concludes the proof since $V \subseteq T$. $\square$

Now, we want to show that if the $|\hat{\alpha}_i|^2$ are concentrated on words of weight $< \frac{\tau}{2}$, then one can cannot learn unambiguously $\tau$ parities of $\mathbf{x}$ given $|\psi_\mathbf{x}\rangle$. Let $B_d \triangleq \{\mathbf{x} \in \mathbb{F}_2^n : |\mathbf{x}|_H \le d\}$. We first prove the following

**Proposition 19.** For any $V \in \mathcal{A}_2(n, k)$, $|V \cap B_d| \le \sum_{a=0}^d \binom{k}{d}$.

*Proof.* Let $V \in \mathcal{A}_2(n, k)$ and we write $V = \mathbf{v} + W$ where $W$ is a linear subspace of dimension $k$. Let $\mathbf{G} \in \mathbb{F}_2^{k \times n}$ such that $W = \{\mathbf{G}^\top \mathbf{s} : \mathbf{s} \in \mathbb{F}_2^k\}$. Notice that

$$ V \cap B_d = \{\mathbf{s} : |\mathbf{G}^\top \mathbf{s} + \mathbf{v}|_H \le d\}. $$

Because $\mathbf{G}$ is of full rank, there exists $I \subseteq [1, n]$ with $|I| = k$ such that $\mathbf{G}_I$ (the matrix where the columns of $\mathbf{G}$ are restricted to those with indices is $I$) is a square matrix of full rank $k$. $(\mathbf{G}_I)^\top \mathbf{s}$ spans the whole space $\mathbb{F}_2^k$ for $\mathbf{s} \in \mathbb{F}_2^k$ therefore

$$ |\{\mathbf{s} : |(\mathbf{G}_I)^\top \mathbf{s} + \mathbf{v}_I|_H \le d\}| \le \sum_{a=0}^d \binom{k}{a}. $$

In order to conclude, notice that $|\mathbf{G}^\top \mathbf{s} + \mathbf{v}|_H \ge |(\mathbf{G}_I)^\top \mathbf{s} + \mathbf{v}_I|_H$, from which we get

$$ |V \cap B_d| = |\{\mathbf{s} : |\mathbf{G}^\top \mathbf{s} + \mathbf{v}|_H \le d\}| \le |\{\mathbf{s} : |(\mathbf{G}_I)^\top \mathbf{s} + \mathbf{v}_I|_H \le d\}| = \sum_{a=0}^d \binom{k}{a}, $$

which concludes the proof. $\square$
We can now prove our main threshold theorem.

**Theorem 5.** Let $S = \{|\psi_x\rangle\}_{x \in \mathbb{F}_2^n}$ be a set of symmetric states with $|\psi_0\rangle = \sum_{i \in \mathbb{F}_2^n} \hat{\alpha}_i |\hat{i}\rangle$. Let $\gamma > 2$ be an absolute constant. Let $\varepsilon$ such that $\sum_{i \notin B_d} |\hat{\alpha}_i|^2 = \varepsilon$. Then $\rho(S, \lceil \gamma d \rceil) \le \varepsilon(1 + o(1))$, where $o(1)$ is a quantity that goes to 0 as $d, n \to \infty$.

*Proof.* We prove this by constructing a solution to the dual program. We fix $\gamma > 2$ and let $\tau = \lceil \gamma d \rceil$. We choose as dual solution

$$b_i = \frac{2^{\tau}}{2^{\tau} - \sum_{a=0}^{d} \binom{\tau}{a}} \quad \text{for } i \notin B_d \quad ; \quad b_i = 0 \quad \text{for } i \in B_d$$

We now check each constraint. Pick $k \in \lceil \tau, n \rceil$, $\mathbf{H} \in \Lambda_k$ as well as $\mathbf{s} \in \mathbb{F}_2^{n-k}$. The dual constraint can be written

$$\sum_{i \in \mathcal{D}_{\mathbf{H}}(\mathbf{s})} b_i \ge 2^k,$$

and we now prove it is satisfied. We write

$$\begin{aligned} \sum_{i \in \mathcal{D}_{\mathbf{H}}(\mathbf{s})} b_i &= \frac{2^{\tau}}{2^{\tau} - \sum_{a=0}^{d} \binom{\tau}{a}} |\mathcal{D}_{\mathbf{H}}(\mathbf{s}) \cap \overline{B_d}| \\ &\ge \frac{2^{\tau}}{2^{\tau} - \sum_{a=0}^{d} \binom{\tau}{a}} \left( 2^k - \sum_{a=0}^{d} \binom{k}{a} \right) \quad \text{from Proposition 19} \\ &\ge 2^k \frac{2^{\tau} - \frac{1}{2^{k-\tau}} \sum_{a=0}^{d} \binom{k}{a}}{2^{\tau} - \sum_{a=0}^{d} \binom{\tau}{a}} \end{aligned}$$

In order to conclude, notice that $d \le \tau/2$ which allows us to write for each $a \in \lceil 0, d \rceil$

$$\frac{\binom{k}{a}}{\binom{\tau}{a}} = \prod_{i=\tau}^{k-1} \frac{\binom{i+1}{a}}{\binom{i}{a}} = \prod_{i=\tau}^{k-1} \frac{i+1}{i+1-a} \le \prod_{i=\tau}^{k-1} \frac{i+1}{i+1-i/2} \le 2^{k-\tau}$$

plugging this in the above inequality, we obtain indeed that

$$\sum_{i \in \mathcal{D}_{\mathbf{H}}(\mathbf{s})} b_i \ge 2^k \frac{2^{\tau} - \sum_{a=0}^{d} \binom{\tau}{a}}{2^{\tau} - \sum_{a=0}^{d} \binom{\tau}{a}} = 2^k,$$

which concludes the proof.

<figure><img src="image_5.png" /></figure>

The way to interpret this proposition is the following. Assume the set of states $S$ has the property that a $(1 - \text{negl}(n))$ of weight of the $|\hat{\alpha}_i|$ lies in strings $\mathbf{i}$ of weight smaller than $\tau/2$, then one can learn $\tau$ parities of $\mathbf{x}$ from $|\psi_\mathbf{x}\rangle$ only with negligible probability.

## 4.3 The average number of parities setting

### 4.3.1 Upper bounds

In the average setting, we want to bound the average number of parities that can be learned unambiguously. This means we fix $C(k) = k$. We write our primal and dual objective function respectively $\rho_{Av}^L(S)$ and $\sigma_{Av}^L(S)$. In this setting, we will prove two bounds. The first bound is related to the average dual weight of $|\psi_0\rangle$.

**Theorem 6.**

$$\sigma_{Av}^L(S) \le 2 \sum_{i \in \mathbb{F}_2^n} |\mathbf{i}|_H |\hat{\alpha}_i|^2.$$

*Proof.* We take a dual solution $b_i = 2|\mathbf{i}|_H$. We now prove that this solution satisfies the dual constraints. We first prove a lemma on the minimum average weight of vectors in an affine subspace of dimension $k$.
**Proposition 20.** For any $\mathbf{H} \in \mathbb{F}_2^{k \times n}$, for any $\mathbf{s} \in \mathbb{F}_2^{n-k}$, we have $\sum_{i \in \mathcal{D}_H(\mathbf{s})} 2|\mathbf{i}|_H \geq k2^k$.

*Proof.* We fix $\mathbf{H} \in \mathbb{F}_2^{k \times n}$, for any $\mathbf{s} \in \mathbb{F}_2^{n-k}$. Let $\mathbf{G}_H \in \mathbb{F}_2^{(n-k) \times n}$ be the matrix such that $\mathcal{D}_H(\mathbf{s}) = \{\mathbf{x} \in \mathbb{F}_2^n : \mathbf{G}_H \mathbf{x} = \mathbf{s}\}$. We fix a vector $\mathbf{v}$ such that $\mathbf{G}_H \mathbf{v} = \mathbf{s}$, which means we can also write

$$ \mathcal{D}_H(\mathbf{s}) = \{\mathbf{H}^\top \mathbf{x} + \mathbf{v} : \mathbf{x} \in \mathbb{F}_2^k\}. $$

Now, let $I \subseteq [1, n]$ with $|I| = k$ such that $\mathbf{H}_I$ (where we restrict columns to the ones with indices in $I$) is a square matrix of full rank $k$. We write

$$ \sum_{i \in \mathcal{D}_H(\mathbf{s})} |\mathbf{i}|_H = \sum_{\mathbf{x} \in \mathbb{F}_2^k} |\mathbf{H}^\top \mathbf{x} + \mathbf{v}|_H \geq \sum_{i \in \mathcal{D}_H(\mathbf{s})} |(\mathbf{H}_I)^\top \mathbf{x} + \mathbf{v}_I|_H = \frac{k2^k}{2}. $$

where in the last equality, we used the fact that $(\mathbf{H}_I)^\top \mathbf{x}$ hits each element of $\mathbb{F}_2^k$ exactly once, since $\mathbf{H}_I$ is a square matrix of full rank $k$. $\square$

From the above lemma, we immediately have that

$$ \sum_{i \in \mathcal{D}_H(\mathbf{s})} b_i = 2 \sum_{i \in \mathcal{D}_H(\mathbf{s})} |\mathbf{i}|_H \geq k2^k. $$

This implies that the $b_i = 2|\mathbf{i}|_H$ satisfies the dual constraints. We therefore conclude that

$$ \rho_{Av}(S) = \sigma_{Av}^L(S) \leq \sum_{i \in \mathbb{F}_2^n} 2|\mathbf{i}|_H |\hat{\alpha}_i|^2. $$

As a direct corollary, we have that if the $|\hat{\alpha}_i|^2$ are fully concentrated around words of weight at most $d$, meaning that $\sum_{i:|\mathbf{i}|_H \leq d} |\hat{\alpha}_i|^2 \geq 1 - \varepsilon$, then one can learn on average at most $2(d(1 - \varepsilon) + n\varepsilon)$ parities which is $\approx 2d$ when $\varepsilon \approx 0$. This theorem is therefore the average case equivalent of Theorem 5.

The above upper bound is sometimes optimal but in many instances, it is also far from optimal. We provide a second family of upper bounds for the average case setting.

**Proposition 21.**

$$ \sigma_{Av}^L(S) \leq (2^n + n - 1)|\hat{\alpha}_0|^2 + (n - 1) \sum_{i \in \mathbb{F}_2^n \setminus \{0\}} |\hat{\alpha}_i|^2. $$

*Proof.* We take a dual solution such that $b_0 = 2^n + n - 1$ and $b_i = n - 1$ for $i \neq 0 \in \mathbb{F}_2^n$. We have to prove that this solution satisfies the dual constraints. Fix any $k \in [1, n]$, $\mathbf{H} \in \Lambda_k$ and $\mathbf{s} \in \mathbb{F}_2^{n-k}$. We have to prove that

$$ \sum_{i \in \mathcal{D}_H(\mathbf{s})} b_i \geq k2^k. $$

We distinguish two cases:

* Either $0 \in \mathcal{D}_H(\mathbf{s})$ thus, $(\sum_{i \in \mathcal{D}_H(\mathbf{s})} b_i) = 2^n + n - 1 + (|\mathcal{D}_H(\mathbf{s})| - 1)(n - 1) = 2^n + n - 1 + (2^k - 1)(n - 1) = n2^k + 2^n - 2^k \geq k2^k$.

* Or $0 \notin \mathcal{D}_H(\mathbf{s})$ thus, $(\sum_{i \in \mathcal{D}_H(\mathbf{s})} b_i) = |\mathcal{D}_H(\mathbf{s})|(n - 1) = 2^k(n - 1) \geq k2^k$, note that this case can only occur when $k < n$, since for $k = n$, we necessarily have $0 \in \mathcal{D}_H(\mathbf{s})$.

Consequently, the dual constraints are saturated precisely when $k = n$ or $k = n - 1$ and $0 \notin \mathcal{D}_H(\mathbf{s})$. This implies that the $(b_i)_{i \in \mathbb{F}_2^n}$ satisfies the dual constraints. We therefore conclude that

$$ \sigma_{Av}^L(S) \leq (2^n + n - 1)|\hat{\alpha}_0|^2 + (n - 1) \sum_{i \in \mathbb{F}_2^n \setminus \{0\}} |\hat{\alpha}_i|^2. \quad \square $$

From the following proposition, additional dual solutions and upper bounds can be easily obtained.
**Proposition 22.** Let $\mathbf{b} = (b_i)_{i \in \mathbb{F}_2^n}$ a dual solution. Then, for all $f: \mathbb{F}_2^n \to \mathbb{F}_2^n$ such that $f(\mathbf{x}) = \mathbf{P}\mathbf{x}+\mathbf{v}$ with $\mathbf{P} \in GL_n(\mathbb{F}_2)$ and $\mathbf{v} \in \mathbb{F}_2^n$, $\mathbf{b}_f = (b_{f(i)})_{i \in \mathbb{F}_2^n}$ is also a dual solution.

The proof is deferred to Appendix A.

**Corollary 3.**

$$ \sigma_{Av}^{L}(S) \leq 2 \sum_{\mathbf{i} \in \mathbb{F}_2^n} |\mathbf{i} + \mathbf{1}|_H |\hat{\alpha}_{\mathbf{i}}|^2. $$

*Proof.* Let's show that $b_i = 2|\mathbf{i} + \mathbf{1}|_H$ is a dual solution. By Theorem 6, $b_i = 2|\mathbf{i}|_H$ is a dual solution. Then, by Proposition 26, $b_i = 2|\mathbf{i} + \mathbf{1}|_H$ is a dual solution (take $\mathbf{P} = I$ and $\mathbf{v} = \mathbf{1}$). The upper bound is derived immediately. □

**The specific case of $n = 2$** For the specific case of $n = 2$, we provide a complete characterization of the optimal dual solution. We show that it matches the bound of Theorem 6 or of Proposition 21, up to symmetries on the indices. We prove this in Appendix B.

In the general case however, there are examples where none of these two bounds achieve the optimal solution.

### 4.3.2 Matching primal solutions

In section 4.3.1, we derive upper bounds on the primal program in the average setting using feasible solutions of the dual program. Notice that our linear programs are parametrized by the Fourier coefficients of the states. In this section, we give *primal candidate solutions* associated to these dual solutions but they *may not respect the nonnegativity constraints*. For some parameters, that is, for some sets $S$ of symmetric states, these candidate primal solutions are nonnegative and by the complementary slackness theorem, this indicates that the corresponding upper bound is attained by the primal program. Thus, we do not establish directly the nonnegativity of the candidate primal solutions, as our focus lies in the analysis of a parametric optimization problem. We only say that the upper bound obtained from the dual equals the optimal value in the parameter region where the corresponding primal solution is nonnegative.

In this section only, we will use the following definitions that will be more convenient to state the matching primal solutions. First, remark that a given information about $\mathbf{x}$ is not uniquely determined by the choice of $(\mathbf{H}, \mathbf{y})$. For instance, consider

$$ \mathbf{H} = \begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \end{pmatrix} \quad \text{and} \quad \mathbf{y} = \begin{pmatrix} 1 \\ 0 \end{pmatrix} \quad \text{then} \quad \mathbf{H}\mathbf{x} = \mathbf{y} \Leftrightarrow x_1 \oplus x_3 = 1 \land x_2 \oplus x_3 = 0, $$

$$ \mathbf{H}' = \begin{pmatrix} 1 & 0 & 1 \\ 1 & 1 & 0 \end{pmatrix} \quad \text{and} \quad \mathbf{y}' = \begin{pmatrix} 1 \\ 1 \end{pmatrix} \quad \text{then} \quad \mathbf{H}'\mathbf{x} = \mathbf{y}' \Leftrightarrow x_1 \oplus x_3 = 1 \land x_1 \oplus x_2 = 1. $$

One can easily check that $\mathbf{H}\mathbf{x} = \mathbf{y} \Leftrightarrow \mathbf{H}'\mathbf{x} = \mathbf{y}'$ which means the same information is described in two different ways. This comes from the fact that the lines of the two matrices $\mathbf{H}, \mathbf{H}'$ actually generate the same 2-dimensional subspace of $\mathbb{F}_2^3$. To circumvent this issue, we redefine our sets $\Lambda_k$ without duplicates.

**Definition 22.** For $0 \le k \le n$, we define $\tilde{\Lambda}_k$ as the set of all parity-check matrices $\mathbf{H} \in \mathbb{F}_2^{k \times n}$ of full rank $k$, taken without duplicates, meaning that two matrices $\mathbf{H}, \mathbf{H}'$ are identified whenever they generate the same code $\{\mathbf{x} \in \mathbb{F}_2^n | \mathbf{H}\mathbf{x} = \mathbf{0}\}$. Equivalently, $\tilde{\Lambda}_k$ contains exactly one representative matrix for each $[n, n-k]$ linear code over $\mathbb{F}_2$.

We fix also a notation for the coset leader and we introduce a specific set of parity matrices.

**Definition 23.** We denote by $\mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s})$ and by $\mathbf{r}_{\mathbf{H}}^{\max}(\mathbf{s})$, the minimum weight representative of the dual coset $\mathcal{D}_{\mathbf{H}}(\mathbf{s})$ (called the coset leader) and the maximum weight representative of the dual coset $\mathcal{D}_{\mathbf{H}}(\mathbf{s})$ respectively. Formally,

$$ \mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s}) = \arg \min_{\mathbf{x} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s})} |\mathbf{x}|_H \quad \text{and} \quad \mathbf{r}_{\mathbf{H}}^{\max}(\mathbf{s}) = \arg \max_{\mathbf{x} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s})} |\mathbf{x}|_H. $$
**Definition 24.** Let $n \in \mathbb{N}$. We define $\mathcal{E}_k^n$ as the set of all ordered submatrices of the identity matrix $I_n$, obtained by selecting $k$ distinct rows of $I_n$ in increasing order of their indices, for $0 \le k \le n$. Formally,

$$ \mathcal{E}_k^n = \left\{ \begin{pmatrix} \mathbf{e}_{i_1} \\ \mathbf{e}_{i_2} \\ \vdots \\ \mathbf{e}_{i_k} \end{pmatrix} \middle| 1 \le i_1 < i_2 < \cdots < i_k \le n \right\}, $$

where $\mathbf{e}_j \in \mathbb{F}_2^n$ denotes the j-th canonical basis vector.

Furthermore, let $\mathbf{1} = 1 \dots 1$ denote the all-ones vector. We are now in position to state our solutions.

**Proposition 23 (Hamming solution).** The dual solution $b_i = 2|\mathbf{i}|_H$ for $\mathbf{i} \in \mathbb{F}_2^n$ is associated to the primal candidate solution

$$ \lambda_i^{\mathbf{H}} = \begin{cases} \frac{(-1)^{n-k} \sum_{s \in \mathbb{F}_2^n} (-1)^{|s|_H} |\hat{\alpha}_{\mathbf{r}_{\mathbf{H}}^{\mathrm{MAX}(s)}}|^2}{|\hat{\alpha}_i|^2} & \text{for } k \in [0, n], \mathbf{H} \in \mathcal{E}_k^n, \mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{0}), \\ 0 & \text{otherwise.} \end{cases} $$

**Proposition 24 (co-Hamming solution).** The dual solution $b_i = 2|\mathbf{i} + \mathbf{1}|_H$ for $\mathbf{i} \in \mathbb{F}_2^n$ is associated to the primal candidate solution

$$ \lambda_i^{\mathbf{H}} = \begin{cases} \frac{(-1)^{n-k} \sum_{s \in \mathbb{F}_2^n} (-1)^{|s|_H} |\hat{\alpha}_{\mathbf{r}_{\mathbf{H}}^{\mathrm{min}(s)}}|^2}{|\hat{\alpha}_i|^2} & \text{for } k \in [0, n], \mathbf{H} \in \mathcal{E}_k^n, \mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{1}), \\ 0 & \text{otherwise.} \end{cases} $$

**Proposition 25 (Spike solution).** The dual solution $b_0 = 2^n + n - 1$ and $b_i = n - 1$ for $\mathbf{i} \neq \mathbf{0} \in \mathbb{F}_2^n$ is associated to the primal candidate solution

$$ \lambda_i^{\mathbf{H}} = \begin{cases} \frac{|\hat{\alpha}_0|^2}{|\hat{\alpha}_i|^2} & \text{for } \mathbf{H} = \mathbf{I}, \mathbf{i} \in \mathbb{F}_2^n, \\ \frac{\sum_{x \in \mathcal{D}_{\mathbf{H}}(\mathbf{1})} |\hat{\alpha}_x|^2 - \sum_{x \in \mathcal{D}_{\mathbf{H}}(\mathbf{0})} |\hat{\alpha}_x|^2}{2^{n-1}|\hat{\alpha}_i|^2} & \text{for } \mathbf{H} \in \tilde{\Lambda}_{n-1}, \mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{1}), \\ 0 & \text{otherwise.} \end{cases} $$

The proofs are deferred to Appendix A.

# 5 Efficient constructions

Now, we investigate how the fine-grained unambiguous measurement can be implemented by quantum circuits given access to a primal solution ($\lambda_i^{\mathbf{H}}$). Our main observation is that the fine-grained unambiguous measurement reduces to the preparation of some controlled quantum state. Assuming access to such a unitary, the fine-grained unambiguous measurement can be performed efficiently.

**Theorem 7.** Let $S = \{|\psi_x\rangle\}$ be a set of symmetric states with $|\psi_0\rangle = \sum_{\mathbf{i} \in \mathbb{F}_2^n} |\hat{\alpha}_i|^2$ and let $(\lambda_i^{\mathbf{H},y})$ be a primal solution, i.e. an ensemble of nonnegative reals satisfying Equation 1 and Equation 2. Assume that these numbers are efficiently quantum sampleable i.e. that the unitary

$$ U : |\mathbf{i}\rangle|0\rangle \mapsto \sum_{k \in [0, n]} \sum_{\mathbf{H} \in \Lambda_k} \sqrt{\lambda_i^{\mathbf{H}} \frac{|\hat{\alpha}_i|}{\hat{\alpha}_i}} |\mathbf{i}\rangle|\mathbf{H}\rangle, \qquad (12) $$

can be computed in time poly(n). Then we can construct a POVM $\{F_{\mathbf{H},y}\} \in \Gamma(S)$ such that

1. $\rho(S; \{F_{\mathbf{H},y}\}) = \rho^L(S; (\lambda_i^{\mathbf{H}}))$.

2. The POVM $\{F_{\mathbf{H},y}\}$ can be efficiently implemented in time poly(n).

*Proof.* Consider $k \in [0, n]$, $\mathbf{H} \in \Lambda_k$, $\mathbf{G}_\mathbf{H}$ its associated matrix and $\mathbf{s} \in \mathbb{F}_2^{n-k}$. By Theorem 2, for all $\mathbf{i} \in \mathbb{F}_2^n$ such that $\mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s})$, there exist real numbers $\beta_{\mathbf{s}}^\mathbf{H}$ such that the following relation is true:

$$ \lambda_i^{\mathbf{H}} |\hat{\alpha}_i|^2 = (\beta_{\mathbf{s}}^{\mathbf{H}})^2. \qquad (13) $$
Let $\mathbf{s} \in \mathbb{F}_2^{n-k}$ and $\mathbf{i} \in \mathbb{F}_2^n$ such that $\mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s})$, $\mathbf{i}$ can be decomposed uniquely as $\mathbf{i} = \mathbf{H}^{\top}\mathbf{t} + \mathbf{v}_s$ with $\mathbf{t} \in \mathbb{F}_2^k$ and $\mathbf{v}_s$ the coset leader of $\mathcal{D}_{\mathbf{H}}(\mathbf{s})$. Then for any $\mathbf{x} \in \mathbb{F}_2^n$,

$$ \mathbf{x} \cdot \mathbf{i} = \mathbf{x} \cdot (\mathbf{H}^{\top}\mathbf{t} + \mathbf{v}_s) = (\mathbf{H}\mathbf{x}) \cdot \mathbf{t} + \mathbf{x} \cdot \mathbf{v}_s \quad (14) $$

We define $\tilde{U} = (H^{\otimes n} \otimes I)U(H^{\otimes n} \otimes I)$.

$$ \tilde{U} : |\hat{\mathbf{i}}\rangle|0\rangle \mapsto \sum_{k \in [0,n]} \sum_{\mathbf{H} \in \Lambda_k} \sqrt{\lambda_{\mathbf{i}}^{\mathbf{H}} \frac{|\hat{\alpha}_{\mathbf{i}}|}{\hat{\alpha}_{\mathbf{i}}}} |\hat{\mathbf{i}}\rangle|\mathbf{H}\rangle. $$

Recall that we can write each $|\psi_{\mathbf{x}}\rangle = \sum_{\mathbf{i} \in \mathbb{F}_2^n} (-1)^{\mathbf{i} \cdot \mathbf{x}} \hat{\alpha}_{\mathbf{i}} |\hat{\mathbf{i}}\rangle$. We therefore obtain

$$ \begin{aligned} \tilde{U}|\psi_{\mathbf{x}}\rangle|0\rangle &= \sum_{\mathbf{i} \in \mathbb{F}_2^n} (-1)^{\mathbf{i} \cdot \mathbf{x}} \hat{\alpha}_{\mathbf{i}} |\hat{\mathbf{i}}\rangle \sum_{\mathbf{H} \in \Lambda} \sqrt{\lambda_{\mathbf{i}}^{\mathbf{H}} \frac{|\hat{\alpha}_{\mathbf{i}}|}{\hat{\alpha}_{\mathbf{i}}}} |\mathbf{H}\rangle \\ &= \sum_{\mathbf{H} \in \Lambda} \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} \beta_{\mathbf{s}}^{\mathbf{H}} \left( \sum_{\mathbf{i} \in \mathbb{F}_2^n} (-1)^{\mathbf{i} \cdot \mathbf{x}} |\hat{\mathbf{x}}\rangle \right) |\mathbf{H}\rangle \quad \text{from (13)} \end{aligned} $$

We use the decomposition of $\mathbf{i}$ and we apply the isometry $|\hat{\mathbf{i}}\rangle \mapsto |\hat{\mathbf{t}}\rangle|\mathbf{s}\rangle$.

$$ \begin{aligned} & \sum_{\mathbf{H} \in \Lambda} \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} (-1)^{\mathbf{x} \cdot \mathbf{v}_s} \beta_{\mathbf{s}}^{\mathbf{H}} \left( \sum_{\mathbf{t} \in \mathbb{F}_2^k} (-1)^{\mathbf{H} \cdot \mathbf{t}} |\hat{\mathbf{t}}\rangle \right) |\mathbf{s}\rangle |\mathbf{H}\rangle && \text{from (14)} \\ &= \sum_{\mathbf{H} \in \Lambda} |\mathbf{H}\mathbf{x}\rangle \left( \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} (-1)^{\mathbf{x} \cdot \mathbf{v}_s} \sqrt{2^k} \beta_{\mathbf{s}}^{\mathbf{H}} |\mathbf{s}\rangle \right) |\mathbf{H}\rangle && \text{from (8)} \end{aligned} $$

We can now measure all the qubits in the computational basis. The measurement outputs $\mathbf{H}$, $\mathbf{Hx}$ with probability

$$ \mathrm{Pr}((\mathbf{H}, \mathbf{Hx})) = \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} 2^k (\beta_{\mathbf{s}}^{\mathbf{H}})^2 = \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} \sum_{\mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s})} (\beta_{\mathbf{s}}^{\mathbf{H}})^2 = \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} \sum_{\mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{s})} \lambda_{\mathbf{i}}^{\mathbf{H}} |\hat{\alpha}_{\mathbf{i}}|^2 = \sum_{\mathbf{i} \in \mathbb{F}_2^n} \lambda_{\mathbf{i}}^{\mathbf{H}} |\hat{\alpha}_{\mathbf{i}}|^2 $$

as the $\{|\mathbf{s}\rangle\}_{\mathbf{s} \in \mathbb{F}_2^{n-k}}$ are orthonormal. $\square$

## Acknowledgments

We acknowledge funding from the French PEPR integrated projects EPIQ (ANR-22-PETQ-007), PQ-TLS (ANR-22-PETQ-008) and HQI (ANR-22-PNCQ-0002) all part of plan France 2030 as well as the QuantERA QuantaGENOMICS project under Grant Agreement No. 101017733.
References

[BJK$^{+25}$] Shi Bai, Hansraj Jangir, Elena Kirshanova, Tran Ngo, and William Youmans. A quasi-polynomial time algorithm for the extrapolated dihedral coset problem over power-of-two moduli. In *Advances in Cryptology – CRYPTO 2025, Lecture Notes in Computer Science*. Springer, 2025. CRYPTO 2025 proceedings, paper ID 35664.

[CB98] Anthony Chefles and Stephen M. Barnett. Optimum unambiguous discrimination between linearly independent symmetric states. *Physics Letters A*, 250(4):223-229, 1998.

[CH25] André Chailloux and Paul Hermouet. On the quantum equivalence between $S|LWE\rangle$ and ISIS, 2025. arXiv:2510.06097 [quant-ph], https://arxiv.org/abs/2510.06097.

[Che98] Anthony Chefles. Unambiguous discrimination between linearly independent quantum states. *Physics Letters A*, 239(6):339-347, March 1998.

[CHL$^{+25}$] Yilei Chen, Zihan Hu, Qipeng Liu, Han Luo, and Yaxin Tu. Lwe with quantum amplitudes: Algorithm, hardness, and oblivious sampling. In *Advances in Cryptology – CRYPTO 2025, Lecture Notes in Computer Science*. Springer, 2025. IACR Crypto 2025 proceedings, paper ID 35580.

[CLZ22] Yilei Chen, Qipeng Liu, and Mark Zhandry. Quantum algorithms for variants of average-case lattice problems via filtering. Springer-Verlag, 2022.

[CT24] André Chailloux and Jean-Pierre Tillich. The Quantum Decoding Problem. In Frédéric Magniez and Alex Bredariol Grilo, editors, *19th Conference on the Theory of Quantum Computation, Communication and Cryptography (TQC 2024)*, volume 310 of *Leibniz International Proceedings in Informatics (LIPIcs)*, pages 6:1–6:14, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik.

[CT25] André Chailloux and Jean-Pierre Tillich. Quantum advantage from soft decoders. In *Proceedings of the 57th Annual ACM Symposium on Theory of Computing*, STOC '25, page 738–749, New York, NY, USA, 2025. Association for Computing Machinery.

[DFS24] Thomas Debris-Alazard, Pouria Fallahpour, and Damien Stehlé. Quantum oblivious lwe sampling and insecurity of standard model lattice-based snarks. In *Proceedings of the 56th Annual ACM Symposium on Theory of Computing*, STOC 2024, page 423–434, New York, NY, USA, 2024. Association for Computing Machinery.

[Die88] D. Dieks. Overlap and distinguishability of quantum states. *Physics Letters A*, 126(5):303–306, 1988.

[DJL00] Miloslav Dušek, Mika Jahma, and Norbert Lütkenhaus. Unambiguous state discrimination in quantum cryptography with weak coherent states. *Phys. Rev. A*, 62:022306, Jul 2000.

[DRT23] Thomas Debris-Alazard, Maxime Remaud, and Jean-Pierre Tillich. Quantum reduction of finding short code vectors to the decoding problem. *IEEE Transactions on Information Theory*, 2023.

[Hel69] Carl W. Helstrom. Quantum detection and estimation theory. *Journal of Statistical Physics*, 1(2):231–252, Jun 1969.

[HW94] Paul Hausladen and William K. Wootters. A 'pretty good' measurement for distinguishing quantum states. *Journal of Modern Optics*, 41(12):2385-2390, 1994.

[Iva87] I.D. Ivanovic. How to differentiate between non-orthogonal states. *Physics Letters A*, 123(6):257-259, 1987.

[JS95] Gregg Jaeger and Abner Shimony. Optimal distinction between two non-orthogonal quantum states. *Physics Letters A*, 197(2):83-87, 1995.
[JSW+25] Stephen P. Jordan, Noah Shutty, Mary Wootters, Adam Zalcman, Alexander Schmidhuber, Robbie King, Sergei V. Isakov, Tanuj Khattar, and Ryan Babbush. Optimization by decoded quantum interferometry, 2025. arXiv:2408.08292 [quant-ph], https://arxiv.org/abs/2408.08292.

[KM19] K. S. Kravtsov and S. N. Molotkov. Practical quantum key distribution with geometrically uniform states. *Phys. Rev. A*, 100:042329, Oct 2019.

[KOYJ22] Naser Karimi, Hadi Z Olyaei, Marziyeh Yahyavi, and Mohammad Ali Jafarizadeh. Reconstructing quantum states via unambiguous state discrimination. *Progress of Theoretical and Experimental Physics*, 2023(1):013A01, 11 2022.

[Per88] Asher Peres. How to differentiate between non-orthogonal states. *Physics Letters A*, 128(1):19, 1988.

[Pra62] Eugene Prange. The use of information sets in decoding cyclic codes. *IRE Trans. Inf. Theory*, 8:5-9, 1962.

[PW91] Asher Peres and William K. Wootters. Optimal detection of quantum information. *Phys. Rev. Lett.*, 66:1119-1122, Mar 1991.

[Reg09] Oded Regev. On lattices, learning with errors, random linear codes, and cryptography. *J. ACM*, 56(6), September 2009.

[RLvE03] Philippe Raynal, Norbert Lütkenhaus, and Steven J. van Enk. Reduction theorems for optimal unambiguous state discrimination of density matrices. *Phys. Rev. A*, 68:022308, Aug 2003.

[SHB01] Yuqing Sun, Mark Hillery, and János A. Bergou. Optimum unambiguous discrimination between linearly independent nonorthogonal quantum states and its optical realization. *Phys. Rev. A*, 64:022311, Jul 2001.

[YZ24] Takashi Yamakawa and Mark Zhandry. Verifiable quantum advantage without structure. *J. ACM*, 71(3), June 2024.
# A Matching primal solutions for the average setting

We first prove that from any dual solution $(b_i)_{i \in \mathbb{F}_2^n}$, one can also construct other dual solutions with the same objective by applying any affine bijection $f$ on the indices $i$.

**Proposition 26.** Let $\mathbf{b} = (b_i)_{i \in \mathbb{F}_2^n}$ a dual solution. Then, for all $f: \mathbb{F}_2^n \to \mathbb{F}_2^n$ such that $f(\mathbf{x}) = \mathbf{P}\mathbf{x}+\mathbf{v}$ with $\mathbf{P} \in GL_n(\mathbb{F}_2)$ and $\mathbf{v} \in \mathbb{F}_2^n$, $\mathbf{b}_f = (\mathbf{b}_{f(i)})_{i \in \mathbb{F}_2^n}$ is also a dual solution.

*Proof.* Let $\mathbf{b} = (b_i)_{i \in \mathbb{F}_2^n}$ be a dual solution, that is, for $i \in \mathbb{F}_2^n$, $b_i \in \mathbb{R}_+$ and for $k \in [0, n]$, $\mathbf{H} \in \Lambda_k$, and $\mathbf{s} \in \mathbb{F}_2^{n-k}$, $\sum_{i \in D_H(s)} b_i \ge C(k)2^k$. We consider $f: \mathbb{F}_2^n \to \mathbb{F}_2^n$ such that $f(i) = \mathbf{P}i + \mathbf{v}$ with $\mathbf{P} \in GL_n(\mathbb{F}_2)$ and $\mathbf{v} \in \mathbb{F}_2^n$. Let us recall that $D_H(s) = \{\mathbf{x} \in \mathbb{F}_2^n | \mathbf{G}_H \mathbf{x} = \mathbf{s}\}$ and we define $f(D_H(s)) = \{\mathbf{f}(\mathbf{x}) | \mathbf{x} \in \mathbb{F}_2^n, \mathbf{G}_H \mathbf{x} = \mathbf{s}\} = \{\mathbf{P}\mathbf{x} + \mathbf{s} | \mathbf{x} \in \mathbb{F}_2^n, \mathbf{G}_H \mathbf{x} = \mathbf{s}\}$. We restate $f(D_H(s))$:

$$ 
\begin{aligned}
\mathbf{y} \in f(D_H(s)) &\Leftrightarrow \mathbf{y} = \mathbf{P}\mathbf{x} + \mathbf{v} \text{ and } \mathbf{G}_H \mathbf{x} = \mathbf{s} \\
&\Leftrightarrow \mathbf{x} = \mathbf{P}^{-1}(\mathbf{y} + \mathbf{v}) \text{ and } \mathbf{G}_H \mathbf{P}^{-1}(\mathbf{y} + \mathbf{v}) = \mathbf{s} \\
&\Leftrightarrow \mathbf{x} = \mathbf{P}^{-1}(\mathbf{y} + \mathbf{v}) \text{ and } \mathbf{G}_H' \mathbf{y} = \mathbf{s}' \\
&\Leftrightarrow \mathbf{y} \in D_{H'}(\mathbf{s}')
\end{aligned}
$$

with $\mathbf{H}' = \mathbf{H}\mathbf{P}^T$, $\mathbf{G}_H' = \mathbf{G}_H\mathbf{P}^{-1}$ and $\mathbf{s}' = \mathbf{s} + \mathbf{G}_H\mathbf{P}^{-1}\mathbf{v}$. In other words, $f(D_H(s)) = D_{H'}(\mathbf{s}')$. Finally,

$$ \sum_{i \in D_H(s)} \mathbf{b}_{f(i)} = \sum_{\mathbf{y} \in f(D_H(s))} \mathbf{b}_{\mathbf{y}} = \sum_{\mathbf{y} \in D_{H'}(\mathbf{s}')} \mathbf{b}_{\mathbf{y}} \ge C(k)2^k $$

□

This proposition justifies that $b_i = 2|\mathbf{i} + \mathbf{1}|$ is also a dual solution, since $b_i = 2|\mathbf{i}|$ is one.

## A.1 Hamming solution

**Proposition 27 (Hamming solution).** The dual solution $b_i = 2|\mathbf{i}|_H$ for $\mathbf{i} \in \mathbb{F}_2^n$ is associated to the primal candidate solution

$$ \lambda_{\mathbf{i}}^{\mathbf{H}} = \begin{cases} \frac{(-1)^{n-k} \sum_{s \in \mathbb{F}_2^{n-k}} (-1)^{|s|_H} |\hat{\alpha}_{\mathbf{r}_{\mathbf{H}}^{\text{MAX}}(s)}|^2}{|\hat{\alpha}_{\mathbf{i}}|^2} & \text{for } k \in [0, n], \mathbf{H} \in \mathcal{E}_k^n, \mathbf{i} \in D_H(\mathbf{0}), \\ 0 & \text{otherwise.} \end{cases} $$

*Proof.* Same proof as for the co-Hamming solution below.

□

## A.2 co-Hamming solution

We start the proof by giving some useful lemmas about the coset leader when $\mathbf{H} \in \mathcal{E}_k^n$. Recall this set was defined in Definition 24.

**Remark.** By definition of $\mathbf{H} \in \mathcal{E}_k^n$ means $\mathbf{H}$ is a subset of rows of the canonical basis.

**Lemma 3 (Coset leader for $\mathbf{H} \in \mathcal{E}_k^n$).** Let $\mathbf{H} \in \mathcal{E}_k^n$ and let $S \subseteq [n] = \{1, \dots, n\}$ be the index set of the rows of $\mathbf{H}$, so $|S| = k$ and $\mathbf{H} = I_S$. Let $C = \text{Ker}(\mathbf{H}) = \{\mathbf{x} \in \mathbb{F}_2^n : \mathbf{x}|_S = 0\}$ and fix the canonical generator $\mathbf{G}_C = I_{S^c} \in \mathbb{F}_2^{(n-k) \times n}$, where $S^c = [n] \setminus S$. For any $\mathbf{s} \in \mathbb{F}_2^{n-k}$, the dual coset is

$$ D_H(\mathbf{s}) = \{ \mathbf{x} \in \mathbb{F}_2^n : \mathbf{G}_C \mathbf{x} = \mathbf{s} \} = \{ \mathbf{x} \in \mathbb{F}_2^n : \mathbf{x}|_{S^c} = \mathbf{s} \}. $$

Its coset leader is $\mathbf{y}$ with $\mathbf{y}|_S = \mathbf{0}$, $\mathbf{y}|_{S^c} = \mathbf{s}$. In other words, $\mathbf{y} = \sum_{j \in S^c} s_j \mathbf{e}_j$, so the support of $\mathbf{y}$ is contained in $S^c$.

*Proof.* By construction, $C = \text{Ker}(\mathbf{H}) = \{\mathbf{x} : \mathbf{x}|_S = 0\}$ and $\mathbf{G}_C = I_{S^c}$ maps $\mathbf{x}$ to its restriction on $S^c$. Hence $D_H(\mathbf{s}) = \{\mathbf{x} : \mathbf{x}|_{S^c} = \mathbf{s}\}$. Any $\mathbf{x} \in D_H(\mathbf{s})$ can be written uniquely as $\mathbf{x} = (\mathbf{u}, \mathbf{s})$ where $\mathbf{u} \in \mathbb{F}_2^k$ fills the coordinates on $S$. The Hamming weight decomposes as $|\mathbf{x}|_H = |\mathbf{u}|_H + |\mathbf{s}|_H$, which is minimized if and only if $\mathbf{u} = \mathbf{0}$. Therefore the unique minimum-weight element is $\mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s})$ defined by $\mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s})|_S = 0$ and $\mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s})|_{S^c} = \mathbf{s}$. Finally, since $\mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s})$ has ones exactly on the coordinates $j \in S^c$ with $s_j = 1$, we have $\mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s}) = \sum_{j \in S^c} s_j \mathbf{e}_j$. □
**Lemma 4.** Let $\mathbf{x} \in \mathbb{F}_2^n$. There exists a unique pair $(k, \mathbf{H}) \in \{0, \dots, n\} \times \mathcal{E}_k^n$ such that $\mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{1}) = \mathbf{x}$ (and hence $\mathbf{x} \in \mathcal{D}_{\mathbf{H}}(\mathbf{1})$).

*Proof.* Let $S = \{j \in [n] : x_j = 0\}$ and set $k := |S| = n - |\mathbf{x}|_H$. Consider the matrix $\mathbf{H} = I_S \in \mathcal{E}_k^n$, i.e., the $k \times n$ submatrix of the identity $I_n$ whose rows are $\{e_j : j \in S\}$ in increasing order. For $\mathbf{H} \in \mathcal{E}_k^n$, we can use the previous lemma to compute the coset leader $\mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s})$. In particular, for $\mathbf{s} = \mathbf{1} \in \mathbb{F}_2^{n-k}$, we obtain $\mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{1})$ is the vector equal to 0 on $S$ and 1 on $S^c$, which is exactly $\mathbf{x}$. This proves existence, and also $\mathbf{x} \in \mathcal{D}_{\mathbf{H}}(\mathbf{1})$ since $\mathbf{x}|_{S^c} = \mathbf{1}$.

For uniqueness, suppose $\mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{1}) = \mathbf{x}$ with $\tilde{\mathbf{H}} \in \mathcal{E}_k^n$ and let $\tilde{S}$ be the index set of the rows of $\tilde{\mathbf{H}}$. By the explicit form above, $\mathbf{r}_{\tilde{\mathbf{H}}}^{\min}(\mathbf{1})$ is 0 on $\tilde{S}$ and 1 on $\tilde{S}^c$. Since this vector equals $\mathbf{x}$, we must have $\tilde{S} = S$ and hence $\tilde{k} = |\tilde{S}| = |S| = n - |\mathbf{x}|_H = k$. Inside $\mathcal{E}_k^n$ the matrix with row set $S$ in increasing order is unique, namely $I_S = \mathbf{H}$. Therefore $(k, \mathbf{H})$ is unique. $\square$

**Lemma 5.** For $\mathbf{i}, \mathbf{x} \in \mathbb{F}_2^n$ and $k \in \{0, \dots, n\}$, define

$$N(k, \mathbf{i}, \mathbf{x}) \triangleq |\{ \mathbf{H} \in \mathcal{E}_k^n : \mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{1}), \exists \mathbf{s} \in \mathbb{F}_2^{n-k} \text{ with } \mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s}) = \mathbf{x} \}|.$$

Then

$$N(k, \mathbf{i}, \mathbf{x}) = \begin{cases} \left( \begin{array}{c} |\mathbf{i}|_H - |\mathbf{x}|_H \\ k - (n - |\mathbf{i}|_H) \end{array} \right) & \text{if } \mathbf{x} \subseteq \mathbf{i} \text{ and } n - |\mathbf{i}|_H \le k \le n - |\mathbf{x}|_H, \\ 0 & \text{otherwise.} \end{cases}$$

Here $\mathbf{x} \subseteq \mathbf{i}$ means $\text{supp}(\mathbf{x}) \subseteq \text{supp}(\mathbf{i})$.

*Proof.* Let $\mathbf{i}, \mathbf{x} \in \mathbb{F}_2^n$, let $k \in \{0, \dots, n\}$. Let $\mathbf{H} \in \mathcal{E}_k^n$ and write $S \subseteq [n]$ for the set of row indices of $\mathbf{H}$ and $S^c = [n] \setminus S$. With the canonical choice $\mathbf{G}_C = I_{S^c}$ for $C = \text{Ker}(\mathbf{H})$, one has

$$\mathcal{D}_{\mathbf{H}}(\mathbf{s}) = \{\mathbf{x} \in \mathbb{F}_2^n : x|_{S^c} = \mathbf{s}\}, \quad \mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s})|_S = 0, \mathbf{r}_{\tilde{\mathbf{H}}}^{\min}(\mathbf{s})|_{S^c} = \mathbf{s}.$$

We denote by $Z(\mathbf{v}) \triangleq \{j \in [n] : v_j = 0\}$ the zero-support of $\mathbf{v}$. Hence, the two conditions in the definition of $N(k, \mathbf{i}, \mathbf{x})$ translate to

$$\mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{1}) \iff \mathbf{i}|_{S^c} = \mathbf{1} \iff S \supseteq Z(\mathbf{i}),$$

and

$$\exists \mathbf{s} \text{ with } \mathbf{r}_{\tilde{\mathbf{H}}}^{\min}(\mathbf{s}) = \mathbf{x} \iff \mathbf{x}|_S = 0 \iff S \subseteq Z(\mathbf{x}),$$

Therefore, admissible $S$ are precisely those satisfying

$$Z(\mathbf{i}) \subseteq S \subseteq Z(\mathbf{x}).$$

In particular, this has a solution if and only if $Z(\mathbf{i}) \subseteq Z(\mathbf{x})$, i.e., $\mathbf{x} \subseteq \mathbf{i}$. Assume $\mathbf{x} \subseteq \mathbf{i}$ and write

$$Z(\mathbf{x}) = Z(\mathbf{i}) \cup (\text{supp}(\mathbf{i}) \setminus \text{supp}(\mathbf{x})).$$

Every admissible $S$ is then of the form $S = Z(\mathbf{i}) \cup T$ with $T \subseteq \text{supp}(\mathbf{i}) \setminus \text{supp}(\mathbf{x})$. The size constraint $|S| = k$ becomes $|T| = k - |Z(\mathbf{i})| = k - (n - |\mathbf{i}|_H)$, which is feasible if and only if

$$0 \le k - (n - |\mathbf{i}|_H) \le |\mathbf{i}|_H - |\mathbf{x}|_H \iff n - |\mathbf{i}|_H \le k \le n - |\mathbf{x}|_H.$$

In that case, the number of such $T$ is $(|\mathbf{i}|_H - |\mathbf{x}|_H) / (k - (n - |\mathbf{i}|_H))$, yielding exactly the claimed formula. If $\mathbf{x} \not\subseteq \mathbf{i}$, there is no admissible $S$ and the count is 0. $\square$

**Proposition 28 (co-Hamming solution).** The dual solution $b_{\mathbf{i}} = 2|\mathbf{i} + \mathbf{1}|_H$ for $\mathbf{i} \in \mathbb{F}_2^n$ is associated to the primal candidate solution

$$\lambda_{\mathbf{i}}^{\mathbf{H}} = \begin{cases} \frac{(-1)^{n-k} \sum_{\mathbf{s} \in \mathbb{F}_2^n - k} (-1)^{|\mathbf{s}|_H} |\hat{\alpha}_{\mathbf{H}}^{\min}(\mathbf{s})|^2}{|\hat{\alpha}_{\mathbf{1}}|^2} & \text{for } k \in [0, n], \mathbf{H} \in \mathcal{E}_k^n, \mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{1}), \\ 0 & \text{otherwise.} \end{cases}$$
Proof. Let $\mathbf{i} = 0$, $\sum_{\mathbf{H} \in \Lambda} \lambda_0^H = \frac{|\hat{\alpha}_0|^2}{|\hat{\alpha}_0|^2} + \sum_{\mathbf{H} \in \Lambda^*} 0 = 1$ as for $\mathbf{H} \in \Lambda^*$, $0 \notin \mathcal{D}_{\mathbf{H}}(\mathbf{1})$. Let $\mathbf{i} \neq 0 \in \mathbb{F}_2^n$,

$$S \triangleq \sum_{\mathbf{H} \in \Lambda} \lambda_{\mathbf{i}}^{\mathbf{H}} = \frac{1}{|\hat{\alpha}_{\mathbf{i}}|^2} \sum_{k=0}^{n} (-1)^{n-k} \sum_{\mathbf{H} \in \mathcal{E}_k^n | i \in \mathcal{D}_{\mathbf{H}}(\mathbf{1})} \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} (-1)^{|\mathbf{s}|_H} |\hat{\alpha}_{\mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s})}|^2$$

Let's show that

$$A \triangleq \sum_{k=0}^{n} (-1)^{n-k} \sum_{\mathbf{H} \in \mathcal{E}_k^n | i \in \mathcal{D}_{\mathbf{H}}(\mathbf{1})} \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} (-1)^{|\mathbf{s}|_H} |\hat{\alpha}_{\mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s})}|^2 = |\hat{\alpha}_{\mathbf{i}}|^2$$

Let

$$F_{\mathbf{i}}(\mathbf{x}) = \sum_{k=0}^{n} (-1)^{n-k} \sum_{\mathbf{H} \in \mathcal{E}_k^n | i \in \mathcal{D}_{\mathbf{H}}(\mathbf{1}), \exists \mathbf{s} \in \mathbb{F}_2^{n-k} \mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s}) = \mathbf{x}} (-1)^{|\mathbf{s}|_H}$$

and rewrite A using $F_{\mathbf{i}}(\mathbf{x})$,

$$A = \sum_{\mathbf{x} \in \mathbb{F}_2^n} |\hat{\alpha}_{\mathbf{x}}|^2 F_{\mathbf{i}}(\mathbf{x}).$$

We now show that

$$F_{\mathbf{i}}(\mathbf{x}) = 1 \quad \text{if } \mathbf{x} = \mathbf{i}$$

$$F_{\mathbf{i}}(\mathbf{x}) = 0 \quad \text{otherwise}$$

Note that, for $\mathbf{H} \in \mathcal{E}_k^n$, there is at most one $\mathbf{s} \in \mathbb{F}_2^{n-k}$ such that $\mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s}) = \mathbf{x}$ since $\mathbf{x}$ lies in one of the cosets of $\mathbf{H}$ but is not necessarily a coset leader. Assume $\mathbf{x} = \mathbf{i}$,

$$\begin{aligned}
F_{\mathbf{i}}(\mathbf{i}) &= \sum_{k=0}^{n} (-1)^{n-k} \sum_{\mathbf{H} \in \mathcal{E}_k^n | \mathbf{r}_{\mathbf{H},1} = \mathbf{i}} (-1)^{1 \cdot 1} \\
&= |\{(k, \mathbf{H}) \in [0, n] \times \mathcal{E}_k^n | \mathbf{r}_{\mathbf{H},1} = \mathbf{i}\}| \\
&= 1 && \text{from Lemma 4}
\end{aligned}$$

Assume $\mathbf{x} \neq \mathbf{i}$,

$$\begin{aligned}
F_{\mathbf{i}}(\mathbf{x}) &= \sum_{k=0}^{n} (-1)^{n-k} \sum_{\mathbf{H} \in \mathcal{E}_k^n | i \in \mathcal{D}_{\mathbf{H}}(\mathbf{1}), \exists \mathbf{s} \in \mathbb{F}_2^{n-k} \mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s}) = \mathbf{x}} (-1)^{|\mathbf{s}|_H} \\
&= (-1)^{|\mathbf{s}|_H} \sum_{k=0}^{n} (-1)^{n-k} N(k, \mathbf{i}, \mathbf{x}) \\
&= (-1)^{|\mathbf{s}|_H} \sum_{k=n-|\mathbf{i}|_H}^{n-|\mathbf{x}|_H} (-1)^{n-k} \binom{|\mathbf{i}|_H - |\mathbf{x}|_H}{k - (n - |\mathbf{i}|_H)} && \text{from Lemma 5} \\
&= (-1)^{|\mathbf{s}|_H + |\mathbf{i}|_H} \sum_{r=0}^{|\mathbf{i}|_H - |\mathbf{x}|_H} (-1)^r \binom{|\mathbf{i}|_H - |\mathbf{x}|_H}{r} \\
&= 0
\end{aligned}$$

This gives immediately that $A = |\hat{\alpha}_{\mathbf{i}}|^2$. Finally, if $\lambda_{\mathbf{i}}^H \ge 0$, complementary slackness conditions are satisfied as for all $\mathbf{i} \in \mathbb{F}_2^n$, $(\sum_{\mathbf{H}} \lambda_{\mathbf{i}}^H - 1)b_{\mathbf{i}} = 0$. The primal and dual objective are equal, it is the optimum. $\square$

We can double check that the dual value is attained.

$$B \triangleq \sum_{k=0}^{n} \sum_{\mathbf{H} \in \Lambda_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} k \lambda_{\mathbf{i}}^{\mathbf{H}} |\hat{\alpha}_{\mathbf{i}}|^2 = \sum_{\mathbf{i} \in \mathbb{F}_2^n} \sum_{k=0}^{n} k (-1)^{n-k} \sum_{\mathbf{H} \in \mathcal{E}_k^n | i \in \mathcal{D}_{\mathbf{H}}(\mathbf{1})} \sum_{\mathbf{s} \in \mathbb{F}_2^{n-k}} (-1)^{|\mathbf{s}|_H} |\hat{\alpha}_{\mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s})}|^2$$
We introduce

$$
F'_{\mathbf{i}}(\mathbf{x}) \triangleq \sum_{k=0}^{n} k(-1)^{n-k} \sum_{\mathbf{H} \in \mathcal{E}_k^n | \mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{1}), \exists \mathbf{s} \in \mathbb{F}_2^{n-k} \mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s}) = \mathbf{x}} (-1)^{|\mathbf{s}|_{\mathbf{H}}}
$$

and we rewrite

$$
B = \sum_{\mathbf{i} \in \mathbb{F}_2^n} \sum_{\mathbf{x} \in \mathbb{F}_2^n} |\hat{\alpha}_{\mathbf{x}}|^2 F'_{\mathbf{i}}(\mathbf{x})
$$

Let's show that

$$
F'_{\mathbf{i}}(\mathbf{x}) = \begin{cases} |\mathbf{i} + \mathbf{1}|_H & \text{if } \mathbf{x} = \mathbf{i} \\ 1 & \text{if } \mathbf{x} \subset \mathbf{i} \text{ and } |\mathbf{i}|_H - |\mathbf{x}|_H = 1 \\ 0 & \text{otherwise.} \end{cases}
$$

$$
\begin{align*}
F'_{\mathbf{i}}(\mathbf{i}) &= \sum_{k=0}^{n} k(-1)^{n-k} \sum_{\mathbf{H} \in \mathcal{E}_k^n | \mathbf{r}_{\mathbf{H},1}=\mathbf{i}} (-1)^{n-k} \\
&= |\mathbf{i} + \mathbf{1}|_H \tag*{\text{from Lemma 4}}
\end{align*}
$$

$$
F'_{\mathbf{i}}(\mathbf{x}) = \sum_{k=0}^{n} k(-1)^{n-k} \sum_{\mathbf{H} \in \mathcal{E}_k^n | \mathbf{i} \in \mathcal{D}_{\mathbf{H}}(\mathbf{1}), \exists \mathbf{s} \in \mathbb{F}_2^{n-k} \mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s}) = \mathbf{x}} (-1)^{|\mathbf{s}|_H}
$$

Let $\mathbf{H} \in \mathcal{E}_k^n$ and write $S \subseteq [n]$ for the set of row indices of $\mathbf{H}$ and $S^c = [n] \setminus S$. With the canonical choice $\mathbf{G}_C = I_{S^c}$ for $C = \text{Ker}(\mathbf{H})$, one has

$$
\mathcal{D}_{\mathbf{H}}(\mathbf{s}) = \{ \mathbf{x} \in \mathbb{F}_2^n : x|_{S^c} = \mathbf{s} \}, \quad \mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s})|_S = \mathbf{x}|_S = 0, \mathbf{r}_{\mathbf{H}}^{\min}(\mathbf{s})|_{S^c} = \mathbf{x}|_{S^c} = \mathbf{s}.
$$

Thus, $|\mathbf{x}|_H = |\mathbf{s}|_H$.

$$
\begin{align*}
F'_{\mathbf{i}}(\mathbf{x}) &= (-1)^{|\mathbf{x}|_H} \sum_{k=0}^{n} k(-1)^{n-k} N(k, \mathbf{i}, \mathbf{x}) \\
&= (-1)^{|\mathbf{x}|_H} \sum_{k=n-|\mathbf{i}|_H}^{n-|\mathbf{x}|_H} k(-1)^{n-k} \binom{|\mathbf{i}|_H - |\mathbf{x}|_H}{k - (n - |\mathbf{i}|_H)} \\
&= (-1)^{|\mathbf{x}|_H + |\mathbf{i}|_H} \sum_{r=0}^{|\mathbf{i}|_H - |\mathbf{x}|_H} (n - |\mathbf{i}|_H + r) (-1)^r \binom{|\mathbf{i}|_H - |\mathbf{x}|_H}{r} \\
&= (-1)^{|\mathbf{x}|_H + |\mathbf{i}|_H} \left[ (n - |\mathbf{i}|_H) \sum_{r=0}^{|\mathbf{i}|_H - |\mathbf{x}|_H} (-1)^r \binom{|\mathbf{i}|_H - |\mathbf{x}|_H}{r} + \sum_{r=0}^{|\mathbf{i}|_H - |\mathbf{x}|_H} r (-1)^r \binom{|\mathbf{i}|_H - |\mathbf{x}|_H}{r} \right] \\
&= (-1)^{|\mathbf{x}|_H + |\mathbf{i}|_H} \sum_{r=0}^{|\mathbf{i}|_H - |\mathbf{x}|_H} r (-1)^r \binom{|\mathbf{i}|_H - |\mathbf{x}|_H}{r}
\end{align*}
$$

Let $\mathbf{x} \neq \mathbf{i}$ such that $\mathbf{x} \subset \mathbf{i}$ and $|\mathbf{i}|_H - |\mathbf{x}|_H = 1$, $F'_{\mathbf{i}}(\mathbf{x}) = (-1)(-1) = 1$. Let $\mathbf{x} \neq \mathbf{i}$ such that $\mathbf{x} \subset \mathbf{i}$ and $|\mathbf{i}|_H - |\mathbf{x}|_H \neq \{0, 1\}$, $F'_{\mathbf{i}}(\mathbf{x}) = 0$. Let $\mathbf{x} \neq \mathbf{i}$ such that $\mathbf{x} \not\subset \mathbf{i}$, $F'_{\mathbf{i}}(\mathbf{x}) = 0$.

$$
B = \sum_{\mathbf{i} \in \mathbb{F}_2^n} |\mathbf{i} + \mathbf{1}|^2 |\hat{\alpha}_{\mathbf{x}}|^2 + \sum_{\mathbf{i} \in \mathbb{F}_2^n} \sum_{\mathbf{x} \in \mathbb{F}_2^n | \mathbf{x} \subset \mathbf{i}, |\mathbf{i}|_H - |\mathbf{x}|_H = 1} |\hat{\alpha}_{\mathbf{x}}|^2 \\
|\{\mathbf{x} \in \mathbb{F}_2^n | \mathbf{x} \subset \mathbf{i}, |\mathbf{i}|_H - |\mathbf{x}|_H = 1\}| = n - |\mathbf{i}|_H = |\mathbf{i} + \mathbf{1}|_H
$$

As expected, we obtain

$$
B = 2 \sum_{\mathbf{i} \in \mathbb{F}_2^n} |\mathbf{i} + \mathbf{1}|^2 |\hat{\alpha}_{\mathbf{i}}|^2.
$$
### A.3 Spike solution

**Proposition 29 (Spike solution).** The dual solution $b_0 = 2^n + n - 1$ and $b_i = n - 1$ for $i \neq 0 \in \mathbb{F}_2^n$ is associated to the primal candidate solution

$$ \lambda_i^H = \begin{cases} \frac{|\hat{\alpha}_0|^2}{|\hat{\alpha}_i|^2} & \text{for } \mathbf{H} = I, \mathbf{i} \in \mathbb{F}_2^n, \\ \frac{\sum_{\mathbf{x} \in \mathcal{D}_{\mathbf{H}(1)}} |\hat{\alpha}_{\mathbf{x}}|^2 - \sum_{\mathbf{x} \in \mathcal{D}_{\mathbf{H}(0)}} |\hat{\alpha}_{\mathbf{x}}|^2}{2^{n-1}|\hat{\alpha}_i|^2} & \text{for } \mathbf{H} \in \tilde{\Lambda}_{n-1}, \mathbf{i} \in \mathcal{D}_{\mathbf{H}}(1), \\ 0 & \text{otherwise.} \end{cases} $$

*Proof.* First, observe that for $\mathbf{H} = I$, $\mathbb{F}_2^n = \mathcal{D}_{\mathbf{H}}(0)$ and for $\mathbf{H} \in \tilde{\Lambda}_{n-1}$, $\mathbb{F}_2^n = \mathcal{D}_{\mathbf{H}}(0) \sqcup \mathcal{D}_{\mathbf{H}}(1)$.

Let $\mathbf{i} = 0$, $\sum_{\mathbf{H} \in \tilde{\Lambda}} \lambda_0^H = \frac{|\hat{\alpha}_0|^2}{|\hat{\alpha}_0|^2} + \sum_{\mathbf{H} \in \tilde{\Lambda}_{n-1}} 0 = 1$ as for $\mathbf{H} \in \tilde{\Lambda}_{n-1}$, $0 \notin \mathcal{D}_{\mathbf{H}}(1)$.

Let $\mathbf{i} \neq 0 \in \mathbb{F}_2^n$,

$$ S \triangleq \sum_{\mathbf{H} \in \tilde{\Lambda}} \lambda_i^H = \frac{|\hat{\alpha}_0|^2}{|\hat{\alpha}_i|^2} + \frac{1}{2^{n-1}|\hat{\alpha}_i|} \sum_{\mathbf{H} \in \tilde{\Lambda}_{n-1} | \mathbf{i} \in \mathcal{D}_{\mathbf{H}}(1)} \left( \sum_{\mathbf{x} \in \mathcal{D}_{\mathbf{H}}(1)} |\hat{\alpha}_{\mathbf{x}}|^2 - \sum_{\mathbf{x} \in \mathcal{D}_{\mathbf{H}}(0)} |\hat{\alpha}_{\mathbf{x}}|^2 \right) \\ = \frac{|\hat{\alpha}_0|^2}{|\hat{\alpha}_i|^2} + \frac{1}{2^{n-1}|\hat{\alpha}_i|} \sum_{\mathbf{H} \in \tilde{\Lambda}_{n-1} | \mathbf{i} \in \mathcal{D}_{\mathbf{H}}(1)} \left[ (|\hat{\alpha}_i|^2 - |\hat{\alpha}_0|^2) + \left( \sum_{\mathbf{x} \in \mathcal{D}_{\mathbf{H}}(1) \setminus \{\mathbf{i}\}} |\hat{\alpha}_{\mathbf{x}}|^2 - \sum_{\mathbf{x} \in \mathcal{D}_{\mathbf{H}}(0) \setminus \{\mathbf{0}\}} |\hat{\alpha}_{\mathbf{x}}|^2 \right) \right] $$

Let's show that

$$ A \triangleq \sum_{\mathbf{H} \in \tilde{\Lambda}_{n-1} | \mathbf{i} \in \mathcal{D}_{\mathbf{H}}(1)} \left( \sum_{\mathbf{x} \in \mathcal{D}_{\mathbf{H}}(1) \setminus \{\mathbf{i}\}} |\hat{\alpha}_{\mathbf{x}}|^2 - \sum_{\mathbf{x} \in \mathcal{D}_{\mathbf{H}}(0) \setminus \{\mathbf{0}\}} |\hat{\alpha}_{\mathbf{x}}|^2 \right) = 0. $$

For $\mathbf{H} \in \tilde{\Lambda}_{n-1}$, $\mathcal{C} = \text{Ker}(\mathbf{H})$ of dimension 1 by rank-nullity theorem. So, there exists $\mathbf{c}_0 \neq \mathbf{0}$ such that $\mathcal{C} = \text{span}\{\mathbf{c}_0\}$. We choose $\mathbf{G}_\mathcal{C} = \mathbf{c}_0^\mathrm{T}$. We rewrite $\mathcal{D}_{\mathbf{H}}(1) = \{\mathbf{x} \in \mathbb{F}_2^n \mid \mathbf{G}_\mathcal{C} \cdot \mathbf{x} = 1\} = \{\mathbf{x} \in \mathbb{F}_2^n \mid \mathbf{c}_0^\mathrm{T} \cdot \mathbf{x} = 1\}$ and $\mathcal{D}_{\mathbf{H}}(0) = \{\mathbf{x} \in \mathbb{F}_2^n \mid \mathbf{c}_0^\mathrm{T} \cdot \mathbf{x} = 0\}$. Remark that $\mathbf{0} \notin \mathcal{D}_{\mathbf{H}}(1)$ by definition and $\mathbf{i} \notin \mathcal{D}_{\mathbf{H}}(0)$ as $\mathbf{i} \in \mathcal{D}_{\mathbf{H}}(1)$. Then,

$$ A = \sum_{c_0 \in \mathbb{F}_2^n | \mathbf{c}_0^\mathrm{T} \cdot \mathbf{i} = 1} \left( \sum_{\mathbf{x} \in \mathbb{F}_2^n \setminus \{\mathbf{i}\} | \mathbf{c}_0^\mathrm{T} \cdot \mathbf{x} = 1} |\hat{\alpha}_{\mathbf{x}}|^2 - \sum_{\mathbf{x} \in \mathbb{F}_2^n \setminus \{\mathbf{0}\} | \mathbf{c}_0^\mathrm{T} \cdot \mathbf{x} = 0} |\hat{\alpha}_{\mathbf{x}}|^2 \right) \\ = \sum_{\mathbf{x} \in \mathbb{F}_2^n \setminus \{\mathbf{0}, \mathbf{i}\}} |\hat{\alpha}_{\mathbf{x}}|^2 (N_1(\mathbf{x}) - N_0(\mathbf{x})) $$

where we define for all $\mathbf{x} \in \mathbb{F}_2^n \setminus \{\mathbf{0}, \mathbf{i}\}$

$$ N_1(\mathbf{x}) \triangleq |\{\mathbf{c}_0 \in \mathbb{F}_2^n \mid \mathbf{c}_0^\mathrm{T} \cdot \mathbf{i} = 1 \text{ and } \mathbf{c}_0^\mathrm{T} \cdot \mathbf{x} = 1\}|, $$

$$ N_0(\mathbf{x}) \triangleq |\{\mathbf{c}_0 \in \mathbb{F}_2^n \mid \mathbf{c}_0^\mathrm{T} \cdot \mathbf{i} = 1 \text{ and } \mathbf{c}_0^\mathrm{T} \cdot \mathbf{x} = 0\}|. $$

We are counting the number of vectors in the intersection of two affine hyperplanes. $\mathbf{c} \mapsto \mathbf{c}^\mathrm{T}\mathbf{i}$ and $\mathbf{c} \mapsto \mathbf{c}^\mathrm{T}\mathbf{x}$ are linearly independent as $\mathbf{x} \neq \mathbf{0}, \mathbf{i}$. Thus, $N_1(\mathbf{x}) = N_0(\mathbf{x}) = 2^{n-2}$ and $A = 0$.

$$ S = \frac{|\hat{\alpha}_0|^2}{|\hat{\alpha}_i|^2} + \frac{1}{2^{n-1}|\hat{\alpha}_i|} \sum_{\mathbf{H} \in \tilde{\Lambda}_{n-1} | \mathbf{i} \in \mathcal{D}_{\mathbf{H}}(1)} (|\hat{\alpha}_i|^2 - |\hat{\alpha}_0|^2) + 0 \\ = \frac{|\hat{\alpha}_0|^2}{|\hat{\alpha}_i|^2} + \frac{1}{2^{n-1}|\hat{\alpha}_i|} (|\hat{\alpha}_i|^2 - |\hat{\alpha}_0|^2) |\{\mathbf{H} \in \tilde{\Lambda}_{n-1} | \mathbf{i} \in \mathcal{D}_{\mathbf{H}}(1)\}| $$

$\{\mathbf{H} \in \tilde{\Lambda}_{n-1} | \mathbf{i} \in \mathcal{D}_{\mathbf{H}}(1)\}$ defines an affine hyperplane of cardinality $2^{n-1}$.

$$ S = \frac{|\hat{\alpha}_0|^2}{|\hat{\alpha}_i|^2} + \frac{1}{2^{n-1}|\hat{\alpha}_i|} 2^{n-1} (|\hat{\alpha}_i|^2 - |\hat{\alpha}_0|^2) \\ = 1. $$

Finally, if $\lambda_i^H \ge 0$, complementary slackness conditions are satisfied as for all $\mathbf{i} \in \mathbb{F}_2^n$, $(\sum_{\mathbf{H}} \lambda_i^H - 1)b_i = 0$. The primal and dual objective are equal, it is the optimum. $\square$
We can double check that the dual value is attained.

$$
\begin{align*}
\sum_{k=0}^{n} \sum_{\mathbf{H} \in \tilde{\Lambda}_k} \sum_{\mathbf{i} \in \mathbb{F}_2^n} k \lambda_{\mathbf{i}}^{\mathbf{H}} |\hat{\alpha}_{\mathbf{i}}|^2 &= n 2^n |\hat{\alpha}_0|^2 + \frac{n-1}{2^{n-1}} \sum_{\mathbf{i} \in \mathbb{F}_2^n \setminus \{0\}} \sum_{\mathbf{H} \in \tilde{\Lambda}_{n-1}} \sum_{\mathbf{i} \in \mathcal{D}_{\mathbf{H}}(1)} \left( \sum_{\mathbf{x} \in \mathcal{D}_{\mathbf{H}}(1)} |\hat{\alpha}_{\mathbf{x}}|^2 - \sum_{\mathbf{x} \in \mathcal{D}_{\mathbf{H}}(0)} |\hat{\alpha}_{\mathbf{x}}|^2 \right) \\
&= n 2^n |\hat{\alpha}_0|^2 + (n-1) \sum_{\mathbf{i} \in \mathbb{F}_2^n \setminus \{0\}} (|\hat{\alpha}_{\mathbf{i}}|^2 - |\hat{\alpha}_0|^2) + 0 \\
&= (n 2^n - (n-1)(2^n-1)) |\hat{\alpha}_0|^2 + (n-1) \sum_{\mathbf{i} \in \mathbb{F}_2^n \setminus \{0\}} |\hat{\alpha}_{\mathbf{i}}|^2 \\
&= (2^n + n-1) |\hat{\alpha}_0|^2 + (n-1) \sum_{\mathbf{i} \in \mathbb{F}_2^n \setminus \{0\}} |\hat{\alpha}_{\mathbf{i}}|^2
\end{align*}
$$

B Full characterization of fine-grained unambiguous measure-
ments on $\mathbb{F}_2^2$ in the average setting

In this section, we describe all the measurements that are possible on 2 bits when considering the average number of parities setting. The only parities we can learn on a 2 bits codeword $\mathbf{x} = x_1 x_2$ are $\mathbf{x} = 00, \mathbf{x} = 01, \mathbf{x} = 10, \mathbf{x} = 11, x_2 = 0, x_2 = 1, x_1 = 0, x_1 = 1, x_1 \oplus x_2 = 0, x_1 \oplus x_2 = 1, \emptyset$. These parities are described using the set of matrices

$$
\tilde{\Lambda} = \left\{ \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}, (0 \ 1), (1 \ 0), (1 \ 1), (0 \ 0) \right\}
$$

which correspond respectively to learning the full codeword, the first bit, the second bit, the xor or
nothing. We use the notation of Definition 22, where we consider in $\tilde{\Lambda}$ only one matrix $\mathbf{H}$ per affine
subspace.

The corresponding unambiguous POVM is {$F_{00}, F_{01}, F_{10}, F_{11}, F_{\perp 0}, F_{\perp 1}, F_{0\perp}, F_{1\perp}, F_{\text{xor}=0}, F_{\text{xor}=1}, F_{\perp}$}.
When considering the states $|\psi_{\mathbf{x}}\rangle = \hat{\alpha}_{00}|00\rangle + (-1)^{c_2}\hat{\alpha}_{01}|01\rangle + (-1)^{c_1}\hat{\alpha}_{10}|10\rangle + (-1)^{c_1+c_2}\hat{\alpha}_{11}|11\rangle$, we
assume without loss of generality that $|\hat{\alpha}_{00}|^2 \leq |\hat{\alpha}_{01}|^2 \leq |\hat{\alpha}_{10}|^2 \leq |\hat{\alpha}_{11}|^2$.

We first associate to the five matrices $\mathbf{H}$ in $\tilde{\Lambda}$ real numbers $\lambda_i^\mathbf{H}$ with $i \in \mathbb{F}_2^2$. We rewrite

$$
\lambda_i = \lambda_i \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}; \quad \mu_i = \lambda_i \begin{pmatrix} 0 & 1 \end{pmatrix}; \quad \nu_i = \lambda_i \begin{pmatrix} 1 & 0 \end{pmatrix}; \quad \xi_i = \lambda_i \begin{pmatrix} 1 & 1 \end{pmatrix}; \quad \delta_i = \lambda_i \begin{pmatrix} 0 & 0 \end{pmatrix}.
$$

We now rewrite the linear program associated to the objective $\rho_{Av}^L(S)$. We first write the linear relations between the variables. In our case, we obtain

$$
\lambda_{00} |\hat{\alpha}_{00}|^2 = \lambda_{01} |\hat{\alpha}_{01}|^2 = \lambda_{10} |\hat{\alpha}_{10}|^2 = \lambda_{11} |\hat{\alpha}_{11}|^2
$$

as well as

$$
\mu_{00} |\hat{\alpha}_{00}|^2 = \mu_{10} |\hat{\alpha}_{10}|^2
$$

$$
\nu_{00} |\hat{\alpha}_{00}|^2 = \nu_{01} |\hat{\alpha}_{01}|^2
$$

$$
\xi_{00} |\hat{\alpha}_{00}|^2 = \xi_{11} |\hat{\alpha}_{11}|^2
$$

$$
\mu_{01} |\hat{\alpha}_{01}|^2 = \mu_{11} |\hat{\alpha}_{11}|^2
$$

$$
\nu_{10} |\hat{\alpha}_{10}|^2 = \nu_{11} |\hat{\alpha}_{11}|^2
$$

$$
\xi_{01} |\hat{\alpha}_{01}|^2 = \xi_{10} |\hat{\alpha}_{10}|^2
$$

We plug these relations in the linear program in order to reduce the number of variables. We thus
obtain the following linear program
## 2-bits primal program

Variables:

$$ \lambda_{00}, \mu_{00}, \mu_{01}, \nu_{00}, \nu_{10}, \xi_{00}, \xi_{01}, \delta_{00}, \delta_{01}, \delta_{10}, \delta_{11} \in \mathbb{R}_{+} $$

Objectives:

$$ \rho^L(S) \triangleq \max 8\lambda_{00}|\hat{\alpha}_{00}|^2 + 2(\mu_{00}|\hat{\alpha}_{00}|^2 + \mu_{10}|\hat{\alpha}_{01}|^2) + 2(\nu_{00}|\hat{\alpha}_{00}|^2 + \nu_{10}|\hat{\alpha}_{10}|^2) + 2(\xi_{00}|\hat{\alpha}_{00}|^2 + \xi_{01}|\hat{\alpha}_{01}|^2) $$

Constraints:

$$ 1 - \lambda_{00} - \mu_{00} - \nu_{00} - \xi_{00} - \delta_{00} = 0 $$

$$ 1 - \frac{|\hat{\alpha}_{00}|^2}{|\hat{\alpha}_{01}|^2} \lambda_{00} - \mu_{01} - \frac{|\hat{\alpha}_{00}|^2}{|\hat{\alpha}_{01}|^2} \nu_{00} - \xi_{01} - \delta_{01} = 0 $$

$$ 1 - \frac{|\hat{\alpha}_{00}|^2}{|\hat{\alpha}_{10}|^2} \lambda_{00} - \frac{|\hat{\alpha}_{00}|^2}{|\hat{\alpha}_{10}|^2} \mu_{00} - \nu_{10} - \frac{|\hat{\alpha}_{01}|^2}{|\hat{\alpha}_{10}|^2} \xi_{01} - \delta_{10} = 0 $$

$$ 1 - \frac{|\hat{\alpha}_{00}|^2}{|\hat{\alpha}_{11}|^2} \lambda_{00} - \frac{|\hat{\alpha}_{01}|^2}{|\hat{\alpha}_{11}|^2} \mu_{01} - \frac{|\hat{\alpha}_{00}|^2}{|\hat{\alpha}_{10}|^2} \nu_{10} - \frac{|\hat{\alpha}_{00}|^2}{|\hat{\alpha}_{11}|^2} \xi_{00} - \delta_{11} = 0 $$

From this program, we construct the associated dual linear program.

## 2-bits dual program

Variables:

$$ b_{00}, b_{01}, b_{10}, b_{11} \in \mathbb{R}_{+} $$

Objective:

$$ \sigma^L(S) \triangleq \min b_{00}|\hat{\alpha}_{00}|^2 + b_{01}|\hat{\alpha}_{01}|^2 + b_{10}|\hat{\alpha}_{10}|^2 + b_{11}|\hat{\alpha}_{11}|^2 $$

Constraints:

$$ b_{00} + b_{01} + b_{10} + b_{11} \geq 8 $$

$$ b_{00} + b_{10} \geq 2 $$

$$ b_{01} + b_{11} \geq 2 $$

$$ b_{00} + b_{01} \geq 2 $$

$$ b_{10} + b_{11} \geq 2 $$

$$ b_{00} + b_{11} \geq 2 $$

$$ b_{01} + b_{10} \geq 2 $$

By Corollary 3 and Proposition 28, we obtain that

**Corollary 4 (co-Hamming solution).** The optimal value is $4|\hat{\alpha}_{00}|^2 + 2|\hat{\alpha}_{01}|^2 + 2|\hat{\alpha}_{10}|^2$ when

$$ \lambda_{00} = 1, $$

$$ \mu_{00} = 0, \quad \mu_{01} = \frac{|\hat{\alpha}_{01}|^2 - |\hat{\alpha}_{00}|^2}{|\hat{\alpha}_{01}|^2}, $$

$$ \nu_{00} = 0, \quad \nu_{10} = \frac{|\hat{\alpha}_{10}|^2 - |\hat{\alpha}_{00}|^2}{|\hat{\alpha}_{10}|^2}, $$

$$ \xi_{00} = 0, \quad \xi_{01} = 0 $$

and

$$ \delta_{00} = 0, \quad \delta_{01} = 0, \quad \delta_{10} = 0, \quad \delta_{11} = \frac{|\hat{\alpha}_{00}|^2 + |\hat{\alpha}_{11}|^2 - |\hat{\alpha}_{01}|^2 - |\hat{\alpha}_{10}|^2}{2|\hat{\alpha}_{11}|^2} $$

are nonnegative.

By Proposition 21 and Proposition 29, we obtain that
**Corollary 5 (Spike solution).** The optimal value is $5|\hat{\alpha}_{00}|^2 + |\hat{\alpha}_{01}|^2 + |\hat{\alpha}_{10}|^2 + |\hat{\alpha}_{11}|^2$ when

$$\lambda_{00} = 1,$$

$$\mu_{00} = 0, \quad \mu_{01} = \frac{|\hat{\alpha}_{01}|^2 + |\hat{\alpha}_{11}|^2 - |\hat{\alpha}_{00}|^2 - |\hat{\alpha}_{10}|^2}{2|\hat{\alpha}_{01}|^2},$$

$$\nu_{00} = 0, \quad \nu_{10} = \frac{|\hat{\alpha}_{10}|^2 + |\hat{\alpha}_{11}|^2 - |\hat{\alpha}_{00}|^2 - |\hat{\alpha}_{01}|^2}{2|\hat{\alpha}_{10}|^2},$$

$$\xi_{00} = 0, \quad \xi_{01} = \frac{|\hat{\alpha}_{01}|^2 + |\hat{\alpha}_{10}|^2 - |\hat{\alpha}_{00}|^2 - |\hat{\alpha}_{11}|^2}{2|\hat{\alpha}_{01}|^2},$$

and

$$\delta_{00} = 0, \quad \delta_{01} = 0, \quad \delta_{10} = 0, \quad \delta_{11} = 0$$

are nonnegative.

**Corollary 6.** Up to parameters permutations, these are the only two families of 2-bits measurement possible in the average setting.

*Proof.* We assume without loss of generality that $|\hat{\alpha}_{00}|^2 \le |\hat{\alpha}_{01}|^2 \le |\hat{\alpha}_{10}|^2 \le |\hat{\alpha}_{11}|^2$. By assumptions, we always have that $|\hat{\alpha}_{01}|^2 - |\hat{\alpha}_{00}|^2 \ge 0$ and $|\hat{\alpha}_{10}|^2 - |\hat{\alpha}_{00}|^2 \ge 0$. Moreover, $|\hat{\alpha}_{10}|^2 + |\hat{\alpha}_{11}|^2 \ge |\hat{\alpha}_{00}|^2 + |\hat{\alpha}_{11}|^2$ and $|\hat{\alpha}_{01}|^2 + |\hat{\alpha}_{11}|^2 \ge |\hat{\alpha}_{00}|^2 + |\hat{\alpha}_{11}|^2 \ge |\hat{\alpha}_{00}|^2 + |\hat{\alpha}_{10}|^2$. Finally, either $|\hat{\alpha}_{00}|^2 + |\hat{\alpha}_{11}|^2 \ge |\hat{\alpha}_{01}|^2 + |\hat{\alpha}_{10}|^2$ and the co-Hamming solution is nonnegative and the optimal value is $4|\hat{\alpha}_{00}|^2 + 2|\hat{\alpha}_{01}|^2 + 2|\hat{\alpha}_{10}|^2$ or, $|\hat{\alpha}_{00}|^2 + |\hat{\alpha}_{11}|^2 \le |\hat{\alpha}_{01}|^2 + |\hat{\alpha}_{10}|^2$ and the spike solution is nonnegative and the optimal value is $5|\hat{\alpha}_{00}|^2 + |\hat{\alpha}_{01}|^2 + |\hat{\alpha}_{10}|^2 + |\hat{\alpha}_{11}|^2$. $\square$

We can then generalize this analysis in the case we don't have $|\hat{\alpha}_{00}|^2 \le |\hat{\alpha}_{01}|^2 \le |\hat{\alpha}_{10}|^2 \le |\hat{\alpha}_{11}|^2$ by sorting the indices with respect to the largest $|\hat{\alpha}_i|^2$ and then performing the same analysis.