# Self-testing protocols based on the chained Bell inequalities

## Abstract

Self-testing is a device-independent technique based on non-local correlations whose aim is to certify the effective uniqueness of the quantum state and measurements needed to produce these correlations. It is known that the maximal violation of some Bell inequalities suffices for this purpose. However, most of the existing self-testing protocols for two devices exploit the well-known Clauser-Horne-Shimony-Holt Bell inequality or modifications of it, and always with two measurements per party. Here, we generalize the previous results by demonstrating that one can construct self-testing protocols based on the chained Bell inequalities, defined for two devices implementing an arbitrary number of two-output measurements. On the one hand, this proves that the quantum state and measurements leading to the maximal violation of the chained Bell inequality are unique. On the other hand, in the limit of a large number of measurements, our approach allows one to self-test the entire plane of measurements spanned by the Pauli matrices and . Our results also imply that the chained Bell inequalities can be used to certify two bits of perfect randomness.

figuresection

## 1 Introduction

In the last decades, it has been proven that nonlocality, besides being very important from a foundational point of view, is also a resource for quantum information applications in the so-called device-independent scenario. There, devices are just seen as “black boxes” producing a classical output, given a classical input. The devices can provide an advantage over classical information processing only when they produce non-local correlations, that is, correlations that violate a Bell inequality and, therefore, cannot be reproduced by shared classical instructions. It is then possible to construct quantum information applications exploiting this device-independent quantum certification based on Bell’s theorem. Successful examples are protocols for device-independent randomness generation [1], device-independent quantum key distribution [2] and blind quantum computation [3].

Historically, self-testing can be considered as the first device-independent protocol. Introduced by Mayers and Yao [4], the standard self-testing scenario consists of a classical user who has access to several black boxes, which display some non-local correlations. The user received these boxes from a provider, who claims that to produce the observed correlations the boxes perform some specific measurements on a given quantum state. The goal of the classical user is to make sure that the boxes work properly, i.e. that they contain the claimed state and perform the claimed measurements. This is especially relevant if the user does not trust the provider or, even if trusted, does not want to rely on the provider’s ability to prepare the devices. Self-testing is the procedure that allows for this kind of certification. The self-tested states and measurements can later be used to run a given quantum information protocol, as proposed in [4] for secure key distribution. For many protocols, however, passing through self-testing techniques is not necessary and in fact it is simpler and more efficient to run the protocol directly from the observed correlations, as for example in standard device-independent quantum key distribution protocols [2]. Yet, self-testing protocols constitute an important device-independent primitive as they certify the entire description of the quantum setup only from the observed statistics.

As mentioned, the concept of self-testing was introduced by Mayers and Yao in [4], where the procedure to self-test a maximally entangled pair of qubits is described. This protocol was made robust in subsequent works, see [7, 11]. In the following years new self-testing protocols for more complicated states such as graph states were described [10], as well as protocols for self-testing more complicated operations, such as entire quantum circuits [11]. A general numerical method for self-testing, known as the SWAP method, was introduced in [12], providing much better estimations of robustness than the analytical proofs. This numerical method can also be used to self-test three-qubit states such as GHZ states [13] and W states [14].

Despite its importance, we lack general techniques to construct and prove self-testing protocols. Most of the existing examples are built from the maximal violation of a Bell inequality. Based on geometrical considerations, see for instance [15, 16], one expects that generically there is a unique way, state and measurements, of producing the extremal correlations attaining the maximal quantum violation of a Bell inequality. This is not always the case, but whenever it is, we say that the corresponding Bell inequality is useful for self-testing. Following this approach, it is possible to prove that the state and measurements maximally violating the Clauser-Horne-Shimony-Holt (CHSH) inequality [25] are unique [5, 7], and the corresponding state is a maximally entangled two-qubit state. More recently, a self-testing protocol for any two-qubit entangled states has been derived in [20] using the Bell inequalities introduced in [8], and all the self-testing configurations for a maximally entangled state of two qubits using two measurements of two outputs have been identified in [9]. From a general perspective, it is an interesting question to understand which Bell inequalities are useful for self-testing and what are the states and measurements certified by them. But, as seen in the previous discussion, little is known beyond the simple scenario involving two measurements of two outputs.

The main result of this work is to prove that the so-called chained Bell inequalities [24], defined for two devices performing an arbitrary number of measurements of two outputs, are useful for self-testing. Recall that the maximal violation of these inequalities is given by a maximally entangled two-qubit state and measurements equally spaced on an equator of the Bloch sphere [19]. Our results imply that this known violation is unique. Our proof is based on a sum-of-squares (SOS) decomposition of the Bell operator defined by the chained inequalities. The specific form of the SOS decomposition allows us to construct a quantum circuit that acts as a swap-gate, provided that the inequality is maximally violated. It is then proven that the swap-gate circuit correctly isolates the states and measurements that need to be self-tested, that is, those providing the maximal violation.

## 2 Preliminaries

### 2.1 Self-testing terminology

In this section we define the settings and introduce some self-testing terminology. We consider the standard Bell scenario in which two parties share a quantum state on which they can perform measurements, described by the two-outcome operators , where . The shared state and measurements are not trusted and are modelled as black boxesÂÂ: each of them gets some classical input, which labels the choice of measurement, and produces a classical output, the measurement result. As the dimension is arbitrary, one can restrict the analysis to pure states and projective measurements without any loss of generality. The state lives in a joint Hilbert space of an unknown dimension. Operators act on the part of the state living in , so that operators of different parties commute: . Also, and can be considered to be projective measurements. In this scenario the parties calculate the joint outcome probabilities that can be described as . The set of joint probabilities for all possible combinations of inputs and outputs is often simply called the set of correlations. The parties can also check whether the probability distribution is non-local, i.e. whether some Bell inequality is violated. A Bell inequality can be written as a linear combination of the observed correlations.

Usually there is a specification of the black boxes, in self-testing terminology named as the reference experiment, and it consists of the state and measurements in some given Hilbert spaces and of finite dimension. On the other hand, the term physical experiment is used for the actual state and measurements . The aim of self-testing is to compare the reference and the physical experiment and certify that they are physically equivalent. This means that the physical experiment is the same as the reference experiment up to local unitaries and additional non-relevant degrees of freedom, which are unavoidable, that is:

(1) |

where describe the local states of the possible additional degrees of freedom of the physical experiment and and are arbitrary local unitaries acting on systems and . We introduce the product isometry , a map that preserves the inner product, but does not have to preserve dimension. Thus we say that a self-testing protocol is successful if there exists a local isometry relating the physical and reference experiment:

(2) |

In self-testing terminology the relation between the physical and the reference experiment described by (2) is called equivalence.

Trivially, a necessary condition for equivalence is that the full set of correlations obtained from the black boxes is equal to the set of correlations that one would obtain after applying the reference measurements on the reference state. A weaker necessary condition is to verify that the two sets of correlations lead to the same maximal quantum violation of a given Bell inequality.While in general checking all the correlations provides more information, there are some situations where observing just the maximum quantum value of a Bell inequality has been proven to be sufficient to certify the equivalence between the physical and the reference experiment. This is the approach we follow in this work and prove that the observation of the maximum quantum violation of the chained Bell inequalities suffices for self-testing.

### 2.2 The chained Bell inequality

The chained Bell inequalities were introduced in Refs. [24] to generalize the well-known Clauser-Horne-Shimony-Holt (CHSH) Bell inequality [25] to a larger number of measurements per party, while keeping the number of outcomes to two. Let us denote by and the observables of Alice and Bob, respectively, and assume that they all have outcomes . Then, the chained Bell inequality for inputs reads

(3) |

where we denote . Notice that for the above formula reproduces the CHSH Bell inequality

(4) |

Importantly, in quantum theory the chained Bell inequality can be violated by Alice and Bob if they perform measurements on an entangled quantum state. To be more precise, let there exist quantum observables and , i.e., Hermitian operators with eigenvalues acting on some Hilbert space of, so far, unspecified dimension, and an entangled state such that , where stands for the so-called Bell operator

(5) |

where again . In particular, it has been shown in Ref. [19] that the maximal quantum violation of the Bell inequality (3) amounts to

(6) |

and it is realized with the maximally entangled state of two qubits

(7) |

and the following measurements

(8) |

where and are the standard Pauli matrices and , , and , where and (see Fig. 1).

For further purposes, let us also introduce the notion of the shifted Bell operator, that is, an operator given by . Since, by the very construction, this operator is positive-semidefinite, then there exist a finite number of operators (not necessarily positive) which are functions of the measurements and such that

(9) |

This decomposition is called a sum-of-squares (SOS) decomposition, in this particular case of the shifted Bell operator. Furthermore, an SOS decomposition in which operators contain products of at most measurement operators is named SOS decomposition of n-th degree. The use of SOS decompositions for self-testing proofs has been previously considered in [21]. Numerically, it is possible to obtain SOS decompositions of various degrees via the Navascues-Pironio-Acin (NPA) hierarchy [18]. In fact, the degree of the SOS decomposition is related to the level of the NPA hierarchy used. The dual of the semi-definite program defined by the -th level of the NPA hierarchy yields an SOS decomposition of -th degree.

What is important for further considerations is that if maximally violates the chained Bell inequality, then , which implies that for every . In other words, belongs to the intersection of kernels of the operators . This imposes a plethora of conditions on the state and measurements maximally violating the Bell inequality.

## 3 Self-testing with the chained Bell inequalities

In this section we prove that with the aid of the chained Bell inequalities one can self-test the presence of the maximally entangled state (7) and identify measurements (8), thus generalizing the results previously obtained for the CHSH Bell inequality in Refs. [5, 7, 17]. The advantage of our approach over the previous results lies on the fact that in the limit of a large number of measurements, the chained Bell inequality allows one to self-test the entire plane of the Bloch sphere spanned by the Pauli matrices and . Also, our results imply that the maximal quantum violation of the chained Bell inequalities is unique in the sense that there exists only one probability distribution maximally violating them. This makes chained Bell inequalities useful for randomness certification (see [16]). In the context of nonlocal games this result confirms that measuring (8) on a maximally entangled state state (7) is the only way (up to local isometries) to win the odd cycle game with maximal probability; it is known that the probability to win the odd-cycle game in quantum regime is [22].

### 3.1 The SOS decompositions

The key ingredient in our proof are the following two SOS decompositions of the shifted Bell operator associated to the chained Bell inequality whose proofs are deferred to A. We start from the first degree SOS decomposition.

###### Lemma 1.

Let be the state and the measurements maximally violating the chained Bell inequality. Then, the corresponding shifted Bell operators admits the following SOS of first degree:

(10) | |||||

where we assume that and . The coefficients , , and are given by

(11) | |||

(12) |

and

(13) |

with .

Note that the above SOS decomposition remains valid if in its second line we omit the sum over and fix to be any number from . Also, the transformations and in the first parenthesis, and in the second one lead to the whole family of SOS decompositions. Let us finally mention that that the above SOS decomposition is a particular case of an SOS decomposition for a more general Bell inequality which will be presented in Ref. [23] together with an analytical method used to derive it.

It turns out, however, that none of them is enough for self-testing. In fact, we need the following second degree SOS decomposition.

###### Lemma 2.

Similarly we can construct another SOS decomposition from the above one by applying the following transformations to it: in all terms, in the curly brackets and in the remaining terms.

### 3.2 Exact case

We start our considerations with the ideal case when the black boxes reach the maximal quantum violation of the Bell inequality and and leave the study of the robustness of our schemes for the following section.

The departure point of our considerations is the swap-gate introduced in Ref. [6] and presented on Fig. 2. In what follows we show that with properly chosen controlled gates , , and it defines a unitary operation that satisfies Eq. (2). To this end, let us choose

(15) |

and

(16) |

Clearly, as all observables and are Hermitian and have eigenvalues , and for even and for odd are unitary. However, the operators for odd , for even and might not be unitary in general, which in turn makes the circuit of Figure 2 non-unitary. To overcome this problem we exploit the polar decomposition which says that one can write any operator as where and are some unitary operators and . Then, if and are of full rank we define and , while if one of them is rank deficient, say , we replace its zero eigenvalues by one and then use the above construction; in other words, we define with denoting the projector onto the kernel of .

First, notice that it follows from the SOS decompositions (10) and (2) that for any , the identities

(17) |

are satisfied, which imply in particular that

(18) |

Moreover, one can prove that (see B) the operators and anticommute in the following sense

(19) |

Finally, although the tilded operators are in general different than and , it turns out that they act in the same way when applied to , that is,

(20) |

To prove these relations, let stand for the vector norm defined as . Then, the following reasoning applies [20]

(21) | |||||

where the first and the second equalities stem from the fact that is unitary and its definition, respectively. The third equality is a consequence of the fact is unitary which implies that , and, finally, the inequality and the last equality follow from the operator inequality and Eq. (18).

We are now ready to state and prove our first main result.

###### Theorem 3.

###### Proof.

Let us first consider Eq. (22). Owing to the linearity of in both Alice’s and Bob’s measurements and the fact that for even (see Lemma 7 in B):

(25) |

the left-hand side of Eq. (22) can be rewritten as

(26) | |||||

Then, it follows from Eqs. (18) and (19) that and , and therefore we only need to check how the map applies to and . In the first case, one has

(27) |

Exploiting Eqs. (18) and (20) to convert to and then to , and the fact that has eigenvalues , meaning that and are projectors onto orthogonal subspaces, one finds that the terms in Eq. (3.2) containing the ancillary vectors and simply vanish, and the whole expression simplifies to

(28) |

Using then the fact that , the anticommutation relation (19) and the identities (18) and (20), we finally obtain

(29) |

with , which is exactly Eq. (24).

In the second case, i.e., that of , one has

(30) | |||||

Exploiting the properties (18) and (20), the anticommutation relation (19), and the fact that , one can prove that the terms in Eq. (30) containing kets and are zero and the whole expression reduces to

(31) |

By applying then Eq. (18) and the anticommutation relation (19) in the second term of Eq. (31), one can rewrite it as

(32) |

After plugging Eqs. (29) and (32) into Eq. (26) and using the fact that the Pauli matrices and anticommute and satisfy , we arrive at

(33) | |||||

Let us now prove Eqs. (23). From the the linearity of and Eq. (25), we get

(34) |

Following the same steps as above, one can prove the following relations

(35) |

which when plugged into Eq. (34) leads, in virtue of Eq. (25), to the first part of Eq. (23).The second part of the same equation can be proven in exactly the same way. ∎

###### Corollary.

An important corollary following directly from Theorem 3 is that the probability distribution with

(36) |

being the conditional probability of obtaining the outcomes and upon performing the th and th measurement, respectively, is unique. In other words, there is no other probability distribution maximally violating inequality (3) different than the one above.

Let us alsonotice that in order to prove the uniqueness of correlations maximally violating the chained Bell inequality one needs only the conditions (23) and (24); the conditions (22) are superfluous. This is because

(37) | |||||

where the first equality follows from the fact that is unitary and and second from Eqs. (23) and (24).

## 4 Robustness

For practical purposes, it is important to estimate the robustness of self-testing procedures, as in any realistic situation it is impossible due to experimental imperfections to actually reach the maximal violation of any Bell inequality. One expects, however, self-testing procedures to tolerate some deviations from the ideal case, that is, if the violation of the given Bell inequality is close to its maximum quantum value, the state producing the violation must be close to the state maximally violating this Bell inequality. In [21] it has been proven that SOS decompositions allow one to reach the best known robustness of all analytical self-test protocols.

Here we study how robust is the above self-testing procedure based on the chained Bell inequality. Assuming that the physical state and the physical measurements and violate the chained Bell inequality by with some sufficiently small , we estimate the distance between and the reference state, and how this distance is affected when physical measurements are applied to it. For simplicity and clearness we give bounds for the case when the number of measurements is even; the bounds for in the odd case can be determined in an analogous way.

Let us begin by noticing that now , and therefore the exact relations (38), (39) and (40) do not hold anymore. We then need to derive their approximate versions. First, it stems from the first SOS decomposition that (see Lemma 8 in C)

(38) |

where . Clearly, for any , and for . Moreover, following the same reasoning as in (21), one proves that

(39) |

Finally, both SOS decompositions (10) and (2) imply the following approximate anticommutation relations (see Lemma 9 in C):

(40) |

where , is defined in Lemma 1, and and are given in Lemma 9 in C. In what follows we drop the dependence of and on .

Equipped with these tools we can state and prove the second main result of this paper.

###### Theorem 4.

Let be a state and measurements giving violation of the chained Bell inequality . Then,

(41) | |||

(42) | |||

(43) | |||

(44) |

where , is the unitary transformation defined above, with denoting the length of . The functions , , and vanish as and for sufficiently large scale with as .

###### Proof.

As the norm of cannot be computed exactly, it turns out that to prove this theorem it is more convenient to first estimate the following distance

(45) |

with

(46) |

and then show that the error we have by doing so is small for sufficiently small .

From now on we will mainly follow the steps of the proof of Theorem 3 replacing the identities by the corresponding inequalities. First, let us notice that for any (see C for the proof):

(47) |

where and are given in Lemma 10 of the Appendix. Denoting by and the operators appearing in the parentheses in (47), we can write

(48) | |||||

and, by further exploitation of the fact that is unitary, the first norm can be upper bounded as