Device-independent characterization of quantum instruments

Among certification techniques, those based on the violation of Bell inequalities are appealing because they do not require assumptions on the underlying Hilbert space dimension and on the accuracy of calibration methods. Such device-independent techniques have been proposed to certify the quality of entangled states, unitary operations, projective measurements following von Neumann's model and rank-one positive-operator-valued measures (POVM). Here, we show that they can be extended to the characterization of quantum instruments with post-measurement states that are not fully determined by the Kraus operators but also depend on input states. We provide concrete certification recipes that are robust to noise.


Introduction
Experiments using either NV centers [1], photon pair sources [2,3] or neutral atoms [4] have recently been used to test Bell inequalities [5] in a very convincing way. The observed Bell inequality violations have brought new and fascinating insights about nature by showing that some correlations cannot be explained by locally causal models. These experiments also revolutionize branches of applied physics like randomness generation [6,7,8,9,10,11,12] by making it device-independent, i.e. the randomness guarantees hold without assumptions on the underlying Hilbert space dimension and on the accuracy of calibration methods.
The possibility of randomness generation from Bell inequalities is clear when one realizes that the only situation allowing for a maximal quantum violation of the simplest Bell inequality [13], within the quantum formalism, consists in using complementary Pauli measurements on a maximally-entangled two-qubit state [14,15]. This means that the violation of a Bell inequality can certify quantum states and von Neumann measurements directly, without resorting to tomography.
Efforts are being devoted to characterise measurements not captured by the usual von Neumann model. Refs. [28,29] for example, showed how to characterise rank-one POVMs that are not composed of orthogonal projection. Less is known for measurements whose post-measurement state is not fully determined by the Kraus operator associated with the measurement result, but also depends on the input state. In this case, the measurement statistics and the post-measurement states have to be considered together in order to verify that a measurement achieves the ideal trade-off between disturbance and information gain. Such quantum instruments [30], sometimes called weak measurements [31], can be more efficient in practice than projective or rank-one measurements e.g. for generating randomness. Whereas randomness generation based on projective measurements requires at least as many maximally-entangled states as the number of certified random bits, an arbitrary number of random bits can in principle be extracted from a single maximally-entangled state by applying successive quantum instruments which do not break entanglement [32,33,34,35]. The certification of such measurements is thus not only of fundamental interest but could be used in practice to characterise the potential of an actual quantum instrument for producing large amounts of device-independent randomness with a single entangled state.
In this manuscript, we provide a recipe to certify quantum instruments that are neither projective measurements nor rank-one POVMs, i.e. we certify the states conditioned on each outcome as well as the probability of each outcome. We also derive a new class of Bell inequalities suitable for the robust self-testing of partially-entangled two-qubit states. Our final recipe is realistically robust to experimental noise.

Device-independent certification of quantum instruments
We consider an unknown instrument, that we denote M, and our goal is to show that it behaves as an ideal instrument M in a device-independent way. We start by clarifying the formulation, then describe the proposed recipe before discussing the results.

Formulation
Consider an ideal noise-free quantum instrument M with k outcomes operating on a single system of dimension d. It is represented by a collection of k Kraus operators {K } k−1 =0 satisfying the completeness relation K † K = 1. Each Kraus operator defines a completely positive map ρ → K ρK † . Given a state ρ B ∈ L(C d ), the probability to observe the outcome is given by the Born rule p = Tr K ρ B K † and the normalized post-measurement state for this outcome is Note that the dimension of is not necessarily the same than the one of ρ B . To illustrate our method, we consider in this work measurements operating on qubits and returning qubits, cf. Eq. (3).
Von Neumann measurements and rank-one POVMs correspond to the specific case where {K } are proportional to projectors onto pure states |ψ , that is K = η |ψ ψ |. In this case, the post-measurement state corresponding to the outcome is |ψ independently of the premeasured state of the system. Performing such a measurement on a physical system can extract full information about its state but also disturbs it maximally, e.g. it breaks all entanglement the system might have with the rest of the world.
Quantum instruments that are neither Von Neumann measurements nor rank-one POVMs introduce less disturbance in the system at the price of extracting less information [36]. This has the benefit of preserving interesting and useful features such as entanglement while nevertheless revealing information about the system. As an example, for θ ∈ [0, π/4] the Kraus operators are associated to quantum instruments which tend to be projective in the limit θ → 0, and the identity in the limit when θ → π/4. Such an instrument is sufficient to implement the scheme proposed in [33,34,35] to produce more randomness than possible with von Neumann measurements.
Whether the considered measurement is a von Neumann measurement or not, it can be fully characterised by the map where we have introduced a register R indicating the outcome. In comparison to the map generated by a single Kraus operator K , the map M is trace-preserving by construction, hence defines a quantum channel. We note that every set of Kraus operators uniquely defines a map through Eq. (3), and any map of this form uniquely defines the post-measurement states, and hence corresponds to a quantum instrument. We illustrate our method by showing how to certify a quantum instrument of the form given in Eq. An actual -possibly noisy -measurement (see Fig. 1) acting on a Hilbert space H B can be Figure 1: Scheme of the actual experiment that is used to characterise the measurement box M in a deviceindependent way. The source which is represented by a box with a star, produces an unknown bipartite state ρ shared between A and B. Party B performs the measurement. The pre-and post-measurement states can be measured with additional measurements named A 0/1 for party A and B 0/1/2/3 for party B that are also unknown (not represented).
described by the following map where M are the completely positive maps associated to the outcomes . In general, these maps may not be expressed in terms of a single Kraus operator, but as a combination of several ones, i.e.
In order to show that a measurement described by M acts like a target measurement M, it is sufficient to identify a subspace of H B on which the action of M is similar to the one of M. Moreover, a map is fully described by its action on one half of a maximallyentangled state, a result known as the Choi-Jamiolkowski isomorphism [37,38]. Therefore, the equivalence between the considered measurement and the target one is obtained by showing that there exist completely positive tracepreserving maps and such that the composition of these maps with the actual measurement is identical to the reference measurement, that is The injection map Λ i B and the output map Λ o B identify subspaces and subsystems in which the measurement M acts as the reference measurement M, see Fig. 2. Note that the output map does not depend on the measurement output, cf discussion below. Also note that since all possible outcomes appear in the definition of the maps M and M -the corresponding Choi states include a description of the labels -equality (7) guarantees at the same time that the outcome states are as expected and that each outcome appears with the desired probability.
The previous equality cannot be satisfied in an actual experiment due to unavoidable imperfections. Following [39,40], we thus propose an extension for quantifying the distance F(M, M) between M and M using where F (ρ, σ) = Tr √ ρ σ √ ρ is the Uhlmann fidelity between two states ρ and σ.

Recipe
The aim of this section is to show how the quantity (8) can be lower bounded in the setup presented in Fig. 3. In addition to the source producing the bipartite state ρ and the measurement M to be characterised, each party has a measurement box. The box of party A has two inputs A 0 and A 1 while the one of party B has four inputs B 0 , B 1 , B 2 , B 3 . For each measurement input, a binary outcome is obtained called a for A and b for B, with a, b = ±1. The measurement M can be applied by party B before the measurement input is chosen. Although there is no assumption about the Hilbert space dimension and on the proper calibration of the measurement devices, M can be characterised in two steps: Step I identifies the quality of the state produced by the source while step II is used to characterise the states after each outcome of the measurement to be certified. The certifications associated to steps I and II are then combined to bound F(M, M) as defined in Eq. (8) Let us first focus on step I. In this step, the measurement settings A 0/1 and B 0/1 are chosen

t e x i t s h a 1 _ b a s e 6 4 = " c h C g x t j 5 u c C y B T Y R Z I W x D d H Y e y U = " > A A A D C 3 i c j V J N T x R B E H 0 M g r g C L n A x 8 T K R m H j a z H C B I 8 E L B w + Q s E D c x U 1 P b + / u h P l K T 4 8 J W S D +
s 7 a D P 2 O T 7 j C 7 5 6 n 7 w L 7 9 K 7 m k i 9 q d p n B b 8 t 7 / o H 4 i G k P g = = < / l a t e x i t > < l a t e x i t s h a 1 _ b a s e 6 4 = " q q e v S C i N T v U g h U n f 5 j P s 3 F l a J C k D 3 i + 4 C n 3 Z r N e L Y x S + c t m S X h 1 v T 0 s U i f n D p N b L P 5 z l 6 5 y J b 9 W + y R i 2 n / 7 Y T f q I 6 V k j U 4 J P s / v x v l f f 1 s L Q Z D v H A 1 x K y p c I y t T v 6 j B 6 N f s T W t Q 2 6 r t T k r 1 0 N b p 3 + r B 4 b q g p z F A 9 o 1 s X R 5 b q b i O 5 / S d c p O Q j j 7 N 6 e 0 r D 3 L W l v h u 6 2 J 1 y H 8 c / h 3 Q X e 5 H Q b t 8 B X v x R q u 1 x S e 4 T m W O P 0 V r G I D m + g w 9 h t 8 x C d 8 9 t 5 7 5 9 6 F d 3 k t 9 c Z q n x Z + W 9 7 V T 5 r / p j s = < / l a t e x i t > < l a t e x i t s h a 1 _ b a s e 6 4 = " q q e v S C i N T v U g h U n f 5 j P s 3 3 3 t v 3 3 s T F U l c m i D 4 M u Y 9 e D g + M T n 1 q P F 4 e m b 2 S X P u a b f M K y 1 V R + Z J r n c i U a o k z l T H x C Z R O 4 V W I o 0 S t R 0 d r V v 7 9 r H S Z Z x n W + a k U H u p O M j i Y S y F I d V v z j c a v Z e U D 8 R + 3 u + l w h y W U o / W T s / 6 z Y W g H b j l 3 w V h D R Z W l 1 u v 3 7 7 7 8 H U z b / 5 A D w P k k K i Q Q i G D I U 4 g U P L Z R Y g A B b k 9 j M h p o t j Z F c 7 Q o G 9 F l a J C k D 3 i + 4 C n 3 Z r N e L Y x S + c t m S X h 1 v T 0 s U i f n D p N b L P 5 z l 6 5 y J b 9 W + y R i 2 n / 7 Y T f q I 6 V k j U 4 J P s / v x v l f f 1 s L Q Z D v H A 1 x K y p c I y t T v 6 j B 6 N f s T W t Q 2 6 r t T k r 1 0 N b p 3 + r B 4 b q g p z F A 9 o 1 s X R 5 b q b i O 5 / S d c p O Q j j 7 N 6 e 0 r D 3 L W l v h u 6 2 J 1 y H 8 c / h 3 Q X e 5 H Q b t 8 B X v x R q u 1 x S e 4 T m W O P 0 V r G I D m + g w 9 h t 8 x C d 8 9 t 5 7 5 9 6 F d 3 k t 9 c Z q n x Z + W 9 7 V T 5 r / p j s = < / l a t e x i t > < l a t e x i t s h a 1 _ b a s e 6  freely and applied directly on the state produced by the source ρ so that party A and B can estimate the Clauser, Horne, Shimony, and Holt (CHSH) value [13] Here, A k B j = a,b a b P (a, b|A k , B j ) is the expectation value of measurements A k and B j . The CHSH value allows one to bound the fidelity of ρ with a maximally-entangled two-qubit state.
In particular, the results of Ref. [41] show that there exist local extraction maps Λ A : Whenever β = 2 √ 2, the formula (10) certifies that the source produces |φ + up to local maps, these maps being explicitly defined from the quantum description of the measurement inputs A 0/1 and B 0/1 . In this case, the same maps can be used to show that A 's settings correspond to the Pauli measurements A 0 = σ z and A 1 = σ x while B's settings correspond to B 0/1 = 1 √ 2 (σ z ± σ x ) 1 .  Step I is used to characterize the state of the source while Step II gives a certificate of the post-measurement states. The statistics recorded in each step is then used to certify the quality of measurement M device-independently.
In step II, party B applies M. Let us first consider the state conditioned on the outcome 0, which is characterized using A 0/1 and B 2/3 . In particular, parties A and B are interested in the Bell inequality cos(2θ) + (2 + cos(2θ)) 7 − cos(4θ) 5 + cos(4θ) (11) with b θ = arctan (1 + 1 2 cos 2 (2θ))/ sin 2 (2θ), whose maximal quantum value is one by construction. We derived this Bell inequality using the variational method presented in [27,42] to self-test partially-entangled two-qubit pure states in a particularly robust manner. Note that for θ = π 4 , Ineq. (11) is the re-normalized CHSH inequality. However, we emphasize that Ineq. (11) is not equivalent to the tilted-CHSH inequality of Refs. [43,44] but was carefully constructed for the demands of self-testing presented here. The knowledge of I θ allows one to bound the fidelity of the conditional state 0 , that is, to guarantee the existence of local maps Λ A : Here, I * θ is a cutoff parameter corresponding to the violation for which the fidelity matches the square of the largest Schmidt coefficient of |φ 0 θ = cos(θ)|00 + sin(θ)|11 . Fig. 4 shows the critical value I * θ for both this inequality and the tilted CHSH inequality, as calculated in the Appendix. The previous bound shows that whenever I θ reaches its maximal quantum value I θ = 1, the state conditioned on the outcome 0 corresponds to the state |φ 0 θ up to local maps, these maps being explicitly defined from the quantum description of the measurements performed by A 0/1 and B 2/3 respectively. The same maps can also be used to show that when I θ = 1, A 's settings correspond to the Pauli measure- The post-measurement state corresponding to the outcome 1 can be characterized with the same measurement boxes A 0/1 and B 2/3 , as well as the same local extraction maps Λ A and Λ o,θ B| , see Appendix. Moreover, by including the classical output of the measurement in a global state including a register, as mentioned before, the overall post-measurement state can be written in a compact form   (11); we assume that the second output state appears with probability p 0 = p 1 = 1 2 achieving the violation I 0 θ , I 1 θ ≥ I θ . The plot is for θ = (2π + 7)/22 ≈ 0.6. associated to outcome , and p the probability of this outcome. As the certificates for the two branches 0 and 1 are obtained with the same isometries, they can be combined into a single certificate for . In particular, using the orthogonality of the register states, we have Taking into account the fact that the fidelity cannot decrease under completely-positive trace-preserving maps and using the triangle inequality arccos(F (ρ 1 , ρ 3 )) ≤ arccos(F (ρ 1 , ρ 2 )) + arccos(F (ρ 2 , ρ 3 ))), we can prove that the fidelity of the state before and after the measurement can be combined to bound the fidelity of the measurement itself, that is, (see Proposition 5 of [27]). Whenever β = 2 √ 2 and I θ = 1 for both output states, this bound guarantees that F(M, M) = 1. In noisy scenarios, the fidelity that can be certified is shown in Fig. 5.
Note that in case where the fidelity of the state before the measurement cannot be assessed, the quality of the measurement cannot be certified. Indeed, if the source produces the state |φ 0 θ |0 B + |φ 1 θ |1 B , and the measurement simply reads out the auxiliary B system, then all post-measurement statistics are reproduced. Hence, it is necessary to be able to estimate the quality of the pre-measurement state to give a certificate for the proper functioning of the measurement itself.

Discussion
So far our exposition was focused on the particular example of Kraus operators given by Eq. (1) and (2). Nevertheless, the reader might have noticed that only the tests used to bound the fidelity of the initial state F i and of the post-measurement states F o are specific to this example. Consider now a general quantum instrument and assume that one can obtain certificates for the state produced by the source as in Eq. (10) and for all the post-measurement states as in Eq. (12). If the extraction maps Λ A on Alice's side are the same for all certificates, straightforward application of Eqs. (14) and (15) provides a self-testing of the whole instrument. In summary, our approach applies straightforwardly to quantum instruments with an arbitrary number of classical outcomes, including qubit measurements with more than two Kraus operators and measurements on larger-dimensional systems, as well as multipartite instruments.
Note also that we focused on a formulation where the extraction maps Λ o B| in Eq. (6) act trivially on the classical measurement output R, that is the extraction maps applied on the quantum output is independent of the measurement result . We believe that this corresponds to the spirit of self-testing in which states and channels are certified up to passive transformations. Nevertheless, a formulation where the extraction maps Λ o, B| acting on the post-measurement quantum state depend on the measurement outputs is also possible. In this case it is sufficient to certify the initial and all post-measurement states independently in order to obtain a certificate for the whole instrument. Our derivation then holds as long as Alice's maps are the same.

Conclusion
We provided a family of Bell inequalities that can be used to self-test non-maximally-entangled two-qubit states with a greater resistance to noise than known Bell inequalities. These results allowed us to derive robust bounds that can be used in practice to certify the quality of qubits measurements beyond the von Neumann model and rank-one POVMs. This takes essentially three steps. In the first step, the CHSH test is performed without the measurement to evaluate the quantity β. In the second step, Bell tests are performed after the measurement to be certified is applied on the system, so as to evaluate the values I θ and I θ (see appendix) for each classical output of the instrument. In the third step, the fidelity of the actual measurement is deduced from fidelities of the state before the measurement F i and of the post-measurement states F θ using the formula given in Eq. (15). The robustness of our certification techniques together with the flexibility of our recipe make us confident that self-testing of quantum instruments could soon be demonstrated experimentally. For a more theoretical perspective, our results could be naturally extended to self-test only one Kraus operator within a family. This could be obtained by generalizing the 'heralded' fidelity defined in [26] to the current setting. tion using electron spins separated by 1.3 kilometres, Nature 526, 682 (2015).

A Appendix
In the supplemental material we will prove the inequality in Eq. (12) of the main text. To do so we have to lower bound the fidelity of an unknown state ρ with respect to |φ 0 θ = cos(θ)|00 + sin(θ)|11 (16) as a function of the expected value of the following Bell expression evaluated on the state ρ where b θ = arctan . Here and in the rest of the appendix we use the short notation c θ = cos(θ) and s θ = sin(θ). The Bell expression Eq. (17) has a quantum bound of 1, achieved by measuring precisely the two-qubit state |φ 0 θ with the observables We find that the local bound of Eq. (17) achieved by the deterministic local strategy {A 0 = A 1 = B 0 = 1, B 1 = −1} is given by This value is to be compared with the local bound of the well-known (normalized) tilted-CHSH , also known to attain the quantum bound of 1 for the partially entangled state of Eq. (16) and well-chosen measurement settings, see Ref. [43,44] of the main text. We find that the local bound of Eq. (20) is always higher than the local bound of the tilted-CHSH , meaning that the violation of the tilted-CHSH inequality is more robust to white noise than the violation of our new Bell inequality. Nevertheless, our later studies will show that the new Bell operator allows for a more noise-tolerant state certification. The reason for this counter-intuitive result is the following: comparing the observed violation to the local bound only provides information on the distance between the target state (in our case |φ 0 θ ) and deterministic strategies, given by parallel measurement setting A 0 = ±A 1 with B 0 = ±B 1 and product states |ψ A |ψ B with A 0 |ψ A = ±|ψ A and B 0 |ψ B = ±|ψ B . In self-testing, on the other hand, we need to bound the distance of the target state to arbitrary states for arbitrary measurement settings. It is then crucial that the violation worsens drastically when departing from the perfect settings.

A.1 Fidelity Bounds
To derive lower bounds on the state fidelity from a Bell violation I θ we use the tools presented in Ref. [27] of the main text. There, it is shown that such a global lower bound can be obtained by solving a two-qubit problem. More precisely, the state fidelity can be bounded by minimizing the quantity with O(ρ, σ) = Tr(σρ), over all possible twoqubit states ρ and all possible qubit observables A 0 , A 1 , B 0 , B 1 (with eigenvalues ±1) that are compatible with the value I θ of the Bell operator. Here, are the local extraction channels that can depend on the local observable A 0 with A 1 for Λ A and B 0 with B 1 for Λ o,θ B . The first step, therefore, is to fix these extraction channels.
Before we do so, let us fix some notation for the local observables. Any qubit observable with eigenvalues +1 and −1 can be written as n · σ with |n| = 1. Furthermore, without loss of generality, we can set the local bases such that where H = 1 √ 2 (σ z +σ x ), V = 1 √ 2 (σ z −σ x ). Hence, in the minimization the pairs of observable A 0 , A 1 and B 1 , B 2 as well as the extraction channels Λ A and Λ o,θ B only depend on a single parameter a and b respectively. upon applying the extraction maps Λ a and Λ b . We will now show the violation of another inequality I θ , related to I θ by a mere relabeling of some of the inputs and outputs, bounds the overlap of a state ρ with the other target state θ φ 0 θ | (R † ⊗R † ) −sB (a, b) − µ1 ≥ 0.
The rotation on Bob's side commutes with the extraction channel Λ b . This is easily verified by reminding ourselves that Ω b ∈ {σ x , σ z } and therefore On Alice's side, we realize that RHR † = V . Therefore RΓ π 2 −a R † = Γ a . By also recalling that Figure 6: The first row shows the settings present in the experiment, the left column belongs to Alice, the right one to Bob. In case the outcome of the generalized measurement is 0, they just collect the data. If the outcome is 1, Bob reinterprets his inputs, i.e. if he chose B 0 he saves the result as the outcome of B 1 and vice versa. Alice on the other hand collects her data applying A 0 → −A 0 . This transformation is sketched in the second row. The effect of this post-processing on the settings correspond to Alice applying a shift to her measurement angle followed by a rotation aroundx by π, i.e. Rx(π)•(a → π 2 − a), where Rx(π) = e i π 2 σx . The observables of Bob are simply rotated by Rx(π). g( π 2 − a) = g(a), we find that RΛ π 2 −a [ρ]R † = Λ a [RρR † ].
Combining everything and using R ⊗ R|φ 0 θ = |φ 1 θ , Eq. (36) is equivalent to (37) which implies that with the same extraction channels and observables, and a new Bell test I θ , one can device-independently self-test the second output state |φ 1 θ .