Graph-Theoretic Framework for Self-Testing in Bell Scenarios

Quantum self-testing is the task of certifying quantum states and measurements using the output statistics solely, with minimal assumptions about the underlying quantum system. It is based on the observation that some extremal points in the set of quantum correlations can only be achieved, up to isometries, with specific states and measurements. Here, we present a new approach for quantum self-testing in Bell non-locality scenarios, motivated by the following observation: the quantum maximum of a given Bell inequality is, in general, difficult to characterize. However, it is strictly contained in an easy-to-characterize set: the \emph{theta body} of a vertex-weighted induced subgraph $(G,w)$ of the graph in which vertices represent the events and edges join mutually exclusive events. This implies that, for the cases where the quantum maximum and the maximum within the theta body (known as the Lov\'asz theta number) of $(G,w)$ coincide, self-testing can be demonstrated by just proving self-testability with the theta body of $G$. This graph-theoretic framework allows us to (i) recover the self-testability of several quantum correlations that are known to permit self-testing (like those violating the Clauser-Horne-Shimony-Holt (CHSH) and three-party Mermin Bell inequalities for projective measurements of arbitrary rank, and chained Bell inequalities for rank-one projective measurements), (ii) prove the self-testability of quantum correlations that were not known using existing self-testing techniques (e.g., those violating the Abner Shimony Bell inequality for rank-one projective measurements). Additionally, the analysis of the chained Bell inequalities gives us a closed-form expression of the Lov\'asz theta number for a family of well-studied graphs known as the M\"obius ladders, which might be of independent interest in the community of discrete mathematics.


I. INTRODUCTION
In many information processing tasks, quantum systems render a distinct advantage over classical systems. Motivated by this observation, there has been a rapid development of quantum technologies with potentially new real-world communication and computation applications. We have also recently witnessed "quantum supremacy" [AAB + 19, ZWD + 20] and early hints of the quantum internet [WEH18]. With the increasing importance of quantum technologies, it becomes pertinent to develop tools for certifying, verifying, and benchmarking quantum devices with minimal assumptions regarding their inner working mechanisms [EHW + 19]. This is a challenging task due to the enormous dimensionality of the Hilbert space associated with the quantum systems.
One of the prominent approaches to device certification is self-testing [MY04]. The idea of self-testing is to certify underlying measurement settings and quantum states using solely measurement statistics. The notion was initially put forward for Bell non-local correlations. The concept has since been extended to prepareand-measure scenarios [TSV + 20, FK19], contextuality [BRV + 19b,BRV + 19a], and steering [ŠASA16, GKW15,SBK20]. Self-testing has also been applied to quantum gates and circuits [VDMMS07,MMMO06]. A great amount of work has also been done in making self-testing protocols robust against experimental noise [MYS12, YN13, WCY + 14, MS13]. While the Ref. [MY04] considered the noiseless case for the CHSH self-testing, the authors in [MYS12] extended it to the noisy case. In [HH18], the authors proposed the mixture of CHSH test and stabilizer test, which has better noise tolerance than the CHSH test. The authors in [McK11] proposed a robust self testing method for graph states. In the aforementioned self-testing protocol by [McK11], the number of required copies increases with order O(n 22 ), where n is the number of qubits of one graph state. To improve the scaling, the authors in [HH18] proposed another self testing method for the same setting with O(n 4 log n) copies. Further, the paper [HK19] proposed a robust self testing protocol for GHZ states. Selftesting with Bell states of higher dimensions has been studied in [KŠT + 19, SSKA19]. In [Kan16], tripartite Mermin inequalty was used for robust self-testing of the three party GHZ state. Robust self-testing protocols based on Chained Bell inequalities have been investigated in Ref. [ŠASA16]. Comprehensive studies have been carried on for self-testing of single quantum device based on contextuality [BRV + 19b,BRV + 19a] and via computational assumptions [MV20]. The idea of self-testing has been used for device-independent randomness generation [CY14,Col09,DPA13,ŠASA16], entanglement detection [BŠCA18a,BŠCA18b], delegated quantum computing [RUV13,McK13], and in several computational complexity proofs, such as the recent breakthrough result of MIP* = RE [JNV + 20]. For a thorough review of self-testing, refer to [ŠB19].
Recently, graph-theoretic techniques have been widely used to study the set of quantum correlations [CSW14,Slo20]. In [CSW14], the authors provide a graph-theoretic characterization of classical and quantum sets in correlation experiments with well-studied objects in graph theory (and combinatorial optimization). In particular, the authors in [CSW14] study Bell inequalities and non-contextuality inequalities (a generalization of Bell inequalities). The techniques from [CSW14] have been used to provide robust self-testing schemes in the framework of non-contextuality inequalities for single systems [BRV + 19b]. However, a systematic treatment for Bell scenarios is still lacking. Here, we provide a graph-theoretic approach to study Bell self-testing for multi-partite scenarios by combining techniques from combinatorial optimization and results from [CSW14].
Given a Bell scenario, the set of quantum correlations B Q is, in general, difficult to characterize. However, B Q is a strict subset of an easy-to-characterize set, i.e., the theta body [Gro88] of the graph of exclusivity G ex (V, E) of all the events of the scenario. The vertices in G ex (V, E) represent the events produced in the scenario [CSW14]. The edges in G ex (V, E) connect the nodes corresponding to mutually exclusive events. Using the normalization conditions, every Bell non-locality witness can be written as S = w i p i , where w i > 0 and p i are probabilities of events. Therefore, S can be associated to a vertex-weighted graph (G, w) where weights correspond to the w i and G is an induced subgraph of G ex (V, E) [CSW14]. The quantum maximum of S must be in the theta body of G, which is an even easier to characterize set, as G is a subgraph of G ex (V, E). Therefore, for the cases where the quantum maximum of a Bell non-locality witness is equal to the maximum of the theta body of G, one can prove the self-testing of the Bell inequality by analyzing the theta body of G.
We have two sets of assumptions. Our first key assumption is that the quantum maximum for the Bell witness is equal to the Lovász theta number of the vertex-weighted induced subgraph of G ex (V, E) corresponding to the events and their respective weights when the Bell witness is written as a positive linear combination of probabilities of events. The Lovász theta number [Lov79] is a graph invariant defined in (2) (see section II), of the aforementioned induced subgraph. Our second set of assumptions involve some particular relation among the local projective measurements involved in the scenario. We elaborate on the second set of assumptions in subsection II E. Our results for bipartite and tripartite cases have been stated as Theorems 7, 8, 10 and 11 (see subsection II E). Since induced subgraph with weights is still a graph of exclusivity, we will use (G ex , w) throughout the paper in place of (G, w).
We apply our techniques to quantum correlations which are known to allow for self testing: those maximally violating the CHSH [CHSH69], chained [Pea70,BC90], and three-party Mermin [Mer90] Bell inequaliuties. For CHSH and tripartite Mermin Bell inequalities, we recover self-testing statements for projectors of arbitrary rank. For the family of chained Bell inequalities, we recover self-testing statement for rank-one projective measurements. Our method leads to intriguing insights concerning the dimensionality of the shared quantum state and measurement settings. We also furnish a self-testing statement for the previously not known case of the Abner Shimony (AS) inequality [Gis09] for the case of rank-one projective measurements. In addition, we provide the closed-form expression for the Lovász theta number for Möbius ladder graphs [GH67] using the aforementioned connections. The previous closed-form expression was conjectured in [Ara14]. Our result, thus, renders a proof for this conjecture.
The structure of the paper is as follows. We discuss the background literature needed for our work and prove our results in section II. The test cases are presented in section III. There, we discuss the CHSH, chained, Mermin, and AS Bell inequalities. Finally, in section IV, we discuss the implications of our work and provide some open problems for future study.

II. BACKGROUND AND RESULTS
A. The graph of exclusivity framework A measurement M , together with its outcome a, is called a measurement event (or event, for brevity) and denoted (a|M ). Two events, e i and e j are mutually exclusive (or exclusive, for brevity) if there exists a measurement M such that e i and e j correspond to different outcomes of M . To any set of events {e i } N i=1 , we associate a simple undirected graph G ex = ([N ], E), where [N ] refers to the set {1, 2, . . . , N }. This graph, referred to as the graph of exclusivity, has vertex set [N ] and two vertices i, j are adjacent (denoted i ∼ j) if the corresponding events e i and e j are exclusive.
We now consider theories that assign probabilities to events. A behavior for G ex is a mapping p : [N ] → [0, 1], such that p i + p j ≤ 1, for all i ∼ j, where we denote p(i) by p i . Here, the non-negative scalar p i ∈ [0, 1] encodes the probability that event e i occurs. The linear constraint p i + p j ≤ 1 enforces that, if p i = 1, then p j = 0.
A behavior p : [N ] → [0, 1] is deterministic non-contextual if all events have pre-determined binary values (0 or 1) that do not depend on the occurrence of other events. In other words, a deterministic non-contextual behavior p is a mapping p : [N ] → {0, 1},such that p i + p j ≤ 1, for all i ∼ j. A deterministic non-contextual behavior can be considered a vector in R N . The convex hull of all deterministic non-contextual behaviors is called the set of non-contextual behaviors, denoted P N C (G ex ). The set P N C (G ex ) is a polytope with its vertices being the deterministic non-contextual behaviors. Behaviors that do not lie in P N C (G ex ) are called contextual. It is worth mentioning that, in combinatorial optimisation, one often encounters the stable set polytope of a graph G ex , STAB(G ex ) (see Appendix A). It is quite easy to see that stable sets of G ex (a subset of vertices, where no two vertices share an edge between them) and non-contextual behaviors coincide.
Lastly, a behavior p : [N ] → [0, 1] is called quantum behavior if there exists a quantum state |ψ and projectors Π 1 , . . . , Π N acting on a Hilbert space H such that (1) We refer to the ensemble |ψ , {Π} N i=1 as a quantum realization of the behavior p. The set of all quantum behaviors is a convex set, denoted by P Q (G ex ). It turns out that P Q (G ex ) is also a well-studied entity in combinatorial optimisation, namely the theta body, denoted by TH(G ex ) and is formally defined in Appendix A definition 21. Now, suppose that we are interested in the maximum value of the sum S = w 1 p 1 + w 2 p 2 + · · · + w N p N , where w i ≥ 0 are weights for i ∈ [N ] and 1. p ∈ P N C (G ex ) is a non-contextual behavior. In this case, the maximum (henceforth referred to as the classical bound) is given by the independence number of the vertex weighted graph of exclusivity, α(G ex , w), that is, the size of the largest clique in the complement graph. Here, w refers to the N dimensional vector of non-negative weights.
2. p ∈ P Q (G ex ) is a quantum behavior. In this case, the maximum (henceforth referred to as the quantum bound) is given by the Lovász theta number of the vertex weighted graph of exclusivity, ϑ(G ex , w), defined by the following semidefinite program: where, S 1+N + denotes positive semidefinite matrices of size (N + 1) × (N + 1). From the definition of the theta body and Lemma 27 (see Appendix A), one can note that p i = X ii for all i ∈ [N ].
Proofs of the above statements follow quite straightforwardly from the definitions and were first observed in [CSW14]. The Gram-Schmidt decomposition of matrix X corresponding to (2) gives the quantum realization for the underlying behaviour p [BRV + 19b] (see Appendix A for the definition of Gram-Schmidt decomposition). Note that, for a fixed X, its different Gram-Schmidt decompositions are related to one another via isometry.
Definition 1. (Non-contextuality inequality) For a given graph of exclusivity G ex , a non-contextuality inequality corresponds to a halfspace that contains the set of non-contextual behaviors, i.e., and B. The CHSH experiment in the graph of exclusivity framework In the CHSH Bell experiment, an arbitrator generates two maximally entangled quantum systems and transmits them to two spatially separated parties: Alice and Bob. Alice has two measurement settings, x = 0 and x = 1, and Bob has likewise two measurement settings, y = 0 and y = 1. These local measurements are binary observables, each having outcomes, say 0 and 1. Each party (Alice and Bob) measures in every round in either the 0 or the 1 setting. The selections of settings made by each party must be random and independent of those of the other party. Let (a, b|x, y) represent the event where Alice measures in the setting x, Bob measures in the setting y, and they get a ∈ {0, 1} and b ∈ {0, 1}, respectively. Let the probability of the corresponding event be p(a, b|x, y). There are sixteen different events corresponding to all possible combinations of inputs and outputs. They repeat this exercise a considerable enough times, once they are finished, to determine the probabilities of these events.

C. Self-Testing
Bell inequalities are special instances of non-contextuality inequalities. Consider an n-partite Bell scenario, characterized by a number n of distant observers or parties, their respective measurement settings, and their possible outcomes. Suppose party j possesses k j different settings with K j different outcomes for each measurement. In such a scenario, one can compute the probability of a particular string of outcomes given a string of measurements, that is, p[a 1 , a 2 , . . . , a n |x 1 , x 2 , . . . , x n ], where a j ∈ [K j ] and x j ∈ [k j ] for all j ∈ [n]. We use the notation a to refer to the n-tuple string a 1 , a 2 , . . . , a n . Similarly, we use x for the measurement settings. A n-partite Bell inequality is of the following form: for some coefficients s a x and where S L is the largest possible value allowed in local hidden variable(LHV) models [BCP + 14]. The quantum supremum of the Bell expression, i.e., the left hand side of (5), denoted by S Q , is the largest possible value of the above expression when p [ a| x] ranges over the set of quantum behaviors, i.e., for a shared quantum state |ψ ∈ H 1 ⊗ H 2 . . . , ⊗H n and quantum projective measurements {M j aj |xj } acting on H j for all j ∈ n. We refer to the state and the set of measurements that reproduce the quantum behavior, collectively as a quantum realization.
where C, A i (for all i ∈ [m]) are Hermitian n × n matrices and b ∈ C m .
We have introduced the primal formulation of the Lovász theta SDP in (2). The dual formulation for (2) is given by where . We make crucial use of the following Theorem due to Alizadeh et al. [AHO97,Theorem 4] to show that the optimiser of (2) is unique.
Theorem 4. [AHO97] Let Z * be a dual optimal and nondegenerate solution of a semidefinite program. Then, there exists a unique primal optimal solution for that SDP.
The notion of dual nondegeneracy is given by the following definition.
Definition 5. (Dual nondegeneracy) Let Z * be an optimal dual solution and let M be any symmetric matrix. If the homogeneous linear system only admits the trivial solution M = 0, then Z * is said to be dual nondegenerate.
A key ingredient for proving the results in this paper is the following lemma: Lemma 6. ( [BRV + 19b]) Let X * be the unique optimal solution for the primal and let {|u i u i |} n i=0 be a quantum realization achieving the maximum quantum value of n i=1 w i p i : p ∈ P q (G ex ). Then, the non-contextuality inequality

E. Results
We are given a Bell inequality of the form 5 and we consider the set of events p [ a| x] such that s a x = 0. We shall index this set by i and denote the corresponding event as e i . Suppose we are given a n-partite Bell inequality with Bell witness B = i w i p i , with w i > 0 and p i = p(e i ), and a quantum realization (ψ, {M j aj |xj } j ) (let us call this the reference system) that achieves the quantum supremum, S Q of B. Let (G ex , w) be the weighted graph capturing the weights {w i } and mutual exclusivity relationships among the events {e i } in B.
We have two sets of assumptions in this manuscript. The first set of assumptions is following: (ii) The Lovász theta SDP in (2) corresponding to (G ex , w) has a unique maximizer. This assumption is a consequence of assumption i for the scenarios of interest in this paper.
We consider two types of sets of indexes I and I 0 = I ∪ {0}. We consider the matrix X ij := ψ|Π j Π i |ψ , where Π i is a projection and Π 0 is the identity operator. We set n := |I|. The assumption ii means that the following SDP has unique solution.
The second set of assumptions depend on the scenarios of interest and have been mentioned in the following subsubsections. Our results for bipartite and tripartite cases have been summarized as Theorems 7, 8, 10 and 11.

Bipartite case
Suppose the unique optimal maximizer X * = (X ij ) is given by where ). Then, we define the projection In the following, we discuss how the state |ψ is locally converted to |ψ when the vectors Π i |ψ realize the optimal solution in the SDP (13). We define |v i := η −1 i Π i |ψ . First, we consider the case that the ranks of the projections Π A i A and Π B i B are one. We introduce the following conditions.
B4 We define the graph on I B in the following way. The node i B ∈ I B is connected to i B ∈ I B when the following two conditions holds.
In the two qubit case, if the set {v i } i∈I of vectors contains the following 4 vectors, then the conditions A1 and A2 hold; where a 0 = a 1 , a 2 , b 0 , b 1 = 0.
Theorem 7. Assume that the optimal maximizer given in (14) satisfies conditions A1 and A2 and the vectors (Π i |ψ ) i∈I realize the optimal solution in the SDP (13). In addition, the ranks of the projections are assumed to be one. Then, there exist isometries for i ∈ I.
Proof. The proof has been deferred to Appendix D.
Now we consider the general case. In addition to A1 and A2, we assume the following condition.
A3 Ideal systems H A and H B are two-dimensional.
A4 Each system has only two measurements. That is, the setĪ A (Ī B ) of all indexes of the space When A3 and A4 hold, We also consider the following condition for Assume that the optimal maximizer given in (14) satisfies conditions A1, A2, A3, and A4, the vectors (Π i |ψ ) i∈I realize the optimal solution in the SDP (13), and condition C1 holds. Then, there exist Proof. The proof has been deferred to Appendix D.

Tripartite case
We assume that the unique optimal maximizer X * = (X ij ) is given by where Also, for simplicity, a i A , b i B , and c i C are assumed to be normalized and η i > 0. Now, we consider a state |ψ on In the following, we discuss how the state |ψ is locally converted to |ψ when the vectors Π i |ψ realize the optimal solution in the SDP (13). We define |v i := η −1 i Π i |ψ . We consider the case that the ranks of the projections Π A i A , Π B i B and Π C i C are one. We introduce the following conditions. Definition 9. Three distinct elements i, j, k ∈ I are called linked when the following two conditions holds.
In addition, two distinct elements x A , x A for index of a vectors of C d A are called connected when there exist three linked elements i, j, k ∈ I such that the first components of i, j, k ∈ I are x A , x A .
For i B , i C , we use notation Then, we introduce the following conditions for the optimal maximizer given in (20).

A5 The vectors {v
A6 There exist a subset I A of indecies of the space H A with |I A | = d A and d A sets I BC,i A for i A ∈ I A of indecies of the space H B ⊗ H C to satisfy the following conditions. The set We consider the graph G A with the set I A of vertecies such that the edges are given as the the pair of all connected elements in I A in the sense of the end of Definition 9. The graph G A is not divided into two disconnected parts.
That is, there exist a subset I B of the second indecies and subsets I C,i B of the third indecies such that they satisfy conditions B1, B2, B3, and B4. We denote the graph defined in this condition by G B Theorem 10. Assume that the optimal maximizer given in (20) satisfies conditions A5, A6, and A7, and the vectors (Π i |ψ ) i∈I realize the optimal solution in the SDP (13). In addition, the ranks of the projections Π A i A , Π B i B , and Π C i C are assumed to be one.
for i ∈ I.
Proof. The proof has been deferred to Appendix D.
Now we consider the general case. We define |v i : We introduce other conditions for the optimal maximizer given in (20) as a generalization of A3 and A4.
A8 Ideal systems H A , H B , and H C are two-dimensional.
A9 Each system has only two measurements. That is, the setsĪ A ,Ī B , andĪ C is composed of 4 elements. For When A3 and A4 hold, We also consider the following condition for Let Theorem 11. Assume that the optimal maximizer given in (20) satisfies conditions A5, A6, A5, A7, A8, and A9, and the vectors (Π i |ψ ) i∈I realize the optimal solution in the SDP (13). Then, there exist isometries Proof. The proof has been deferred to Appendix D.

III. TEST CASES
In the following subsections we apply our techniques to the CHSH, chained, Mermin, and AS Bell inequalities.
A. CHSH Self-Testing Self-testing is known to hold for the maximum quantum violation of the CHSH inequality [MY04]. Here, we study the CHSH inequality in the graph of exclusivity framework [CSW14].
Recall that the graph of exclusivity corresponding to the Bell witness given by Eq. (4) is given by the C i8 (1, 4) graph (see figure 14). We claim that the optimal solution to dual (10) for C i8 (1, 4) is given by where k = 3 − 2 √ 2 and h = 2 − √ 2. Lovász theta SDP has zero duality gap, that is, the primal optimal solution and optimal dual solution yield the same program value. It can be easily verified that (26) is a feasible solution to (10) for the graph C i8 (1, 4). The dual solution (26) achieves 2 + √ 2 and is thus dual optimal. In order to show the uniqueness of the primal optimal, we show that Z CHSH is nondegenerate. That requires us to show that M = 0 is the only symmetric 9 × 9 matrix satisfying equations (11) and (12) corresponding to the Lovász theta SDP. That is, the linear system has a unique solution M = 0. Barring the M Z * = 0 constraint, the rest of the constraints already guarantee that several entries of M must be zeros. Thus the M matrix has the following form: It can be easily checked that the only solution to the system of linear equations M · Z CHSH = 0 is M = 0.
The optimal solution for primal (2) is given by where χ = 2+ The configurations corresponding to the primal optimal matrix P CHSH correspond to different Gram decomposition of P CHSH and are related to each other via global isometry. A quantum realization is achieved with the two-qubit maximally entangled state |ψ = ( 1 √ 2 , 0, 0, 1 √ 2 ) T and the vectors corresponding to the 8 projective measurements given by where the kets corresponding to the local measurements are given by Here, Z and X are denoted 0 and 1, respectively, while −1 and 1 are denoted 0 and 1, respectively. We will refer to this graph as GM . It is the complement of Shrikhande graph [Shr59] .
with a = 1 √ 2 , c = cos π 8 , and d = sin π 8 . For the CHSH case, the vector v i corresponds to |v i . The dimension of the canonical realization is 4 with d 1 = d 2 = 2. CHSH inequality satisfies Conditions A1 and A2, which can be checked by choosing the vectors in (15) as follows: Moreover, the local measurements for the CHSH case satisfy condition A3, A4 and C1 as well. Thus, the CHSH case satisfies all the conditions for Theorem 8, which implies there exist isometries for i ∈ I, where |junk is a state on K A ⊗ K B . Therefore, any two tensored realizations attaining the maximum quantum violation of the CHSH inequality are related via local isometries.

B. Mermin Self-Testing
Here, we examine the case of Mermin's Bell inequality for three parties [Mer90]. As detailed in Appendix B, the Bell witness of this inequality includes 16 events. Their graph of exclusivity, denoted G M , is shown in Fig. III B.
The primal optimal for the SDP corresponding to the quantum violation of the Mermin inequality for three parties is given by where a = 0.25, b = 0.125, e 16 is the all one column vector of size 16, and E G M is the adjacency matrix of the complement of G M , and I 16 is the identity matrix of size 16. The proof of the uniqueness of the primal optimal P Mermin is trivially similar to the CHSH case. The quantum state and measurement settings can be obtained via Gram decomposition of P Mermin . A quantum realization is achieved with the three-qubit GHZ state |u 0 = 1 √ 2 (|000 + |111 ) and the projective measurements . This quantum realization achieves the quantum bound of the Bell witness (given by Eq. (B6) in Appendix B), i.e., 4, which is equal to the Lovász theta number of G M (Fig. III B). The local bound is 3 and is equal to the independence number of G M . We can check that local measurement settings for the tripartite Mermin case satisfy Conditions A5, A6, and A7 as follows. In this example, a O , b O , c O means |O . This notation is applied to Z, P, M .
We choose the subset I A := {O, P }. Then, we have The subsets I B , I C,Z , and I C,P satisfy conditions B1, B2, B3, and B4. The Mermin case satisfies Conditions A8 and A9 in addition to Conditions A5, A6, and A7. Thus, given the vectors (Π i |ψ ) i∈I which realize the optimal solution in the SDP (13), there exist isometries for i ∈ I, where |junk is a state on Since P Mermin is a Gram matrix of vectors |u 0 , |u 1 , . . . , |u 16 , rank of P Mermin is equal to the dimension of the span of |u 0 , |u 1 , . . . , |u 16 . As it turns out, the rank of P Mermin is seven. Thus, a seven-dimensional configuration can achieve the maximal violation of the Mermin inequality. We append a seven-dimensional configuration corresponding to P Mermin in Appendix C. In the tripartite Bell scenario, one obtains maximal violation of the Mermin inequality using three qubits and thus dimension eight. This is purely because the seven dimensional state can not be realized as tensor product of three two-dimensional subsystems. Moreover, as one can expect, the dimension of the span of the measurement settings in the tensored case, i.e., dim(span(|u 0 , |u 1 , . . . , |u 16 )) is still seven! The graph G M is the complement of Shrikhande graph [Shr59]. Since Shrikhande Graph is vertex transitive, it implies that G M is also vertex transitive. We observe that there is a unique behaviour in QSTAB (G M ) which achieves α (G M ). Moreover, by vertex transitivity in the theta body, we also observe that there is a unique behavior which achieves ϑ (G M ).

C. Self-Testing Chained Bell Inequalities
The chained Bell inequalities [Pea70,BC90] are defined for the bipartite Bell scenario with N dichotomic measurements per party. In terms of correlations between the observables of Alice and Bob, the chained Bell inequality for N settings is given by Here, "LHV" indicates that the local hidden variable bound is 2N − 2. The observables A i and B j , measured by Alice and Bob, respectively, have outcomes 1 or −1. The correlation terms A i B j denote the expectation value of the product of outcomes for A i and B j . The maximum quantum value of I Bell N is 2N cos π 2N . Suppose Alice measures A x on her particle and obtains a. Similarly, assume Bob measures B y on his particle and obtains b. The probability for the aforementioned event is denoted by P (a, b|x, y) . We can use these probabilities to re-express the correlations as follows: Using Eqs. (44) and (45), we can re-express the inequality in equation (43) as The graph of exclusivity for the events in I CSW N is Ci 4N (1, 2N ) and is isomorphic to the Möbius ladder graph of order 4N . The independence number of Ci 4N (1, 2N ) is 2N − 1. The Lovász theta number, however, remains unknown and has been conjectured [Ara14] to be equal to ϑ (Ci 4N (1, 2N ) Here, we prove that the above conjecture is correct by simple semidefinite programming duality arguments. Moreover, we recover Bell self-testing statements for the chained Bell inequalities for arbitrary N. For the purposes of the proof, we introduce the matrix where e 4N denotes the all-ones column vector of length 4N, k = cos π 2N , f = 1−k 1+k , l = 1 1+k , A C 4N is the adjacency matrix of the cycle graph C 4N , and I 2N is a 2N × 2N identity matrix.
Note that the matrix M N is a circulant matrix with n = 4N , c 0 = 1, c 1 = l, c 2N = f, c n−1 = l, and c i = 0 for i / ∈ {0, 1, 2N, n−1}. Therefore, its eigenvalues are given by λ j = 1+l(ω j +ω (n−1)j )+f ω 2N j , for j = 0, 1, . . . n−1. Simplifying this, we obtain When j is even, the minimum eigenvalue is when j = 2N , for which When j is odd, the minimum eigenvalue is when j = 2N − 1, for which Finally, note that the eigenvalue of M N corresponding to the eigenvector e 4N is 1+2l+f . Whereas l N e 4N e T 4N is a rank-1 matrix with eigenvector e 4N with eigenvalue l N ×4N = 4l. Therefore, the eigenvalue of corresponding to the eigenvector e 4N is 1 + 2l are the same as those of M N and are non-negative as shown above. Hence, all the eigenvalues are non-negative.
Proof. We need to show that 1. Z * N is dual feasible for the program in (10). 2. Z N corresponds to dual optimal value.
To show feasibility, we need to show that Z N is of the form as in (10), that is, This is indeed true for the following choice of values: t = N l , λ i = 2 for i = 1, 2, . . . , 4N and µ ij = 2l whenever i and j share an edge in C 4N and µ ij = 2f for |i − j| = 2N . Finally, using Lemma 12, we have Z N 0.
Using the measurement settings for chained Bell inequalities in [AQB + 13], one obtains the output of the primal SDP (2) for I CSW N equal to N 1 + cos π

2N
. Strong duality for the SDP in (2) implies that Z N corresponds to dual optimal value.
The proof of the uniqueness of the primal optimal is similar to the proof corresponding to n-cycle graphs in [BRV + 19b]. Chained Bell Inequalities satisfies Conditions A1 and A2, which can be checked by choosing the vectors in (D3) as follows: Here, |A 1 = 1 expresses the eigenvector of A 1 with eigenvalue 1. This notation is applied to other observables.
Since the optimal maximizer given in (14) satisfies conditions A1 and A2 and the vectors (Π i |ψ ) i∈I realize the optimal solution in the SDP (13). In addition, we the ranks of the projections Π A i A and Π B i B are assumed to be one. Thus, there exist isometries V A : for i ∈ I. This completes the proof of self-testability for the chained Bell inequalities for rank-one projectors. Since Z N corresponds to dual optimal value, we have ϑ (Ci 4N (1, 2N ) as conjectured in [Ara14].
The violation of the Bell inequality AS c 4 can achieve ϑ(G, w) by choosing as initial state and as local measurements with i = 0, 1, 2, 3, m(α) = cos α|0 + sin α|1 , and The primal optimal for the SDP corresponding to the quantum violation of AS c 4 can be obtained by the state and measurement directions given in Eqs. (65)-(67). Here, we omit its expression, as it is lengthy and complex. The proof of the uniqueness of the primal optimal is similar as in previous cases.
The local projective measurements satisfy Conditions A1 and A2, which can be checked by choosing the vectors in (D3) as follows: Here, |A 1 = 1 expresses the eigenvector of A 1 with eigenvalue 1. This notation is applied to other observables. Since the optimal maximizer given in (14) satisfies conditions A1 and A2 and the vectors (Π i |ψ ) i∈I realize the optimal solution in the SDP (13). In addition, we the ranks of the projections Π A i A and Π B i B are assumed to be one. Thus, there exist isometries V A : for i ∈ I. This completes the proof of self-testability for the AS c 4 Bell inequality for rank-one projectors.

IV. SUMMARY AND OPEN PROBLEMS
In this work, we introduced a graph-theoretic approach to self-testing in Bell scenarios, combining ideas from graph theory and semidefinite programming. The motivation was the observation that the set of quantum correlations for a Bell scenario is, in general, difficult to characterize while, using ideas from [CSW14], one can provide an easy to characterize single SDP-based relaxation of this set. By proving self-testing for the maximizer of a Bell inequality with respect to the aforementioned set, we furnish self-testing for the set of quantum correlations for the underlying Bell scenario.
Our method requires that the quantum bound of the Bell inequality is equal to the Lovász theta number of the vertex-weighted graph of exclusivity of the events appearing in the Bell witness, when written as a positive linear combination of probabilities of events. As we have seen, this is frequently the case. Our other assumptions involve some particular relation among the local projective measurements involved in the scenario as mentioned in Theorems 7, 8, 10 and 11. In future, it would be interesting to simplify our assumptions involving relation among local projective measurements.
We applied our techniques to the CHSH, chained and three-party Mermin Bell inequalities. For CHSH and the trpartite Mermin case, we recovered self-testing results for projectors of arbitrary rank. For chained Bell inequalities, our self-testing statements hold for rank-one projectors. For the Mermin three-party case, the primal optimal matrix's rank is seven, indicating that the self-testing preparation dimension can be seven. However, in the Bell scenario, the underlying dimension has to be eight due to the tensor structure. We also applied our method to the previously not-known case of AS inequalities and provided a self-testing statement for the case of rank-one projectors.
While delivering the self-testing statement for the chained-Bell inequality via our graph-theoretic framework, we also obtained a closed-form expression for the Lovász theta number for Möbius ladder graphs. Our closedform expression matches with the conjecture of [Ara14].
Our methods belong in the intersection region of graph theory, Bell non-locality, and contextuality. Our results provide further motivation to study Bell self-testing via the graph-theoretic framework in the future. Furthermore, we believe that techniques such as ours could be used in the future to study open problems in graph theory taking advantage of ideas from quantum theory.
A natural next step in our program would be to generalize our result for scenarios with noise. In other words, a graph-theoretic approach to robust Bell self-testing.
The graph-theoretic approach has been employed to study self-testing in Bell scenarios and in contextuality scenarios with sequential measurements. It will be interesting to see if the techniques based on graph theory could be also useful for self-testing in prepare and measure scenarios. In future, it would be interesting to extend our self-testing statements for chained Bell and AS inequalities for arbitrary rank projectors. . Two vertices are adjacent if they share an edge between them. The complement graphḠ has same vertices as G, but its edge set is complement of the set E. A clique of a graph is set of pairwise adjacent vertices. The complement of clique is a set of vertices that are pairwise non-adjacent. A natural generalization of graph is hypergraph with generalized edges connecting more than two vertices. These generalized edges are called hyperedges.
Definition 13. (Cyclic graph) Given a graph with n vertices such that every ith vertex of the graph is connected to (i + 1)mod n th vertex and (i − 1)mod n th vertex is called cyclic graph and denoted as C n .
An elegant generalization of the concept of cyclic graph is the concept of circulant graph, which is defined below.
We will use the notation OR(G) to represent the orthonormal representation of G.
Definition 16. (Stable set) Stable set is a set of vertices of a graph such that no two vertices which lie in it share an edge.
Definition 17. (Independence number) Independence number of a graph is the cardinality of the largest stable set of the graph. We will denote it by α(G).
Definition 18. (Convex hull) Convex hull of a set A is the smallest convex set containing A.
Definition 19. (Incidence vector) An Incidence vector of a set B ⊂ A is a vector P ∈ R |A| + such that for every i ∈ A, Definition 20. (Stable set polytope) The convex hull of all the incidence vectors of stable sets of graph G is called stable set polytope of graph. It is denoted by STAB(G).
Definition 21. (Theta body) Let {|v i } corresponds to the orthonormal representation ofḠ. Given a unit vector |φ = (1, 0, 0, · · · , 0) ∈ R d with only first co-ordinate 1 and rest 0, the Theta body of graph G is defined as Definition 22. (Lovász theta number [Lov79]) The Lovász theta number ϑ(G) of a graph G is defined as follows: where |φ is a unit vector and {|v i } is an orthonormal representation of the graph G. |φ is also known as handle.
Definition 23. (Fractional stable set polytope) The fractional stable set polytope is given by Definition 24. (Fractional packing number) The fractional packing of a graph G is the value of the following linear program: Definition 25. (Gram matrix and Gram decomposition) Given a set of vectors v 1 , v 2 , . . . , v k in an inner product space, the corresponding Gram matrix is a Hermitian matrix X, defined via their inner products such that X i,j = v i , v j for i, j ∈ {1, 2, . . . , n}. It is important to note that rank X = dim span (v 1 , v 2 , . . . , v k ) .
Decomposing Gram matrix X such that X = AA † is called Gram decomposition of X. The rows of A are related to v i up to isometry.
It is worthwhile to note that STAB(G) ⊆ TH(G)⊆ QSTAB(G) [Knu94]. An alternate formulation of theta body of a graph G = ([n], E) is given by: Lemma 27.
[RBB + 21] We have that x ∈ TH(G) iff there exist unit vectors d, w 1 , . . . , w n such that
(B6) The graph of exclusivity of these 16 events is the complement of Shrikhande graph [Shr59].
This graph, shown in Fig. III B, has α = 3 and ϑ = α * = 4. Similarly, one can obtain the graph corresponding to any S n .

Bipartite case
We assume that the unique optimal maximizer X * = (X ij ) is given by η i η j v j , v i with the following; For where Also, for simplicity, a i A and b i B are assumed to be normalized and η i > 0. Now, we consider a state |ψ on H A ⊗ H B , and projections Π A i A and Π B i B on H A and H B . Here, when ). Then, we define the projection Π i := Π A i A ⊗ Π B i B , In the following, we discuss how the state |ψ is locally converted to |ψ when the vectors Π i |ψ realize the optimal solution in the SDP (D1). We define |v i := η −1 i Π i |ψ .
a. Rank-one case First, we consider the case that the ranks of the projections Π A i A and Π B i B are one. We introduce the following conditions.
B4 We define the graph on I B in the following way. This graph cannot be divided. i B ∈ I B is connected to i B ∈ I B when the following two conditions holds.

B4-2
The relation I A,i B ∩ I A,i B = ∅ holds.
In the two qubit case, if The set {v i } i∈I of vectors contains the following 4 vectors, then the conditions A1 and A2 hold; where a 0 = a 1 , a 2 , b 0 , b 1 = 0.
Example 1. CHSH inequality satisfies Conditions A1 and A2, which can be checked by choosing the vectors in (D3) as follows: Example 2. Chained Bell inequalities satisfies Conditions A1 and A2, which can be checked by choosing the vectors in (D3) as follows: In this example and the next example, |A 1 = 1 expresses the eigenvector of A 1 with eigenvalue 1. This notation is applied to other observables.
Example 3. Abner Shimony Self-Testing satisfies Conditions A1 and A2, which can be checked by choosing the vectors in (D3) as follows: Theorem 28. Assume that the optimal maximizer given in (D2) satisfies conditions A1 and A2 and the vectors (Π i |ψ ) i∈I realize the optimal solution in the SDP (D1). In addition, the ranks of the projections Π A i A and Π B i B are assumed to be one. Then, there exist isometries V A : H A → H A and V B : for i ∈ I.
Proof. Since the vectors Π i |ψ realize the optimal solution in the SDP (D1), there exists a isometry V from We fix an arbitrary element i B ∈ I B . For i A , i A ∈ I A,i B , Condition A1 implies Hence, there exists an isometry V A,i B : Since Condition B4-1 guarantees b i B , b i B = 0, the combination of (D15) and (D16) implies that Hence, we find that V A,i B = V A,i B . Since the graph defined in B4 is not divided, all isometries V A,i B are the same. We denote it by V A . We choose arbitrary two elements i B , i B ∈ I B . We choose elements i A ∈ I A,i B and i A ∈ I A,i B such that the combination of (D18) and (D19) implies that Hence, there exists an isometry V B : Since We consider the general case. In addition to A1 and A2, we assume the following condition.
A3 Ideal systems H A and H B are two-dimensional.
While CHSH inequality, Chained Bell inequalities, and Abner Shimony Self-Testing satisfy Conditions A1 and A2, only CHSH inequality satisfies Conditions A3 and A4.
We also consider the following condition for Let H A i A and H B i B be the image of the projections Π A i A and Π B i B . Theorem 29. Assume that the optimal maximizer given in (D2) satisfies conditions A1, A2, A3, and A4, the vectors (Π i |ψ ) i∈I realize the optimal solution in the SDP (D1), and condition C1 holds. Then, there exist for i ∈ I, where |junk is a state on K A ⊗ K B .
Lemma 30. Assume that the vectors (Π i |ψ ) i∈I realize the optimal solution in the SDP (D1). Assume that a projection Π is commutative with Π i for any i ∈ I. Also assume that Πψ = 0. Let ψ (Π) be the normalized vector of Πψ . Then, the vectors Π i |ψ (Π) realize the optimal solution in the SDP (D1).
Considering the contraposition of Lemma 30, we have the following lemma.
Lemma 31. Assume that the vectors Π i |ψ realize the optimal solution in the SDP (D1). Assume that a projection Π is commutative with Π i for any i ∈ I. Also, there exists an element j ∈ I such that ΠΠ j = 0. Then, Πψ = 0.
In the same way, we define the projectionsΠ B j B andΠ B . We define the projectionΠ Step 2: Due to Lemma 30, the vectors Π i ψ (j A ,j B ) = Π iΠ(j A ,j B ) ψ (j A ,j B ) realize the optimal solution in the SDP (D1). Also, Π iΠ(j A ,j B ) is rank-one. Hence, we can apply Theorem 28 to the vectors As shown in Step 3, for Then, for j A , we choose an element j B such that Π (j A ,j B ) ψ = 0. Then, we define V A,j A := V A,(j A ,j B ) . Thus, for elements j A and j B , there exists an constant β j A ,j B such that Hence, we have We define the spaces K A and K B spanned by {|j A } and {|j B }, respectively. We define the junk state on We define the isometries V A : The isometries V A and V B satisfy conditions (D22) and (D23).
Step 3: We show the following fact; For The above vector is a constant times of ) i are the unique optimal solution in the SDP (D1). Hence, there exists a constant , which is the desired statement.

Tripartite case
We assume that the unique optimal maximizer X * = (X ij ) is given by η i η j v j , v i with the following; For where In the following, we discuss how the state |ψ is locally converted to |ψ when the vectors Π i |ψ realize the optimal solution in the SDP (D1). We define |v i := η −1 i Π i |ψ .
a. Rank-one case We consider the case that the ranks of the projections Π A i A , Π B i B and Π C i C are one. We introduce the following conditions.
Definition 32. Three distinct elements i, j, k ∈ I are called linked when the following two conditions holds.
That is, when t i,j = A, i A = j A ,i B = j B ,and i C = j C . v i and v k share a t i,k −th common element for In addition, two distinct elements x A , x A for index of a vectors of C d A are called connected when there exist three linked elements i, j, k ∈ I such that the first components of i, j, k ∈ I are x A , x A .
For i B , i C , we use notation Then, we introduce the following conditions for the optimal maximizer given in (D37).
We consider the graph G A with the set I A of vertecies such that the edges are given as the the pair of all connected elements in I A in the sense of the end of Definition 32. The graph G A is not divided into two disconnected parts.

A7 The vectors {b
That is, there exist a subset I B of the second indexes and subsets I C,i B of the third indexes such that they satisfy conditions B1, B2, B3, and B4. We denote the graph defined in this condition by G B The subsets I B , I C,Z , and I C,P satisfy conditions B1, B2, B3, and B4.
Lemma 33. Assume that i, j, k ∈ I 0 are connected by one edge, i.e., satisfy conditions C1 and C2. We choose for l = i, j, k. We assume that v l , v l = v l , v l for l, l = i, j, k. Then, we have Proof. For simplicity, without loss of generality, we assume that we have Hence, which implies (D43) or (D46). When (D43), we have (D44) and (D45). When (D45), we have (D46) and (D47).
Theorem 34. Assume that the optimal maximizer given in (D37) satisfies conditions A5, A6, and A7, and the vectors (Π i |ψ ) i∈I realize the optimal solution in the SDP (D1). In addition, the ranks of the projections for i ∈ I. Proof.
Step 1: We fix an arbitrary element i A ∈ I A . For i BC , i BC ∈ I BC,i A , Condition A1 implies Hence, there exists an isometry V BC,i A : Step 2: We choose a subgraph G A,0 ⊂ G A such that the vertecies of G A,0 is I A , G A,0 has no cycle, and G A,0 cannot be divided into two parts.
We fix the origin i A,0 ∈ I A . For any element i A ∈ I A , we have the unique path to connect i A,0 and i A by using G A,0 because G A,0 has no cycle. We denote this path as i A,0 − i A,1 − · · · − i A,n = i A . We define α(i A ) as Lemma 33 guarantees that α(i A ) takes value 1 or −1. Due to the above definition and the uniqueness of the above path, we find that For i BC ∈ I BC,i A,l and i BC ∈ I BC,i A,l+1 , we find that a i A,l , a i A,l+1 ψ i BC , ψ i BC = a i A,l ⊗ ψ i BC , a i A,l+1 ⊗ ψ i BC (D64) = a i A,l ⊗ ψ i BC , a i A,l+1 ⊗ ψ i BC (D65) = a i A,l , a i A,l+1 ψ i BC , ψ i BC (D66) =α(i A,l )α(i A,l+1 ) a i A,l , a i A,l+1 V BC,i A,l ψ i BC , V BC,i A,l+1 ψ i BC (D67) Since a i A,l , a i A,l+1 = 0 and the sets {ψ i BC } i BC ∈I BC,i A,l and {ψ i BC } i BC ∈I BC,i A,l+1 span the space C d B d C , we find that α(i A,l )α(i A,l+1 )V † BC,i A,l V BC,i A,l+1 is identity. Then, we find that That is, we have Also, we define the isometry V A : Since the set {a i A } i A ∈I A spans the space C d A , we have Step 3: For i B ∈ I B and i C ∈ I C,i B , we choose i A such that (i B , i C ) ∈ I BC,i A . Then, we define β(i B , i C ) := α(i A ). We fix an arbitrary element i B ∈ I B . For i C , i C ∈ I C,i B , Relation (D70) implies Hence, there exists an isometry V C,i B : H C → H C such that for i C ∈ I C,i B .
Step 4: We choose a subgraph G B,0 ⊂ G B such that the vertecies of G B,0 is I B , G B,0 has no cycle, and G B,0 cannot be divided into two parts.
We fix the origin i B,0 ∈ I B . For any element i B ∈ I B , we have the unique path to connect i B,0 and i B by using G B,0 because G B,0 has no cycle. We denote this path as i B,0 −i B,1 −· · ·−i B,n = i B . We choose a non-zero element i C,l ∈ I C,i B,l−1 ∩ I C,i B,l . We choose i A,l , i A,l such that (i B,l−1 , i C,l ) ∈ I BC,i A,l and (i B,l , i C,l ) ∈ I BC,i A,l . We define β(i B ) as γ(i B ) := n l=1 β(i B,l−1 , i C,l )β(i B,l , i C,l ). (D77) For i C ∈ I C,i B,l and i C ∈ I C,i B,l+1 , we find that Since b i B,l , b i B,l+1 = 0 and the sets {c i C } i C ∈I C,i B,l and {c i C } i C ∈I C,i B,l+1 span the space H C , we find that γ(i B,l )γ(i B,l+1 )V † C,i B,l V C,i B,l+1 is identity. Then, we find that That is, we have Step 5: For elements i B , i B ∈ I B , the sets {c i C } i C ∈I C,i B and {c i C } i C ∈I C,i B span the space C d C . We choose i C ∈ I C,i B and i C ∈ I C,i B such that c i C , c i C = 0. We have Since c i C , c i C = 0, we have Also, we define the isometry V B : H B → H B such that Combining (D73) and (D96), we have We consider the general case. We define |v i := η −1 i Π A i A ⊗ Π B i B ⊗ Π C i C |ψ . LetĪ A ,Ī B ,Ī C be the sets of indexes of the spaces H A , H B , H C . We introduce other conditions for the optimal maximizer given in (D37) as a generalization of A3 and A4.
A8 Ideal systems H A , H B , and H C are two-dimensional.
A9 Each system has only two measurements. That is, the setsĪ A ,Ī B , andĪ C is composed of 4 elements. For any element i A ∈Ī A (i B ∈Ī B , i C ∈Ī C ), there exists an element i A ∈Ī A (i B ∈Ī B , i C ∈Ī C ) such that a i A |a i A = 0 ( b i B |b i B = 0, c i C |c i C = 0).
Mermin Self-testing satisfies Conditions A8 and A9 in addition to Conditions A5, A6, and A7. When A3 and A4 hold,Ī A (Ī B ,Ī C ) is written as B A,0 ∪ B A,1 (B B,0 ∪ B B,1 , B C,0 ∪ B C,1 ), where B A,j = {(0, j), (1, j)} (B B,j = {(0, j), (1, j)}, B C,j = {(0, j), (1, j)}) and a (0,j) |a (1,j) = 0 ( b (0,j) |b (1,j) = 0, c (0,j) |c (1,j) = 0) for j = 0, 1. We also consider the following condition for Let H A i A , H B i B , and H C i C be the image of the projections Π A i A , Π B i B , and Π C i C . Theorem 35. Assume that the optimal maximizer given in (D37) satisfies conditions A5, A6, A5, A7, A8, and A9, and the vectors (Π i |ψ ) i∈I realize the optimal solution in the SDP (D1). Then, there exist isometries V A from H A ⊗ K A to H A , V B from H B ⊗ K B to H B , and V C from H C ⊗ K C to H C such that for i ∈ I, where |junk is a state on K A ⊗ K B ⊗ K C .
Proof. Similar to the proof of Theorem 29, we define orthogonal projectionsΠ X j X on H X such that the projection Π X := j XΠ X j A satisfies Π X ψ = ψ for X = A, B, C. Then, we define the projectionΠ (j A ,j B ,j C ) := Π A j AΠ B j BΠ C j C . In the same way as the proof of Theorem 29, we define α (j A ,j B ,j C ) ,β j A ,j B ,j C , and V X,j X for X = A, B, C.
We define the space K X spanned by {|j X } for X = A, B, C. We define the junk state on K A ⊗ K B ⊗ K C as We define the isometries V X : H X ⊗ K X → H X as for X = A, B, C. The isometries V A , V B , and V C satisfy conditions (D98) and (D99).