Main

Consider a scenario where a classical user, Victor, engages with a quantum device by posing questions \(x\in\mathcal{I}\) and receiving answers \(a\in\mathcal{O}\), where \(\mathcal{I}\) and \(\mathcal{O}\) are two finite sets of labels. Lacking any prior knowledge of the device’s internal workings, Victor models its behaviour as a state preparation |ψ〉, accompanied by quantum measurements {Max,∑aMax = I} where I is the identity matrix. In response to question x, the device executes measurement {Ma|x}a on the state |ψ〉 and outputs the resulting measurement output a. While it is straightforward to predict the device’s output statistics from |ψ〉 and {Max} using Born’s rule1 p(ax) = 〈ψMaxψ〉, it is impossible to deduce |ψ〉 and {Max} solely from the statistics p(ax). Indeed, different states |ψ〉 and {Max} can yield the same p(ax). In this setting, even a classical computer is always able to simulate the quantum process, if its running time is not limited.

Intriguingly, deducing the quantum functionality from the resulting classical statistics becomes possible in the so-called bipartite Bell scenario2,3 (Fig. 1). Here, Victor interacts with two spatially separated quantum devices, named Alice and Bob. He poses questions \(x\in {{{{\mathcal{I}}}}}_{\mathrm{A}}\) and \(y\in {{{{\mathcal{I}}}}}_{\mathrm{B}}\) to Alice and Bob respectively, who in turn provide answers, \(a\in {{{{\mathcal{O}}}}}_{\mathrm{A}}\) and \(b\in {{{{\mathcal{O}}}}}_{\mathrm{B}}\). While Alice and Bob cannot communicate during this interaction, they may share an entangled quantum state |ψAB, which they can measure locally using measurements \(\{{M}_{a| x}:a\in {{{{\mathcal{O}}}}}_{\mathrm{A}},x\in {{{{\mathcal{I}}}}}_{\mathrm{A}}\}\) and \(\{{N}_{b| y}:b\in {{{{\mathcal{O}}}}}_{\mathrm{B}},y\in {{{{\mathcal{I}}}}}_{\mathrm{B}}\}\) to obtain outputs a and b. The statistics observed by Victor then follow the distribution p(a,bx,y) = 〈ψMaxNbyψ〉. Some statistics p(a,bx,y) can exclusively be produced by a specific set of measurements {Max} and {Nby} on a specific entangled state |ψAB (up to a change of a local frame of reference). This phenomenon is known as self-testing4 and it relies on key features of quantum theory such as entanglement5 and incompatibility of measurements6. Self-testing represents the strongest form of verification as it requires minimal assumptions, namely, no-communication between Alice’s and Bob’s measuring devices and the validity of the quantum theory. In particular, in self-testing we do not require access to any trusted or fully characterized quantum devices, a condition also known as device independence7.

Fig. 1: Self-testing in a Bell scenario.
figure 1

Spatially separated, Alice and Bob perform local measurements on a shared state (left, described by \({{{\mathcal{S}}}}\)), giving rise to correlation p(a,bx,y). In the case of self-testing (right), Victor can classically verify Alice and Bob: the only way for Alice and Bob to produce the correct correlation is by adhering to the prescribed specification \(\tilde{{{{\mathcal{S}}}}}\).

The quantum mechanical description of the devices in a bipartite Bell scenario is given by what we call a strategy. Formally, such a strategy \({{{\mathcal{S}}}}\) is a tuple:

$${{{\mathcal{S}}}}=\left({\left\vert \psi \right\rangle }_{\mathrm{AB}},\{{M}_{a|x}:a\in {{{{\mathcal{O}}}}}_{\mathrm{A}},x\in {{{{\mathcal{I}}}}}_{\mathrm{A}}\},\{{N}_{b|\,y}:b\in {{{{\mathcal{O}}}}}_{\mathrm{B}},y\in {{{{\mathcal{I}}}}}_{\mathrm{B}}\}\right),$$

where \({\left\vert \psi \right\rangle }_{\mathrm{AB}}\in {{{{\mathcal{H}}}}}_{\mathrm{A}}\otimes {{{{\mathcal{H}}}}}_{\mathrm{B}}\) is the shared state and \({{{{\mathcal{M}}}}}_{x}=\{{M}_{a|x}\}\subseteq {{{\mathcal{L}}}}({{{{\mathcal{H}}}}}_{\mathrm{A}})\) and \({{{{\mathcal{N}}}}}_{b}=\{{N}_{b|\,y}\}\subseteq {{{\mathcal{L}}}}({{{{\mathcal{H}}}}}_{\mathrm{B}})\) are the positive operator-valued measures (POVMs) of Alice and Bob respectively. Here \({\mathcal{H}}_{\mathrm{A}}/{\mathcal{H}}_{\mathrm{B}}\) denotes the Hilbert space of Alice/Bob, and \({\mathcal{L}}({\mathcal{H}})\) is the space of linear operators on \({\mathcal{H}}\). The resulting measurement statistics:

$$p(a,b| x,y)=\langle \psi | {M}_{a| x}\otimes {N}_{b|\, y}| \psi \rangle$$

is commonly referred to as correlation. In self-testing, we can recover the description of the state and measurements comprising \({{{\mathcal{S}}}}\) from merely observing the measurement statistics p that it produces. So whenever self-testing holds, we can verify the involved state-preparation and measurement functionalities without any prior knowledge of the inner workings of the employed quantum devices. This leads us to the following fundamental question of self-testing:

Question

Which quantum states and which measurements can be self-tested?

In other words, the above question asks which state-preparation and measurement functionalities can be verified by a classical user with no access to trusted quantum devices. To verify (self-test) a given state-preparation or measurement functionality, we need to construct a strategy \({{{\mathcal{S}}}}\) that incorporates this functionality and is moreover determined (self-tested) by the correlation it produces.

In the bipartite scenario, the question regarding self-testable states has been answered by a milestone result8 that allowed any pure bipartite entangled state to be self-tested. Recent work showed that in the network setting9 it is possible to self-test any entangled multiparty state10. In contrast to this relatively complete picture for self-testing of quantum states, the self-testing of general measurements has remained elusive. Existing protocols primarily focus on low-dimensional quantum systems or specific higher-dimensional measurements. In the case of a two-level system, we know how to self-test Pauli measurements4, and subsequent work has shown that any two-dimensional projective measurement is self-testable11. In refs. 12,13 tensor-products of Pauli matrices were self-tested, and ref. 14 presented a self-test for a particular pair of d-output measurements. In refs. 15,16, constant-sized self-testing of measurements satisfying some special property is demonstrated. The verification of measurements has also been considered in more general scenarios, including verification of POVM measurements in one-sided device-independent settings17 and verification of entangled measurements in structured networks18. Self-testing of arbitrary higher-dimensional measurements in the standard bipartite Bell scenario, however, has remained out of reach.

The issue of complex measurements

If a strategy uses complex measurements (measurements with complex matrix entries in a Schmidt basis of the shared state), we can take the complex conjugate to obtain a different strategy that yields the same statistics:

$$\left\langle \psi | {\overline{M}}_{a| x}\otimes {\overline{N}}_{b|\, y}| \psi \right\rangle =\left\langle \psi | {M}_{a| x}\otimes {N}_{b|\, y}| \psi \right\rangle .$$

In general, the complex conjugated strategy \(({\left\vert \psi \right\rangle }_{\mathrm{AB}},\{{\overline{M}}_{a|x}\},\{{\overline{N}}_{b|\,y}\})\) cannot be obtained from the original strategy by a local change of basis. Unlike a change of reference frame, complex conjugation does not have a natural physical interpretation. Hence, complex conjugation is a fundamental obstruction to the verification of complex measurements in the strongest possible sense in the standard two-party Bell scenario. To verify complex measurements, the usual approach is to weaken the self-testing definition and consider equivalence up to both the change of local frame of reference and the complex conjugate19,20,21,22. More generally, this approach aligns with the concept of convex self-testing23, allowing Alice and Bob to employ a convex combination of strategies (in the case of self-testing strategies with complex entries, a reference strategy and its complex conjugate). In this work our goal is to identify which measurements can be verified (self-tested) in the strongest form—that is, only up to a change of local frame of reference, which is not met by complex measurements. A recent work24 showed that only projective measurements fulfil this strict self-testing criterion. Our findings therefore offer a comprehensive self-testing protocol for all measurements that are potentially self-testable.

In this work we study the self-testing of measurements in a comprehensive (as opposed to example-based) manner, and provide initial general results for self-testing of measurements. Our specific contributions include the following:

First, we put forth a fully explicit self-testing protocol for any real projective measurement. Our construction has a question set of cubic size in d, the dimension of the measurement to be self-tested, and a constant-sized answer set. Our self-test is also robust to noise.

Second, we formalize the method of post-hoc self-testing and identify the condition for its application. Post-hoc self-testing occurs when we can extend a previously self-tested strategy to include an additional measurement. While there are sporadic examples of this method in the literature, a comprehensive understanding of this phenomenon and when it occurs was lacking. To remedy this, we identified a condition under which an initial self-test of a given \({{{\mathcal{S}}}}\) can be extended to include an additional \({{{\mathcal{M}}}}\). Applying this criterion to an initial strategy from recent work15 allows us to obtain our explicit self-testing construction for any real projective measurement.

Finally, we develop a new technique of iterative self-testing that involves the sequential application of post-hoc self-testing. Starting from any established self-test, we use Jordan algebra to characterize the set of measurements that can be verified via iterative self-testing. Iterative self-testing is inspired by the formalization of post-hoc self-testing, and offers a way of developing new self-tests based on pre-existing ones.

Set-up

The observable picture of measurements

In many cases, especially when the measurement is projective (that is, all operators in the POVMs are projections), it can be more convenient to work with generalized observables than with operators of POVMs. Given a POVM \(\{{M}_{a}:a\in [0,| {{{{\mathcal{O}}}}}_{\mathrm{A}}| -1]\}\), its generalized observables are contractions given by:

$${A}^{(j)}:=\sum_{a=0}^{| {{{{\mathcal{O}}}}}_{\mathrm{A}}| -1}{\omega }^{aj}{M}_{a},j\in [0,| {{{{\mathcal{O}}}}}_{\mathrm{A}}| -1]$$

where \(\omega ={\mathrm{e}}^{i2\uppi /| {{{{\mathcal{O}}}}}_{\mathrm{A}}| }\). Note that {Ma} can be recovered from {A(j)} by \({M}_{a}=\frac{1}{| {{{{\mathcal{O}}}}}_{\mathrm{A}}| }{\sum }_{j = 0}^{| {{{{\mathcal{O}}}}}_{\mathrm{A}}| -1}{\omega }^{-aj}{A}_{x}^{(\;j)}\). So {A(j)} provides an alternative, yet full, description of the measurement {Ma}. One important property of generalized observables is that a measurement {Ma} is projective if, and only if, the corresponding AA(1) is a unitary matrix of order \(| {{{{\mathcal{O}}}}}_{\mathrm{A}}|\) (see ref. 25 for a proof; here, the order of A is the smallest integer n such that An = I). In this case A(j) = Aj is the jth power of A, implying that every projective measurement {Ma} is fully characterized by a single operator A = ∑aωaMa. Therefore, we call A the observable of {Ma} whenever {Ma} is a projective measurement.

In this work we specify quantum strategies by the tuple:

$${{{\mathcal{S}}}}=\left({\left\vert \psi \right\rangle }_{\mathrm{AB}},\left\{{A}_{x}^{(j)}:x\in {{{{\mathcal{I}}}}}_{\mathrm{A}},\,j\in {{{{\mathcal{O}}}}}_{\mathrm{A}}\right\},\left\{{B}_{y}^{(k)}:y\in {{{{\mathcal{I}}}}}_{\mathrm{B}},k\in {{{{\mathcal{O}}}}}_{\mathrm{B}}\right\}\right),$$

where \({A}_{x}^{(j)}=\mathop{\sum }_{a = 0}^{| {{{{\mathcal{O}}}}}_{\mathrm{A}}| -1}{\omega }_{A}^{a\,j}{M}_{a| x}\), \({\omega }_{A}={\mathrm{e}}^{i2\uppi /| {{{{\mathcal{O}}}}}_{\mathrm{A}}| }\), \({B}_{y}^{(k)}=\mathop{\sum }_{b = 0}^{| {{{{\mathcal{O}}}}}_{\mathrm{B}}| -1}{\omega }_{B}^{bk}{N}_{b|\, y}\) and \({\omega }_{B}={\mathrm{e}}^{i2\uppi /| {{{{\mathcal{O}}}}}_{\mathrm{B}}| }\). The correlation is also conveniently specified via

$${\left\{\left\langle \psi \left\vert {A}_{x}^{(j)}\otimes {B}_{y}^{(k)}\right\vert \psi \right\rangle \right\}}_{j,k,x,y}={\left\{\mathop{\sum}_{a,b}{\omega }_{A}^{aj}{\omega }_{B}^{bk}p(ab| xy)\right\}}_{j,k,x,y}.$$

Furthermore, we call \({{{\mathcal{S}}}}\) projective if all the measurements in \({{{\mathcal{S}}}}\) are projective, and denote it by \({{{\mathcal{S}}}}=({\left\vert \psi \right\rangle }_{\mathrm{AB}},\{{A}_{x}:x\in {{{{\mathcal{I}}}}}_{\mathrm{A}}\},\{{B}_{y}:y\in {{{{\mathcal{I}}}}}_{\mathrm{B}}\})\) for simplicity. In this work we shall present our results in terms of observables.

Self-testing

In a self-testing protocol the verifier Victor wishes to infer the underlying quantum strategy from his observation of correlations, so it is desired that the strategy generating a given correlation is to some extent unique. However, there are at least two types of manipulation of the strategy that do not affect the correlation. First, if we only choose a different basis, then strategies \({{{\mathcal{S}}}}=({\left\vert \psi \right\rangle }_{\mathrm{AB}},\{{A}_{x}^{(j)}\},\{{B}_{y}^{(k)}\})\) and \({{{\mathcal{S}}}}{\prime} =({U}_{\mathrm{A}}\otimes {U}_{\mathrm{B}}{\left\vert \psi \right\rangle }_{\mathrm{AB}},\{{U}_{\mathrm{A}}{A}_{x}^{(j)}{U}_{\mathrm{A}}^{{\dagger} }\},\{{U}_{\mathrm{B}}{B}_{y}^{(k)}{U}_{\mathrm{B}}^{{\dagger} }\})\) produce the same correlation for any local unitaries UA,UB. Second, if we attach a bipartite auxiliary state \({\left\vert {{\mathrm{aux}}}\,\right\rangle }_{{\mathrm{A}}^{\prime}{\mathrm{B}}^{\prime} }\) on which the measurements act trivially, then strategies \({{{\mathcal{S}}}}=({\left\vert \psi \right\rangle }_{\mathrm{AB}},\{{A}_{x}^{(j)}\},\{{B}_{y}^{(k)}\})\) and \({{{\mathcal{S}}}}{\prime} =\left({\left\vert {{\mathrm{aux}}}\,\right\rangle }_{{\mathrm{A}}{\prime}{\mathrm{B}}{\prime} }\right.\)\(\otimes {\left\vert \psi \right\rangle }_{\mathrm{AB}},\{I\otimes {A}_{x}^{(j)}\},\{I\otimes {B}_{y}^{(k)}\}\big)\) produce the same correlation. Motivated by the above two manipulations, we say that \(\tilde{{{{\mathcal{S}}}}}\) is a local dilation of \({{{\mathcal{S}}}}\) if up to a change of local bases \({{{\mathcal{S}}}}\) is \(\tilde{{{{\mathcal{S}}}}}\) plus some trivial auxiliary state. We are now ready to define self-testing.

Definition 1

A strategy \(\tilde{{{{\mathcal{S}}}}}=(\left\vert \tilde{\psi }\right\rangle ,\{{\tilde{A}}_{x}^{(j)}\},\{{\tilde{B}}_{y}^{(k)}\})\) is self-tested if any strategy \({{{\mathcal{S}}}}=(\left\vert \psi \right\rangle ,\{{A}_{x}^{(j)}\},\{{B}_{y}^{(k)}\})\) producing the same correlation as \(\tilde{{{{\mathcal{S}}}}}\) must be locally dilated to \(\tilde{{{{\mathcal{S}}}}}\); that is, up to change of local bases, \({A}_{x}^{(j)}=I\otimes {\tilde{A}}_{x}^{(j)}\), \({B}_{y}^{(k)}\) \(=I\otimes {\tilde{B}}_{y}^{(k)}\) and \(\left\vert \psi \right\rangle =\left\vert {{\mathrm{aux}}}\,\right\rangle \otimes \left\vert \tilde{\psi }\right\rangle\) for some auxiliary state \(\left\vert {{\mathrm{aux}}}\,\right\rangle\).

Results

We begin by presenting our main result: the self-testing of any real projective measurement. Next, we introduce the methodology employed to establish this result and outline its proof. Lastly, we propose the method of iterative self-testing and offer a criterion for its application.

Self-testing of any real projective measurement

We now show how to self-test an arbitrary real projective measurement. Specifically, we construct the following self-tested strategy:

Theorem 1

Let \(\left\vert {\varPhi }_{d}\right\rangle ={\sum }_{j = 0}^{d-1}\left\vert\, jj\right\rangle /\sqrt{d}\) be the (canonical) maximally entangled state in dimension d. For any d2, we construct d-dimensional binary observables \({\tilde{T}}_{0},\ldots ,{\tilde{T}}_{d(d+1)/2}\) such that for any d-dimensional real projective measurement given by its observable \(\tilde{O}\), the strategy:

$${\tilde{S}} = \left(\left|\phi_{d} \right\rangle,\overbrace{\{{\tilde{T}}_{0},\ldots,{\tilde{T}}_{d},{\tilde{O}}\}}^{{\rm{Alice}}{\hbox{'}}{\rm{s}}\,{\rm{measurements}}},\overbrace{\{{\tilde{T}}_{0},\ldots{\tilde{T}}_{d},{\tilde{T}}_{d+1},\ldots,{\tilde{T}}_{d(d+1)/2-1}\}}^{{\rm{Bob}}{\hbox{'}}{\rm{s}}\,{\rm{measurements}}}\right)$$

is self-tested.

The binary observables \({\tilde{T}}_{0},\ldots ,{\tilde{T}}_{d(d+1)/2-1}\) correspond to rank-1 projections coming from vectors forming the standard (d + 1)-simplex centred at the origin (their explicit construction is described in Supplementary Section 3.1). But let us briefly discuss a few key points about Theorem 1. First, the observables \(\{{\tilde{T}}_{j}\}\) are independent of the specific d-dimensional observable \(\tilde{O}\) that Victor wishes to self-test, as long as d is fixed. One can therefore simultaneously incorporate several new projective measurements. Second, all \({\tilde{T}}_{j}\) are binary measurements (have two outputs), which means that the size of the question set \({{{{\mathcal{I}}}}}_{\mathrm{A}}\times {{{{\mathcal{I}}}}}_{\mathrm{B}}\) is in O(d3), while the answer set is constant-sized. Third, the self-test from Theorem 1 is robust to noise: if a strategy produces a correlation close to that of \(\tilde{{{{\mathcal{S}}}}}\), then it must be close to \(\tilde{{{{\mathcal{S}}}}}\) up to a basis change and enlargement by some trivial auxiliary state. The robust version of Theorem 2 can be found in Supplementary Section 2.2.

Condition for post-hoc self-testing

The concept of post-hoc self-testing has been implicitly employed in previous works, such as self-testing of graph states26, randomness certification27,28 and one-sided self-testing17,29. A review paper30 summarized this technique and referred to it as post-hoc self-testing. In this section, we formalize the idea of post-hoc self-testing and establish the necessary condition for its application.

In post-hoc self-testing we consider a scenario where we have self-tested strategy \(\tilde{{{{\mathcal{S}}}}}=(\left\vert \tilde{\psi }\right\rangle ,{\{{\tilde{A}}_{x}^{(j)}\}}_{x},\{{\tilde{B}}_{y}^{(k)}\}_{y})\), and we would like to self-test an additional measurement \(\{{\tilde{O}}^{(\ell )}\}\), where denotes the outcome of the additional measurement. We are interested to ask when \(\{{\tilde{O}}^{(\ell )}\}\) can be self-tested by extending \(\tilde{{{{\mathcal{S}}}}}\). In particular, when is \(\tilde{{{{\mathcal{S}}}}}{\prime} =(\left\vert \tilde{\psi }\right\rangle ,{\{{\tilde{A}}_{x}^{(j)}\}}_{x},\{{\tilde{B}}_{y}^{(k)},{\tilde{O}}^{(\ell )}\}_{y})\) self-tested by the correlation it produces (Fig. 2)? As \(\tilde{{{{\mathcal{S}}}}}\) is self-tested, Alice has to honestly perform some measurement that is a local dilation of \(\{{\tilde{A}}_{x}^{(j)}\}\), producing correlations \({\{\langle \tilde{\psi }| ({\tilde{A}}_{x}^{(j)}\otimes {\tilde{O}}^{(\ell )})| \tilde{\psi }\rangle \}}_{x}\) between \({\tilde{A}}_{x}^{(j)}\) and \({\tilde{O}}^{(\ell )}\). Now if \({\{\langle \tilde{\psi }| ({\tilde{A}}_{x}^{(j)}\otimes {\tilde{O}}^{(\ell )})| \tilde{\psi }\rangle \}}_{x}\) can fully characterize \(\{{\tilde{O}}^{(\ell )}\}\) for all then Bob also has no choice but to honestly perform a local dilation of \({\tilde{O}}^{(\ell )}\), and \(\tilde{S}{\prime}\) remains self-tested consequently. Whether \({\{\langle \tilde{\psi }| {\tilde{A}}_{x}^{(j)}\otimes {\tilde{O}}^{(\ell )}| \tilde{\psi }\rangle \}}_{x}\) fully characterizes \({\tilde{O}}^{(\ell )}\) will depend on \(\{{\tilde{A}}_{x}^{(j)}\}\), \(\left\vert \tilde{\psi }\right\rangle\), and \({\tilde{O}}^{(\ell )}\). The following theorem provides a criterion for post-hoc self-testing when the measurements are projective.

Fig. 2: Post-hoc self-testing.
figure 2

Starting from a self-tested strategy \(\tilde{{{{\mathcal{S}}}}}\) (left), if it is feasible to infer the new measurement \({\tilde{O}}^{(\ell )}\) with input ynew and output from correlations \(\{\langle \psi | {A}_{x}^{(j)}\otimes {O}^{(\ell )}| \psi \rangle \}\), then extended strategy \(\tilde{{{{\mathcal{S}}}}}^{\prime}\) (right) remains self-tested.

Theorem 2

A criterion for post-hoc self-testing. Let \(\tilde{{{{\mathcal{S}}}}}=(\left\vert \tilde{\psi }\right\rangle ,{\{{\tilde{A}}_{x}\}}_{x},\{{\tilde{B}}_{y}\}_{y})\) be a self-tested projective strategy, and let \(\tilde{O}\) be the observable of an L-output projective measurement. Then \(\tilde{{{{\mathcal{S}}}}}{\prime} =(\left\vert \tilde{\psi }\right\rangle ,{\{{\tilde{A}}_{x}\}}_{x},\{{\tilde{B}}_{y},\tilde{O}\}_{y})\) remains self-tested, if the following holds: for each ℓ[0, L1], there exists a positive-definite operator P such that:

$$\overline{{\tilde{O}}^{\ell }}{P}_{\ell }\in {{{\mathrm{span}}}\,}_{{\mathbb{C}}}\left\{D{\tilde{A}}_{x}^{j}D:x,j\right\},$$
(1)

where D is the diagonal matrix D= diag1, , λd), and λj are the Schmidt coefficients of \(\left\vert \tilde{\psi }\right\rangle\).

The key steps towards Theorem 2 are twisting the tracial inner product between operators with D, inducing a conformal pairing of vectors with P and then leveraging the metric properties of observables and isometries to recover \({\tilde{O}}^{\ell }\). While the positive definite P renders condition (1) nonlinear, its existence can be determined via semi-definite optimization.

While condition (1) can be checked through a semi-definite program, the existential nature of Theorem 2 can make it cumbersome to work with in some applications. To address this issue, we present a closed-form variant of Theorem 2 for the special case where \(\left\vert \tilde{\psi }\right\rangle =\left\vert {\mathbf{\Phi}}_{d}\right\rangle\) is the maximally entangled state and \({\tilde{A}}_{x}\) and \(\tilde{O}\) are binary measurements. This particular form not only facilitates the proof of Theorem 1, but also proves useful in the context of iterative self-testing.

Proposition 3

A closed-form criterion for post-hoc self-testing. Let \(\tilde{{{{\mathcal{S}}}}}=(\left\vert {\varPhi }_{d}\right\rangle ,{\{{\tilde{A}}_{x}\}}_{x},\{{\tilde{B}}_{y}\}_{y})\) be a self-tested projective strategy where \({\{{\tilde{A}}_{x}\}}_{x}\) are binary, and let \(\tilde{O}\) be the observable of a binary real projective measurement. Then \(\tilde{{{{\mathcal{S}}}}}{\prime} =(\left\vert \tilde{\psi }\right\rangle ,{\{{\tilde{A}}_{x}\}}_{x},\{{\tilde{B}}_{y},\tilde{O}\}_{y})\) remains self-tested whenever:

$$\tilde{O}\in {{\mathrm{sgn}}}\,({{{\mathrm{span}}}\,}_{{\mathbb{R}}}\{I,{\tilde{A}}_{x}:x\}),$$

where sgn is the extension of the sign function via functional calculus. Namely, it is given by \({{\mathrm{sgn}}}\,:H={\sum }_{j}{\lambda }_{j}\left\vert {v}_{j}\right\rangle \left\langle {v}_{j}\right\vert \mapsto {\sum }_{j}{{\mathrm{sgn}}}\,({\lambda }_{j})\left\vert {v}_{j}\right\rangle \left\langle {v}_{j}\right\vert\) where \({\{\left\vert {v}_{j}\right\rangle \}}_{j}\) is an orthonormal basis of eigenvectors for H.

The proofs of Theorem 2 and Proposition 3 can be found in the Supplementary Information. We note that the sgn function is crucial, as it produces observables outside the span.

Proof outline of Theorem 1

The self-testing result of Theorem 1 follows by applying Proposition 3 to an initial self-tested strategy chosen from ref. 15. Specifically, in ref. 15 the authors show that the strategy:

$${\tilde{{{{\mathcal{S}}}}}}^{(0)}=\left(\left\vert {\varPhi }_{d}\right\rangle ,{\{{\tilde{T}}_{x}\}}_{x = 0}^{d},{\{{\tilde{T}}_{y}\}}_{y = 0}^{d}\right)$$

is robustly self-tested. Here \({\tilde{T}}_{j}\) are certain binary observables, the same as the ones in Theorem 1. We introduce the following additional observables for Bob:

$${\{{\tilde{T}}_{y}\}}_{y = d+1}^{\frac{d(d+1)}{2}-1}=\{{{\mathrm{sgn}}}\,({\tilde{T}}_{j}+{\tilde{T}}_{k}):1\le \,j < \,k\,\le \,d\,\}\setminus \{{{\mathrm{sgn}}}\,({\tilde{T}}_{1}+{\tilde{T}}_{2})\}.$$

We then use Proposition 3 to conclude that the extended strategy:

$${\tilde{{{{\mathcal{S}}}}}}^{(1)}=\left(\left\vert {\varPhi }_{d}\right\rangle ,{\{{\tilde{T}}_{x}\}}_{x = 0}^{d},{\{{\tilde{T}}_{y}\}}_{y = 0}^{\frac{d(d+1)}{2}-1}\right)$$

remains self-tested.

Next we show that the observables on Bob’s side from strategy \({\tilde{{{{\mathcal{S}}}}}}^{(1)}\) span the space of all d × d symmetric matrices. Therefore, for any binary observable \({\tilde{O}}_{{{{\rm{binary}}}}}\), we have \({\tilde{O}}_{{{{\rm{binary}}}}}\in {{\mathrm{sgn}}}\,({{{\mathrm{span}}}\,}_{{\mathbb{R}}}{\{I,{\tilde{T}}_{y}\}}_{y = 0}^{\frac{d(d+1)}{2}-1})\). By incorporating \(\tilde{O}\) into Alice’s set of observables, the strategy:

$${\tilde{{{{\mathcal{S}}}}}}^{(2)}=\left(\left\vert {\Phi }_{d}\right\rangle ,{\{{\tilde{T}}_{x},{\tilde{O}}_{{{{\rm{binary}}}}}\}}_{x = 0}^{d},{\{{\tilde{T}}_{y}\}}_{y = 0}^{\frac{d(d+1)}{2}-1}\right)$$

remains self-tested. Finally, if any binary observable can be self-tested, then any multiple-output one can also be self-tested by regarding it as a collection of binary observables. Specifically, given any L-output observable \(\tilde{O}=\mathop{\sum }_{a = 0}^{L-1}{\mathrm{e}}^{i2\uppi a/L}{\tilde{M}}_{a}\), consider binary observables \({\{2{\tilde{M}}_{a}-I\,\}}_{a = 0}^{L-1}\). As every binary observable \(2{\tilde{M}}_{a}-I\) can be self-tested, \(\tilde{O}\) can be self-tested as well. This holds for any L≥2, so we conclude that:

$${\tilde{{{{\mathcal{S}}}}}}^{(3)}=\left(\left\vert {\varPhi }_{d}\right\rangle ,{\{{\tilde{T}}_{x},\tilde{O}\}}_{x = 0}^{d},{\{{\tilde{T}}_{y}\}}_{y = 0}^{\frac{d(d+1)}{2}-1}\right)$$

is self-tested for any d-dimensional real projective measurement \(\tilde{O}\), thus finishing the proof of Theorem 1.

Iterative self-testing

In the proof of Theorem 1 we sequentially applied post-hoc self-testing two times to get the final self-testing protocol. In general, given initial strategy \(\tilde{{{{\mathcal{S}}}}}=({\varPhi }_{d},\{{\tilde{A}}_{x}\},\{{\tilde{B}}_{y}\})\), if we post-hoc self-test \(\tilde{O}\in {{\mathrm{sgn}}}\,({{\mathrm{span}}}\,\{I,{\tilde{A}}_{x}\})\) on Bob’s side, then we can use \(\{{\tilde{B}}_{y},\tilde{O}\}\) to post-hoc self-test another measurement \(\tilde{O}{\prime} \in {{\mathrm{sgn}}}\,({{\mathrm{span}}}\,\{I,{\tilde{B}}_{y},\tilde{O}\})\) for Alice. By doing this in several rounds, starting from a small set of observables \(\{{\tilde{A}}_{x}\}\) we may eventually self-test many additional observables. We call this process iterative self-testing. A priori it is unclear exactly which measurements can be reached starting from a fixed self-tested strategy \(\tilde{{{{\mathcal{S}}}}}\) after many rounds of iterative self-testing. The main goal of this section is to provide an easy-to-use criterion for a measurement \(\tilde{O}\) to be reachable after an arbitrary number of rounds of iterative self-testing.

Given an initial strategy \(\tilde{{{{\mathcal{S}}}}}=(\left\vert {\varPhi }_{d}\right\rangle ,\{{\tilde{A}}_{x}\},\{{\tilde{B}}_{y}\})\), let Sj be the set of binary observables that can be obtained in the jth iteration of post-hoc self-testing via Proposition 3. Note that \({S}_{1}={{\mathrm{sgn}}}\,({{{\mathrm{span}}}\,}_{{\mathbb{R}}}\{I,{\tilde{A}}_{x}:x\})\) and \({S}_{j+1}={{\mathrm{sgn}}}\,({{{\mathrm{span}}}\,}_{{\mathbb{R}}}({S}_{j}))\) for j ≥ 1. Furthermore, we have SjSj+1 since \({{\mathrm{sgn}}}\,(\tilde{O})=\tilde{O}\) for any binary observable \(\tilde{O}\). Therefore, by iteratively using this technique, we enlarge the set of self-tested binary observables, Sj, in each step.

Define \({V}_{j}:= {{{\mathrm{span}}}\,}_{{\mathbb{R}}}({S}_{j})\). Then {Vj}j is an increasing sequence of subspaces of the finite-dimensional real Hermitian matrix space, \({H}_{d}({\mathbb{R}})\), and eventually stabilizes at \({V}_{\infty }=\mathop{\lim }_{j\to \infty }{V}_{j}\). Given initial binary observables \(\{{\tilde{A}}_{x}\},\{{\tilde{B}}_{y}\}\), it is natural to ask: what is V? In the Supplementary Information we show that V is the real Jordan algebra generated by \(\{{\tilde{A}}_{x}\}\) (ref. 31). Recall that a (unital) Jordan algebra is a vector subspace of an associative algebra that contains the identity and is closed under the Jordan product \(a\star b=\frac{1}{2}(ab+ba)\).

This yields the following theorem:

Theorem 4

Let \(\tilde{{{{\mathcal{S}}}}}=(\left\vert {\varPhi }_{d}\right\rangle ,\{{\tilde{A}}_{x}\},\{{\tilde{B}}_{y}\})\) be a self-tested strategy using maximally entangled state and binary real projective measurements. A binary real projective measurement \(\tilde{O}\) can be iteratively self-tested if \(\tilde{O}\in {{{\mathcal{JA}}}}(\{{\tilde{A}}_{x}\})\), where \({{{\mathcal{JA}}}}(\{{\tilde{A}}_{x}\})\) is the real Jordan algebra generated by \(\{{\tilde{A}}_{x}\}\). Moreover, the upper bound on the number of the iterations is determined by \(\lceil 2{\log }_{2}d\;\rceil\).

To argue about many-output (rather than just binary-output) measurements, we can proceed in a manner similar to that used in the proof of Theorem 1. This leads us to conclude that every L-output measurement \(\{{\tilde{M}}_{\ell },\ell \in [0,L-1]\}\) satisfying:

$${\tilde{M}}_{\ell }\in {{{\mathcal{JA}}}}(\{{\tilde{A}}_{x}\})\quad \forall \ell \in [0,L-1]$$

can be iteratively self-tested when starting from a self-tested strategy \(\tilde{{{{\mathcal{S}}}}}\). In particular, if \({{{\mathcal{JA}}}}(\{{\tilde{A}}_{x}\})={H}_{d}({\mathbb{R}})\), that is\(\{{\tilde{A}}_{x}\}\) generates the whole real Jordan algebra of symmetric d × d matrices, then every d-dimensional measurement can be self-tested. We show that the condition \({{{\mathcal{JA}}}}(\{{\tilde{A}}_{x}\})={H}_{d}({\mathbb{R}})\) is equivalent to \(\{{\tilde{A}}_{x}\}\) having a trivial centralizer, which can be checked efficiently.

Discussion

We have addressed the problem of self-testing an arbitrary real projective measurement by constructing a self-testing protocol using binary measurements and maximally entangled states. Our protocol remains the same for any real projective measurement, provided that the dimension d is fixed. The protocol has a O(d3)-sized question set and a constant-sized answer set. We show that our protocol is, in principle, robust. While the obtained robustness could be sufficient for further theoretical results, our analysis is not tight enough to tolerate realistic noise in current experiments. To obtain experimentally relevant robustness, one should perform a tailored analysis of a carefully selected set-up, as it is highly unlikely that any analysis that applies to arbitrary set-ups will ever be sufficiently tight for experimental purposes.

Another contribution of this work is the technique of iterative self-testing. This offers a convenient method for establishing new self-tests based on pre-existing ones. Our results show that the set of self-testable observables includes the real Jordan algebra generated by the observables that we use for iterative self-testing.

We leave a few open questions and improvements for future work. Now that we know that all real projective measurements can be self-tested, one outstanding challenge is to enhance the efficiency—specifically, the size and robustness of the protocols. It is known that some high-dimensional states and measurements admit constant-sized self-tests (for example, see refs. 15,16 and refs. 14,32 with constant-sized question sets). Is it the case that all states and measurements can be self-tested by a constant-sized protocol? Another open question is whether numerical techniques, such as the numerical swap method33, could yield better robustness estimates when our protocol is applied to concrete target measurements. This could have applications in verifiable distributed quantum computation34.

Lastly, from a theoretical standpoint, iterative self-testing is applicable to strategies with partially entangled states, but the underlying algebraic structure remains to be understood. It would also be interesting to explore beyond the two-party Bell scenario and investigate whether there are more general scenarios that allow self-testing of complex measurements in a stronger sense, for example, where only a measurement and its conjugate are allowed but not any combination of them35,36.