# Quantum networks self-test all entangled states

Ivan Šupić  CNRS, LIP6, Sorbonne Université, 4 place Jussieu, 75005 Paris,
France  Joseph Bowles  ICFO-Institut de Ciencies Fotoniques, The Barcelona
Institute of Science and Technology, 08860 Castelldefels (Barcelona), Spain
Marc-Olivier Renou  ICFO-Institut de Ciencies Fotoniques, The Barcelona
Institute of Science and Technology, 08860 Castelldefels (Barcelona), Spain
Antonio Acín  ICFO-Institut de Ciencies Fotoniques, The Barcelona Institute of
Science and Technology, 08860 Castelldefels (Barcelona), Spain  ICREA -
Institució Catalana de Recerca i Estudis Avançats, 08010 Barcelona, Spain
Matty J. Hoban  Department of Computing, Goldsmiths, University of London, New
Cross, London SE14 6NW, United Kingdom  Cambridge Quantum Computing Ltd

(August 27, 2024)

###### Abstract

Certifying quantum properties with minimal assumptions is a fundamental
problem in quantum information science. Self-testing is a method to infer the
underlying physics of a quantum experiment only from the measured statistics.
While all bipartite pure entangled states can be self-tested, little is known
about how to self-test quantum states of an arbitrary number of systems. Here,
we introduce a framework for network-assisted self-testing and use it to self-
test any pure entangled quantum state of an arbitrary number of systems. The
scheme requires the preparation of a number of singlets that scales linearly
with the number of systems, and the implementation of standard projective and
Bell measurements, all feasible with current technology. When all the network
constraints are exploited, the obtained self-testing certification is stronger
than what is achievable in any Bell-type scenario. Our work does not only
solve an open question in the field, but also shows how properly designed
networks offer new opportunities for the certification of quantum phenomena.

The difficulty in classically simulating quantum systems offers radically new
avenues for information processing; this difficulty even becomes an
impossibility when causality constraints are imposed, such as in a Bell test
Bel (64). These new possibilities bring challenges, as experimental
demonstrations require a very precise control of the quantum devices involved.
It is therefore crucial for the development of quantum information
technologies to design tools to certify the correct functioning of complex
quantum devices using our limited classical information processing
capabilities EHW+ (20).

A ubiquitous form of certification is to determine that a system is in a
particular quantum state. Standard state tomography Fan (57); VR (89) achieves
this by performing measurements on the system to certify and compare the
obtained results with the predictions from the Born rule. This method is
described as device-dependent, as it assumes that measurements are perfectly
characterised (an unrealistic assumption in many setups). Measurements can
also be certified device-dependently, through the preparation of, in turn,
perfectly characterized quantum states, introducing a form of circularity in
the procedure. The strongest form of device certification should then minimise
the assumptions made: it should be based solely on experimental data and make
very few assumptions about the devices involved, without requiring any
detailed characterization of them. To attain this form of certification the
device-independent framework ABG+ (07); PAB+ (09); Col (06), in which quantum
devices are modelled as uncharacterised ‘black boxes’ with only classical
interaction (inputs and outputs) with these boxes, offers a solution. Being a
data-driven framework, in order to certify genuine quantum properties in the
device-independent approach it is necessary to observe statistics without any
classical analogue (for example correlations violating a Bell inequality).

Self-testing pushes device-independent quantum certification to its strongest
form: modulo some symmetries inherent to the device-independent framework,
self-testing protocols certify the precise form of the quantum state and/or
quantum measurements only from the statistics they generate ŠB (20). The
concept of self-testing was introduced in MY (04) (see also MY (98), and SW
(87) for a precursor result) and relies on a standard Bell test in which local
measurements are performed on an entangled state. The authors of MY (04)
showed the existence of statistics (correlations) such that black boxes
reproducing them must essentially prepare the maximally entangled state
${\lvert\phi^{+}\rangle}=\frac{1}{\sqrt{2}}({\lvert 00\rangle}+{\lvert
11\rangle})$. These Bell correlations, therefore, self-test the state
${\lvert\phi^{+}\rangle}$. These seminal works opened a new research program:
what is the ultimate power of self-testing? In particular, can one design
self-testing protocols for any quantum state? This question remains open since
more than twenty years. In a seminal result, Coladangelo _et al._ showed that
all pure bipartite states can be self tested CGS (17). In the general
multipartite case however, and despite partial progress for some restricted
families of states McK (11); WCY+ (14); PVN (14); ŠCAA (18); BAŠ+ (20), little
is known. This should not come as a surprise, as entanglement is much richer
and harder to characterize in the multipartite case.

In this work, we answer this question by providing a self-testing protocol for
any pure state of an arbitrary number of systems with arbitrary local
dimension. To do so, we introduce the concept of _network assisted self-
testing_ , in which a network made of non-trusted states and measurements is
employed to self-test a target quantum device. We first show how to self-state
a generic pure state of $N$ particles using a network structure that utilises
$N$ additional maximally entangled states, standard single-particle projection
and two-particle Bell measurements; all of which are within experimental
reach. This result is obtained under standard-self testing assumptions, i.e.
without assuming the causal constraints associated to the network geometry.
Considering these additional constraints, we also show how our results imply a
type of certification that is strictly stronger than any possible in standard
self-testing.

Figure 1: (a) Network-assisted Self-testing in a scenario for $M=5$ devices
where the aim is to self-test a three-party state ${\lvert\psi\rangle}$. We
consider that the state ${\lvert\psi\rangle}$ can be self-tested if there
exist quantum correlations $P(a_{1}...a_{5}|x_{1}...x_{5})$ between all
devices which imply the existence of local channels $\tau_{1},...,\tau_{3}$
which extract a superposition of ${\lvert\psi\rangle}$ and
${\lvert\psi^{*}\rangle}$ from a subset of three devices. This superposition
is “flagged", with local ancilla qubits which indicate whether the state is
conjugated or not, see Equation 2. See the appendices for a comparison with
other existing definitions of self-testing.

_Standard Self-testing_ — Self-testing aims at characterising the
informational content of quantum devices. It is defined in a standard Bell
test in which an $N$-party state is distributed among $N$ observers who can
run $m$ possible measurements of $r$ possible results. We label the choice of
measurement by each party by $x_{i}=1,\ldots,m$, and the obtained result by
$a_{i}=1,\ldots,r$, with $i=1,\ldots,N$. The resulting statistics is described
by the conditioned probability distribution $P(a_{1}...a_{N}|x_{1}...x_{N})$,
which we simply dub as correlations. In a quantum realisation, these observed
correlations read

$P(a_{1}...a_{N}|x_{1}...x_{N})=\textrm{Tr}\left(\rho_{N}M_{a_{1}|x_{1}}\otimes\ldots\otimes
M_{a_{N}|x_{N}}\right),$ (1)

where $\rho_{N}$ denotes the states shared by the $N$ observers and
$M_{a_{1}|x_{1}}$ the positive operators defining their local measurements.
The goal of self-testing is to certify the state and/or measurements in Eq.
(1) only from the observed correlations. This is done in the device-
independent scenario, assuming the validity of Eq. (1) but without invoking
any assumptions on the state and measurements appearing in it. In particular
the dimension is not fixed, and as a result the state in Eq. (1) is taken to
be pure, $\rho_{N}={\lvert\psi_{N}\rangle\\!\langle\psi_{N}\rvert}$. It is
also standard to assume that measurements are projective as correlations from
arbitrary measurements can be simulated by projective measurements. In order
to arrive at the correlations in Eq. (1) there is an assumption that in each
run of the experiment the state and measurement operators are the same.

The device-independent formulation of self-testing has important consequences.
First, self-testing is limited to pure states. Second, the state can only be
specified modulo some unavoidable symmetries. For instance, a local rotation
(or unitary) of one part of the state, compensated by a rotation of the
corresponding measurement device, results in the same statistics. Also, a
source creating extra unmeasured degrees of freedom produces the same
statistics. Moreover, one cannot discriminate between a given quantum
realisation, and its complex conjugate: they also lead to the same statistics.
The formal definition of state self-testing we use in this work takes into
account all these facts as follows.

######  Definition 1 (State Self-testing).

A state ${\lvert\psi_{N}\rangle}$ can be self-tested if there exist
correlations $P(a_{1}...a_{N}|x_{1}...x_{N})$ such that for any quantum
realisation of them, there exists a set of $N$ local quantum maps
$\tau_{1},\cdots,\tau_{N}$ that when applied to the unknown state of the
system extract the state

$\displaystyle{\lvert\psi^{\alpha}_{N}\rangle}=\sqrt{\alpha}{\lvert\psi_{N}\rangle}{\lvert
0\rangle}^{\otimes N}+\sqrt{1-\alpha}{\lvert\psi_{N}^{*}\rangle}{\lvert
1\rangle}^{\otimes N}$ (2)

for some unknown $\alpha\in[0,1]$.

Operationally, this definition implies that from the measurement statistics
one can conclude that the target state ${\lvert\psi_{N}\rangle}$ can be
extracted from the underlying state in the experiment. This extraction
procedure is defined by a set of $N$ local quantum channels, i.e.
deterministic quantum operations that can be physically realised. Importantly,
these channels describing the extraction do not need to be implemented. All
that is required is a proof that such channels exist, implying the target
state can be extracted. The extraction procedure takes care of the freedom
inherent to self-testing in unmeasured additional degrees of freedom or local
rotations. The symmetry with respect to complex conjugation is reflected by
the unknown linear combination of the target state and its complex conjugate
with auxiliary systems appearing in the definition of the extracted state
${\lvert\psi^{\alpha}_{N}\rangle}$. In fact, the correlations derived when
making local measurements $M_{a_{i}|x_{i}}$ on ${\lvert\psi_{N}\rangle}$ can
also be obtained by making local measurements $M_{a_{i}|x_{i}}\otimes{\lvert
0\rangle}{\langle 0\rvert}+M^{*}_{a_{i}|x_{i}}\otimes{\lvert 1\rangle}{\langle
1\rvert}$ on ${\lvert\psi^{\alpha}_{N}\rangle}$ independently of $\alpha$.
Extracting state ${\lvert\psi^{\alpha}_{N}\rangle}$ is in principle the most
one can hope for when using only the observed correlations in the Bell test.
Note that in the particular case of bipartite systems, the issue with complex
conjugation does not appear because every pure state is real when rotated to
its Schmidt decomposition, i.e. one can always take $\alpha=1$ as in Col (17).

Figure 2:  The network scenario we use to prove that any pure state
${\lvert\psi_{N}\rangle}$ can be self-tested in a network of $M=2N$ parties
composed of $N$ main parties $A_{1},...,A_{N}$, each being assisted by an
auxiliary party $B_{1},...,B_{N}$ (here $N=6$). In order to establish the
self-testing correlations, the main parties (holding the state
${\lvert\psi\rangle}$ to be self-tested) each share an additional maximally
entangled state with their corresponding auxiliary party. By making joint
measurements at the main parties, one can show that the resulting correlations
imply the existence of local channels that extract the state
${\lvert\psi_{N}^{\alpha}\rangle}$ (for some $\alpha$) from these devices. (b)
The network scenario we use to prove fully network-assisted self-testing (See
Theorem 2). Here, we have only a single auxiliary party that receives input
$y=(y_{1},\cdots,y_{N})$ and outputs $b=(b_{1},\cdots,b_{N})$. The measurement
strategy used to establish the self-testing correlations is the same as in
(a), where now all the auxiliary parties are grouped together. Assuming the
independence of the sources defined by this network structure, we can prove
that the extracted state must be ${\lvert\psi_{N}\rangle}$ or its complex
conjugate. Figure 3: The ingredients required for our self-testing protocols.
We start with quantum state tomography (A), and through adapting the set-up we
end up in the self-testing scenario (D), where we wish to perform the same
task as tomography but through an _uncharacterised_ setup. Characterised, or
trusted, devices are (in green) are eventually replaced with uncharacterised,
or untrusted devices (in black). For illustrative purposes we focus on qubits.
(A) Local Tomography: by measuring the three (characterised) Pauli operators
$\sigma_{x},\sigma_{y},\sigma_{z}$, we characterise a state
${\lvert\psi_{N}\rangle}$ shared among $N$ parties (of which two are shown
here).
(B) Measurement-Device-Independent (MDI) Tomography: this modification of
tomography removes the assumption that measurement devices are perfectly
characterised, and introduce auxiliary systems in informationally-complete
single-qubit states, e.g. the eigenstates of the three Pauli operators. If
Bell-state measurements are performed, this is equivalent to tomography, but a
priori we do not need to assume this ŠHCA (19).
(C) MDI Tomography assisted with Remote State Preparation (RSP): the auxiliary
states used in MDI Tomography can be obtained by measuring one half a
maximally-entangled system. The reduced post-measurement state is thus
informationally-complete.
(D) Network Self-Testing: the characterised devices in MDI Tomography with RSP
are replaced with an initially uncharacterised measurement device and
bipartite system shared between an original node and an auxiliary node. The
maximally-entangled two-qubit state and Pauli measurements on one qubit are
then self-tested; for this we use maximal violations of three different
Clauser-Horne-Shimony-Holt inequalities CHSH (69) as shown in the appendices.
Thus a priori characterisation is now unnecessary.

_Network-assisted Self-testing_ — Our work is based on the idea that networks
provide new avenues for quantum certification. For that, we introduce the
framework of network-assisted self-testing, and of fully network-assisted
self-testing, where in the latter case additional network constraints are
assumed.

The general idea of the framework is to construct a network of $M\geq N$
parties and use it to generate statistics that guarantees the presence of the
target state ${\lvert\psi_{N}\rangle}$ in the network. The first variant of
the network-assisted framework is very similar to the standard Bell scenario
and assumes that the generated statistics has the same form as in Eq. (1), now
for a system made of $M$ particles.

######  Definition 2 (Network-assisted Self-testing).

A state ${\lvert\psi_{N}\rangle}$ can be self-tested in a network of $M\geq N$
parties if there exist quantum correlations $P(a_{1}...a_{M}|x_{1}...x_{M})$
such that, for any $M$-partite quantum realisation of them, there exists a set
of $N$ local quantum maps $\tau_{1},\cdots,\tau_{N}$ that when applied to a
subset of $N$ parties of the unknown state of the system extract the state

$\displaystyle{\lvert\psi^{\alpha}_{N}\rangle}=\sqrt{\alpha}{\lvert\psi_{N}\rangle}{\lvert
0\rangle}^{\otimes N}+\sqrt{1-\alpha}{\lvert\psi_{N}^{*}\rangle}{\lvert
1\rangle}^{\otimes N}$ (3)

for some unknown $\alpha\in[0,1]$.

This definition is illustrated in Fig 1. Note that network-assisted self-
testing includes standard self-testing by taking $M=N$. Again, a self-testing
statement in terms of ${\lvert\psi^{\alpha}_{N}\rangle}$ is the most one can
hope if the only assumption is that the observed correlations have the form of
Eq. (1). We can now present the first main result of our work.

######  Theorem 1.

Any $N$-party pure state ${\lvert\psi_{N}\rangle}$ can be self-tested
according to Definition 2 in a network involving $M=2N$ parties assisted with
$N$ maximally entangled states.

The network used to prove the theorem is shown in Figure 2a. It consists of
$M=2N$ parties, where each local, main party of ${\lvert\psi_{N}\rangle}$
shares a maximally entangled state of dimension $2^{k}$ with an additional
auxiliary party. Here $k$ is the smallest integer such that $2^{k}$ is larger
than the local Hilbert space dimension of ${\lvert\psi_{N}\rangle}$.

While the proof of the theorem is given in the appendices, here we just
provide the basic intuition behind the construction of the network-assisted
self-testing protocol. The ingredients in the proof are presented in Fig. 3.
The idea is to turn a standard device-dependent tomography process, where
measurements are characterised and trusted, into a self-testing protocol in
which the measurements are not characterised. To do so, we introduce $N$
auxiliary parties that each share a maximally entangled state with one of the
original $N$ main parties; the main parties will now have two systems. The
auxiliary and main parties perform local measurements that self-test their
shared maximally entangled state. The maximally entangled state can now be
seen as a resource for essentially teleporting the initial local state of each
main party to an auxiliary system. To perform this teleportation, a Bell
measurement can be performed at each of the main parties. In addition to the
measurements self-testing the maximally entangled state, the auxiliary parties
perform tomographically complete measurements, thus tomography is performed on
these teleported states. Recall that tomography defines a one-to-one map
between probabilities and states using trusted measurements. Thus, once we
remove the trust on the measurements, we now have a one-to-one map between the
observed correlations and the state ${\lvert\psi_{N}\rangle}$, always up to
the relevant symmetries.

Remarkably, the use of networks allows for the introduction of another form of
self-testing protocols. This second variant exploits the fact that, in a
general network scenario, there may be causal constraints enforced by the
network geometry that are not covered by Eq. (1). In particular, the network
may consist of independent preparations of quantum states, which imply that
not only the measurements but also the state in the network has a tensor-
product form. Such source independence assumptions are common in the study of
network nonlocality, see BGP (10); Fri (15); RBB+ (19); ŠBB (20), and TPKLR
(21) for a review. For instance, if the network consists of two states
prepared by two independent sources, as in a standard entanglement-swapping
experiment, the network state is the tensor product of the two preparations.
These constraints are also natural in the network of Fig. 1b but were not used
in the proof of Theorem 1, which simply assume the validity of Eq. (1). In
general, when enforcing also the independent-preparation constraints, the
correlations in a network have the form

$P(a_{1}...a_{M}|x_{1}...x_{M})=\textrm{Tr}(\bigotimes_{i}\rho_{i}\bigotimes_{j}M_{a_{j}|x_{j}}),$
(4)

where we slightly abuse the notation and simply represent the independence
constraints of the states and measurements in the network by the generic
tensor products. The fact that the constraints on the observed correlations
(4) are now stronger than those associated to the Bell tests used in standard
self-testing, Eq. (1), opens the possibility of stronger self-testing
statements. In particular, using state-independence constraints it may be
possible to exclude all the fully correlated states in
${\lvert\psi^{\alpha}_{N}\rangle}$ and restrict the extraction process to the
two extreme non-correlated cases $\alpha=0,1$, that is, the target state or
its complex conjugate. This idea was recently used to prove the necessity of
complex numbers in Quantum Theory RTW+ (21). All these considerations lead to
the following stronger definition of network-assisted self-testing, which is
impossible when using standard Bell tests.

######  Definition 3 (Fully Network-assisted Self-testing).

A state ${\lvert\psi_{N}\rangle}$ can be self-tested in a network of $M\geq N$
parties if there exist quantum correlations $P(a_{1}...a_{M}|x_{1}...x_{M})$
respecting the network independence constraints such that, for any $M$-partite
quantum realisation of them, there exists a set of $N$ local quantum maps
$\tau_{1},\cdots,\tau_{N}$ that when applied to a subset of $N$ parties of the
unknown state of the system extract either the state ${\lvert\psi_{N}\rangle}$
or ${\lvert\psi_{N}^{*}\rangle}$.

Our second main result is to prove that all states can also be self-tested
according to this stronger definition.

######  Theorem 2.

Any $N$-party pure state ${\lvert\psi_{N}\rangle}$ can be self-tested
according to definition 3 in a network involving $M=N+1$ parties assisted with
$N$ maximally entangled states.

The proof is given in the appendices but the idea behind is intuitive. The
network is similar to the one used in the proof of Theorem 1, but now the
independence constraints are also enforced upon the states. Because this
independence is assumed, in some sense, we not need to separate out each
system into an individual node. That is, there is no need to have $N$
auxiliary nodes as in Fig. 1, and they can now be grouped into a single node
sharing the $N$ maximally entangled states with the $N$ systems in
${\lvert\psi_{N}\rangle}$. The resulting network is shown in Fig. 2b.

Let us conclude this letter with several remarks. Our protocol is the same for
any state, and consists of a fixed structure to which any pure state can be
plugged in. The number of auxiliary systems required to self-test an
$N$-partite state scales linearly in $N$, and the protocol is composed of the
same repeated element for each subsystem. Importantly, in practice, the
devices utilised in our modular scheme, namely maximally-entangled states and
Bell measurements, are some of the most elementary building blocks of the
quantum internet. Hence, our protocol is particularly appealing for practical
purposes. Although we have not proven the noise tolerance of this scheme,
future work could utilise standard techniques in self-testing to prove its
robustness. In one particular direction, it would be useful to adapt the well
known numerical SWAP technique to our scenario YVB+ (14), so that numerical
bounds on robustness could be found. Finally, our method gives a rather
generic way of translating device-dependent schemes to their device-
independent counterparts, in our case from tomography to self-testing
protocols, that could be generalised to other certification procedures BOW
(19); BSS (18); RKB (18). This could then lead to new device-independent
protocols for quantum key distribution and verifiable distributed quantum
computation RUV (13); CGJV (19), especially those requiring multipartite
states McK (16).

Acknowledgements I.Š. acknowledges funding from ERC grant QUSCO. M.-O.R. is
supported by the supported by the grant PCI2021-122022-2B financed by
MCIN/AEI/10.13039/501100011033 and by the European Union NextGenerationEU/PRTR
and acknowledge the Swiss National Fund Early Mobility Grants P2GEP2_19144.
M.J.H. acknowledges the FQXi large grant “The Emergence of Agents from Causal
Order" (FQXi FFF Grant number FQXi-RFP-1803B). We acknowledge support from the
Government of Spain (FIS2020-TRANQI, Retos Quspin and Severo Ochoa
CEX2019-000910-S), Fundacio Cellex, Fundacio Mir-Puig, Generalitat de
Catalunya (CERCA, AGAUR SGR 1381 and QuantumCAT), the ERC AdG CERQUTE, the AXA
Chair in Quantum Information Science and the Swiss NCCR SwissMap.

## References

  * ABG+ (07) Antonio Acín, Nicolas Brunner, Nicolas Gisin, Serge Massar, Stefano Pironio, and Valerio Scarani.  Device-independent security of quantum cryptography against collective attacks.  Physical Review Letters, 98(23):230501, 2007.  doi:10.1103/PhysRevLett.98.230501.
  * APVW (16) Antonio Acín, Stefano Pironio, Tamás Vértesi, and Peter Wittek.  Optimal randomness certification from one entangled bit.  Phys. Rev. A, 93:040102, Apr 2016.  doi:10.1103/PhysRevA.93.040102.
  * BAŠ+ (20) Flavio Baccari, Remigiusz Augusiak, Ivan Šupić, Jordi Tura, and Antonio Acín.  Scalable Bell inequalities for qubit graph states and robust self-testing.  Phys. Rev. Lett., 124:020402, Jan 2020.  doi:10.1103/PhysRevLett.124.020402.
  * Bel (64) John Stewart Bell.  On the Einstein Podolsky Rosen paradox.  Physics, 1:195–200, 1964.  doi:10.1103/PhysicsPhysiqueFizika.1.195.
  * BGP (10) Cyril Branciard, Nicolas Gisin, and Stefano Pironio.  Characterizing the nonlocal correlations created via entanglement swapping.  Phys. Rev. Lett., 104:170401, Apr 2010.  doi:10.1103/PhysRevLett.104.170401.
  * BOW (19) Costin Bădescu, Ryan O’Donnell, and John Wright.  Quantum state certification.  In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing, STOC 2019, page 503–514, New York, NY, USA, 2019. Association for Computing Machinery.  doi:10.1145/3313276.3316344.
  * (7) Joseph Bowles, Ivan Šupić, Daniel Cavalcanti, and Antonio Acín.  Device-independent entanglement certification of all entangled states.  Physical Review Letters, 121(18), Oct 2018.  doi:10.1103/physrevlett.121.180503.
  * (8) Joseph Bowles, Ivan Šupić, Daniel Cavalcanti, and Antonio Acín.  Self-testing of pauli observables for device-independent entanglement certification.  Physical Review A, 98(4), Oct 2018.  doi:10.1103/physreva.98.042336.
  * BSS (18) Jean-Daniel Bancal, Nicolas Sangouard, and Pavel Sekatski.  Noise-resistant device-independent certification of bell state measurements.  Phys. Rev. Lett., 121:250506, Dec 2018.  doi:10.1103/PhysRevLett.121.250506.
  * CGJV (19) Andrea Coladangelo, Alex B. Grilo, Stacey Jeffery, and Thomas Vidick.  Verifier-on-a-leash: New schemes for verifiable delegated quantum computation, with quasilinear resources.  In Yuval Ishai and Vincent Rijmen, editors, Advances in Cryptology – EUROCRYPT 2019, pages 247–277, Cham, 2019. Springer International Publishing.
  * CGS (17) Andrea Coladangelo, Koon Tong Goh, and Valerio Scarani.  All pure bipartite entangled states can be self-tested.  Nature Communications, 8:15485, may 2017.  doi:10.1038/ncomms15485.
  * CHSH (69) John F. Clauser, Michael A. Horne, Abner Shimony, and Richard A. Holt.  Proposed experiment to test local hidden-variable theories.  Phys. Rev. Lett., 23:880–884, Oct 1969.  doi:10.1103/PhysRevLett.23.880.
  * Col (06) Roger Colbeck.  Quantum And Relativistic Protocols For Secure Multi-Party Computation.  PhD thesis, University of Cambridge, 2006.  URL: https://arxiv.org/abs/0911.3814.
  * Col (17) Andrea Coladangelo.  Parallel self-testing of (tilted) EPR pairs via copies of (tilted) CHSH and the magic square game.  Quantum Information and Computation, 17(9-10):831–865, 2017.
  * EHW+ (20) Jens Eisert, Dominik Hangleiter, Nathan Walk, Ingo Roth, Damian Markham, Rhea Parekh, Ulysse Chabaud, and Elham Kashefi.  Quantum certification and benchmarking.  Nature Reviews Physics, 2(7):382–390, 2020.  doi:10.1038/s42254-020-0186-4.
  * Fan (57) Ugo Fano.  Description of states in quantum mechanics by density matrix and operator techniques.  Rev. Mod. Phys., 29:74–93, Jan 1957.  doi:10.1103/RevModPhys.29.74.
  * Fri (15) Tobias Fritz.  Beyond Bell’s Theorem II: Scenarios with arbitrary causal structure.  Communications in Mathematical Physics, 341(2):391–434, Nov 2015\.  doi:10.1007/s00220-015-2495-5.
  * Hil (07) Roland Hildebrand.  Positive partial transpose from spectra.  Physical Review A, 76(052325), 2007.  doi:10.1103/PhysRevA.76.052325.
  * JP (18) Nathaniel Johnston and Everett Patterson.  The inverse eigenvalue problem for entanglement witnesses.  Linear Algebra and its Applications, 550:1 – 27, 2018.  doi:https://doi.org/10.1016/j.laa.2018.03.043.
  * McK (11) Matthew McKague.  Self-testing graph states.  In Revised Selected Papers of the 6th Conference on Theory of Quantum Computation, Communication, and Cryptography - Volume 6745, TQC 2011, page 104–120, Berlin, Heidelberg, 2011. Springer-Verlag.  doi:10.1007/978-3-642-54429-3_7.
  * McK (16) Matthew McKague.  Interactive proofs for $\mathsf{BQP}$ via self-tested graph states.  Theory of Computing, 12(3):1–42, 2016.  doi:10.4086/toc.2016.v012a003.
  * MM (10) Matthew McKague and Michele Mosca.  Generalized self-testing and the security of the 6-state protocol.  In Conference on Quantum Computation, Communication, and Cryptography, pages 113–130. Springer, 2010.
  * MM (11) Matthew McKague and Michele Mosca.  Generalized self-testing and the security of the 6-state protocol.  Lecture Notes in Computer Science, page 113–130, 2011.  doi:10.1007/978-3-642-18073-6_10.
  * MY (98) Dominic Mayers and Andrew Yao.  Quantum cryptography with imperfect apparatus.  Proceedings 39th Annual Symposium on Foundations of Computer Science (Cat. No.98CB36280), 1998.  doi:10.1109/sfcs.1998.743501.
  * MY (04) Dominic Mayers and Andrew Yao.  Self testing quantum apparatus.  Quantum Info. Comput., 4:273, 2004.
  * MYS (12) Matthew McKague, Tzyh Haur Yang, and Valerio Scarani.  Robust self-testing of the singlet.  Journal of Mathematical Physics, 45(45):455304, 2012.
  * PAB+ (09) Stefano Pironio, Antonio Acín, Nicolas Brunner, Nicolas Gisin, Serge Massar, and Valerio Scarani.  Device-independent quantum key distribution secure against collective attacks.  New Journal of Physics, 11(4):045021, apr 2009.  doi:10.1088/1367-2630/11/4/045021.
  * PVN (14) Károly F. Pál, Tamás Vértesi, and Miguel Navascués.  Device-independent tomography of multipartite quantum states.  Phys. Rev. A, 90:042340, Oct 2014.  doi:10.1103/PhysRevA.90.042340.
  * RBB+ (19) Marc-Olivier Renou, Elisa Bäumer, Sadra Boreiri, Nicolas Brunner, Nicolas Gisin, and Salman Beigi.  Genuine quantum nonlocality in the triangle network.  Phys. Rev. Lett., 123:140401, Sep 2019.  doi:10.1103/PhysRevLett.123.140401.
  * RKB (18) Marc-Olivier Renou, Jędrzej Kaniewski, and Nicolas Brunner.  Self-testing entangled measurements in quantum networks.  Phys. Rev. Lett., 121:250507, Dec 2018.  doi:10.1103/PhysRevLett.121.250507.
  * RTW+ (21) Marc-Olivier Renou, David Trillo, Mirjam Weilenmann, Thinh P. Le, Armin Tavakoli, Nicolas Gisin, Antonio Acín, and Miguel Navascués.  Quantum theory based on real numbers can be experimentally falsified.  Nature, 600(7890):625–629, Dec 2021.  doi:10.1038/s41586-021-04160-4.
  * RUV (13) Ben W. Reichardt, Falk Unger, and Umesh Vazirani.  Classical command of quantum systems.  Nature, 496:456, 2013.  doi:10.1038/nature12035.
  * ŠB (20) Ivan Šupić and Joseph Bowles.  Self-testing of quantum systems: a review, September 2020.  doi:10.22331/q-2020-09-30-337.
  * ŠBB (20) Ivan Šupić, Jean-Daniel Bancal, and Nicolas Brunner.  Quantum nonlocality in networks can be demonstrated with an arbitrarily small level of independence between the sources.  Phys. Rev. Lett., 125:240403, Dec 2020.  doi:10.1103/PhysRevLett.125.240403.
  * ŠCAA (18) Ivan Šupić, Andrea Coladangelo, Remigiusz Augusiak, and Antonio Acín.  Self-testing multipartite entangled states through projections onto two systems.  New Journal of Physics, 20(8):083041, aug 2018.  doi:10.1088/1367-2630/aad89b.
  * ŠHCA (19) Ivan Šupić, Matty J. Hoban, Laia Domingo Colomer, and Antonio Acín.  Self-testing and certification using trusted quantum inputs, 2019.  arXiv:1911.09395v1.  arXiv:1911.09395.
  * SU (01) Michael Seevinck and Jos Uffink.  Sufficient conditions for three-particle entanglement and their tests in recent experiments.  Phys. Rev. A, 65:012107, Dec 2001.  doi:10.1103/PhysRevA.65.012107.
  * SW (87) Stephen J. Summers and Reinhard Werner.  Maximal violation of Bell’s inequalities is generic in quantum field theory.  Communications in Mathematical Physics, 110(2):247–259, 1987.  doi:10.1007/BF01207366.
  * TPKLR (21) Armin Tavakoli, Alejandro Pozas-Kerstjens, Ming-Xing Luo, and Marc-Olivier Renou.  Bell nonlocality in networks, 2021.  arXiv:2104.10700.
  * VR (89) K. Vogel and H. Risken.  Determination of quasiprobability distributions in terms of probability distributions for the rotated quadrature phase.  Phys. Rev. A, 40:2847–2849, Sep 1989.  doi:10.1103/PhysRevA.40.2847.
  * WCY+ (14) Xingyao Wu, Yu Cai, Tzyh Haur Yang, Huy Nguyen Le, Jean-Daniel Bancal, and Valerio Scarani.  Robust self-testing of the three-qubit W state.  Phys. Rev. A, 90:042339, Oct 2014.  doi:10.1103/PhysRevA.90.042339.
  * YVB+ (14) Tzyh Haur Yang, Tamás Vértesi, Jean-Daniel Bancal, Valerio Scarani, and Miguel Navascués.  Robust and versatile black-box certification of quantum devices.  Phys. Rev. Lett., 113:040401, Jul 2014.  doi:10.1103/PhysRevLett.113.040401.

In the following, we provide the framework for network-assisted self-testing
of all pure multipartite quantum states and explain our proof in appendix A.
We give a rigorous detailed proof in appendices C.1, D, E.1. We also explain
in appendix B how to adapt our ideas to the additional hypothesis of source
independence in the network, in order to obtain fully network-assisted self-
testing of all pure multipartite quantum states. For simplicity, we
concentrate on qubit states: extension to qudit states is given in appendix F.
We also restrict ourselves to pure genuinely multipartite entangled quantum
states, as when a pure state is not genuinely multipartite entangled, it can
be written as the product of several pure genuinely multipartite entangled
states of smaller size, and one can then self test each of these states
separately.

##  Appendix A Network-assisted self-testing

We first introduce in appendix A.1 the definition of network assisted self-
testing, as well as the concepts of (i) ideal reference experiment and (ii)
performed physical experiment that produces the self testing correlations.
Then, in appendix A.2, we outline the proof of our result, which is decomposed
in three steps.

###  A.1 Notations, definitions and setup

Reference and physical experiments. The experiment involving the setup we want
to self-test is called the _reference experiment_. It consists of the
reference state ${\lvert\psi_{N}\rangle}$ to be self-tested (assumed to be
pure multipartite genuinely entangled), reference measurements (in our case,
they will be Pauli and Bell state measurements), and additional auxiliary
states (in our case, they will be several maximally entangled bipartite qubit
states). The actual experiment performed in the laboratory is named the
_physical experiment_ , consisting of the physical state ${\lvert\Psi\rangle}$
(which include all states created in the physical experiment, without assuming
independent preparation) and physical measurements. The only assumptions made
about the physical experiment is that it can be described by quantum theory,
that no signaling is unforced, and that the observed correlations are the same
as in the reference experiment.

The reference experiment for network assisted self-testing. The reference
experiment is the ideal experiment which should be done to obtain self-
testing, see Figure 4. It involves $2N$ parties, decomposed into $N$ _main
parties_ labeled $A_{1},...,A_{N}$ and $N$ _auxiliary parties_ labeled
$B_{1},...,B_{N}$, the reference state ${\lvert\psi_{N}\rangle}$, and $N$
copies of the Bell state ${\lvert\phi^{+}\rangle}=\frac{1}{\sqrt{2}}({\lvert
00\rangle}+{\lvert 11\rangle})$. In the following, we write $\mathbb{A}\equiv
A_{1}...A_{N}$ and $\mathbb{B}\equiv B_{1}...B_{N}$. The $N$ main parties are
sharing the reference state ${\lvert\psi_{N}\rangle}_{\mathbb{A}}$ together,
and each main party $A_{j}$ is associated with her auxiliary party $B_{j}$,
with whom she shares a state ${\lvert\phi^{+}\rangle}_{A_{j}B_{j}}$.

The main party $A_{j}$ (resp. auxiliary party $B_{j}$) receives inputs
$x_{j}\in\\{0,...,5,\diamond\\}$ (resp. $y_{j}\in\\{0,1,2\\}$). On all inputs
except $\diamond$, the main party $A_{j}$ (resp. auxiliary party $B_{j}$)
provides a bit output $a_{j}\in\\{0,1\\}$ (resp. $b_{j}\in\\{0,1\\}$). These
outputs are obtained via local Pauli measurements of the pair maximally
violating the 3-CHSH inequalities CHSH (69), composed of the sum of three
versions of the same CHSH inequality up to permutations BŠCA18a  (see the
reference correlations below). More precisely, the reference observables of
each auxiliary party $B_{j}$ are three Pauli observables
$\sigma_{0}:=\sigma_{z}$, $\sigma_{1}:=\sigma_{x}$ and
$\sigma_{2}:=\sigma_{y}$ and each main party $A_{j}$ performs six different
measurements, corresponding to the reference observable
$(\sigma_{x}\pm\sigma_{z})/\sqrt{2}$, $(\sigma_{x}\pm\sigma_{y})/\sqrt{2}$ and
$(\sigma_{y}\pm\sigma_{z})/\sqrt{2}$. On the last input $\diamond$, each main
party performs a full Bell state measurement in basis
${\lvert\phi^{\pm}\rangle}=\frac{1}{\sqrt{2}}({\lvert 00\rangle}\pm{\lvert
11\rangle}),{\lvert\psi^{\pm}\rangle}=\frac{1}{\sqrt{2}}({\lvert
01\rangle}\pm{\lvert 10\rangle})$, providing two bits of output. The
corresponding measurements projectors of parties $A_{j},B_{j}$ are written
$\mathsf{M}^{\prime}_{a_{j}|x_{j}},N^{\prime}_{b_{j}|y_{j}}$.

The physical experiment for network assisted self-testing. The physical
experiment consists in the experiments actually performed in the laboratory,
seen by an observer, who should be convinced that there exist a channel,
defined by a completely-positive trace-preserving (CPTP) map, which can
extract the state ${\lvert\psi_{N}\rangle}$ from the experimental devices.
This physical experiment provides the same correlations as the reference
experiment, detailed below. However, the observer does not assume anything
about the internal functioning of the physical experiment, not even its
network causal structure. They aim to _deduce_ the existence of a CPTP map
which can extract ${\lvert\psi_{N}\rangle}$ from the devices in the physical
experiment that give rise to the correlations she observes.

We denote the full state all main and auxiliary parties share as
${\lvert\Psi\rangle}^{A_{1},\cdots,A_{N},B_{1},\cdots,B_{N}}\equiv{\lvert\Psi\rangle}$
and write the measurement operator of $A_{j}$ on input $x_{j}$, for output
$a_{j}$ (resp. $B_{j}$, $y_{j}$, $b_{j}$), as a projector
$\mathsf{M}_{a_{j}|x_{j}}$ (resp. $\mathsf{N}_{b_{j}|y_{j}}$). When the output
$a_{j}$ or $b_{j}$ is a bit (on all inputs except $x_{j}=\diamond$), we
introduce dichotomic observables
$\text{A}_{x_{j}}^{(j)}=\sum_{a_{j}}(-1)^{a_{j}}\mathsf{M}_{a_{j}|x_{j}}$ and
$\text{B}_{y_{j}}^{(j)}=\sum_{b_{j}}(-1)^{b_{j}}\mathsf{N}_{b_{j}|y_{j}}$.

Reference correlations in the network assisted self-testing experiment. The
only assumptions made on the physical experiment are that it can be described
by quantum mechanics, satisfies the no signalling constraints and achieves the
same correlations as in the reference experiment, as follows:

Reference correlations in the network-assisted scenario 1. In between every
pair of a main party and its auxiliary party $A_{j},B_{j}$, the following
3-CHSH inequality is maximally violated: $\forall
j,\mathsf{CHSH}_{j}(0,1;0,1)+\mathsf{CHSH}_{j}(2,3;0,2)+\mathsf{CHSH}_{j}(4,5;1,2)=6\sqrt{2},$
(5) where $\mathsf{CHSH}_{j}(x_{1},x_{2},y_{1},y_{2})=\langle
A^{(j)}_{x_{1}}B^{(j)}_{y_{1}}\rangle+\langle
A^{(j)}_{x_{1}}B^{(j)}_{y_{2}}\rangle+\langle
A^{(j)}_{x_{2}}B^{(j)}_{y_{1}}\rangle-\langle
A^{(j)}_{x_{2}}B^{(j)}_{x_{2}}\rangle$. 2. When all main parties perform the
measurement $\diamond$, the statistics correspond to the ideal one obtained
via the teleportation of the state ${\lvert\psi_{N}\rangle}$ to the auxiliary
parties up to a correction unitary indexed by $a_{j}\in\\{00,01,10,11\\}$, who
perform a complete tomography of the teleported particle with the Pauli
measurements: $\forall
k\in\\{0,1,2\\},{\langle\Psi\rvert}\bigotimes_{j=1}^{N}\mathsf{M}_{a_{j}|\diamond}^{(j)}\otimes\text{B}_{k}^{j}{\lvert\Psi\rangle}=\frac{1}{4^{N}}{\langle\psi_{N}\rvert}\bigotimes_{j=1}^{N}U_{a_{j}}^{\dagger}\sigma_{k}^{j}U_{a_{j}}{\lvert\psi_{N}\rangle},$
(6) where $\sigma_{0}\equiv\sigma_{z}$, $\sigma_{1}\equiv\sigma_{x}$,
$\sigma_{2}\equiv\sigma_{y}$, $U_{00}\equiv\mathds{1}$,
$U_{01}\equiv\sigma_{z}$, $U_{10}\equiv\sigma_{x}$,
$U_{11}\equiv\sigma_{z}\sigma_{x}$.

Network assisted self-testing in the physical experiment. The general aim of
self-testing is to show, given that the correlations of the physical
experiment are the same as the one of the reference experiment, that one can
extract the reference state ${\lvert\psi_{N}\rangle}$ from the physical state
${\lvert\Psi\rangle}$. Several nonequivalent definitions can be introduced. In
the following, we concentrate on network-assisted self-testing, which we
define as:

######  Definition 4 (Network-assisted Self-testing).

A state ${\lvert\psi_{N}\rangle}$ can be self-tested in a network of $M\geq N$
parties if there exist quantum correlations $P(a_{1}...a_{M}|x_{1}...x_{M})$
such that, for any $M$-partite quantum realisation of them, there exists a
CPTP map $\Phi$ that extract the state ${\lvert\psi_{N}\rangle}$ from
${\lvert\Psi\rangle}$, up to a globally heralded conjugation:

$\displaystyle\Phi(\Psi)={\lvert\psi^{\alpha}_{N}\rangle}=\sqrt{\alpha}{\lvert\psi_{N}\rangle}{\lvert
0\rangle}^{\otimes N}+\sqrt{1-\alpha}{\lvert\psi_{N}^{*}\rangle}{\lvert
1\rangle}^{\otimes N}$ (7)

for some unknown $\alpha\in[0,1]$.

If such CPTP map $\Phi$ exists, we say that we can extract the reference state
from the physical one. Note that other definition of self-testing asks that
$M=N$, and that the map $\Phi$ is an isometry. As discussed in the main text,
since self-testing statements are built only from the observed correlations,
one cannot hope to have a description of the extracted state with respect to
the reference state finer than what encapsulated by eq. (7).

Note also that, from the point of view of the correlations they generate among
the $N$ parties, any of the states in eq. (7),
${\lvert\psi^{\alpha}_{N}\rangle}$ is at least as powerful as the reference
state ${\lvert\psi_{N}\rangle}$. In fact, any correlations obtained by
performing some local measurements, for simplicity just denoted by $M_{j}$, on
${\lvert\psi_{N}\rangle}$, can also be obtained by, first, each party
measuring the extra qubit in ${\lvert\psi^{\alpha}_{N}\rangle}$, and then
performing measurement $M_{j}$ (or its complex conjugate $M_{j}^{*}$) when the
result of the qubit measurement is 0 (or 1).

The first main result of our work is to provide a reference experiment
attaining the network assisted self-testing of any $N$-partite pure state
${\lvert\psi_{N}\rangle}$.

Figure 4: The reference experiment. Every main party shares with the
corresponding auxiliary party a maximally entangled pair of qubits. The
measurements performed by auxiliary parties can be self-tested. This
effectively allows to perform tomography of the state that is teleported to
the auxiliary parties when all main parties apply Bell state measurements.

###  A.2 The proof

This section gives an informal proof of our construction of network assisted
self-testing. The proof is rigorously developed in appendices C.1, D, E.1.

Note first that in the reference experiment, when all main parties perform the
Bell state measurement on inputs $x_{j}=\diamond$, they teleport the state
${\lvert\psi_{N}\rangle}$ to the auxiliary parties, via the $N$ maximally
entangled pairs of qubits ${\lvert\phi_{+}\rangle}$ they individually share
with each auxiliary party. This teleportation process lies in the heart of our
proof, which ultimately consists in self-testing the state teleported to the
auxiliary parties.

Our proof consist in three steps. We first prove Lemma 1, which allows one to
self tests the tomographic measurement devices of the auxiliary parties,
thanks to the maximal violation of the 3-CHSH inequality between each
main/auxiliary party pair $A_{j},B_{j}$ (only using the property eq. (5) of
the correlations). Importantly, our characterisation of the tomographic
measurement devices can only be done up to a complex conjugation, mapping
$\sigma_{y}$ to $\sigma_{y}^{*}=-\sigma_{y}$. We solve this technical
difficulty in a second step, with Lemma 2, which characterises how well such
an up-to-conjugation tomographic device can specify a state. At last, a third
step proves our main result through Theorem 3, which uses these characterised
tomographic measures to self test the state that is teleported to the
auxiliary parties when the main parties perform the teleporting Bell state
measurement on input $x_{j}=\diamond$ (only using the property eq. (6) of the
correlations).

####  A.2.1 Step 1: Self testing the auxiliary parties tomographic devices.

In the first step of our proof, we develop a subroutine to self-test the
tomographically complete set of measurements performed by the auxiliary
parties $B_{j}$ . This subroutine is actually the self-test of a maximally
entangled pair of qubits, shared between each main and its corresponding
auxiliary party.

It is known that the maximal violation of the CHSH inequality is enough to
self-test the maximally entangled pair of qubits and a pair of anticommuting
observables SW (87). Superimposing three versions of the CHSH inequality into
a 3-CHSH inequality allows us to self-test three mutually anticommuting
observables APVW (16); BŠCA18a . Such three observables can always be mapped
to three Pauli operators, with a caveat that $\sigma_{y}$ is self-tested up to
complex conjugation. More precisely, there exist two extra qubit spaces, one
for each party, containing two correlated qubits. Depending on her extra qubit
value, a party apply either $\sigma_{y}$ or $\sigma_{y}^{*}=-\sigma_{y}$. As
these two extra qubits are correlated, this eventual conjugation of
$\sigma_{y}$ is performed by the two parties in a correlated way.

Hence, the observed maximal violation of the 3-CHSH inequality in the physical
experiment implies that the auxiliary party measures three Pauli observables
on their inputs (up to complex conjugation), independently of the input of the
main parties. Note that any other construction self-testing the two-qubit
maximally entangled state and the three Pauli measurements, up to complex
conjugation, such as that in MM (11), can be used for this part. In Section
C.1, we formalise this first step in the following lemma, which we write in
its informal version:

######  Lemma 1 (informal).

Let the physical state ${\lvert\Psi\rangle}$ and dichotomic observables
$\\{\text{A}_{j}\\}_{j=0}^{5}$ and $\\{\text{B}_{j}\\}_{j=0}^{2}$ reproduce
the maximal violation of all the 3-$\mathsf{CHSH}$ inequalities between the
$N$ pairs of main and auxiliary parties. Then, up to local ancillary systems
and a local isometry,
${\lvert\Psi\rangle}\approx{\lvert\mathrm{aux}\rangle}\bigotimes_{j=0}^{N-1}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}}.$
Moreover, the physical experiment auxiliary party operators
$B^{(j)}_{0},B^{(j)}_{1}$ acts as the reference operators
$\sigma^{(j)}_{z},\sigma^{(j)}_{x}$ over the state, whereas $B^{(j)}_{2}$ acts
as the reference operators $\sigma^{(j)}_{y}$ over the state, up to a
$\sigma_{z}$ correction on the auxiliary system. E.g.: $\displaystyle
B^{(0)}_{0}\cdot{\lvert\Psi\rangle}$
$\displaystyle\approx{\lvert\mathrm{aux}\rangle}\otimes(\sigma^{(0)}_{z}\cdot{\lvert\phi^{+}\rangle})\bigotimes_{j=1}^{N-1}{\lvert\phi^{+}\rangle}$
$\displaystyle B^{(0)}_{2}\cdot{\lvert\Psi\rangle}$
$\displaystyle\approx\sigma_{z}^{(0)}{\lvert\mathrm{aux}\rangle}\otimes(\sigma^{(0)}_{y}\cdot{\lvert\phi^{+}\rangle})\bigotimes_{j=1}^{N-1}{\lvert\phi^{+}\rangle}$

###### Proof.

For a technical version of this Lemma, and a proof, see appendix C.1. ∎

####  A.2.2 Step 2: Tomography up to complex conjugation.

The previous step allows us to self test the tomographically complete set of
Pauli measurements performed by the auxiliary parties, up to a complex
conjugation. We aim to use these measurements to completely characterise the
state shared between the auxiliary parties when the main parties perform a
teleportation Bell state measurement, on inputs $\diamond$. However, this
requires to understand how much such a tomography-up-to-conjugation device can
specify a state. This is the aim of the second step of our proof. In the
following (informal) proposition, we prove that when a state is measured with
tomography-up-to-conjugation devices as given in the conclusion of Lemma 1, it
is characterised up to a global conjugation:

######  Lemma 2 (informal).

Consider a tomographically complete set of local measurements
${M^{\prime}}_{a_{j}|x_{j}}^{(j)}$. Consider a second set of local
measurements $M_{a_{j}|x_{j}}^{(j)}$, which are the same as
${M^{\prime}}_{a_{j}|x_{j}}^{(j)}$ up to conjugation, as in Lemma 1. Assume
that the targeted state ${\lvert\psi_{N}\rangle}$ is genuinely multipartite
pure entangled. Let $\rho$ be an unknown state such that when $\rho$ is
measured with $M_{a_{j}|x_{j}}^{(j)}$, one observes the same correlations as
when ${\lvert\psi_{N}\rangle}$ is measured with
${M^{\prime}}_{a_{j}|x_{j}}^{(j)}$. Then, the purification of $\rho$ must be
${\lvert\tilde{\Psi}\rangle}={\lvert\psi_{N}\rangle}\otimes{\lvert\xi_{+}\rangle}+{\lvert\psi_{N}^{*}\rangle}\otimes{\lvert\xi_{-}\rangle},$
(8) where ${\lvert\psi_{N}^{*}\rangle}$ is the complex conjugate of
${\lvert\psi_{N}\rangle}$, ${\langle\xi_{+}\rvert\xi_{-}\rangle}=0$ and
$\|{\lvert\xi_{+}\rangle}\|+\|{\lvert\xi_{-}\rangle}\|=1$.

###### Proof.

For a technical version of this Lemma, and a proof, see appendix D. ∎

Note that to apply this Lemma, we need to assume that the reference state
${\lvert\psi_{N}\rangle}$ is genuinely multipartite entangled, i.e. non-
product. In case ${\lvert\psi_{N}\rangle}$ is separable, one can easily adapt
this proposition by applying our construction to each of the constituents of
the non-genuinely multipartite entangled state ${\lvert\psi_{N}\rangle}$,
obtaining independent potential complex conjugations for each of them.

####  A.2.3 Step 3: Network assisted self testing.

We now have all the tools to perform network assisted self testing in the
physical experiment. The last step of our proof focus on the case when all
main parties received the input $x_{j}=\diamond$. In that case, they perform a
(uncharacterized) Bell state measurement, which in practice teleportS the
(uncharacterized) reference state ${\lvert\psi_{N}\rangle}$ to the auxiliary
parties. Then, the auxiliary parties perform a tomographic measurement,
characterised up to complex conjugation thanks to Step 1 above. Step 2 of our
proof allows us to show that the teleported state shared by the auxiliary
parties, after the main parties performed their measurement on inputs
$x_{j}=\diamond$, is the state ${\lvert\psi_{N}\rangle}$, up to a global
conjugation.

This provides the following informal formulation of our first theorem, which
finishes our proof:

######  Theorem 3 (informal).

Let the state ${\lvert\Psi\rangle}$ and dichotomic observables
$\\{\text{A}_{j}\\}_{j=0}^{5}$ and $\\{\text{B}_{j}\\}_{j=0}^{2}$ reproduce
the correlations of the reference experiment. Then, there exists a CPTP map
$\Phi$ such that, up to ancillas and junk state:
$\Phi({\lvert\Psi\rangle})={\lvert\psi_{N}\rangle}\otimes{\lvert 0\cdots
0\rangle}+{\lvert\psi_{N}^{*}\rangle}\otimes{\lvert 1\cdots 1\rangle}$

###### Proof.

For a technical version of this theorem, and a proof, see appendix E.1. ∎

##  Appendix B Fully network-assisted self-testing

In this appendix, we explain how our result adapts when one consider the fully
network assisted framework, in which we make a supplementary assumption of
source independence in the physical experiment. Now, we will again start from
a reference experiment using state ${\lvert\psi_{N}\rangle}$ and extra
resources (in our case, the same as in our network assisted protocol), and we
aim to show the existence of a CPTP maps $\Phi$ which extracts
${\lvert\psi_{N}\rangle}$. The existence of $\Phi$ will be proven under the
assumptions that the physical experiment can be described by quantum theory
with a state created _by independent sources as in the reference experiment_ ,
that no signaling is enforced, and that the observed correlations are the same
as in the reference experiment.

###  B.1 Notations, definitions and setup

The reference experiment for fully network assisted self-testing. In the case
of fully network assisted self-testing, our reference experiment is almost
identical to the one for network assisted self-testing. The only difference is
that we consider a unique auxiliary party, which takes the role of all the
auxiliaries parties in the network assisted self-testing protocol, and that
this auxiliary party has two additional inputs, labeled by
$\lozenge,\blacklozenge$, on which he performs a reference measurement
consisting of parallel Bell state measurements. Hence, the reference
experiment involves $N+1$ parties, decomposed into $N$ _main parties_ labeled
$A_{1},...,A_{N}$ and a unique _auxiliary party_ labeled $B$, the reference
state ${\lvert\psi_{N}\rangle}$, and $N$ copies of the
${\lvert\phi^{+}\rangle}=\frac{1}{\sqrt{2}}({\lvert 00\rangle}+{\lvert
11\rangle})$ state. The $N$ main parties are sharing the reference state
${\lvert\psi_{N}\rangle}$ together, and each main party $A_{j}$ shares a state
${\lvert\phi^{+}\rangle}_{A_{j}B}$ with the auxiliary party $B$.

The main parties $A_{j}$ have the same inputs and outputs as in the network
assisted self-testing reference experiments, and perform the same
measurements. The auxiliary party $B$ receives an input which is either a
vector $\mathbf{y}=(y_{1},\cdots,y_{N})$, where $y_{j}\in\\{0,1,2\\}$, or
$\lozenge$, or $\blacklozenge$: in total, the auxiliary party has $3^{N}+2$
different measurement choices.

On input $\mathbf{y}=(y_{1},\cdots,y_{N})$, $B$ outputs a vector
$\mathbf{b}=(b_{1},\cdots,b_{N})$ where $b_{j}$ is obtained by measuring his
share of ${\lvert\phi^{+}\rangle}_{A_{j}B}$ with the Pauli operator
$\sigma_{y_{j}}$. On input $\lozenge$, $B$ performs a reference measurement
consisting of $\lfloor N/2\rfloor$ independent Bell state measurements
performed on system pairs $(1,2)$, $(3,4)$, $\cdots$, $(2\lfloor
N/2\rfloor-1,\leavevmode\nobreak\ 2\lfloor N/2\rfloor)$, outputting a vector
of pairs of bits $\mathbf{b}=((b_{1},b_{2}),(b_{3},b_{4}),\cdots,(b_{2\lfloor
N/2\rfloor-1},b_{2\lfloor N/2\rfloor}))$. On input $\blacklozenge$, $B$
performs a reference measurement consisting of $\lfloor N/2\rfloor$
independent Bell state measurements performed on system pairs $(N,1)$,
$(2,3)$, $\cdots$, $(2\lfloor N/2\rfloor-2,\leavevmode\nobreak\ 2\lfloor
N/2\rfloor-1)$, outputting a vector of pairs of bits
$\mathbf{b}=((b_{N},b_{1}),(b_{2},b_{3}),\cdots,(b_{2\lfloor
N/2\rfloor-2},b_{2\lfloor N/2\rfloor-1}))$.

The physical experiment for fully network assisted self-testing. The physical
experiment consists in the experiment actually performed in the laboratory,
seen by an observer who should be convinced that there exist a CPTP map which
can extract the state ${\lvert\psi_{N}\rangle}$ from the experimental devices.
This physical experiment provides the same correlations as the reference
experiment, detailed below. As above, the observer does not assume anything
about the internal functioning of the physical devices in the physical
experiment, but does assume that the states are created according to the
network causal structure. She aims to _deduce_ the existence of a CPTP map
which can extract ${\lvert\psi_{N}\rangle}$ from the devices in the physical
experiment that give rise to the observed correlations.

With a slight abuse of notation, we again denote the full state all main
parties and the auxiliary party share as
${\lvert\Psi\rangle}^{A_{1},\cdots,A_{N},B}\equiv{\lvert\Psi\rangle}$. We use
the same notations for $A_{j}$ measurement operators as in the physical
experiment of the network assisted case. We write the measurement operator of
$B$ on input $\mathbf{y}$, for output $\mathbf{b}$, as projector
$N^{\prime}_{\mathbf{b}|\mathbf{y}}$. We also introduce the observable
$\text{B}_{y_{j},\mathbf{y}}^{(j)}=\sum_{\mathbf{b}}(-1)^{b_{j}}\mathsf{N}_{\mathbf{b}|\mathbf{y}}$.
On input $y\in\\{\lozenge,\blacklozenge\\}$, for output $b$, we write $B$
measurement operator as projector $N^{\prime}_{b|y}$.

Reference correlations in the fully network assisted self-testing experiment.
We assume that the correlations of the physical experiment are the same as in
the reference experiment, that is, they are:

Reference correlations in the fully network-assisted scenario 1. In between
every main party $A_{j}$ and the auxiliary party $B$, the following 3-CHSH
inequality is maximally violated:  $\displaystyle\forall\emph{$j$},\quad$
$\displaystyle\forall\mathbf{y},\mathbf{y}^{\prime},\mathbf{y}^{\prime\prime}\quad\emph{s.t.}\quad
y_{j}=0,y^{\prime}_{j}=1,y^{\prime\prime}_{j}=2,$
$\displaystyle\mathsf{CHSH}_{j}(0,1;\mathbf{y},\mathbf{y}^{\prime})+\mathsf{CHSH}_{j}(2,3;\mathbf{y},\mathbf{y}^{\prime\prime})+\mathsf{CHSH}_{j}(4,5;\mathbf{y}^{\prime},\mathbf{y}^{\prime\prime})=6\sqrt{2},$
(9) where
$\mathsf{CHSH}_{j}(x_{1},x_{2};\mathbf{y},\mathbf{y}^{\prime})=\langle
A^{(j)}_{x_{1}}B^{(j)}_{y_{j},\mathbf{y}}\rangle+\langle
A^{(j)}_{x_{1}}B^{(j)}_{y_{j}^{\prime},\mathbf{y}^{\prime}}\rangle+\langle
A^{(j)}_{x_{2}}B^{(j)}_{y_{j},\mathbf{y}}\rangle-\langle
A^{(j)}_{x_{2}}B^{(j)}_{y_{j}^{\prime},\mathbf{y}^{\prime}}\rangle$. 2. When
the auxiliary party performs measurements denoted with $\lozenge$ or
$\blacklozenge$, the state of the corresponding auxiliary parties is projected
to one of the four Bell pairs, which imposes perfect (anti)correlation between
measurement observables corresponding to the Pauli observables:
$\displaystyle{\langle\Psi\rvert}\frac{\text{A}_{0}^{2j-1}+\text{A}_{1}^{2j-1}}{\sqrt{2}}\otimes\frac{\text{A}_{0}^{2j}+\text{A}_{1}^{2j}}{\sqrt{2}}\otimes\mathsf{N}_{b_{2j-1},b_{2j}|\lozenge}^{(2j-1,2j)}{\lvert\Psi\rangle}=\frac{1}{4}(-1)^{b_{2j}},$
(10)
$\displaystyle{\langle\Psi\rvert}\frac{\text{A}_{0}^{2j-1}-\text{A}_{1}^{2j-1}}{\sqrt{2}}\otimes\frac{\text{A}_{0}^{2j}-\text{A}_{1}^{2j}}{\sqrt{2}}\otimes\mathsf{N}_{b_{2j-1},b_{2j}|\lozenge}^{(2j-1,2j)}{\lvert\Psi\rangle}=\frac{1}{4}(-1)^{b_{2j-1}},$
(11)
$\displaystyle{\langle\Psi\rvert}\frac{\text{A}_{2}^{2j-1}-\text{A}_{3}^{2j-1}}{\sqrt{2}}\otimes\frac{\text{A}_{2}^{2j}-\text{A}_{3}^{2j}}{\sqrt{2}}\otimes\mathsf{N}_{b_{2j-1},b_{2j}|\lozenge}^{(2j-1,2j)}{\lvert\Psi\rangle}=\frac{1}{4}(-1)^{b_{2j-1}\oplus
b_{2j}\oplus 1},\qquad\forall j\in\\{1,2,\cdots,\lfloor\frac{N}{2}\rfloor\\}$
(12)
$\displaystyle{\langle\Psi\rvert}\frac{\text{A}_{0}^{2j}+\text{A}_{1}^{2j}}{\sqrt{2}}\otimes\frac{\text{A}_{0}^{2j+1}+\text{A}_{1}^{2j+1}}{\sqrt{2}}\otimes\mathsf{N}_{b_{2j},b_{2j+1}|\blacklozenge}^{(2j,2j+1)}{\lvert\Psi\rangle}=\frac{1}{4}(-1)^{b_{2j+1}},$
(13)
$\displaystyle{\langle\Psi\rvert}\frac{\text{A}_{0}^{2j}-\text{A}_{1}^{2j}}{\sqrt{2}}\otimes\frac{\text{A}_{0}^{2j+1}-\text{A}_{1}^{2j+1}}{\sqrt{2}}\otimes\mathsf{N}_{b_{2j},b_{2j+1}|\blacklozenge}^{(2j,2j+1)}{\lvert\Psi\rangle}=\frac{1}{4}(-1)^{b_{2j}},$
(14)
$\displaystyle{\langle\Psi\rvert}\frac{\text{A}_{2}^{2j}-\text{A}_{3}^{2j}}{\sqrt{2}}\otimes\frac{\text{A}_{2}^{2j+1}-\text{A}_{3}^{2j+1}}{\sqrt{2}}\otimes\mathsf{N}_{b_{2j},b_{2j+1}|\blacklozenge}^{(2j,2j+1)}{\lvert\Psi\rangle}=\frac{1}{4}(-1)^{b_{2j}\oplus
b_{2j+1}\oplus 1}$ (15) 3. When all the main parties perform the measurement
$\diamond$ and the auxiliary party does not measure $\lozenge$ or
$\blacklozenge$, the statistics correspond to those of the ideal experiment
obtained via the teleportation of the state ${\lvert\psi_{N}\rangle}$ to the
auxiliary party, up to a correction unitary indexed by
$a_{j}\in\\{00,01,10,11\\}$, who performs a complete tomography of it with the
Pauli measurements $\forall
k\in\\{0,1,2\\},{\langle\Psi\rvert}\bigotimes_{j=1}^{N}\mathsf{M}_{a_{j}|\diamond}^{(j)}\otimes\text{B}_{k}^{j}{\lvert\Psi\rangle}=\frac{1}{4^{N}}{\langle\psi_{N}\rvert}\bigotimes_{j=1}^{N}U_{a_{j}}^{\dagger}\sigma_{k}^{j}U_{a_{j}}{\lvert\psi_{N}\rangle},$
(16) where $\sigma_{0}\equiv\sigma_{z}$, $\sigma_{1}\equiv\sigma_{x}$,
$\sigma_{2}\equiv\sigma_{y}$, $U_{00}\equiv\mathds{1}$,
$U_{01}\equiv\sigma_{z}$, $U_{10}\equiv\sigma_{x}$,
$U_{11}\equiv\sigma_{z}\sigma_{x}$.

Fully network assisted self-testing in the physical experiment. We introduce
fully network-assisted self-testing as:

######  Definition 5 (Fully network-assisted self-testing).

A state ${\lvert\psi_{N}\rangle}$ is fully network-assisted self-tested in a
network of $M\geq N$ parties if there exist quantum correlations
$P(a_{1}...a_{M}|x_{1}...x_{M})$ such that, for any $M$-partite quantum
realisation of them in a physical experiment satisfying the network structure,
there exists a CPTP map $\Phi$ that extract the state

$\displaystyle\Phi(\Psi)=\begin{cases}{\lvert\psi_{N}\rangle}\\\
\mathrm{\leavevmode\nobreak\ \leavevmode\nobreak\ or}\\\
{\lvert\psi_{N}^{*}\rangle}\end{cases}$ (17)

If such CPTP map $\Phi$ exists, we say that we can extract the reference state
from the physical one. Note that thanks to the hypothesis of network structure
for the physical experiment, we don’t need to introduce a potential global
conjugation.

###  B.2 The proof

Our proof of fully network-assisted self-testing is adapted from the one for
network-assisted self testing, hence we simply explain the main differences
for the two.

In a first step, see appendix C.2, we obtain a refined version of Lemma 1, in
which we take advantage of the additional reference measurements
$\lozenge,\blacklozenge$ of the auxiliary party to completely characterize the
tomographic measurements, up to a conjugation which now can only be global,
happening with probability one. Hence, on input $\mathbf{y}$, we self test the
fact that the auxiliary party is either performing the ideal $N$ independent
Pauli measurements, or performing a global conjugation of these ideal $N$
independent Pauli measurements.

Then, the second step is not needed anymore, as the auxiliary party
tomographic setup is ideal. It might be that all the operators are complex
conjugated, which only corresponds to a convention on the definition of the
square root of $-1$ being $+i$ or $-i$. Note that in the setup of Appendix A,
the situation is different because of the presence of the extra qubits, which
somehow determine whether to use the ideal experiment or its complex
conjugate.

The last step is straightforward: from completely characterised tomographic
devices, we can completely determine the state that is teleported to the
auxiliary party after the main parties performed their measurement on inputs
$x_{j}=\diamond$, see E.2.

##  Appendix C Self-testing a tensor product of N maximally entangled pairs of
qubits and a tomographically complete set of measurements

In this appendix we prove the procedure for self-testing a tensor product of
$N$ maximally entangled pairs of qubits in two scenarios:

  * •

in section C.1 each pair is shared between two spatially separated and non-
communicating parties, in our scenario they correspond to one of the auxiliary
and main parties. There are no assumptions about the state shared among the
$2N$ parties.

  * •

in section C.2 one auxiliary party shares with $N$ main parties $N$ maximally
entangled states. The network structure is assumed: the $N$ physical states
are assumed to be independent.

###  C.1 Network-assisted scenario

In this section, we prove the lemma related to the extraction of $N$ maximally
entangled pairs of qubits based on $N$ maximal violations of the 3-CHSH
inequalities, as given in eqs. (5).

######  Lemma 1 (Formal version, network-assisted case).

Let the state
${\lvert\Psi\rangle}\in\mathscr{H}^{\mathbb{A}}\otimes\mathscr{H}^{\mathbb{B}}$
and dichotomic observables $\\{\text{A}_{j}\\}_{j=0}^{5}$ and
$\\{\text{B}_{j}\\}_{j=0}^{2}$ reproduce the reference correlations given in
eqs. (5). Then there exists a local isometry
$V=\bigotimes_{j=0}^{N-1}V_{\text{A}}^{(j)}\otimes V_{\text{B}}^{(j)}$ such
that $\displaystyle V\left({\lvert\Psi\rangle}\otimes{\lvert
0...0\rangle}_{\mathbb{A}^{\prime}\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime}{\mathbb{B}}^{\prime\prime}}\right)$
$\displaystyle={\lvert\mathrm{aux}\rangle}_{\mathbb{A}\mathbb{B}\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime\prime}}\bigotimes_{j=0}^{N-1}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}}$
(18) $\displaystyle
V\left(\bigotimes_{j=1}^{N}\mathsf{W}_{\text{C}}^{(j)}{\lvert\Psi\rangle}\otimes{\lvert
0...0\rangle}_{\mathbb{A}^{\prime}\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime}{\mathbb{B}}^{\prime\prime}}\right)$
$\displaystyle={\sigma_{z}^{q(w)}}^{C_{j}^{\prime\prime}}{\lvert\mathrm{aux}\rangle}_{\mathbb{A}\mathbb{B}\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime\prime}}\bigotimes_{j=1}^{N}{\sigma_{w}}^{C_{j}^{\prime}}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}},$
(19) where $\mathsf{W}\in\\{\mathsf{X},\mathsf{Y},\mathsf{Z}\\}$,
$\text{C}\in\\{\text{A},\text{B}\\}$ and $q(x)=q(z)=0$ while $q(y)=1$. The
junk state ${\lvert\mathrm{aux}\rangle}$ has the following form:
${\lvert\mathrm{aux}\rangle}=\sum_{\iota}{\lvert\xi_{\iota}\rangle}_{\mathbb{A}\mathbb{B}}{\lvert\iota\rangle}_{\mathbb{A}^{\prime\prime}}{\lvert\iota\rangle}_{{\mathbb{B}}^{\prime\prime}},$
(20) where $\iota\in(0,1)^{N}$. Through the isometry, the measurements are
self-tested up to complex conjugation. For each party, measurement
$\mathsf{Y}_{\text{A}}$ is self-tested to be either $\sigma_{y}$,
$-\sigma_{y}$ or some coherent superposition of the two.

As described in the main text, every main party can receive one of seven
inputs $x\in\\{0,1,2,3,4,5,\diamond\\}$,while every auxiliary party receives
one of three inputs $y\in\\{0,1,2\\}$. To inputs $x\in\\{0,1,\cdots,5\\}$ and
all $y$-s, the parties answer with outputs $a\in\\{0,1\\}$ and
$b\in\\{0,1\\}$, respectively. To the input $\diamond$, the main parties
answer with two-bit outputs $a\in\\{00,01,10,11\\}$. For the result in this
section, the $\diamond$ input is not relevant.

Let us define for $x_{j}\leq 5$ the operators
$\text{A}^{(j)}_{x_{j}}=\sum_{a_{j}}(-1)^{a_{j}}\mathsf{M}^{(j)}_{a_{j}|x_{j}}$,
which are valid observables for the main parties. For the auxiliary parties we
analogously define the following operators
$\text{B}_{y_{j}}^{(j)}=\sum_{b_{j}}(-1)^{b_{j}}\mathsf{N}_{b_{j}|y_{j}}$. Let
us consider a pair of parties, $1$-st main and the $1$-st auxiliary. We check
the correlations between the measurement outcomes $a_{1}$ and $b_{1}$, i.e.
the correlations between operators $\text{A}_{x_{1}}^{(1)}$ and
$\text{B}_{y_{1}}^{(1)}$. The observables are measured on the whole state
shared among the $2N$ parties ${\lvert\Psi\rangle}$. The self-test is based on
the well-known CHSH inequality. Namely, two parties can maximally violate the
CHSH inequality CHSH (69) if and only if they share a maximally entangled pair
of qubits and each measures an anticommuting pair of observables. From the
observables available to the parties one can define the following three CHSH
operators

$\displaystyle\mathscr{B}_{1}^{(1)}$
$\displaystyle=\text{A}^{(1)}_{0}\text{B}^{(1)}_{0}+\text{A}^{(1)}_{1}\text{B}^{(1)}_{0}+\text{A}^{(1)}_{0}\text{B}^{(1)}_{1}-\text{A}^{(1)}_{1}\text{B}^{(1)}_{1}$
(21) $\displaystyle\mathscr{B}_{2}^{(1)}$
$\displaystyle=\text{A}^{(1)}_{2}\text{B}^{(1)}_{0}+\text{A}^{(1)}_{2}\text{B}^{(1)}_{2}+\text{A}^{(1)}_{3}\text{B}^{(1)}_{0}-\text{A}^{(1)}_{3}\text{B}^{(1)}_{2}$
(22) $\displaystyle\mathscr{B}_{3}^{(1)}$
$\displaystyle=\text{A}^{(1)}_{4}\text{B}^{(1)}_{1}+\text{A}^{(1)}_{4}\text{B}^{(1)}_{2}+\text{A}^{(1)}_{5}\text{B}^{(1)}_{1}-\text{A}^{(1)}_{5}\text{B}^{(1)}_{2}.$
(23)

The maximal quantum violation of all three inequalities corresponding to three
CHSH operators is given by the Tsirelson bound $2\sqrt{2}$. Let us show it for
the first CHSH operator by considering the sum-of-squares (SOS) decomposition
of the so called shifted CHSH operator
$2\sqrt{2}\mathds{1}-\mathscr{B}_{1}^{(1)}$:

$\sqrt{2}(2\sqrt{2}\mathds{1}-\mathscr{B}_{1}^{(1)})=\left[\text{B}^{(1)}_{0}-\frac{\text{A}^{(1)}_{0}+\text{A}^{(1)}_{1}}{\sqrt{2}}\right]^{2}+\left[\text{B}^{(1)}_{1}-\frac{\text{A}^{(1)}_{0}-\text{A}^{(1)}_{1}}{\sqrt{2}}\right]^{2}$
(24)

Hence, the state ${\lvert\Psi\rangle}$ satisfying
${\langle\Psi\rvert}\mathscr{B}_{1,\mathbf{y},\mathbf{y}^{\prime}}^{(1)}{\lvert\Psi\rangle}=2\sqrt{2}$
must also satisfy

$\displaystyle\text{B}^{(1)}_{0}{\lvert\Psi\rangle}$
$\displaystyle=\frac{\text{A}^{(1)}_{0}+\text{A}^{(1)}_{1}}{\sqrt{2}}{\lvert\Psi\rangle}$
(25) $\displaystyle\text{B}^{(1)}_{1}{\lvert\Psi\rangle}$
$\displaystyle=\frac{\text{A}^{(1)}_{0}-\text{A}^{(1)}_{1}}{\sqrt{2}}{\lvert\Psi\rangle}$
(26)

Since operators $\frac{\text{A}^{(1)}_{0}+\text{A}^{(1)}_{1}}{\sqrt{2}}$ and
$\frac{\text{A}^{(1)}_{0}-\text{A}^{(1)}_{1}}{\sqrt{2}}$ anticommute by
construction the same holds for $\text{B}^{(1)}_{0}$ and $\text{B}^{(1)}_{1}$
on the support of
$\rho^{(1)}=\textrm{tr}_{\text{A}_{2}\text{B}_{2}\text{A}_{3}\text{B}_{3}\cdots\text{A}_{N-1}\text{B}_{N-1}\text{A}_{N}\text{B}_{N}}{\lvert\Psi\rangle\\!\langle\Psi\rvert}$:

$\\{\text{B}^{(1)}_{0},\text{B}^{(1)}_{1}\\}\rho^{(1)}=0$ (27)

By repeating the procedure with the two other CHSH inequalities when the
maximal violation is obtained
${\langle\Psi\rvert}\mathscr{B}_{2}^{(1)}{\lvert\Psi\rangle}=2\sqrt{2}$ and
${\langle\Psi\rvert}\mathscr{B}_{3}^{(1)}{\lvert\Psi\rangle}=2\sqrt{2}$, the
following relations can be obtained

$\displaystyle\text{B}^{(1)}_{0}{\lvert\Psi\rangle}$
$\displaystyle=\frac{\text{A}^{(1)}_{2}+\text{A}^{(1)}_{3}}{\sqrt{2}}{\lvert\Psi\rangle}$
(28) $\displaystyle\text{B}^{(1)}_{2}{\lvert\Psi\rangle}$
$\displaystyle=\frac{\text{A}^{(1)}_{2}-\text{A}^{(1)}_{3}}{\sqrt{2}}{\lvert\Psi\rangle}$
(29) $\displaystyle\text{B}^{(1)}_{1}{\lvert\Psi\rangle}$
$\displaystyle=\frac{\text{A}^{(1)}_{4}+\text{A}^{(1)}_{5}}{\sqrt{2}}{\lvert\Psi\rangle}$
(30) $\displaystyle\text{B}^{(1)}_{2}{\lvert\Psi\rangle}$
$\displaystyle=\frac{\text{A}^{(1)}_{4}-\text{A}^{(1)}_{5}}{\sqrt{2}}{\lvert\Psi\rangle}$
(31)

which imply the following anticommuting relations:

$\displaystyle\\{\text{B}^{(1)}_{0},\text{B}^{(1)}_{2}\\}\rho^{(1)}$
$\displaystyle=0$ (32)
$\displaystyle\\{\text{B}^{(1)}_{1},\text{B}^{(1)}_{2}\\}\rho^{(1)}$
$\displaystyle=0$ (33)

Let us now introduce some notation for the $1$-st auxiliary party:
$\mathsf{Z}_{\text{B}}^{(1)}=\text{B}_{0}^{(1)}$,
$\mathsf{X}_{\text{B}}^{(1)}=\text{B}_{1}^{(1)}$ and
$\mathsf{Y}_{\text{B}}^{(1)}=\text{B}_{2}^{(1)}$. For $1$-st main party let us
introduce
${\mathsf{Z}^{\prime}_{\text{A}}}^{(1)}=\frac{\text{A}^{(1)}_{0}+\text{A}^{(1)}_{1}}{\sqrt{2}}$,
${\mathsf{X}^{\prime}_{\text{A}}}^{(1)}=\frac{\text{A}^{(1)}_{0}-\text{A}^{(1)}_{1}}{\sqrt{2}}$
and
${\mathsf{Y}^{\prime}}_{\text{A}}^{(1)}=\frac{\text{A}^{(1)}_{2}-\text{A}^{(1)}_{3}}{\sqrt{2}}$.
From equations (28)-(31) we can conclude also that:

$\displaystyle{\mathsf{Z}^{\prime}_{\text{A}}}^{(1)}{\lvert\Psi\rangle}$
$\displaystyle=\mathsf{Z}_{\text{B}}^{(1)}{\lvert\Psi\rangle}$ (34)
$\displaystyle{\mathsf{X}^{\prime}_{\text{A}}}^{(1)}{\lvert\Psi\rangle}$
$\displaystyle=\mathsf{X}_{\text{B}}^{(1)}{\lvert\Psi\rangle}$ (35)
$\displaystyle{\mathsf{Y}^{\prime}_{\text{A}}}^{(1)}{\lvert\Psi\rangle}$
$\displaystyle=\mathsf{Y}_{\text{B}}^{(1)}{\lvert\Psi\rangle}$ (36)

The operators ${\mathsf{Z}^{\prime}_{\text{A}}}^{(1)}$,
${\mathsf{X}^{\prime}_{\text{A}}}^{(1)}$ and
${\mathsf{Y}^{\prime}_{\text{A}}}^{(1)}$ are not necessarily unitary, but one
can define their regularized versions $\mathsf{Z}_{\text{A}}^{(1)}$,
$\mathsf{X}_{\text{A}}^{(1)}$ and $\mathsf{Y}_{\text{A}}^{(1)}$ which are
unitary by construction. The regularized version of the operator is obtain by
rescaling all the eigenvalues to $\pm 1$ and changing $0$ eigenvalues to $1$
without changing eigenvectors. This can be described by the following
expression

$\mathsf{Z}_{\text{A}}^{(1)}={\mathsf{Z}^{\prime}}_{\text{A}}^{(1)}/|{\mathsf{Z}^{\prime}}_{\text{A}}^{(1)}|,$
(37)

and analogously for $\mathsf{X}_{\text{A}}^{(1)}$ and
$\mathsf{Y}_{\text{A}}^{(1)}$.

Through the following chain of relations we show that
${\mathsf{Z}^{\prime}_{\text{A}}}^{(1)}{\lvert\Psi\rangle}=\mathsf{Z}_{\text{A}}^{(1)}{\lvert\Psi\rangle}$:

$\displaystyle||(\mathsf{Z}_{\text{A}}^{(1)}-{\mathsf{Z}^{\prime}_{\text{A}}}^{(1)}){\lvert\Psi\rangle}||$
$\displaystyle=||(\mathds{1}-({\mathsf{Z}_{\text{A}}^{(1)}}^{\dagger}{\mathsf{Z}^{\prime}_{\text{A}}}^{(1)})){\lvert\Psi\rangle}||=||(\mathds{1}-|{\mathsf{Z}^{\prime}_{\text{A}}}^{(1)})|){\lvert\Psi\rangle}||$
$\displaystyle=||(\mathds{1}-|\mathsf{Z}_{\text{B}}^{(1)}{\mathsf{Z}^{\prime}_{\text{A}}}^{(1)})|){\lvert\Psi\rangle}||\leq||(\mathds{1}-\mathsf{Z}_{\text{B}}^{(1)}{\mathsf{Z}^{\prime}_{\text{A}}}^{(1)}){\lvert\Psi\rangle}||=0,$

where the first equality comes from the fact that
${\mathsf{Z}_{\text{A}}^{(1)}}^{\dagger}$ is unitary, the second equality just
uses the definition of ${\mathsf{Z}}^{(1)}_{\text{A}}$. The third equality is
equivalent to
$|\mathsf{Z}_{\text{B}}^{(1)}\mathsf{Z}_{\text{A}}^{(1)}|=|\mathsf{Z}_{\text{A}}^{(1)}|$,
which is correct because $\mathsf{Z}_{\text{B}}^{(1)}$ is unitary. The
inequality is a consequence of $A\leq|A|$, and finally the last equality is
the consequence of (35). An equivalent analysis can be done for correlations
between all the other pairs of main-auxiliary party. The conditions for self-
testing is the observation of the maximal violations

$\displaystyle{\langle\Psi\rvert}\mathscr{B}_{1}^{(j)}{\lvert\Psi\rangle}=2\sqrt{2},\qquad{\langle\Psi\rvert}\mathscr{B}_{2}^{(j)}{\lvert\Psi\rangle}=2\sqrt{2},\qquad{\langle\Psi\rvert}\mathscr{B}_{3}^{(j)}{\lvert\Psi\rangle}=2\sqrt{2},$
(38)

for all $j=2,\cdots,N$. In the same way as for $j=1$ we can construct unitary
operators $\mathsf{X}_{\text{A}}^{(j)}$, $\mathsf{Z}_{\text{A}}^{(j)}$,
$\mathsf{Y}_{\text{A}}^{(j)}$, $\mathsf{X}_{\text{B}}^{(j)}$,
$\mathsf{Z}_{\text{B}}^{(j)}$, $\mathsf{Y}_{\text{B}}^{(j)}$ such that:

$\displaystyle\mathsf{X}_{\text{A}}^{(j)}{\lvert\Psi\rangle}=\mathsf{X}_{\text{B}}^{(j)}{\lvert\Psi\rangle},\qquad$
$\displaystyle\mathsf{Z}_{\text{A}}^{(j)}{\lvert\Psi\rangle}=\mathsf{Z}_{\text{B}}^{(j)}{\lvert\Psi\rangle},\qquad\mathsf{Y}_{\text{A}}^{(j)}{\lvert\Psi\rangle}=\mathsf{Y}_{\text{B}}^{(j)}{\lvert\Psi\rangle},$
(39)
$\displaystyle\\{\mathsf{X}_{\text{A}}^{(j)},\mathsf{Z}_{\text{A}}^{(j)}\\}\rho^{(j)}=0,\qquad$
$\displaystyle\\{\mathsf{X}_{\text{A}}^{(j)},\mathsf{Y}_{\text{A}}^{(j)}\\}\rho^{(j)}=0,\qquad\\{\mathsf{Y}_{\text{A}}^{(j)},\mathsf{Z}_{\text{A}}^{(j)}\\}\rho^{(j)}=0,$
(40)
$\displaystyle\\{\mathsf{X}_{\text{B}}^{(j)},\mathsf{Z}_{\text{B}}^{(j)}\\}\rho^{(j)}=0,\qquad$
$\displaystyle\\{\mathsf{X}_{\text{B}}^{(j)},\mathsf{Y}_{\text{B}}^{(j)}\\}\rho^{(j)}=0,\qquad\\{\mathsf{Y}_{\text{B}}^{(j)},\mathsf{Z}_{\text{B}}^{(j)}\\}\rho^{(j)}=0.$
(41)

Furthermore, since operators for different parties act non-trivially on
different Hilbert spaces, we have

$\displaystyle[P_{\text{A}}^{(j)},Q_{\text{A}}^{(k)}]{\lvert\Psi\rangle}$
$\displaystyle=0$ (42)
$\displaystyle[P_{\text{B}}^{(j)},Q_{\text{B}}^{(k)}]{\lvert\Psi\rangle}$
$\displaystyle=0$ (43)

for every $j\neq k$ and $P,Q\in\\{\mathsf{X},\mathsf{Z},\mathsf{Y}\\}$.
Equipped will all these equations we can directly use the extended SWAP
isometry $V_{\text{A}}\otimes
V_{\text{B}}=\bigotimes_{j=1}^{N}\left(V^{(j)}_{\text{A}}\otimes
V^{(j)}_{\text{B}}\right)$ (see Fig. 5 for $V^{(j)}_{\text{A}}\otimes
V^{(j)}_{\text{B}}$). A single isometry $V^{(j)}=V^{(j)}_{\text{A}}\otimes
V^{(j)}_{\text{B}}$ acts in the following way MYS (12),MM (10):

$\displaystyle
V^{(j)}\left({\lvert\Psi\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
0000\rangle}_{A_{j}^{\prime}A_{j}^{\prime\prime}{B}_{j}^{\prime}{B}_{j}^{\prime\prime}}\right)$
$\displaystyle={\lvert\xi\rangle}_{\mathbb{A}\mathbb{B}A_{j}^{\prime\prime}{B}_{j}^{\prime\prime}}\otimes{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}},$
(44) $\displaystyle
V^{(j)}\left(\mathsf{Z}_{\text{C}}^{(j)}{\lvert\Psi\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
0000\rangle}_{A_{j}^{\prime}A_{j}^{\prime\prime}B_{j}^{\prime}B_{j}^{\prime\prime}}\right)$
$\displaystyle={\lvert\xi\rangle}_{\mathbb{A}\mathbb{B}A_{j}^{\prime\prime}B_{j}^{\prime\prime}}\otimes\sigma_{z}^{C^{\prime}_{j}}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}},$
(45) $\displaystyle
V^{(j)}\left(\mathsf{X}_{\text{C}}^{(j)}{\lvert\Psi\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
0000\rangle}_{A_{j}^{\prime}A_{j}^{\prime\prime}B_{j}^{\prime}\text{B}_{j}^{\prime\prime}}\right)$
$\displaystyle={\lvert\xi\rangle}_{\mathbb{A}\mathbb{B}A_{j}^{\prime\prime}B_{j}^{\prime\prime}}\otimes\sigma_{x}^{C^{\prime}_{j}}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}},$
(46) $\displaystyle
V^{(j)}\left(\mathsf{Y}_{\text{C}}^{(j)}{\lvert\Psi\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
0000\rangle}_{A_{j}^{\prime}A_{j}^{\prime\prime}B_{j}^{\prime}B_{j}^{\prime\prime}}\right)$
$\displaystyle=\sigma_{z}^{C_{j}^{\prime\prime}}{\lvert\xi\rangle}_{\mathbb{A}\mathbb{B}A_{j}^{\prime\prime}B_{j}^{\prime\prime}}\otimes\sigma_{y}^{C_{j}^{\prime}}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}},$
(47)

where $\text{C}\in\\{\text{A},\text{B}\\}$, we introduced the notation
$\mathbb{A}=A_{1}\cdots A_{N}$ and $\mathbb{B}=B_{1}\cdots B_{N}$, and
${\lvert\xi\rangle}$ takes the form

$\displaystyle{\lvert\xi\rangle}={\lvert\xi_{0}\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
00\rangle}_{A_{j}^{\prime\prime}B_{j}^{\prime\prime}}+{\lvert\xi_{1}\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
11\rangle}_{A_{j}^{\prime\prime}B_{j}^{\prime\prime}}.$ (48)

and

$\displaystyle{\lvert\xi_{0}\rangle}$
$\displaystyle=\frac{1}{2\sqrt{2}}(\mathds{1}+i\mathsf{Y}_{\text{A}}^{(j)}\mathsf{X}_{\text{A}}^{(j)})(\mathds{1}+\mathsf{Z}_{\text{A}}^{(j)}){\lvert\Psi\rangle},$
(49) $\displaystyle{\lvert\xi_{1}\rangle}$
$\displaystyle=\frac{1}{2\sqrt{2}}(\mathds{1}-i\mathsf{Y}_{\text{A}}^{(j)}\mathsf{X}_{\text{A}}^{(j)})(\mathds{1}+\mathsf{Z}_{\text{A}}^{(j)}){\lvert\Psi\rangle}.$
(50)

eqs. (44)-(47) can be used to obtain:

$\displaystyle
V^{(j)}\left(\frac{\mathds{1}\pm\mathsf{Z}_{\text{C}}^{(j)}}{2}{\lvert\Psi\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
0000\rangle}_{\text{A}_{j}^{\prime}\text{A}_{j}^{\prime\prime}{\text{B}}_{j}^{\prime}{B}_{j}^{\prime\prime}}\right)$
$\displaystyle={\lvert\xi\rangle}_{\mathbb{A}\mathbb{B}A_{j}^{\prime\prime}{B}_{j}^{\prime\prime}}\otimes\frac{\mathds{1}\pm\sigma_{z}^{C^{\prime}_{j}}}{2}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}{B}_{j}^{\prime}},$
(51) $\displaystyle
V^{(j)}\left(\frac{\mathds{1}\pm\mathsf{X}_{\text{C}}^{(j)}}{2}{\lvert\Psi\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
0000\rangle}_{A_{j}^{\prime}A_{j}^{\prime\prime}{B}_{j}^{\prime}{B}_{j}^{\prime\prime}}\right)$
$\displaystyle={\lvert\xi\rangle}_{\mathbb{A}\mathbb{B}A_{j}^{\prime\prime}{B}_{j}^{\prime\prime}}\otimes\frac{\mathds{1}\pm\sigma_{x}^{C^{\prime}_{j}}}{2}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}{B}_{1}^{\prime}},$
(52) $\displaystyle
V^{(j)}\left(\frac{\mathds{1}+\mathsf{Y}_{\text{C}}^{(j)}}{2}{\lvert\Psi\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
0000\rangle}_{A_{j}^{\prime}A_{j}^{\prime\prime}{B}_{j}^{\prime}{B}_{j}^{\prime\prime}}\right)$
$\displaystyle=\frac{\mathds{1}+\sigma_{z}^{C_{j}^{\prime\prime}}}{2}{\lvert\xi\rangle}_{\mathbb{A}A_{j}^{\prime\prime}{B}_{j}^{\prime\prime}}\otimes\frac{\mathds{1}+\sigma_{y}^{C_{j}^{\prime}}}{2}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}{B}_{j}^{\prime}}+\frac{\mathds{1}-\sigma_{z}^{C_{j}^{\prime\prime}}}{2}{\lvert\xi\rangle}_{\mathbb{A}A_{j}^{\prime\prime}{B}_{j}^{\prime\prime}}\otimes\frac{\mathds{1}-\sigma_{y}^{C_{j}^{\prime}}}{2}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}{B}_{j}^{\prime}}$
(53) $\displaystyle
V^{(j)}\left(\frac{\mathds{1}-\mathsf{Y}_{\text{C}}^{(j)}}{2}{\lvert\Psi\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
0000\rangle}_{A_{j}^{\prime}A_{j}^{\prime\prime}{B}_{j}^{\prime}{B}_{j}^{\prime\prime}}\right)$
$\displaystyle=\frac{\mathds{1}+\sigma_{z}^{C_{j}^{\prime\prime}}}{2}{\lvert\xi\rangle}_{\mathbb{A}A_{j}^{\prime\prime}{B}_{j}^{\prime\prime}}\otimes\frac{\mathds{1}-\sigma_{y}^{C_{j}^{\prime}}}{2}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}{B}_{j}^{\prime}}+\frac{\mathds{1}-\sigma_{z}^{C_{j}^{\prime\prime}}}{2}{\lvert\xi\rangle}_{\mathbb{A}A_{j}^{\prime\prime}{B}_{j}^{\prime\prime}}\otimes\frac{\mathds{1}+\sigma_{y}^{C_{j}^{\prime}}}{2}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}{B}_{j}^{\prime}}$
(54)

where again $\text{C}\in\\{\text{A},\text{B}\\}$. We see that the action of
observables $\mathsf{Z}_{\text{C}}$, $\mathsf{X}_{\text{C}}$ and
$\mathsf{Y}_{\text{C}}$ on the physical state is mapped to the action of the
Pauli observables $\sigma_{z}$, $\sigma_{x}$ and $\sigma_{y}$, respectively,
on the maximally entangled pair of qubits, up to a possible complex
conjugation. The isometry $V^{(j)}$ gives a nice interpretation of this
complex conjugation freedom. Given the form of ${\lvert\xi\rangle}$, see eq.
(48), eq. (53) can be read in the following way: before applying measurement
$\mathsf{Y}_{\text{C}}$, a party measures ancilla $C_{j}^{\prime\prime}$ in
the computational basis, and if the result is $0$ it measures $\sigma_{y}$,
while if the result is $-1$ it measures $\sigma_{y}^{*}$. Thus, the
measurement $\mathsf{Y}_{\text{C}}$ is in a way coherently controlled by
$\sigma_{z}$.

${\lvert 0\rangle}_{\text{A}_{j}^{\prime}}$ ${\lvert
0\rangle}_{\text{A}_{j}^{\prime\prime}}$ ${\lvert
0\rangle}_{\text{B}_{j}^{\prime\prime}}$ ${\lvert
0\rangle}_{\text{B}_{j}^{\prime}}$
${\lvert\Psi\rangle}$HH$\mathsf{Z}_{\text{A}}^{(j)}$${\mathsf{Z}}_{\text{B}}^{(j)}$HH$\mathsf{X}_{\text{A}}^{(j)}$${\mathsf{X}}_{\text{B}}^{(j)}$HH$i\mathsf{Y}_{\text{A}}^{(j)}\mathsf{X}_{\text{A}}^{(j)}$$i{\mathsf{Y}}_{\text{B}}^{(j)}{\mathsf{X}}_{\text{B}}^{(j)}$HH${\lvert\phi^{+}\rangle}_{\text{A}_{j}^{\prime}\text{B}_{j}^{\prime}}$

Figure 5: The isometry for self-testing. The standard SWAP gates extracts the
maximally entangled pair of qubits to the primed ancillas.

.

Let us now consider another isometry $V^{(k)}=V_{A}^{(k)}\otimes V_{B}^{(k)}$
with $k\neq j$ and check how it acts together with $V_{A}^{(j)}\otimes
V_{B}^{(j)}$. Thanks to eqs. (42) and (43) we obtain:

$\displaystyle
V^{(k)}\left(V^{(j)}\left({\lvert\Psi\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
0000\rangle}_{A_{j}^{\prime}A_{j}^{\prime\prime}{B}_{j}^{\prime}{B}_{j}^{\prime\prime}}\right)\otimes{\lvert
0000\rangle}_{A_{k}^{\prime}A_{k}^{\prime\prime}{B}_{k}^{\prime}{B}_{k}^{\prime\prime}}\right)=$
$\displaystyle=V^{(k)}\left({\lvert\xi\rangle}_{\mathbb{A}\mathbb{B}A_{j}^{\prime\prime}{B}_{j}^{\prime\prime}}\otimes{\lvert
0000\rangle}_{A_{k}^{\prime}A_{k}^{\prime\prime}{B}_{k}^{\prime}{B}_{k}^{\prime\prime}}\right)\otimes{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}{B}_{j}^{\prime}}$
$\displaystyle=\left[V^{(k)}\left({\lvert\xi_{0}\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
0000\rangle}_{A_{k}^{\prime}A_{k}^{\prime\prime}{B}_{k}^{\prime}{B}_{k}^{\prime\prime}}\right)\otimes{\lvert
00\rangle}_{\text{A}_{j}^{\prime\prime}\text{B}_{j}^{\prime\prime}}+V^{(k)}\left({\lvert\xi_{1}\rangle}_{\mathbb{A}\mathbb{B}}{\lvert
0000\rangle}_{A_{k}^{\prime}A_{k}^{\prime\prime}{B}_{k}^{\prime}{B}_{k}^{\prime\prime}}\right)\otimes{\lvert
11\rangle}_{\text{A}_{j}^{\prime\prime}\text{B}_{j}^{\prime\prime}}\right]\otimes{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}{B}_{j}^{\prime}}$
$\displaystyle={\lvert\xi^{\prime}\rangle}_{\mathbb{A}\mathbb{B}A_{j}^{\prime\prime}A_{k}^{\prime\prime}B_{j}^{\prime\prime}B_{k}^{\prime\prime}}\otimes{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}{B}_{j}^{\prime}}\otimes{\lvert\phi^{+}\rangle}_{A_{k}^{\prime}{B}_{k}^{\prime}},$

where

$\displaystyle{\lvert\xi^{\prime}\rangle}={\lvert\xi_{00}\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
0000\rangle}_{A_{j}^{\prime\prime}B_{j}^{\prime\prime}A_{k}^{\prime\prime}B_{k}^{\prime\prime}}+{\lvert\xi_{01}\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
0011\rangle}_{A_{j}^{\prime\prime}B_{j}^{\prime\prime}A_{k}^{\prime\prime}B_{k}^{\prime\prime}}+{\lvert\xi_{10}\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
1100\rangle}_{A_{j}^{\prime\prime}B_{j}^{\prime\prime}A_{k}^{\prime\prime}B_{k}^{\prime\prime}}+{\lvert\xi_{11}\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
1111\rangle}_{A_{j}^{\prime\prime}B_{j}^{\prime\prime}A_{k}^{\prime\prime}B_{k}^{\prime\prime}}.$
(55)

and

$\displaystyle{\lvert\xi_{00}\rangle}$
$\displaystyle=\frac{1}{2^{3}}(\mathds{1}+i\mathsf{Y}_{\text{A}}^{(j)}\mathsf{X}_{\text{A}}^{(j)})(\mathds{1}+\mathsf{Z}_{\text{A}}^{(j)})(\mathds{1}+i\mathsf{Y}_{\text{A}}^{(k)}\mathsf{X}_{\text{A}}^{(k)})(\mathds{1}+\mathsf{Z}_{\text{A}}^{(k)}){\lvert\Psi\rangle},$
(56) $\displaystyle{\lvert\xi_{01}\rangle}$
$\displaystyle=\frac{1}{2^{3}}(\mathds{1}+i\mathsf{Y}_{\text{A}}^{(j)}\mathsf{X}_{\text{A}}^{(j)})(\mathds{1}+\mathsf{Z}_{\text{A}}^{(j)})(\mathds{1}-i\mathsf{Y}_{\text{A}}^{(j)}\mathsf{X}_{\text{A}}^{(j)})(\mathds{1}+\mathsf{Z}_{\text{A}}^{(j)}){\lvert\Psi\rangle},$
(57) $\displaystyle{\lvert\xi_{10}\rangle}$
$\displaystyle=\frac{1}{2^{3}}(\mathds{1}-i\mathsf{Y}_{\text{A}}^{(j)}\mathsf{X}_{\text{A}}^{(j)})(\mathds{1}+\mathsf{Z}_{\text{A}}^{(j)})(\mathds{1}+i\mathsf{Y}_{\text{A}}^{(k)}\mathsf{X}_{\text{A}}^{(k)})(\mathds{1}+\mathsf{Z}_{\text{A}}^{(k)}){\lvert\Psi\rangle},$
(58) $\displaystyle{\lvert\xi_{11}\rangle}$
$\displaystyle=\frac{1}{2^{3}}(\mathds{1}-i\mathsf{Y}_{\text{A}}^{(j)}\mathsf{X}_{\text{A}}^{(j)})(\mathds{1}+\mathsf{Z}_{\text{A}}^{(j)})(\mathds{1}-i\mathsf{Y}_{\text{A}}^{(j)}\mathsf{X}_{\text{A}}^{(j)})(\mathds{1}+\mathsf{Z}_{\text{A}}^{(j)}){\lvert\Psi\rangle}.$
(59)

If we repeat the procedure for all pairs of parties, we obtain the final local
isometry $V=\bigotimes_{j=0}^{N-1}V_{\text{A}}^{(j)}\otimes
V_{\text{B}}^{(j)}$ such that

$\displaystyle V\left({\lvert\Psi\rangle}\otimes{\lvert
0...0\rangle}_{\mathbb{A}^{\prime}\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime}{\mathbb{B}}^{\prime\prime}}\right)$
$\displaystyle={\lvert\mathrm{aux}\rangle}_{\mathbb{A}B\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime\prime}}\bigotimes_{j=0}^{N-1}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}}$
(60) $\displaystyle
V\left(\bigotimes_{j=1}^{N}\mathsf{W}_{\text{C}}^{(j)}{\lvert\Psi\rangle}\otimes{\lvert
0...0\rangle}_{\mathbb{A}^{\prime}\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime}{\mathbb{B}}^{\prime\prime}}\right)$
$\displaystyle={\sigma_{z}^{q(w)}}^{C_{j}^{\prime\prime}}{\lvert\mathrm{aux}\rangle}_{\mathbb{A}B\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime\prime}}\bigotimes_{j=1}^{N}{\sigma_{w}}^{C_{j}^{\prime}}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}},$
(61)

where $\mathsf{W}\in\\{\mathsf{X},\mathsf{Y},\mathsf{Z}\\}$,
$\text{C}\in\\{\text{A},\text{B}\\}$ and $q(x)=q(z)=0$ while $q(y)=1$. The
junk state ${\lvert\mathrm{aux}\rangle}$ has the following form:

${\lvert\mathrm{aux}\rangle}=\sum_{\iota}{\lvert\xi_{\iota}\rangle}_{\mathbb{A}B}{\lvert\iota\rangle}_{\mathbb{A}^{\prime\prime}}{\lvert\iota\rangle}_{{\mathbb{B}}^{\prime\prime}},$
(62)

where $\iota\in(0,1)^{N}$. Through the isometry, the measurements are self-
tested up to complex conjugation. For each party measurement
$\mathsf{Y}_{\text{A}}$ is self-tested to be either $\sigma_{y}$,
$-\sigma_{y}$ or some coherent superposition of the two.

To conclude, in this section we proved that if the three CHSH inequalities are
maximally violated by $N$ pairs of main-auxiliary parties, $N$ maximally
entangled pairs can be extracted. Moreover, the maximal violations allow us to
self-test Pauli measurements $\sigma_{x}$ and $\sigma_{z}$, while $\sigma_{y}$
is self-tested up to complex conjugation, as shown in (18), and where junk
state, given explicitly in (20) has $N$ flags, which determine whether the
auxiliary party applies $\sigma_{y}$ or $\sigma_{y}^{*}$. In the model given
here, the auxiliary party measures the flag qubits in the computational basis
(hence $\sigma_{z}$ acting on ${\lvert\mathrm{aux}\rangle}$ in (18)), and if
the measurement result is $0$ it applies $\sigma_{y}$, while if the result is
$1$ it applies $\sigma_{y}^{*}$.

###  C.2 Fully network-assisted scenario

In this section, we exploit the fact that the sources present in the physical
experiment are mutually independent. This allows us to join the $N$ auxiliary
parties into one. We prove the following lemma, which is a refinement of the
previous one with the important difference that the physical measurements are
now shown to be equivalent either to the reference measurements or to their
complex conjugate.

######  Lemma 1 (Formal version, fully-network-assisted case).

Let the state
${\lvert\Psi\rangle}_{\mathbb{A}\mathbb{B}}\in\mathscr{H}^{\mathbb{A}}\otimes\mathscr{H}^{\mathbb{B}}$,
dichotomic observables $\\{\text{A}_{j}\\}_{j=0}^{5}$ and
$\\{\text{B}_{j,\mathbf{y}}\\}_{j=0}^{2}$ and measurements
$\\{\mathsf{N}_{b_{j}|\lozenge}^{2j-1,2j},\mathsf{N}_{b_{j}|\blacklozenge}^{2j,2j+1}\\}_{j=1}^{\lfloor
N/2\rfloor}$ reproduce the reference correlations given in eqs. (1) and (10).
Then there exists a local isometry
$V=\bigotimes_{j=0}^{N-1}V_{\text{A}}^{(j)}\otimes V_{\text{B}}^{(j)}$ such
that $\displaystyle
V\left({\lvert\Psi\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
0...0\rangle}_{\mathbb{A}^{\prime}\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime}{\mathbb{B}}^{\prime\prime}}\right)$
$\displaystyle={\lvert\mathrm{aux}\rangle}_{\mathbb{A}\mathbb{B}\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime\prime}}\bigotimes_{j=0}^{N-1}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}}$
(63) $\displaystyle
V\left(\bigotimes_{j=1}^{N}\mathsf{W}_{\text{B}}^{(j)}{\lvert\Psi\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
0\cdots
0\rangle}_{\mathbb{A}^{\prime}\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime}{\mathbb{B}}^{\prime\prime}}\right)$
$\displaystyle=\begin{cases}{\lvert\xi_{0}\rangle}_{\mathbb{A}\mathbb{B}}{\lvert
0\cdots
0\rangle}_{\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime\prime}}\bigotimes_{j=1}^{N}\sigma_{w}^{B_{j}^{\prime}}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}},\\\
{\lvert\xi_{1}\rangle}_{\mathbb{A}\mathbb{B}}{\lvert 1\cdots
1\rangle}_{\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime\prime}}\bigotimes_{j=1}^{N}{\sigma^{*}_{w}}^{B_{j}^{\prime}}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}},\end{cases}$
(64) where $\mathsf{W}\in\\{\mathsf{X},\mathsf{Y},\mathsf{Z}\\}$,
$\text{C}\in\\{\text{A},\text{B}\\}$. The junk state
${\lvert\mathrm{aux}\rangle}$ has the following form:
${\lvert\mathrm{aux}\rangle}={\lvert\xi_{0}\rangle}_{\mathbb{A}\mathbb{B}}{\lvert
0\cdots
0\rangle}_{\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime\prime}}+{\lvert\xi_{1}\rangle}_{\mathbb{A}\mathbb{B}}{\lvert
1\cdots 1\rangle}_{\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime\prime}}.$
(65) Through the isometry, the measurements are self-tested up to complex
conjugation. For each party, measurement $\mathsf{Y}_{\text{A}}$ is self-
tested to be either $\sigma_{y}$ or $-\sigma_{y}$.

Because of the quantum network geometry, we made the assumption that the
physical state has the form

${\lvert\Psi\rangle}_{\mathbb{A}\mathbb{B}}=\left(\bigotimes_{j=1}^{N}{\lvert\Psi_{j}\rangle}_{A_{j}B_{j}}\right)\otimes{\lvert\tilde{\Psi}\rangle}_{\tilde{A}_{1}\cdots\tilde{A}_{N}}\equiv\left(\bigotimes_{j=1}^{N}{\lvert\Psi_{j}\rangle}_{A_{j}B_{j}}\right)\otimes{\lvert\tilde{\Psi}\rangle}_{\tilde{\mathbb{A}}}$
(66)

In the following, we omit the label ${\mathbb{A}\mathbb{B}}$ from the physical
state. As described in the main text, another difference in the network
architecture is that $N$ auxiliary parties are merged into one. In what
follows, we present the proof that $N$ maximal violations of the extended CHSH
inequality each violated by one main and the auxiliary party self-test the
tensor product of $N$ maximally entangled pairs of qubits. The proof is
similar to the one presented in section C.1, adapted to the fact that now
there are no $N$ auxiliary parties, but only one.

In the first part of the proof we focus on the self-testing of $N$ maximally
entangled qubit pairs and for the moment disregard the inputs $\diamond$,
$\lozenge$ and $\blacklozenge$. Let us now define the operator
$\text{A}^{(j)}_{x_{j}}=\sum_{a_{j}}(-1)^{a_{j}}\mathsf{M}^{(j)}_{a_{j}|x_{j}}$.
For the auxiliary party we define the following operators
$\text{B}^{(j)}_{y_{j},\mathbf{y}}=\sum_{\mathbf{b}}(-1)^{b_{j}}\mathsf{N}_{\mathbf{b}|\mathbf{y}}$.
All the operators we defined are valid measurement observables. Let us
consider a pair of parties, $1$-st main and the auxiliary. We check the
correlations between the measurement outcomes $a_{1}$ and $b_{1}$, i.e. the
correlations between operators $\text{A}_{x_{1}}^{(1)}$ and
$\text{B}_{y_{1},\mathbf{y}}^{(1)}$. As operator
$\text{B}_{y_{1},\mathbf{y}}^{(1)}$ acts on the whole Hilbert space of the
auxiliary party, we have to consider the whole state shared among the $N+1$
parties
${\lvert\Psi\rangle}=\left(\bigotimes_{j=1}^{N}{\lvert\Psi_{j}\rangle}_{A_{j}B_{j}}\right)\otimes{\lvert\tilde{\Psi}\rangle}_{\tilde{\mathbb{A}}}$.
As in the previous proof, the self-test is based on the extended CHSH
inequality. For $i\geq 2$, let $y_{i}\in\\{0,1,2\\}$ and consider
$\mathbf{y}=(0,y_{2},...,y_{N})$,
$\mathbf{y}^{\prime}=(1,y^{\prime}_{2},...,y^{\prime}_{N})$ and
$\mathbf{y}^{\prime\prime}=(2,y^{\prime\prime}_{2},...,y^{\prime\prime}_{N})$.
From the observables available to the parties one can define the following
three CHSH operators

$\displaystyle\mathscr{B}_{1,\mathbf{y},\mathbf{y}^{\prime}}^{(1)}$
$\displaystyle=\text{A}^{(1)}_{0}\text{B}^{(1)}_{0,\mathbf{y}}+\text{A}^{(1)}_{1}\text{B}^{(1)}_{0,\mathbf{y}}+\text{A}^{(1)}_{0}\text{B}^{(1)}_{1,\mathbf{y}^{\prime}}-\text{A}^{(1)}_{1}\text{B}^{(1)}_{1,\mathbf{y}^{\prime}}$
(67) $\displaystyle\mathscr{B}_{2,\mathbf{y},\mathbf{y}^{\prime\prime}}^{(1)}$
$\displaystyle=\text{A}^{(1)}_{2}\text{B}^{(1)}_{0,\mathbf{y}}+\text{A}^{(1)}_{2}\text{B}^{(1)}_{2,\mathbf{y}^{\prime\prime}}+\text{A}^{(1)}_{3}\text{B}^{(1)}_{0,\mathbf{y}}-\text{A}^{(1)}_{3}\text{B}^{(1)}_{2,\mathbf{y}^{\prime\prime}}$
(68)
$\displaystyle\mathscr{B}_{3,\mathbf{y}^{\prime},\mathbf{y}^{\prime\prime}}^{(1)}$
$\displaystyle=\text{A}^{(1)}_{4}\text{B}^{(1)}_{1,\mathbf{y}^{\prime}}+\text{A}^{(1)}_{4}\text{B}^{(1)}_{2,\mathbf{y}^{\prime\prime}}+\text{A}^{(1)}_{5}\text{B}^{(1)}_{1,\mathbf{y}^{\prime}}-\text{A}^{(1)}_{5}\text{B}^{(1)}_{2,\mathbf{y}^{\prime\prime}}.$
(69)

All three CHSH operators attain the Tsirelson bound $2\sqrt{2}$. The SOS
decomposition of the shifted CHSH operator
$2\sqrt{2}\mathds{1}-\mathscr{B}_{1,\mathbf{y},\mathbf{y}^{\prime}}^{(j)}$
reads:

$\sqrt{2}(2\sqrt{2}\mathds{1}-\mathscr{B}_{1,\mathbf{y},\mathbf{y}^{\prime}}^{(1)})=\left[\text{B}^{(1)}_{0,\mathbf{y}}-\frac{\text{A}^{(1)}_{0}+\text{A}^{(1)}_{1}}{\sqrt{2}}\right]^{2}+\left[\text{B}^{(1)}_{1,\mathbf{y}^{\prime}}-\frac{\text{A}^{(1)}_{0}-\text{A}^{(1)}_{1}}{\sqrt{2}}\right]^{2}$
(70)

Hence, the state ${\lvert\Psi\rangle}$ satisfying
${\langle\Psi\rvert}\mathscr{B}_{1,\mathbf{y},\mathbf{y}^{\prime}}^{(1)}{\lvert\Psi\rangle}=2\sqrt{2}$
must also satisfy

$\displaystyle\text{B}^{(1)}_{0,\mathbf{y}}{\lvert\Psi\rangle}$
$\displaystyle=\frac{\text{A}^{(1)}_{0}+\text{A}^{(1)}_{1}}{\sqrt{2}}{\lvert\Psi\rangle}$
(71) $\displaystyle\text{B}^{(1)}_{1,\mathbf{y}^{\prime}}{\lvert\Psi\rangle}$
$\displaystyle=\frac{\text{A}^{(1)}_{0}-\text{A}^{(1)}_{1}}{\sqrt{2}}{\lvert\Psi\rangle}$
(72)

The equations

$\frac{\text{A}^{(1)}_{0}\pm\text{A}^{(1)}_{1}}{\sqrt{2}}{\lvert\Psi\rangle}=\left(\frac{\text{A}^{(1)}_{0}\pm\text{A}^{(1)}_{1}}{\sqrt{2}}{\lvert\Psi_{1}\rangle}_{A_{1}B_{1}}\right)\bigotimes_{j=2}^{N}{\lvert\Psi_{j}\rangle}_{A_{j}B_{j}}\otimes{\lvert\tilde{\Psi}\rangle}_{\tilde{\mathbb{A}}}$
(73)

imply

$\displaystyle\text{B}^{(1)}_{0,\mathbf{y}}{\lvert\Psi\rangle}$
$\displaystyle=\left(\text{B}^{(1)}_{0,\mathbf{y}}{\lvert\Psi_{1}\rangle}_{A_{1}B_{1}}\right)\bigotimes_{j=2}^{N}{\lvert\Psi_{j}\rangle}_{A_{j}B_{j}}\otimes{\lvert\tilde{\Psi}\rangle}_{\tilde{\mathbb{A}}}$
(74) $\displaystyle\text{B}^{(1)}_{1,\mathbf{y}^{\prime}}{\lvert\Psi\rangle}$
$\displaystyle=\left(\text{B}^{(1)}_{1,\mathbf{y}^{\prime}}{\lvert\Psi_{1}\rangle}_{A_{1}B_{1}}\right)\bigotimes_{j=2}^{N}{\lvert\Psi_{j}\rangle}_{A_{j}B_{j}}\otimes{\lvert\tilde{\Psi}\rangle}_{\tilde{\mathbb{A}}}$
(75)

Operators $\text{B}^{(1)}_{0,\mathbf{y}^{\prime}}$ and
$\text{B}^{(1)}_{1,\mathbf{y}^{\prime}}$ act nontrivially only on
${\lvert\Psi_{1}\rangle}_{A_{1}B_{1}}$ because they act on the full state
${\lvert\Psi\rangle}$ in the same way as
$(\text{A}_{0}^{(1)}\pm\text{A}_{1}^{(1)})/\sqrt{2}$, which cannot affect the
states ${\lvert\Psi_{j}\rangle}$ for $j\neq 1$.

Since the operators $\frac{\text{A}^{(1)}_{0}+\text{A}^{(1)}_{1}}{\sqrt{2}}$
and $\frac{\text{A}^{(1)}_{0}-\text{A}^{(1)}_{1}}{\sqrt{2}}$ anticommute by
construction, the same holds for $\text{B}^{(1)}_{0,\mathbf{y}}$ and
$\text{B}^{(1)}_{1,\mathbf{y}^{\prime}}$ on the support of
$\rho^{(1)}_{B}=\textrm{tr}_{A_{1}}{\lvert\Psi_{1}\rangle\\!\langle\Psi_{1}\rvert}$:

$\\{\text{B}^{(1)}_{0,\mathbf{y}},\text{B}^{(1)}_{1,\mathbf{y}^{\prime}}\\}\rho_{B}^{(1)}=0$
(76)

By repeating the procedure with the two other CHSH inequalities that attain
the maximal violation
${\langle\Psi\rvert}\mathscr{B}_{2,\mathbf{y},\mathbf{y}^{\prime\prime}}^{(1)}{\lvert\Psi\rangle}=2\sqrt{2}$
and
${\langle\Psi\rvert}\mathscr{B}_{3,\mathbf{y}^{\prime},\mathbf{y}^{\prime\prime}}^{(1)}{\lvert\Psi\rangle}=2\sqrt{2}$,
the following relations can be obtained

$\displaystyle\text{B}^{(1)}_{0,\mathbf{y}}{\lvert\Psi\rangle}$
$\displaystyle=\frac{\text{A}^{(1)}_{2}+\text{A}^{(1)}_{3}}{\sqrt{2}}{\lvert\Psi\rangle}$
(77)
$\displaystyle\text{B}^{(1)}_{2,\mathbf{y}^{\prime\prime}}{\lvert\Psi\rangle}$
$\displaystyle=\frac{\text{A}^{(1)}_{2}-\text{A}^{(1)}_{3}}{\sqrt{2}}{\lvert\Psi\rangle}$
(78) $\displaystyle\text{B}^{(1)}_{1,\mathbf{y}^{\prime}}{\lvert\Psi\rangle}$
$\displaystyle=\frac{\text{A}^{(1)}_{4}+\text{A}^{(1)}_{5}}{\sqrt{2}}{\lvert\Psi\rangle}$
(79)
$\displaystyle\text{B}^{(1)}_{2,\mathbf{y}^{\prime\prime}}{\lvert\Psi\rangle}$
$\displaystyle=\frac{\text{A}^{(1)}_{4}-\text{A}^{(1)}_{5}}{\sqrt{2}}{\lvert\Psi\rangle}$
(80)

which imply the following anticommuting relations:

$\displaystyle\\{\text{B}^{(1)}_{0,\mathbf{y}},\text{B}^{(1)}_{2,\mathbf{y}^{\prime\prime}}\\}\rho_{B}^{(1)}$
$\displaystyle=0$ (81)
$\displaystyle\\{\text{B}^{(1)}_{1,\mathbf{y}^{\prime}},\text{B}^{(1)}_{2,\mathbf{y}^{\prime\prime}}\\}\rho_{B}^{(1)}$
$\displaystyle=0,$ (82)

and also

$\displaystyle\text{B}^{(1)}_{2,\mathbf{y}^{\prime\prime}}{\lvert\Psi\rangle}$
$\displaystyle=\left(\text{B}^{(1)}_{2,\mathbf{y}^{\prime\prime}}{\lvert\Psi_{1}\rangle}_{A_{1}B_{2}}\right)\bigotimes_{j=2}^{N}{\lvert\Psi_{j}\rangle}_{A_{j}B_{j}}\otimes{\lvert\tilde{\Psi}\rangle}_{\tilde{\mathbb{A}}}.$
(83)

If equalities
${\langle\Psi\rvert}\mathscr{B}_{1,\mathbf{y},\mathbf{y}^{\prime}}^{(1)}{\lvert\Psi\rangle}=2\sqrt{2}$,
${\langle\Psi\rvert}\mathscr{B}_{2,\mathbf{y},\mathbf{y}^{\prime\prime}}^{(1)}{\lvert\Psi\rangle}=2\sqrt{2}$
and
${\langle\Psi\rvert}\mathscr{B}_{3,\mathbf{y}^{\prime},\mathbf{y}^{\prime\prime}}^{(1)}{\lvert\Psi\rangle}=2\sqrt{2}$
are satisfied for all $\mathbf{y}$, $\mathbf{y}^{\prime}$ and
$\mathbf{y}^{\prime\prime}$, eqs. (71)-(83) hold for all such $\mathbf{y}$,
$\mathbf{y}^{\prime}$ and $\mathbf{y}^{\prime\prime}$. Let us now introduce
some notation for the auxiliary party:
$\mathsf{Z}_{\text{B}}^{(1)}=\text{B}_{0,\mathbf{0}}^{(1)}$,
$\mathsf{X}_{\text{B}}^{(1)}=\text{B}_{1,\mathbf{1}}^{(1)}$ and
$\mathsf{Y}_{\text{B}}^{(1)}=\text{B}_{2,\mathbf{2}}^{(1)}$, where
$\mathbf{0}=(0,\cdots,0)$, $\mathbf{1}=(1,\cdots,1)$ and
$\mathbf{2}=(2,\cdots,2)$. For the $1$-st main party let us introduce
${\mathsf{Z}^{\prime}}_{\text{A}}^{(1)}=\frac{\text{A}^{(1)}_{0}+\text{A}^{(1)}_{1}}{\sqrt{2}}$,
${\mathsf{X}^{\prime}}_{\text{A}}^{(1)}=\frac{\text{A}^{(1)}_{0}-\text{A}^{(1)}_{1}}{\sqrt{2}}$
and
${\mathsf{Y}^{\prime}}_{\text{A}}^{(1)}=\frac{\text{A}^{(1)}_{2}-\text{A}^{(1)}_{3}}{\sqrt{2}}$.
From equations (71), (72),(77)- (80) we can conclude also that:

$\displaystyle{\mathsf{Z}^{\prime}}_{\text{A}}^{(1)}{\lvert\Psi\rangle}$
$\displaystyle=\frac{\text{A}^{(1)}_{2}+\text{A}^{(1)}_{3}}{\sqrt{2}}{\lvert\Psi\rangle}$
(84) $\displaystyle{\mathsf{X}^{\prime}}_{\text{A}}^{(1)}{\lvert\Psi\rangle}$
$\displaystyle=\frac{\text{A}^{(1)}_{4}+\text{A}^{(1)}_{5}}{\sqrt{2}}{\lvert\Psi\rangle}$
(85) $\displaystyle{\mathsf{Y}^{\prime}}_{\text{A}}^{(1)}{\lvert\Psi\rangle}$
$\displaystyle=\frac{\text{A}^{(1)}_{4}-\text{A}^{(1)}_{5}}{\sqrt{2}}{\lvert\Psi\rangle}.$
(86)

Similarly, as eqs. (71)-(80) hold for all $\mathbf{y}_{0}$,
$\mathbf{y}^{\prime}$ and $\mathbf{y}^{\prime\prime}$, we can conclude:

$\displaystyle\mathsf{Z}_{\text{B}}^{(1)}{\lvert\Psi\rangle}$
$\displaystyle=\text{B}_{0,\mathbf{y}}^{(1)}{\lvert\Psi\rangle},\qquad\forall\mathbf{y}|y_{1}=0,$
(87) $\displaystyle\mathsf{X}_{\text{B}}^{(1)}{\lvert\Psi\rangle}$
$\displaystyle=\text{B}_{1,\mathbf{y}^{\prime}}^{(1)}{\lvert\Psi\rangle},\qquad\forall\mathbf{y}^{\prime}|y^{\prime}_{1}=1,$
(88) $\displaystyle\mathsf{Y}_{\text{B}}^{(1)}{\lvert\Psi\rangle}$
$\displaystyle=\text{B}_{2,\mathbf{y}^{\prime\prime}}^{(1)}{\lvert\Psi\rangle},\qquad\forall\mathbf{y}^{\prime\prime}|y^{\prime\prime}_{1}=2.$
(89)

The operators ${\mathsf{Z}^{\prime}}_{\text{A}}^{(1)}$,
${\mathsf{X}^{\prime}}_{\text{A}}^{(1)}$ and
${\mathsf{Y}^{\prime}}_{\text{A}}^{(1)}$ are not necessarily unitary, but we
can repeat the regularization procedure from the previous proof to show that
there exist unitary operators $\mathsf{Z}_{\text{A}}^{(1)}$,
$\mathsf{X}_{\text{A}}^{(1)}$ and $\mathsf{Y}_{\text{A}}^{(1)}$ such that:

$\displaystyle\mathsf{Z}_{\text{A}}^{(1)}{\lvert\Psi\rangle}={\mathsf{Z}^{\prime}_{\text{A}}}^{(1)}{\lvert\Psi\rangle},\qquad\mathsf{X}_{\text{A}}^{(1)}{\lvert\Psi\rangle}={\mathsf{X}^{\prime}_{\text{A}}}^{(1)}{\lvert\Psi\rangle},\qquad\mathsf{Y}_{\text{A}}^{(1)}{\lvert\Psi\rangle}={\mathsf{Y}^{\prime}_{\text{A}}}^{(1)}{\lvert\Psi\rangle}.$

An equivalent analysis can be done for correlations between all other main
parties an the auxiliary party. Observing maximal violations:

$\displaystyle{\langle\Psi\rvert}\mathscr{B}_{1,\mathbf{y},\mathbf{y}^{\prime}}^{(j)}{\lvert\Psi\rangle}$
$\displaystyle=2\sqrt{2},$ (91)
$\displaystyle{\langle\Psi\rvert}\mathscr{B}_{2,\mathbf{y},\mathbf{y}^{\prime\prime}}^{(j)}{\lvert\Psi\rangle}$
$\displaystyle=2\sqrt{2},$ (92)
$\displaystyle{\langle\Psi\rvert}\mathscr{B}_{3,\mathbf{y}^{\prime},\mathbf{y}^{\prime\prime}}^{(j)}{\lvert\Psi\rangle}$
$\displaystyle=2\sqrt{2},$ (93)

for all $\mathbf{y}$, $\mathbf{y}^{\prime}$, $\mathbf{y}^{\prime\prime}$ and
$j=2,\cdots,N$. In the same way as for $j=1$ we can construct unitary
operators $\mathsf{X}_{\text{A}}^{(j)}$, $\mathsf{Z}_{\text{A}}^{(j)}$,
$\mathsf{Y}_{\text{A}}^{(j)}$, $\mathsf{X}_{\text{B}}^{(j)}$,
$\mathsf{Z}_{\text{B}}^{(j)}$, $\mathsf{Y}_{\text{B}}^{(j)}$ such that:

$\displaystyle\mathsf{X}_{\text{A}}^{(j)}{\lvert\Psi\rangle}=\mathsf{X}_{\text{B}}^{(j)}{\lvert\Psi\rangle},\qquad$
$\displaystyle\mathsf{Z}_{\text{A}}^{(j)}{\lvert\Psi\rangle}=\mathsf{Z}_{\text{B}}^{(j)}{\lvert\Psi\rangle},\qquad\mathsf{Y}_{\text{A}}^{(j)}{\lvert\Psi\rangle}=\mathsf{Y}_{\text{B}}^{(j)}{\lvert\Psi\rangle},$
(94)
$\displaystyle\\{\mathsf{X}_{\text{A}}^{(j)},\mathsf{Z}_{\text{A}}^{(j)}\\}=0,\qquad$
$\displaystyle\\{\mathsf{X}_{\text{A}}^{(j)},\mathsf{Y}_{\text{A}}^{(j)}\\}=0,\qquad\\{\mathsf{Y}_{\text{A}}^{(j)},\mathsf{Z}_{\text{A}}^{(j)}\\}=0,$
(95)
$\displaystyle\\{\mathsf{X}_{\text{B}}^{(j)},\mathsf{Z}_{\text{B}}^{(j)}\\}\rho_{B}^{(j)}=0,\qquad$
$\displaystyle\\{\mathsf{X}_{\text{B}}^{(j)},\mathsf{Y}_{\text{B}}^{(j)}\\}\rho_{B}^{(j)}=0,\qquad\\{\mathsf{Y}_{\text{B}}^{(j)},\mathsf{Z}_{\text{B}}^{(j)}\\}\rho_{B}^{(j)}=0,$
(96) $\displaystyle P_{\text{B}}^{(j)}{\lvert\Psi\rangle}=$
$\displaystyle\left(P_{\text{B}}^{(j)}{\lvert\Psi_{j}\rangle}_{A_{j}B_{j}}\right)\bigotimes_{k\neq
j}{\lvert\Psi_{k}\rangle}_{A_{k}B_{k}}\otimes{\lvert\tilde{\Psi}\rangle}_{\tilde{\mathbb{A}}}\qquad
P\in\\{\mathsf{Z},\mathsf{X},\mathsf{Y}\\}$ (97)

eqs. (97) imply:

$[P_{\text{B}}^{(j)},Q_{\text{B}}^{(k)}]{\lvert\Psi\rangle}=0,$ (98)

for all $j\neq k$ and $P,Q\in\\{\mathsf{X},\mathsf{Z},\mathsf{Y}\\}$. The
operators of different main parties commute since they act non-trivially on
different Hilbert spaces. Equipped with all these equations we can directly
use the extended SWAP isometry $V_{\text{A}}\otimes
V_{\text{B}}=\left(\bigotimes_{j=1}^{N}V^{(j)}_{\text{A}}\right)\otimes\left(\prod_{j=1}^{N}V^{(j)}_{\text{B}}\right)$;
see Fig. 5 for $V^{(j)}=V^{(j)}_{\text{A}}\otimes V_{\text{B}}^{(j)}$. Due to
(98) and the fact that different isometries $V^{(j)}$ all mutually commute we
can get the decomposition:

$V_{\text{A}}\otimes
V_{\text{B}}\left({\lvert\Psi\rangle}\otimes\bigotimes_{j=1}^{N}{\lvert
0000\rangle}_{A^{\prime}_{j}B^{\prime}_{j}A^{\prime\prime}_{j}B^{\prime\prime}_{j}}\right)=\bigotimes_{j=1}^{N}V^{(j)}\left({\lvert\Psi_{j}\rangle}_{A_{j}B_{j}}\otimes{\lvert
0000\rangle}_{A^{\prime}_{j}B^{\prime}_{j}A^{\prime\prime}_{j}B^{\prime\prime}_{j}}\right)$
(99)

A single isometry $V^{(j)}$ acts in the following way:

$\displaystyle V^{(j)}\left({\lvert\Psi_{j}\rangle}_{A_{j}B_{j}}\otimes{\lvert
0000\rangle}_{A_{j}^{\prime}A_{j}^{\prime\prime}{B}_{j}^{\prime}{B}_{j}^{\prime\prime}}\right)$
$\displaystyle={\lvert\xi_{j}\rangle}_{A_{j}B_{j}A_{j}^{\prime\prime}{B}_{j}^{\prime\prime}}\otimes{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}},$
(100) $\displaystyle
V^{(j)}\left(\mathsf{Z}_{\text{C}}^{(j)}{\lvert\Psi_{j}\rangle}_{A_{j}B_{j}}\otimes{\lvert
0000\rangle}_{A_{j}^{\prime}A_{j}^{\prime\prime}B_{j}^{\prime}B_{j}^{\prime\prime}}\right)$
$\displaystyle={\lvert\xi_{j}\rangle}_{A_{j}B_{j}A_{j}^{\prime\prime}B_{j}^{\prime\prime}}\otimes{\sigma_{z}}^{C^{\prime}_{j}}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}},$
(101) $\displaystyle
V^{(j)}\left(\mathsf{X}_{\text{C}}^{(j)}{\lvert\Psi\rangle}_{A_{j}B_{j}}\otimes{\lvert
0000\rangle}_{A_{j}^{\prime}A_{j}^{\prime\prime}B_{j}^{\prime}B_{j}^{\prime\prime}}\right)$
$\displaystyle={\lvert\xi_{j}\rangle}_{A_{j}B_{j}A_{j}^{\prime\prime}B_{j}^{\prime\prime}}\otimes{\sigma_{x}}^{C^{\prime}_{j}}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}},$
(102) $\displaystyle
V^{(j)}\left(\mathsf{Y}_{\text{C}}^{(j)}{\lvert\Psi_{j}\rangle}_{A_{j}B_{j}}\otimes{\lvert
0000\rangle}_{A_{j}^{\prime}A_{j}^{\prime\prime}B_{j}^{\prime}B_{j}^{\prime\prime}}\right)$
$\displaystyle={\sigma_{z}}^{C_{j}^{\prime\prime}}{\lvert\xi_{j}\rangle}_{{A}_{j}B_{j}A_{j}^{\prime\prime}B_{j}^{\prime\prime}}\otimes{\sigma_{y}}^{C_{j}^{\prime}}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}},$
(103)

where $\text{C}\in\\{\text{A},\text{B}\\}$ and ${\lvert\xi_{j}\rangle}$ takes
the form

$\displaystyle{\lvert\xi_{j}\rangle}={\lvert\xi^{j}_{0}\rangle}_{{A}_{j}B_{j}}\otimes{\lvert
00\rangle}_{A_{j}^{\prime\prime}B_{j}^{\prime\prime}}+{\lvert\xi^{j}_{1}\rangle}_{{A}_{j}B_{j}}\otimes{\lvert
11\rangle}_{A_{j}^{\prime\prime}B_{j}^{\prime\prime}}.$ (104)

and

$\displaystyle{\lvert\xi^{j}_{0}\rangle}_{A_{j}B_{j}}$
$\displaystyle=\frac{1}{2\sqrt{2}}(\mathds{1}+i\mathsf{Y}_{\text{A}}^{(j)}\mathsf{X}_{\text{A}}^{(j)})(\mathds{1}+\mathsf{Z}_{\text{A}}^{(j)}){\lvert\Psi_{j}\rangle}_{A_{j}B_{j}},$
(105) $\displaystyle{\lvert\xi^{j}_{1}\rangle}_{A_{j}B_{j}}$
$\displaystyle=\frac{1}{2\sqrt{2}}(\mathds{1}-i\mathsf{Y}_{\text{A}}^{(j)}\mathsf{X}_{\text{A}}^{(j)})(\mathds{1}+\mathsf{Z}_{\text{A}}^{(j)}){\lvert\Psi_{j}\rangle}_{A_{j}B_{j}}.$
(106)

eqs. (100)-(103) can be used to obtain:

$\displaystyle
V^{(j)}\left(\frac{\mathds{1}\pm\mathsf{Z}_{\text{C}}^{(j)}}{2}{\lvert\Psi_{j}\rangle}_{A_{j}B_{j}}\otimes{\lvert
0000\rangle}_{A_{j}^{\prime}A_{j}^{\prime\prime}{B}_{j}^{\prime}{B}_{j}^{\prime\prime}}\right)$
$\displaystyle={\lvert\xi_{j}\rangle}_{{A}_{j}B_{j}A_{j}^{\prime\prime}{B}_{j}^{\prime\prime}}\otimes\frac{\mathds{1}\pm\sigma_{z}^{C^{\prime}_{j}}}{2}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}{B}_{j}^{\prime}},$
(107) $\displaystyle
V^{(j)}\left(\frac{\mathds{1}\pm\mathsf{X}_{\text{C}}^{(j)}}{2}{\lvert\Psi_{j}\rangle}_{A_{j}B_{j}}\otimes{\lvert
0000\rangle}_{A_{j}^{\prime}A_{j}^{\prime\prime}{B}_{j}^{\prime}{B}_{j}^{\prime\prime}}\right)$
$\displaystyle={\lvert\xi_{j}\rangle}_{{A}_{j}B_{j}A_{j}^{\prime\prime}{B}_{j}^{\prime\prime}}\otimes\frac{\mathds{1}\pm\sigma_{x}^{C^{\prime}_{j}}}{2}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}{B}_{j}^{\prime}},$
(108) $\displaystyle
V^{(j)}\left(\frac{\mathds{1}\pm\mathsf{Y}_{\text{C}}^{(j)}}{2}{\lvert\Psi_{j}\rangle}_{A_{j}B_{j}}\otimes{\lvert
0000\rangle}_{A_{j}^{\prime}A_{j}^{\prime\prime}{B}_{j}^{\prime}{B}_{j}^{\prime\prime}}\right)$
$\displaystyle=\frac{\mathds{1}+{\sigma_{z}}^{C_{j}^{\prime\prime}}}{2}{\lvert\xi_{j}\rangle}_{{A}_{j}B_{j}A_{j}^{\prime\prime}{B}_{j}^{\prime\prime}}\otimes\frac{\mathds{1}\pm{\sigma_{y}}^{C_{j}^{\prime}}}{2}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}{B}_{j}^{\prime}}+$
(109)
$\displaystyle\qquad\qquad+\frac{\mathds{1}-{\sigma_{z}}^{C_{j}^{\prime\prime}}}{2}{\lvert\xi_{j}\rangle}_{{A}_{j}B_{j}A_{j}^{\prime\prime}{B}_{j}^{\prime\prime}}\otimes\frac{\mathds{1}\mp{\sigma_{y}}^{C_{j}^{\prime}}}{2}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}{B}_{j}^{\prime}},$
(110)

where again $\text{C}\in\\{\text{A},\text{B}\\}$. These eqs. correspond to the
self-testing of measurements. As we see, performing measurements $\mathsf{Z}$,
$\mathsf{X}$ and $\mathsf{Y}$ on the physical state is equivalent to measuring
$\sigma_{z}$, $\sigma_{x}$ and $\sigma_{y}$ (up to complex conjugation) on the
extracted reference state. Finally, eqs. (99)-(103) imply:

$\displaystyle V\left({\lvert\Psi\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
0...0\rangle}_{\mathbb{A}^{\prime}\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime}{\mathbb{B}}^{\prime\prime}}\right)$
$\displaystyle={\lvert\mathrm{aux}\rangle}_{\mathbb{A}\mathbb{B}\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime\prime}}\bigotimes_{j=0}^{N-1}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}}$
(111) $\displaystyle
V\left(\bigotimes_{j=1}^{N}\mathsf{W}_{\text{C}}^{(j)}{\lvert\Psi\rangle}_{\mathbb{A}\mathbb{B}}\otimes{\lvert
0...0\rangle}_{\mathbb{A}^{\prime}\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime}{\mathbb{B}}^{\prime\prime}}\right)$
$\displaystyle={\sigma_{z}^{q(w)}}^{C_{j}^{\prime\prime}}{\lvert\mathrm{aux}\rangle}_{\mathbb{A}\mathbb{B}\mathbb{A}^{\prime\prime}{\mathbb{B}}^{\prime\prime}}\bigotimes_{j=1}^{N}{\sigma_{w}}^{C_{j}^{\prime}}{\lvert\phi^{+}\rangle}_{A_{j}^{\prime}B_{j}^{\prime}},$
(112)

where $\mathsf{W}\in\\{\mathsf{X},\mathsf{Y},\mathsf{Z}\\}$,
$\text{C}\in\\{\text{A},\text{B}\\}$ and $q(x)=q(z)=0$ while $q(y)=1$,
$\mathbb{A}^{\prime}=A^{\prime}_{1},\cdots,A_{N}^{\prime}$,$\mathbb{}^{\prime\prime}=A^{\prime\prime}_{1},\cdots,A_{N}^{\prime\prime}$,
$\mathbb{B}^{\prime}=B^{\prime}_{1},\cdots,B_{N}^{\prime}$,$\mathbb{B}^{\prime\prime}=B^{\prime\prime}_{1},\cdots,B_{N}^{\prime\prime}$,
. The junk state ${\lvert\mathrm{aux}\rangle}$ has the following form:

${\lvert\mathrm{aux}\rangle}=\sum_{\iota}{\lvert\xi_{\iota}\rangle}_{\mathbb{A}\mathbb{B}}{\lvert\iota\rangle}_{\mathbb{A}^{\prime\prime}}{\lvert\iota\rangle}_{{\mathbb{B}}^{\prime\prime}},$
(113)

where $\iota\in(0,1)^{N}$, and

${\lvert\xi_{\iota}\rangle}_{\mathbb{A}\mathbb{B}}=\bigotimes_{j=1}^{N}{\lvert\xi_{\iota(j)}\rangle}_{A_{j}B_{j}}$
(114)

where $\iota(j)$ is the $j$-th element of $\iota$.

Up to now we have not taken into account the correlations of the measurements
denoted with $\lozenge$ and $\blacklozenge$. The isometry maps the expression
$\otimes_{j=1}^{N}\mathsf{Y}^{(j)}_{\text{A}}{\lvert\Psi\rangle}$ to a
coherent superposition of $2^{N}$ expressions, with different elements of the
superposition being labeled with a particular string $\iota$. Whether the
extracted observable corresponding to $\mathsf{Y}^{(j)}_{\text{A}}$ is
$\sigma_{y}$ or $\sigma_{y}^{*}=-\sigma_{y}$ in an element of the
superposition depends on the corresponding value $\iota(j)$: if $\iota(j)=0$
there is no complex conjugation (_i.e._ $\sigma_{y}$ is extracted), while
$\iota(j)=1$ implies that the complex conjugation is applied (_i.e._
$\sigma_{y}^{*}$ is extracted). The complex conjugations of the extracted
measurements corresponding to different parties are independent from each
other. The correlations of the measurements $\lozenge$ and $\blacklozenge$
will remove this independence, and only two possibilities will remain: either
only the elements of the superposition corresponding to extracted $\sigma_{y}$
will remain, or only those corresponding to extracted $\sigma_{y}^{*}$. For
this we reproduce the proof from BŠCA18b . Remember that in the ideal case the
measurements denoted with $\lozenge$ and $\blacklozenge$ are the Bell state
measurements: when the input is $\lozenge$ the auxiliary party should measure
in the Bell basis the following pairs of qubits $(1,2)$, $(3,4)$,
$\cdots,(N-1,N)$, while the input $\blacklozenge$ "tells" the auxiliary party
to measure in the Bell basis qubit-pairs $(2,3)$, $(4,5)$, $\cdots,(N,1)$.
When the auxiliary party receives the outcome corresponding to the projector
${\lvert\Phi_{{+}}\rangle\\!\langle\Phi_{{+}}\rvert}$ applied on systems $1$
and $2$, the two corresponding main parties should have the perfect
correlation between physical observables corresponding to reference
observables $\sigma_{z}$ or $\sigma_{x}$ and perfectly anticorrelated physical
observables corresponding to reference observable $\sigma_{{y}}$. Notice that
complex conjugation of $\sigma_{{y}}$ is equivalent to swapping the outcomes
since $\sigma_{{y}}^{*}=-\sigma_{{y}}$. But if the main parties do this to
their observables corresponding to $\sigma_{{y}}$ independently from each
other, the correlations compatible with Bell state measurement outcomes will
be lost. Note that the main parties are never asked to measure exactly Pauli
observables but we can still work with correlations of their observables whose
linear combinations give exactly Pauli observables.

For $m=1,\cdots,n$ let us define the following operators

$\displaystyle\mathsf{P}_{m,b^{*}}=\sum_{\mathbf{b}:b_{m}=b^{*}}\mathsf{N}^{(j)}_{\mathbf{b}|\lozenge},\quad\mathsf{Q}_{m,b^{*}}=\sum_{\mathbf{b}:b_{m}=b^{*}}\mathsf{N}^{(j)}_{\mathbf{b}|\blacklozenge},$
(115)

which are the projectors onto the the subspace corresponding to $b_{m}=b^{*}$
for the two measurements.

| $\quad\mathds{1}\quad$ | $\mathsf{Z}_{\text{A}}^{(2m-1)}\mathsf{Z}_{\text{A}}^{(2m)}$ | $\mathsf{X}^{(2m-1)}_{\text{A}}\mathsf{X}^{(2m)}_{\text{A}}$ | $\mathsf{Y}^{(2m-1)}_{\text{A}}\mathsf{Y}^{(2m)}_{\text{A}}$
---|---|---|---|---
$\mathsf{P}_{m,00}$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $-\frac{1}{4}$
$\mathsf{P}_{m,01}$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $-\frac{1}{4}$ | $\frac{1}{4}$
$\mathsf{P}_{m,10}$ | $\frac{1}{4}$ | $-\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$
$\mathsf{P}_{m,11}$ | $\frac{1}{4}$ | $-\frac{1}{4}$ | $-\frac{1}{4}$ | $-\frac{1}{4}$

| $\quad\mathds{1}\quad$ | $\mathsf{Z}^{(2m)}_{\text{A}}\mathsf{Z}^{(2m+1)}_{\text{A}}$ | $\mathsf{X}^{(2m)}_{\text{A}}\mathsf{X}^{(2m+1)}_{\text{A}}$ | $\mathsf{Y}^{(2m)}_{\text{A}}\mathsf{Y}^{(2m+1)}_{\text{A}}$
---|---|---|---|---
$\mathsf{Q}_{m,00}$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $-\frac{1}{4}$
$\mathsf{Q}_{m,01}$ | $\frac{1}{4}$ | $\frac{1}{4}$ | $-\frac{1}{4}$ | $\frac{1}{4}$
$\mathsf{Q}_{m,10}$ | $\frac{1}{4}$ | $-\frac{1}{4}$ | $\frac{1}{4}$ | $\frac{1}{4}$
$\mathsf{Q}_{m,11}$ | $\frac{1}{4}$ | $-\frac{1}{4}$ | $-\frac{1}{4}$ | $-\frac{1}{4}$

Table 1:  Elements of the table give correlation ${\langle\Psi\rvert}C\otimes
R{\lvert\Psi\rangle}$ where $C$ is the operator labelling the column and $R$
the operator labelling the row.

In what follows we explore the constraints on the physical experiment imposed
by the correlations given in Table 1. The norm of the states
$\mathsf{P}_{m,b}{\lvert\Psi\rangle}$ and
$\mathsf{Q}_{m,b}{\lvert\Psi\rangle}$ is equal to $\frac{1}{2}$. Hence, we can
write

$\mathsf{P}_{m,00}{\lvert\Psi\rangle}\sim\frac{1}{4}\left({\lvert\Psi\rangle}+\mathsf{Z}_{\text{A}}^{(2m-1)}\mathsf{Z}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}+\mathsf{X}_{\text{A}}^{(2m-1)}\mathsf{X}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}-\mathsf{Y}_{\text{A}}^{(2m1)}\mathsf{Y}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}\right).$
(116)

Note that the set of states
$\\{{\lvert\Psi\rangle},\mathsf{Z}_{\text{A}}^{(2m-1)}\mathsf{Z}_{\text{A}}^{(2m)}{\lvert\Psi\rangle},\mathsf{X}_{\text{A}}^{(2m-1)}\mathsf{X}_{\text{A}}^{(2m)}{\lvert\Psi\rangle},\mathsf{Y}_{\text{A}}^{(2m-1)}\mathsf{Y}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}\\}$
is orthonormal and it can form a basis for
$\mathscr{H}^{A_{2m-1}}\otimes\mathscr{H}^{A_{2m}}\otimes\mathscr{H}^{B_{2m-1}}\otimes\mathscr{H}^{B_{2m}}$.
Moreover $\mathsf{P}_{m,0}{\lvert\Psi\rangle}$ has the same norm as the
expression from the right hand side of $\sim$ in eq. (116) which implies

$\mathsf{P}_{m,00}{\lvert\Psi\rangle}=\frac{1}{4}\left({\lvert\Psi\rangle}+\mathsf{Z}_{\text{A}}^{(2m-1)}\mathsf{Z}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}+\mathsf{X}_{\text{A}}^{(2m-1)}\mathsf{X}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}-\mathsf{Y}_{\text{A}}^{(2m-1)}\mathsf{Y}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}\right).$
(117)

In the same way we can obtain the following equations:

$\displaystyle\mathsf{P}_{m,01}{\lvert\Psi\rangle}$ $\displaystyle=$
$\displaystyle\frac{1}{4}\left({\lvert\Psi\rangle}+\mathsf{Z}_{\text{A}}^{(2m-1)}\mathsf{Z}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}-\mathsf{X}_{\text{A}}^{(2m-1)}\mathsf{X}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}+\mathsf{Y}_{\text{A}}^{(2m-1)}\mathsf{Y}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}\right),$
(118) $\displaystyle\mathsf{P}_{m,10}{\lvert\Psi\rangle}$ $\displaystyle=$
$\displaystyle\frac{1}{4}\left({\lvert\Psi\rangle}-\mathsf{Z}_{\text{A}}^{(2m-1)}\mathsf{Z}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}+\mathsf{X}_{\text{A}}^{(2m-1)}\mathsf{X}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}+\mathsf{Y}_{\text{A}}^{(2m-1)}\mathsf{Y}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}\right),$
(119) $\displaystyle\mathsf{P}_{m,11}{\lvert\Psi\rangle}$ $\displaystyle=$
$\displaystyle\frac{1}{4}\left({\lvert\Psi\rangle}-\mathsf{Z}_{\text{A}}^{(2m-1)}\mathsf{Z}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}-\mathsf{X}_{\text{A}}^{(2m-1)}\mathsf{X}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}-\mathsf{Y}_{\text{A}}^{(2m-1)}\mathsf{Y}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}\right),$
(120) $\displaystyle\mathsf{Q}_{m,00}{\lvert\Psi\rangle}$ $\displaystyle=$
$\displaystyle\frac{1}{4}\left({\lvert\Psi\rangle}+\mathsf{Z}_{\text{A}}^{(2m-1)}\mathsf{Z}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}+\mathsf{X}_{\text{A}}^{(2m-1)}\mathsf{X}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}-\mathsf{Y}_{\text{A}}^{(2m-1)}\mathsf{Y}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}\right),$
(121) $\displaystyle\mathsf{Q}_{m,01}{\lvert\Psi\rangle}$ $\displaystyle=$
$\displaystyle\frac{1}{4}\left({\lvert\Psi\rangle}+\mathsf{Z}_{\text{A}}^{(2m-1)}\mathsf{Z}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}-\mathsf{X}_{\text{A}}^{(2m-1)}\mathsf{X}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}+\mathsf{Y}_{\text{A}}^{(2m-1)}\mathsf{Y}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}\right),$
(122) $\displaystyle\mathsf{Q}_{m,10}{\lvert\Psi\rangle}$ $\displaystyle=$
$\displaystyle\frac{1}{4}\left({\lvert\Psi\rangle}-\mathsf{Z}_{\text{A}}^{(2m-1)}\mathsf{Z}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}+\mathsf{X}_{\text{A}}^{(2m-1)}\mathsf{X}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}+\mathsf{Y}_{\text{A}}^{(2m-1)}\mathsf{Y}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}\right),$
(123) $\displaystyle\mathsf{Q}_{m,11}{\lvert\Psi\rangle}$ $\displaystyle=$
$\displaystyle\frac{1}{4}\left({\lvert\Psi\rangle}-\mathsf{Z}_{\text{A}}^{(2m-1)}\mathsf{Z}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}-\mathsf{X}_{\text{A}}^{(2m-1)}\mathsf{X}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}-\mathsf{Y}_{\text{A}}^{(2m-1)}\mathsf{Y}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}\right).$
(124)

Equations (117-120) can be used to derive

$\displaystyle\mathsf{Z}_{\text{A}}^{(2m-1)}\mathsf{Z}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}$
$\displaystyle=$
$\displaystyle\left(\mathsf{P}_{m,00}+\mathsf{P}_{m,01}-\mathsf{P}_{m,10}-\mathsf{P}_{m,11}\right){\lvert\Psi\rangle},$
(125a)
$\displaystyle\mathsf{X}_{\text{A}}^{(2m-1)}\mathsf{X}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}$
$\displaystyle=$
$\displaystyle\left(\mathsf{P}_{m,00}-\mathsf{P}_{m,01}+\mathsf{P}_{m,10}-\mathsf{P}_{m,11}\right){\lvert\Psi\rangle},$
(125b)
$\displaystyle\mathsf{Y}_{\text{A}}^{(2m-1)}\mathsf{Y}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}$
$\displaystyle=$
$\displaystyle\left(-\mathsf{P}_{m,00}+\mathsf{P}_{m,01}+\mathsf{P}_{m,10}-\mathsf{P}_{m,11}\right){\lvert\Psi\rangle}.$
(125c)

The set $\\{\mathsf{P}_{m,b}\\}_{m,b}$ is orthogonal and all its elements
commute with all the operators from
$\\{\mathsf{Z}_{\text{A}}^{(j)},\mathsf{X}_{\text{A}}^{(j)}\\}_{j}$, so the
last set of equations implies

$\displaystyle\mathsf{X}_{\text{A}}^{(2m-1)}\mathsf{X}_{\text{A}}^{(2m)}\mathsf{Z}_{\text{A}}^{(2m-1)}\mathsf{Z}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}$
$\displaystyle=$
$\displaystyle\mathsf{X}_{\text{A}}^{(2m-1)}\mathsf{X}_{\text{A}}^{(2m)}\left(\mathsf{P}_{m,00}+\mathsf{P}_{m,01}-\mathsf{P}_{m,10}-\mathsf{P}_{m,11}\right){\lvert\Psi\rangle}$
(126) $\displaystyle=$
$\displaystyle\left(\mathsf{P}_{m,00}+\mathsf{P}_{m,01}-\mathsf{P}_{m,10}-\mathsf{P}_{m,11}\right)\left(\mathsf{P}_{m,00}-\mathsf{P}_{m,01}+\mathsf{P}_{m,10}-\mathsf{P}_{m,11}\right){\lvert\Psi\rangle}$
$\displaystyle=$
$\displaystyle\left(\mathsf{P}_{m,00}-\mathsf{P}_{m,01}-\mathsf{P}_{m,10}+\mathsf{P}_{m,11}\right){\lvert\Psi\rangle}$
$\displaystyle=$
$\displaystyle-\mathsf{Y}_{\text{A}}^{(2m-1)}\mathsf{Y}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}.$

Similarly, from equations (121-124) we get

$\mathsf{X}_{\text{A}}^{(2m-1)}\mathsf{X}_{\text{A}}^{(2m)}\mathsf{Z}_{\text{A}}^{(2m-1)}\mathsf{Z}_{\text{A}}^{(2m)}{\lvert\Psi\rangle}=-\mathsf{Y}_{\text{A}}^{(2m-1)}\mathsf{Y}_{\text{A}}^{(2m)}{\Psi}.$
(127)

Let us check how eq. (126) for $m=1$ affects vector
${\lvert\xi_{\iota}\rangle}=\otimes_{j=1}^{n}(\mathds{1}+(-1)^{\iota(j)}i\mathsf{Y}_{\text{A}}^{(j)}\mathsf{X}_{\text{A}}^{(j)})(\mathds{1}+\mathsf{Z}_{\text{A}}^{(j)}){\lvert\Psi\rangle}$:

${\lvert\xi_{\iota}\rangle}=L_{\textrm{rest}}\otimes\left(\mathds{1}+(-1)^{\iota(1)}i\mathsf{Y}_{\text{A}}^{(1)}\mathsf{X}_{\text{A}}^{(1)}\right)\left(\mathds{1}+\mathsf{Z}_{\text{A}}^{(1)}\right)\otimes\left(\mathds{1}+(-1)^{\iota(2)}i\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}\right)\left(\mathds{1}+\mathsf{Z}_{\text{A}}^{(2)}\right){\lvert\Psi\rangle}$

where
$L_{\textrm{rest}}=\otimes_{j=3}^{N}(\mathds{1}+(-1)^{\iota(j)}i\mathsf{Y}_{\text{A}}^{(j)}\mathsf{X}_{\text{A}}^{(j)})(\mathds{1}+\mathsf{Z}_{\text{A}}^{(j)})$.
Without loss of generality assume $\iota(1)\neq\iota(2)$. In the following
expression for the sake of brevity we omit $L_{\textrm{rest}}$. Then
${\lvert\xi_{\iota}\rangle}$ reads

$\displaystyle{\lvert\Psi\rangle}\pm
i\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}{\Psi}$
$\displaystyle+$
$\displaystyle\mathsf{Z}_{\text{A}}^{(2)}{\lvert\Psi\rangle}\pm
i\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}\mathsf{Z}_{\text{A}}^{(2)}{\lvert\Psi\rangle}\mp
i\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}{\lvert\Psi\rangle}+\mathsf{Y}_{\text{A}}^{(1)}\mathsf{X}_{\text{A}}^{(1)}\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}{\lvert\Psi\rangle}\mp
i\mathsf{Y}_{\text{A}}^{(1)}\mathsf{X}_{\text{A}}^{(1)}\mathsf{Z}_{\text{A}}^{(2)}{\lvert\Psi\rangle}+$
$\displaystyle+\mathsf{Y}_{\text{A}}^{(1)}\mathsf{X}_{\text{A}}^{(1)}\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}\mathsf{Z}_{\text{A}}^{(2)}{\lvert\Psi\rangle}$
$\displaystyle+$
$\displaystyle\mathsf{Z}_{\text{A}}^{(1)}{\lvert\Psi\rangle}\pm
i\mathsf{Z}_{\text{A}}^{(1)}\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}{\lvert\Psi\rangle}+\mathsf{Z}_{\text{A}}^{(1)}\mathsf{Z}_{\text{A}}^{(2)}{\lvert\Psi\rangle}\pm
i\mathsf{Z}_{\text{A}}^{(1)}\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}\mathsf{Z}_{\text{A}}^{(2)}{\lvert\Psi\rangle}\mp
i\mathsf{Y}_{\text{A}}^{(1)}\mathsf{X}_{\text{A}}^{(1)}\mathsf{Z}_{\text{A}}^{(1)}{\lvert\Psi\rangle}+$
$\displaystyle+\mathsf{Y}_{v}^{(1)}\mathsf{X}_{\text{A}}^{(1)}\mathsf{Z}_{\text{A}}^{(1)}\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}{\lvert\Psi\rangle}$
$\displaystyle+$ $\displaystyle\mp
i\mathsf{Y}_{\text{A}}^{(1)}\mathsf{X}_{\text{A}}^{(1)}\mathsf{Z}_{\text{A}}^{(1)}\mathsf{Z}_{\text{A}}^{(2)}{\lvert\Psi\rangle}+\mathsf{Y}_{\text{A}}^{(1)}\mathsf{X}_{\text{A}}^{(1)}\mathsf{Z}_{\text{A}}^{(1)}\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}\mathsf{Z}_{\text{A}}^{(2)}{\lvert\Psi\rangle}.$

Let us rearrange eq. (126) for the case $m=1$. It can be as a sum of eight
terms each being equal to $0$ as shown below.

$\displaystyle\begin{split}{\lvert\Psi\rangle}+\mathsf{Y}_{\text{A}}^{(1)}\mathsf{X}_{\text{A}}^{(1)}\mathsf{Z}_{\text{A}}^{(1)}\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}\mathsf{Z}_{\text{A}}^{(2)}{\lvert\Psi\rangle}=0,&\qquad\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}{\lvert\Psi\rangle}+\mathsf{Y}_{\text{A}}^{(1)}\mathsf{X}_{\text{A}}^{(1)}\mathsf{Z}_{\text{A}}^{(1)}\mathsf{Z}_{\text{A}}^{(2)}{\lvert\Psi\rangle}=0,\\\
\mathsf{Z}_{\text{A}}^{(2)}{\lvert\Psi\rangle}+\mathsf{Y}_{\text{A}}^{(1)}\mathsf{X}_{\text{A}}^{(1)}\mathsf{Z}_{\text{A}}^{(1)}\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}{\lvert\Psi\rangle}=0,&\qquad\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}\mathsf{Z}_{\text{A}}^{(2)}{\lvert\Psi\rangle}+\mathsf{Y}_{\text{A}}^{(1)}\mathsf{X}_{\text{A}}^{(1)}\mathsf{Z}_{\text{A}}^{(1)}{\lvert\Psi\rangle}=0,\\\
\mathsf{Y}_{\text{A}}^{(1)}\mathsf{X}_{\text{A}}^{(1)}{\lvert\Psi\rangle}+\mathsf{Z}_{\text{A}}^{(1)}\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}\mathsf{Z}_{\text{A}}^{(2)}{\lvert\Psi\rangle}=0,&\qquad\mathsf{Y}_{\text{A}}^{(1)}\mathsf{X}_{\text{A}}^{(1)}\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}{\lvert\Psi\rangle}+\mathsf{Z}_{\text{A}}^{(1)}\mathsf{Z}_{\text{A}}^{(2)}{\lvert\Psi\rangle}=0,\\\
\mathsf{Y}_{\text{A}}^{(1)}\mathsf{X}_{\text{A}}^{(1)}\mathsf{Z}_{\text{A}}^{(2)}{\lvert\Psi\rangle}+\mathsf{Z}_{\text{A}}^{(1)}\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}{\lvert\Psi\rangle}=0,&\qquad\mathsf{Y}_{\text{A}}^{(1)}\mathsf{X}_{\text{A}}^{(1)}\mathsf{Y}_{\text{A}}^{(2)}\mathsf{X}_{\text{A}}^{(2)}\mathsf{Z}_{\text{A}}^{(2)}{\lvert\Psi\rangle}+\mathsf{Z}_{\text{A}}^{(1)}{\lvert\Psi\rangle}=0.\end{split}$
(128)

To obtain these equations we used eq. (126), commutation relations between the
operators of different main parties, expressions (95), and the fact that
operators $R_{\text{A}}^{(k)}$ for $R\in\\{X,Y,Z\\}$ are unitary and
Hermitian.

Assuming $\iota(1)\neq\iota(2)$ implies ${\lvert\xi_{\iota}\rangle}=0$.
Analogously, eq. (126) can be used to prove that ${\lvert\iota\rangle}=0$ if
there exists $m$ such that $\iota(2m-1)\neq\iota(2m)$. Similarly, starting
from eq. (127) one can show that ${\lvert\xi_{\iota}\rangle}=0$ if there
exists a value of $m$ such that $\iota(2m)\neq\iota(2m+1)$. The only two