††thanks: New J. Phys. 26, 063012 (2024),
https://doi.org/10.1088/1367-2630/ad4e5c. Original Content from this work may
be used under the terms of the Creative Commons Attribution 4.0 licence. Any
further distribution of this work must maintain attribution to the authors and
the title of the work, journal citation and DOI.

# Towards minimal self-testing of qubit states and measurements in prepare-
and-measure scenarios

Gábor Drótos  0000-0002-0900-5188 MTA Atomki Lendület Quantum Correlations
Research Group, HUN-REN Institute for Nuclear Research, P.O. Box 51, H-4001
Debrecen, Hungary  Károly F. Pál  HUN-REN Institute for Nuclear Research, P.O.
Box 51, H-4001 Debrecen, Hungary  Abdelmalek Taoutioui  0000-0002-4943-5529
MTA Atomki Lendület Quantum Correlations Research Group, HUN-REN Institute for
Nuclear Research, P.O. Box 51, H-4001 Debrecen, Hungary  Tamás Vértesi
0000-0003-4437-9414<EMAIL_ADDRESS>MTA Atomki Lendület Quantum
Correlations Research Group, HUN-REN Institute for Nuclear Research, P.O. Box
51, H-4001 Debrecen, Hungary

###### Abstract

Self-testing is a promising approach to certifying quantum states or
measurements. Originally, it relied solely on the outcome statistics of the
measurements involved in a device-independent (DI) setup. Extra physical
assumptions about the system make the setup semi-DI. In the latter approach,
we consider a prepare-and-measure scenario in which the dimension of the
mediating particle is assumed to be two. In a setup involving four (three)
preparations and three (two) projective measurements in addition to the
target, we exemplify how to self-test any four- (three-) outcome extremal
positive operator-valued measure using a linear witness. One of our
constructions also achieves self-testing of any number of states with the help
of as many projective measurements as the dimensionality of the space spanned
by the corresponding Bloch vectors. These constructions are conjectured to be
minimal in terms of the number of preparations and measurements required. In
addition, we implement one of our prepare-and-measure constructions on IBM and
IonQ quantum processors and certify the existence of a complex qubit Hilbert
space based on the data obtained from these experiments.

##  I Introduction

Quantum technological applications need certified devices. Ideally,
certification does not rely on any assumption about the internal functioning
of the devices involved in the protocol, in which case it is called device-
independent (DI) [1, 2]. In particular, if the characterization of the
preparation and measurement apparatuses is solely based on observed
measurement statistics, we speak of self-testing in the original sense, as
proposed by Mayers and Yao [3]. Such a self-testing is made possible by
exploiting the Bell nonlocal property of multipartite quantum correlations [4,
5].

However, fully DI certification is difficult to implement. This has led to the
appearance of the so-called semi-device-independent (semi-DI) approach, where
certain extra physical assumptions are made about the devices [6]. Particular
assumptions refer to bounds on overlap [7, 8], mean energy [9], entropy of
prepared states [10], or may be based on the response of physical systems to
spatial rotations [11]. In addition, still in the semi-DI framework, all
measurement devices can be considered as fully trusted [12, 13] or only some
of them can be considered as trusted [14, 14]. In the standard prepare-and-
measure (PM) scenario, which will form the framework for self-testing in our
paper, the most widely accepted assumption is an upper bound on the dimension
of the communicated quantum system (see, e.g., [15, 16, 17, 18, 19, 20, 21,
22, 23, 24, 25]).

In the PM scenario, there are two parties, say Alice and Bob. Upon receiving
an input $x$, Alice prepares a state $\rho_{x}$ and sends it to Bob, who
performs a measurement on this state. The choice of his measurement setting is
determined by his input $y$, and the outcome is labeled $b$. A self-test is
performed if using the statistics of the outcomes of the measurements,
$P(b|xy)$, one can prove that the states and the measurement settings are the
ones they are claimed to be (up to some symmetry transformation). Within the
PM scenario, only semi-DI tests can be performed [26]. In fact, suppose that
the dimension $d$ of the mediating particle can be arbitrarily large to
perfectly encode the input $x$. Then Alice simply sends $x$ encoded into a $d$
dimensional classical message to Bob, who has all the information about both
Alice’s and his own input and can therefore simulate any possible conditional
probability $P(b|xy)$.

Our aim in this paper is to provide possibly minimal PM setups, in terms of
the number of involved states and measurement settings, for self-testing any
member of a rather general class of measurements, that of extremal four- or
three-outcome positive operator-valued measures (POVMs) defined over a two-
dimensional Hilbert space; in the most general form, this will be achieved by
constructing possibly minimal PM setups for self-testing an arbitrary number
of pure states of the same Hilbert space.

An $O$-outcome POVM is defined by its $O$ elements, which are positive
semidefinite operators whose sum is the identity operator [27, 28]. A POVM is
said to be extremal if it cannot be written as a convex combination of other
POVMs. If a POVM has more outcomes than the dimensionality of the
corresponding Hilbert space, it is necessarily non-projective, that is, its
elements are not orthogonal projectors, which is a constraint defining a
traditional von Neumann measurement [29]. Non-projective POVMs provide
benefits through enhanced entanglement detection [30, 31] and state
discrimination [32, 33]. Among their applications, we can list quantum
protocols such as quantum coin flipping, quantum money, and quantum
cryptography [34].

Existing literature on self-testing non-projective POVMs mostly concerns a
paradigmatic but specific measurement, the so-called symmetric informationally
complete (SIC) POVM [35, 36] defined over a Hilbert space of dimension two
[20, 21] or arbitrary dimension [37]. However, compounds of SIC POVMs [38] and
the so-called semi-SIC POVMs [39, 40] have also been self-tested.

Most recently, the task of self-testing arbitrary ensembles of pure states and
arbitrary sets of extremal POVMs in PM scenarios of arbitrary Hilbert space
dimension has already been accomplished in Ref. [41]. However, this work does
not, in general, rely on a minimal number of preparations and measurement
settings. We also have to mention Ref. [42], where arbitrary rank-one extremal
measurements are self-tested within the so-called one-sided DI framework [43].
In addition to the assumption that the measurement device is trusted, another
important difference from our work is the use of EPR steering [44, 45] as a
resource.

For our construction, we will adopt the scheme introduced in Ref. [21] for
self-testing non-projective POVMs in a PM scenario where Alice prepares
qubits, that is, states in a two-dimensional Hilbert space. This scheme is
based on choosing the preparations of Alice and a set of “auxiliary”
measurement settings on Bob’s side, all of them projective, such that the
maximum value of a carefully constructed linear witness (that is, a function
of the probabilities $P(b|xy)$ associated with each measurement outcome $b$
conditioned on the inputs $x$ and $y$) self-tests the target POVM which enters
as the “main” measurement of Bob. Moreover, we will closely follow the
particular path developed in our preceding study [40] in which the members of
a specific class of non-projective measurements, the semi-SIC POVMs [39, 46],
are self-tested, and heavily build on certain results obtained in that
context. We emphasize that our self-testing methodology is fully analytic and
does not address the effect of noise. However, in addition to self-testing, we
present a method to certify a complex qubit Hilbert space in the PM scenario
in the presence of experimental noise.

The paper is organized as follows. We start by defining the setup and laying
down the basic ideas in Section II. We continue in Section III by providing
universal considerations with regard to the self-testing of the prepared
states for later use. In Section IV, we construct a potentially minimal setup
for self-testing four-outcome POVMs. A more general construction is presented
in Section V, which covers the self-testing of POVMs with four, but also three
outcomes and any number of prepared states. We conclude in Section VI.
Appendix A is devoted to an illustrative example, while Appendix B presents an
alternative method for self-testing four-outcome POVMs, although not relying
on a minimal setup, as a special case of the results obtained in Ref. [41]. In
Appendix C, we construct a particular complex qubit witness in the prepare-
and-measure setup, which we implement on IBM and IonQ quantum processors
thereby certifying a complex qubit Hilbert space from observed data. The
details of the implementation of the setup on quantum processors can be found
in Appendix D.

##  II Preliminaries

In the qubit space, the element corresponding to outcome $b$,
$b\in\\{1,\ldots,O\\}$, of an $O$-outcome POVM can be written in terms of its
Bloch vector $\vec{n}_{b}$ as:

$M_{b}=\lambda_{b}(\mathbb{1}+\vec{n}_{b}\cdot\vec{\sigma}),$ (1)

where $|\vec{n}_{b}|\leq 1$, $\lambda_{b}>0$ (these conditions ensure
positivity), $\sum_{b}\lambda_{b}=1$ and $\sum_{b}\lambda_{b}\vec{n}_{b}=0$
(hence $\sum_{b}M_{b}=\mathbb{1}$), and the components of $\vec{\sigma}$ are
the Pauli matrices. Note that only extremal POVMs can be self-tested with a
linear witness (see, e.g., Ref. [41]). The maximum number of outcomes for an
extremal POVM in the qubit space is four. Such a POVM is extremal if and only
if its four Bloch vectors are unit vectors that span the three-dimensional
space (actually, due to the condition $\sum_{b}\lambda_{b}\vec{n}_{b}=0$, any
three of them do). In the case of three outcomes, the Bloch vectors must span
a two-dimensional subspace for extremality. In the case of two outcomes, the
extremal POVMs are projective measurements. We will deal with self-tests of
four- and three-outcome cases.

To perform the self-test, we consider the PM setup proposed in Ref. [21] and
described as follows. Let the number of input values for Alice be denoted by
$M_{m}$ and be equal to the number of outcomes of the POVM, that is,
$M_{m}=O$. (Under certain circumstances, we will deviate from this equality,
but it does not affect the relevant considerations.) Let the number of input
values for Bob, that is, the number of measurement settings, be $M_{v}+1$. Let
the first $M_{v}$ settings be two-outcome projective measurements with
outcomes labeled by $b$, $b\in\\{0,1\\}$, while the $(M_{v}+1)$th one the POVM
to be self-tested.

Let us also adopt the assumption that Alice prepares qubits, that is, states
of the form

$\rho_{x}=\frac{\mathbb{1}+\vec{m}_{x}\cdot\vec{\sigma}}{2},$ (2)

where the Bloch vectors $\vec{m}_{x}$, $|\vec{m}_{x}|\leq 1$, provide a unique
characterization.

The linear witness introduced in Ref. [21] reads as:

$W^{\prime}=W-k\sum_{b=1}^{O}P(b=x|x(M_{v}+1)),$ (3)

with

$W=\sum_{x=1}^{M_{m}}\sum_{y=1}^{M_{v}}\sum_{b=0}^{1}w_{xy}^{(b)}P(b|xy),$ (4)

where $P(b|xy)$ is the conditional probability of Bob getting outcome $b$
given $x$ and $y$, while $k$ is a positive number.

For the self-test, the prepared states must be pure, $|\vec{m}_{x}|=1$, and
their Bloch vectors must be anti-aligned with the ones of the POVM to be self-
tested such that $\vec{m}_{x}=-\vec{n}_{b}$ for $b=x$. Furthermore, the
matrices of elements $w_{xy}^{(b)}$ and the $M_{v}$ projective binary
measurements of Bob must be chosen such that the formula given in Eq. (4)
should be appropriate to self-test these binary measurements and the states
with the previously mentioned Bloch vectors; that is, $W$ should be maximal
for these states and measurements, and only for them. With these choices, the
expression in Eq. (3) is appropriate to self-test the non-projective POVM [the
($M_{v}+1$)th measurement], too; the optimum value of the second term is zero,
and it takes this value only if $\vec{n}_{x}=-\vec{m}_{b}$ for $x=b$. The
Bloch vectors $\vec{n}_{b}$ uniquely define the POVM if it is extremal,
because then there is only one way to combine the zero vector from them. It is
not so when, for example, there are four vectors in the same plane, which
corresponds to a non-extremal POVM.

##  III General considerations on self-testing the prepared states

We address here the self-testing of the prepared states without specifying the
form of the matrices of elements $w_{xy}^{(b)}$.

The witness for self-testing the prepared states is given by Eq. (4). Using
$P(0|xy)+P(1|xy)=1$, this equation can be rewritten as:

$W=\frac{1}{2}\sum_{x=1}^{M_{m}}\sum_{y=1}^{M_{v}}\left(w_{xy}^{(0)}+w_{xy}^{(1)}\right)\\\
+\frac{1}{2}\sum_{x=1}^{M_{m}}\sum_{y=1}^{M_{v}}\left(w_{xy}^{(0)}-w_{xy}^{(1)}\right)\left[P(0|xy)-P(1|xy)\right].$
(5)

The first term is an irrelevant constant, we can get rid of it without loss of
generality by choosing $w_{xy}\equiv w_{xy}^{(0)}=-w_{xy}^{(1)}$ (or,
alternatively, by dropping the constant and introducing the notation
$w_{xy}\equiv\left(w_{xy}^{(0)}-w_{xy}^{(1)}\right)/2$). Doing that, one gets

$W=\sum_{x=1}^{M_{m}}\sum_{y=1}^{M_{v}}w_{xy}\left[P(0|xy)-P(1|xy)\right].$
(6)

We note that $P(0|xy)-P(1|xy)$ is the expectation value of an observable that
takes on the values $+1$ and $-1$ upon the measurement outcomes $b=0$ and
$b=1$, respectively.

The conditional probability of getting outcome $b$ when a POVM measurement is
performed on a qubit state $\rho_{x}$ is the following:

$P(b|xy)=\mathrm{Tr}(\rho_{x}M_{b|y}),$ (7)

where $M_{b|y}$ is the POVM element of measurement $y$ corresponding to
outcome $b$. A qubit state $\rho_{x}$ is characterized by its Bloch vector
$\vec{m}_{x}$ according to Eq. (2). The most general form of POVM elements
$M_{b|y}$, $b\in\\{0,1\\}$, of a two-outcome measurement setting $y$ can be
written as:

$M_{b|y}=\left[1+(-1)^{b}\mu_{y}\right]\frac{\mathbb{1}+(-1)^{b}\vec{v}_{y}^{(b)}\cdot\vec{\sigma}}{2},$
(8)

with the Bloch vectors satisfying

$(1+\mu_{y})\vec{v}_{y}^{(0)}=(1-\mu_{y})\vec{v}_{y}^{(1)}\equiv(1-|\mu_{y}|)\vec{v}_{y},$
(9)

where $|\vec{v}_{y}^{(b)}|\leq 1$, and $\vec{v}_{y}$ is defined as the longer
one of $\vec{v}_{y}^{(0)}$ and $\vec{v}_{y}^{(1)}$. The values $\mu_{y}=0$ and
$\mu_{y}=\pm 1$ correspond to a genuine von Neumann measurement and the
degenerate measurements (fixed outcome), respectively. From the above
equations, the difference of the two POVM elements is:

$M_{0|y}-M_{1|y}=\mu_{y}\mathbb{1}+(1-|\mu_{y}|)\vec{v}_{y}\cdot\vec{\sigma}.$
(10)

Using Eqs. (2,6,7), and Eq. (10) one can show that:

$W=\sum_{y=1}^{M_{v}}\sum_{x=1}^{M_{m}}w_{xy}[\mu_{y}+(1-|\mu_{y}|)\vec{m}_{x}\cdot\vec{v}_{y}].$
(11)

To obtain the maximum value of $W$ (which we denote as $Q\equiv
W_{\mathbb{C}^{2}}$ with reference to being a maximum attainable quantum
mechanically or, more specifically, by means of complex qubits), it is clear
that if $\sum_{x}w_{xy}\vec{m}_{x}\cdot\vec{v}_{y}>|\sum_{x}w_{xy}|$, then
$\mu_{y}=0$, therefore, a genuine von Neumann measurement should be performed,
while if $\sum_{x}w_{xy}\vec{m}_{x}\cdot\vec{v}_{y}<|\sum_{x}w_{xy}|$, the
optimal measurement is degenerate. In the latter case, the measurement is
useless and $w_{xy}$ is inappropriate for the self-test. If
$\sum_{x}w_{xy}=0$, that is, the sum of the elements of the $y$th column is
zero, then the contribution of the degenerate measurement is zero. However, it
follows from Appendix B of Ref. [40] that if all $\vec{m}_{x}$ are optimal and
not all elements of the $y$th column of $w_{xy}$ are zero, then the
contribution of the genuine two-outcome von Neumann measurement corresponding
to the optimal $\vec{v}_{y}$ is positive. Therefore, if $w_{xy}$ is such that
the sum of its elements in all columns is zero, the optimum does not contain
any degenerate measurement.

Restricting ourselves only to genuine two-outcome measurements, that is,
taking $\mu_{y}=0$ in Eq. (11), the expression to maximize in terms of unit
vectors $\vec{m}_{x}$ and $\vec{v}_{y}$ is:

$W=\sum_{x=1}^{M_{m}}\sum_{y=1}^{M_{v}}w_{xy}\vec{m}_{x}\cdot\vec{v}_{y}=\sum_{x=1}^{M_{m}}\vec{m}_{x}\cdot\sum_{y=1}^{M_{v}}w_{xy}\vec{v}_{y}.$
(12)

We will follow the procedure presented in [40]. It is easy to see that the
optimum choice for $\vec{m}_{x}$ if vectors $\vec{v}_{y}$ are given is:

$\vec{m}_{x}=\frac{\vec{u}_{x}}{|\vec{u}_{x}|},$ (13)

where

$\vec{u}_{x}\equiv\sum_{y=1}^{M_{v}}w_{xy}\vec{v}_{y},$ (14)

if $|\vec{u}_{x}|\neq 0$, which condition is always true for all $x$ if
$\vec{v}_{y}$ is optimal and each row of $w_{xy}$ contains at least one non-
zero element, as it is proven in Appendix B of Ref. [40]. Using Eqs. (12-14)
it is easy to see that the value of $W$ with the optimal choice of
$\vec{m}_{x}$ for given $\vec{v}_{y}$ can be written as:

$Q_{v}=\sum_{x=1}^{M_{m}}|\vec{u}_{x}|.$ (15)

This expression is valid even if $\vec{v}_{y}$ is such that $|\vec{u}_{x}|=0$
for some $x$ (in this case, any $\vec{m}_{x}$ is optimal for the given $x$).
Using Eq. (14), $|\vec{u}_{x}|$ can be written as:

$|\vec{u}_{x}|=\sqrt{\sum_{y=1}^{M_{v}}w_{xy}^{2}+\sum_{y=1}^{M_{v}-1}\sum_{y^{\prime}=y+1}^{M_{v}}w_{xy}w_{xy^{\prime}}\gamma_{yy^{\prime}}},$
(16)

where $\gamma_{yy^{\prime}}\equiv\vec{v}_{y}\cdot\vec{v}_{y^{\prime}}$ is an
element of the Gram matrix of the set $\vec{v}_{y}$ (as $\vec{v}_{y}$ are
normalized, the diagonal elements of the Gram matrix are $1$). We need to find
the maximum of $Q_{v}$ in terms of $\vec{v}_{y}$. The set of $\vec{v}_{y}$ is
never unique, it may only be determined up to a global orthogonal
transformation. It is the Gram matrix of this set of vectors that can be
uniquely defined. It has been proven in Appendix C of Ref. [40] that if the
number $M_{v}$ of the binary measurement settings is equal to the
dimensionality of the space, and the derivatives of $Q_{v}=\sum|u_{x}|$ with
respect to $\gamma_{yy^{\prime}}$, $y<y^{\prime}$, vanish somewhere, then the
value of $Q_{v}$ takes its global maximum there, provided that these
$\gamma_{yy^{\prime}}$ values correspond to a legitimate Gram matrix (that is,
the symmetric matrix whose diagonal elements are $1$ and the $yy^{\prime}$th
element is $\gamma_{yy^{\prime}}$ is positive semidefinite). The Gram matrix
is uniquely defined if the condition is valid at a single point.

Recall that we are, in fact, interested in constructing a witness matrix $w$
and choosing corresponding vectors $\vec{v}_{y}$ that make self-testing
possible for given $\vec{m}_{x}$. Therefore, even if the optimal $\vec{v}_{y}$
and $\vec{m}_{x}$ are determined for a given $w_{xy}$ only up to a global
orthogonal transformation, we will need to specify $\vec{v}_{y}$ in terms of a
particularly oriented set of $\vec{m}_{x}$.

##  IV Self-testing four-outcome POVMs

For the specific task of self-testing four-outcome POVMs, $O=4$ (which implies
$M_{m}=4$ unless otherwise stated), we fix the number of binary measurement
settings to $M_{v}=3$, and construct an appropriate witness matrix, in terms
of which the appropriate Bloch vectors can also be determined.

Let us consider a witness matrix of the following form:

$w=\left(\begin{array}[]{ccc}\hphantom{-}p_{1}q_{1}&\hphantom{-}p_{1}q_{2}&\hphantom{-}p_{1}q_{3}\\\
\hphantom{-}p_{2}q_{1}&-p_{2}q_{2}&-p_{2}q_{3}\\\
-p_{3}q_{1}&\hphantom{-}p_{3}q_{2}&-p_{3}q_{3}\\\
-p_{4}q_{1}&-p_{4}q_{2}&\hphantom{-}p_{4}q_{3}\\\ \end{array}\right),$ (17)

with

$\sum_{x=1}^{4}p_{x}^{2}=\sum_{y=1}^{3}q_{y}^{2}=1.$ (18)

From Eqs. 16 and 17 it follows that

$\displaystyle|\vec{u}_{1}|=$
$\displaystyle|p_{1}|\sqrt{1+2(q_{1}q_{2}\gamma_{12}+q_{1}q_{3}\gamma_{13}+q_{2}q_{3}\gamma_{23})},$
$\displaystyle|\vec{u}_{2}|=$
$\displaystyle|p_{2}|\sqrt{1+2(-q_{1}q_{2}\gamma_{12}-q_{1}q_{3}\gamma_{13}+q_{2}q_{3}\gamma_{23})},$
$\displaystyle|\vec{u}_{3}|=$
$\displaystyle|p_{3}|\sqrt{1+2(-q_{1}q_{2}\gamma_{12}+q_{1}q_{3}\gamma_{13}-q_{2}q_{3}\gamma_{23})},$
$\displaystyle|\vec{u}_{4}|=$
$\displaystyle|p_{4}|\sqrt{1+2(q_{1}q_{2}\gamma_{12}-q_{1}q_{3}\gamma_{13}-q_{2}q_{3}\gamma_{23})}.$
(19)

From Eqs. 15 and 19 it is easy to see that if $q_{y}\neq 0$ for all $y$, the
condition for the partial derivatives can be written as:

$\displaystyle\frac{p_{1}^{2}}{|\vec{u}_{1}|}-\frac{p_{2}^{2}}{|\vec{u}_{2}|}-\frac{p_{3}^{2}}{|\vec{u}_{3}|}+\frac{p_{4}^{2}}{|\vec{u}_{4}|}$
$\displaystyle=0,$
$\displaystyle\frac{p_{1}^{2}}{|\vec{u}_{1}|}-\frac{p_{2}^{2}}{|\vec{u}_{2}|}+\frac{p_{3}^{2}}{|\vec{u}_{3}|}-\frac{p_{4}^{2}}{|\vec{u}_{4}|}$
$\displaystyle=0,$
$\displaystyle\frac{p_{1}^{2}}{|\vec{u}_{1}|}+\frac{p_{2}^{2}}{|\vec{u}_{2}|}-\frac{p_{3}^{2}}{|\vec{u}_{3}|}-\frac{p_{4}^{2}}{|\vec{u}_{4}|}$
$\displaystyle=0.$ (20)

This means that

$\frac{|\vec{u}_{1}|}{p_{1}^{2}}=\frac{|\vec{u}_{2}|}{p_{2}^{2}}=\frac{|\vec{u}_{3}|}{p_{3}^{2}}=\frac{|\vec{u}_{4}|}{p_{4}^{2}}\equiv
u.$ (21)

Substituting Eq. (19) into the square of the equations above we get:

$\displaystyle p_{1}^{2}u^{2}$
$\displaystyle=1+2(q_{1}q_{2}\gamma_{12}+q_{1}q_{3}\gamma_{13}+q_{2}q_{3}\gamma_{23}),$
$\displaystyle p_{2}^{2}u^{2}$
$\displaystyle=1+2(-q_{1}q_{2}\gamma_{12}-q_{1}q_{3}\gamma_{13}+q_{2}q_{3}\gamma_{23}),$
$\displaystyle p_{3}^{2}u^{2}$
$\displaystyle=1+2(-q_{1}q_{2}\gamma_{12}+q_{1}q_{3}\gamma_{13}-q_{2}q_{3}\gamma_{23}),$
$\displaystyle p_{4}^{2}u^{2}$
$\displaystyle=1+2(q_{1}q_{2}\gamma_{12}-q_{1}q_{3}\gamma_{13}-q_{2}q_{3}\gamma_{23}).$
(22)

From the sum of the equations above it follows that $u=2$. Then from Eq. (21)
we get that $|\vec{u}_{x}|=2p_{x}^{2}$, and the optimum value of $Q_{v}$, and
consequently $W$ is $Q=2$. Here we also used Eq. (18). We get the optimum
values of $\gamma_{12}$, $\gamma_{13}$ and $\gamma_{23}$ if we add the fourth,
the third and the second line of Eq. (22) to the first one, respectively:

$\displaystyle\gamma_{12}$
$\displaystyle=\frac{p_{1}^{2}+p_{4}^{2}-1/2}{q_{1}q_{2}},$
$\displaystyle\gamma_{13}$
$\displaystyle=\frac{p_{1}^{2}+p_{3}^{2}-1/2}{q_{1}q_{3}},$
$\displaystyle\gamma_{23}$
$\displaystyle=\frac{p_{1}^{2}+p_{2}^{2}-1/2}{q_{2}q_{3}}.$ (23)

If the equations above together with
$\gamma_{yy^{\prime}}=\gamma_{y^{\prime}y}$ and $\gamma_{yy}=1$ result in a
legitimate Gram matrix, it corresponds to the unique solution of the problem,
and it determines the optimum $\vec{v}_{y}$ up to an orthogonal
transformation. For an optimum set $\vec{v}_{y}$ the optimum $\vec{m}_{x}$ can
be written as:

$\displaystyle\vec{m}_{1}$
$\displaystyle=\frac{q_{1}\vec{v}_{1}+q_{2}\vec{v}_{2}+q_{3}\vec{v}_{3}}{2p_{1}},$
$\displaystyle\vec{m}_{2}$
$\displaystyle=\frac{q_{1}\vec{v}_{1}-q_{2}\vec{v}_{2}-q_{3}\vec{v}_{3}}{2p_{2}},$
$\displaystyle\vec{m}_{3}$
$\displaystyle=\frac{-q_{1}\vec{v}_{1}+q_{2}\vec{v}_{2}-q_{3}\vec{v}_{3}}{2p_{3}},$
$\displaystyle\vec{m}_{4}$
$\displaystyle=\frac{-q_{1}\vec{v}_{1}-q_{2}\vec{v}_{2}+q_{3}\vec{v}_{3}}{2p_{4}},$
(24)

which follows from Eqs. (13, 14) and Eq. (17), and from
$|\vec{u}_{x}|=2p_{x}^{2}$.

However, our objective is not to find the vectors that maximize $W$ for the
given matrix $w$, but to find the appropriate matrix $w$ if the $\vec{m}_{x}$
vectors are given, which, multiplied by minus one, define the four-outcome
POVM to be self-tested. From Eq. (24) it follows that

$\sum_{x}p_{x}\vec{m}_{x}=0.$ (25)

If $\vec{m}_{x}$ span the three-dimensional space, this, together with the
normalization condition, uniquely defines the parameters $p_{x}$ in Eq. (17)
up to an overall sign. In terms of the parameters $q_{y}$ concerned, from the
first two lines of Eq. (24) we get
$p_{1}\vec{m}_{1}+p_{2}\vec{m}_{2}=q_{1}\vec{v}_{1}$. Let us choose the sign
of $q_{1}$ positive (choosing it negative would simply reverse the direction
of the optimal $\vec{v}_{1}$). We can get the values $q_{2}$ and $q_{3}$
analogously, the result is:

$\displaystyle q_{1}$ $\displaystyle=|p_{1}\vec{m}_{1}+p_{2}\vec{m}_{2}|,$
$\displaystyle q_{2}$ $\displaystyle=|p_{1}\vec{m}_{1}+p_{3}\vec{m}_{3}|,$
$\displaystyle q_{3}$ $\displaystyle=|p_{1}\vec{m}_{1}+p_{4}\vec{m}_{4}|.$
(26)

It can be proven that the $q_{y}$ values calculated this way satisfy the
normalization condition, Eq. (18).

We follow with a remark on $p_{x}$. The linear combination of the Bloch
vectors $\vec{n}_{b}$ with the coefficients appearing in the expression for
the POVM elements, $\lambda_{b}$, gives the null vector, all those
coefficients are positive, and their sum is one. As $\vec{m}_{x}=-\vec{n}_{b}$
for $x=b$, it then follows from Eq. (25) that those $p_{x}$ are just
proportional to $\lambda_{b}$ for $x=b$, and they are all positive. They
should just be renormalized. The vectors $\vec{n}_{b}$ define the coefficients
$\lambda_{b}$ uniquely if they span a three-dimensional space. If not, an
infinite number of POVMs can be defined with the same Bloch vectors;
therefore, such POVMs cannot be self-tested, which is what is expected, as
such POVMs are not extremal.

The $w$ matrix constructed here is such that the maximum of Eq. (12) is given
by the Bloch vectors of the states to be self-tested. Moreover, the solution
is unique up to orthogonal transformations. This is actually true for any set
of four qubit states, including those that do not define a POVM (not all
$p_{x}$ are positive). However, depending on the set of vectors, it may well
happen that an even larger value can be obtained if degenerate measurements
are allowed, as in Eq. (11). This must always be checked, because if this is
the case, the $w$ matrix is inappropriate for the self-test. A way to solve
this problem is to add four additional rows to $w$ containing the same
elements as the first four rows but with opposite signs. The set of states
with Bloch vectors of opposite directions should also be included in the self-
test, therefore, Alice has to be able to prepare twice as many states. As the
sum of the elements of each column of $w$ will obviously be zero now, the
degenerate measurements will always be inferior, making the self-test
feasible.

Once an appropriate $w$ matrix has been fixed as above, one also has to
determine, in terms of $\vec{m}_{x}$, the corresponding Bloch vectors
$\vec{v}_{y}$ characterizing the projective measurements that lead to the
maximum value of the witness. This could be done by inverting Eqs. (24).
However, in analogy with the proof presented in Appendix B of Ref. [40], it
can be shown that the optimum $\vec{v}_{y}$ can be expressed in terms of
$w_{xy}$ and $\vec{m}_{x}$ as:

$\vec{v}_{y}=\frac{\sum_{x=1}^{4}w_{xy}\vec{m}_{x}}{|\sum_{x=1}^{4}w_{xy}\vec{m}_{x}|}.$
(27)

We will now briefly discuss two special configurations of the vectors
$\vec{m}_{x}$. First, if they are in the same plane, they do not define
$p_{x}$ uniquely. Then the optimum of Eq. (12) will be given by the same set
of vectors $\vec{m}_{x}$ using any of the possible choices for $p_{x}$, so
that the states corresponding to $\vec{m}_{x}$ can still be self-tested, even
though the corresponding POVM will not be uniquely defined, as discussed
earlier. Another interesting arrangement is three coplanar vectors with the
fourth one orthogonal to them. In this case the fourth row of $w$ becomes
zero. If we omit this row and the fourth vector, then the resulting $3\times
3$ matrix is appropriate to self-test three coplanar vectors, provided that
the three genuine two-outcome measurements given by the optimal $\vec{v}_{y}$
vectors are the most advantageous. Otherwise, the number of rows and states
can be doubled, as before. In this way, it is possible to self-test three-
outcome extremal POVM measurements with the help of three additional
measurement settings. We will see that with a different method, the same is
possible with just two settings.

##  V Self-testing any number of states and POVMs of four and three outcomes

Now we will discuss how to self-test a set of qubit states of arbitrary number
in a possibly minimal PM setup. The corresponding witness $W$ is defined by
Eq. (4), and we will rely on the corresponding considerations of Section III.
Whenever the Bloch vectors $\vec{m}_{x}$ of the states uniquely define a POVM
according to Eq. (1) through $\vec{n}_{b}=-\vec{m}_{x}$ for $b=x$, that POVM
can also be self-tested by choosing $\vec{m}_{x}=-\vec{n}_{b}$ for $x=b$ and
extending the witness according to Eq. (3). We will use this fact to show how
to self-test three-outcome POVMs in a possibly minimal setup beyond four-
outcome POVMs.

In particular, only two projective measurements are required in this general
framework if the Bloch vectors are coplanar, which is the case for three-
outcome POVMs. The number of projective measurements remains three for Bloch
vectors spanning the three-dimensional space, such as for extremal four-
outcome POVMs. In general, the number $M_{v}$ of projective measurements must
be equal to the dimensionality of the space spanned by the Bloch vectors
$\vec{m}_{x}$ of the $M_{m}$ states to be self-tested.

In any case, the appropriate projective measurements are orthogonal to each
other. There is also considerable freedom in choosing the $w$ matrix, which
may be used to make sure that all degenerate measurements are inferior to the
genuine two-outcome ones so that $w$ is appropriate indeed, and possibly to
optimize properties of the self-test.

Let the elements of the $w$ matrix be

$w_{xy}=r_{x}\mu_{xy},$ (28)

where

$\sum_{y=1}^{M_{v}}\mu_{xy}^{2}=1.$ (29)

From Eq. (16) it follows that for the present choice of the $w$ matrix

$|\vec{u}_{x}|=|r_{x}|\sqrt{1+2\sum_{y=1}^{M_{v}-1}\sum_{y^{\prime}=y+1}^{M_{v}}\mu_{xy}\mu_{xy^{\prime}}\gamma_{yy^{\prime}}},$
(30)

where $\gamma_{yy^{\prime}}\equiv\vec{v}_{y}\cdot\vec{v}_{y^{\prime}}$. The
conditions for the partial derivatives to maximize
$Q_{v}=\sum_{x}|\vec{u}_{x}|$, as defined in Eq. (15), can be written as

$\frac{\partial
Q_{v}}{\partial\gamma_{y_{1}y_{2}}}=\sum_{x=1}^{M_{m}}\frac{|r_{x}|\mu_{xy_{1}}\mu_{xy_{2}}}{\sqrt{1+2\sum_{y=1}^{M_{v}-1}\sum_{y^{\prime}=y+1}^{M_{v}}\mu_{xy}\mu_{xy^{\prime}}\gamma_{yy^{\prime}}}}\\\
=0.$ (31)

Let the parameters of the $w$ matrix satisfy

$\sum_{x=1}^{M_{m}}|r_{x}|\mu_{xy_{1}}\mu_{xy_{2}}=0$ (32)

for all $y_{1}<y_{2}$. Then the conditions for the derivatives in Eq. (31) are
satisfied if all $\gamma_{yy^{\prime}}=0$, that is, orthogonal Bloch vectors
for the measurement settings are an optimal choice (it maximizes $Q_{v}$). In
this case, $|\vec{u}_{x}|=|r_{x}|$ from Eq. (30), and $Q_{v}=\sum_{x}|r_{x}|$.
Let all $r_{x}$ be positive. Then it follows, according to Eq. (13), that

$\vec{m}_{x}=\frac{\vec{u}_{x}}{|\vec{u}_{x}|}=\sum_{y=1}^{M_{v}}\mu_{xy}\vec{v}_{y},$
(33)

that is, the $y$th component of $\vec{m}_{x}$ in the coordinate system defined
by the orthonormal set of the measurement vectors is nothing else than
$\mu_{xy}$ (hence the equality between the number $M_{v}$ of measurement
settings and the dimensionality of the space spanned by the $M_{m}$ vectors
$\vec{m}_{x}$). A matrix $w$ defined through such parameters $\mu_{xy}$ may
only be appropriate for the self-test if $\gamma_{yy^{\prime}}=0$ is the only
optimum, we will discuss this question later.

To self-test a given set of $M_{m}$ qubit states characterized by Bloch
vectors $\vec{m}_{x}$, we have to choose the parameters $\mu_{xy}$ to be the
components of $\vec{m}_{x}$ in a coordinate system. However, only some frames
are appropriate. For example, Eqs. (32) cannot be satisfied if all
$\mu_{xy_{1}}\mu_{xy_{2}}$ have the same sign for all $x$ for any
$y_{1}<y_{2}$. If $\mu_{xy_{1}}$ and $\mu_{xy_{2}}$ are components of
$\vec{m}_{x}$ in a frame, then $\mu_{xy_{1}}\mu_{xy_{2}}$ is an off-diagonal
component of the outer product of $\vec{m}_{x}$ with itself in the same frame.
This outer product $\vec{m}_{x}\otimes\vec{m}_{x}$ is the projection operator
corresponding to $\vec{m}_{x}$. Then Eq. (32) means that the matrix of the
operator $\sum_{x}r_{x}\vec{m}_{x}\otimes\vec{m}_{x}$ is diagonal. Therefore,
we can construct a $w$ choosing $r_{x}$ to be some positive numbers, and
$\mu_{xy}$ to be the components of the set $\vec{m}_{x}$ in the coordinate
system in which $\sum_{x}r_{x}\vec{m}_{x}\otimes\vec{m}_{x}$ is diagonal. Such
a frame exists as the operator is positive semidefinite.

For $w$ to be appropriate for the self-test it is necessary that all
degenerate measurements give smaller $W$ values than the optimal non-
degenerate ones. This is not true for all choices of $r_{x}$. For vectors
$\vec{m}_{x}$ that define POVM measurements as discussed at the beginning of
the section, one can always ensure that all degenerate measurements are
inferior by choosing $r_{x}$ such that the linear combination of the vectors
with $r_{x}$ is the null vector. It is possible as the combination
coefficients in this case are all positive. If a linear combination is zero in
a given frame, it is zero in all frames, including the one where the
components of the vectors are $\mu_{xy}$, therefore
$\sum_{x}r_{x}\mu_{xy}=\sum_{x}w_{xy}=0$, that is, the sum of the elements in
all columns of $w$ is zero, therefore, the maximum of $W$ is given by genuine
two-outcome measurements, indeed. However, this is a sufficient condition and
not a necessary one, and it is not even sure that this is the best choice for
the self-test. Therefore, there still remains some freedom to choose $r_{x}$.
At the same time, if the null vector cannot be given as a linear combination
of vectors $\vec{m}_{x}$ with strictly positive coefficients, we do not know
if it can always be achieved with an appropriate choice of $r_{x}$ that the
degenerate measurements are inferior. However, even in that case it is not
necessary to double the number of rows of $w$ and the number of states to be
self-tested: it is always sufficient to add one single state. Taking any
positive numbers $r^{\prime}_{x}$ and adding the vector
$-\sum_{x}r^{\prime}_{x}\vec{m}_{x}$ normalized, one gets a set of $M_{m}+1$
vectors from which one can combine the null vector with positive coefficients.

Another requirement for $w$ to be appropriate for the self-test is that
$\gamma_{yy^{\prime}}=0$ must be the only optimum solution. This is true if
the Hessian is negative definite. It has been shown in Appendix D of Ref. [40]
that negative semidefiniteness always holds, so that it is sufficient that the
rank is maximal, that is, $M_{v}(M_{v}-1)/2$. The rank is the same as the rank
of the matrix whose elements are
$t_{x\alpha}=r_{x}^{2}\mu_{xy}\mu_{xy^{\prime}}$, where the pair of indices
$yy^{\prime}$ has been replaced by the single index $\alpha$ on the left-hand
side. This matrix has $M_{m}$ rows and $M_{v}(M_{v}-1)/2$ columns, and due to
Eq. (32) its rows are linearly dependent. Therefore, the Hessian may only have
maximal rank if $M_{m}\geq M_{v}(M_{v}-1)/2+1$ holds. The optimum will not be
unique otherwise.

Note that this condition implies, e.g., that self-testing a configuration of
three states with non-coplanar Bloch vectors is only possible if we introduce
an additional, auxiliary preparation. However, even if the condition is
satisfied, the rank can still be lower than maximum, but only if the states to
be self-tested and the parameters $r_{x}$ are chosen in a very special way.
When this is the case, one may choose a different set of $r_{x}$, or, as a
last resort, add some additional state to the set to be self-tested.

In Appendix A, we provide an example that illustrates how the algorithm
presented in this section to determine an appropriate matrix $w$ and vectors
$\vec{v}_{y}$ works. For this purpose, we choose three coplanar vectors
$\vec{m}_{x}$.

##  VI Conclusion

We have addressed the issue of certifying non-projective measurements on
qubits. For this purpose, we have considered a PM scenario and aimed at
designing self-tests within this framework. In particular, we have adopted the
scheme proposed by Tavakoli et al. in Ref. [21] and exemplified how to self-
test, by means of linear witnesses, (i) any four- or three-outcome extremal
POVM with the help of three and two projective measurements, respectively, and
also (ii) any number of states with the help of as many projective
measurements as the dimensionality of the space spanned by the corresponding
Bloch vectors. These setups are conjectured to be minimal in terms of the
number of preparations and projective measurements and represent a
considerable improvement in this regard compared to the more general method of
Navascués et al. [41]. The results of that work count six projective
measurements for the self-testing of four-outcome qubit POVMs. In Appendix B,
we heuristically construct a witness to implement this self-test.

We emphasize here that utilizing a nonlinear witness could not lead to any
advantage, since our problem is convex, according to allowing for shared
randomness. For non-convex problems, nonlinear witnesses can be useful; see,
e.g., Ref. [47] for how to generate them.

As any self-test in a PM scenario, our methods are semi-DI; as explained in
the Introduction, it is impossible to design fully DI certification schemes
within the PM framework. The physical assumption is a dimension bound in our
case. In particular, as mentioned, we restrict the preparations to the qubit
space. The work of Navascués et al. [41], addressing Hilbert spaces of any
dimension, motivates us to pose the open problem of finding PM setups and
corresponding self-testing schemes involving preparations in higher dimensions
with as few preparations and projective measurements as possible. Different
kinds of physical assumptions also form a natural direction for
generalization. However, perhaps the most intriguing question is whether we
have really found the minimal setups or whether further simplification is
possible.

It is certainly true that the number of “auxiliary” measurements can be
further decreased by considering non-projective POVMs for this purpose [48].
Notwithstanding, we can actually show that two projective measurements are not
sufficient to self-test an arbitrary set of prepared states. In particular,
according to Section III, one must be able to express the Bloch vectros of all
of the states to be self-tested as linear combinations of the Bloch vectors
characterizing the measurements. If we have only two of the latter, their
linear combinations will span a two-dimensional plane, not allowing to self-
test configurations of states whose Bloch vectors span the three-dimensional
space. Note that the argumentation of Section III relies on a linear witness,
but we have pointed out that no advantage can be provided by nonlinear
witnesses in our scenario.

Whether or not all of our setups are truly minimal, we believe that they may
contribute to an efficient implementation of the certification of non-
projective measurements or configurations of states relevant for practice. To
achieve this, it is necessary to address the effect of noise.

While noise inhibits achieving a self-test in a strict sense in any real-world
setup, a witness designed for self-testing can be used to certify, up to
sampling uncertainty, a single but well-defined qualitative property that the
targeted measurement or configuration possesses but some restricted set of all
possible measurements or configurations does not, as in, e.g., Ref. [21]. This
is because the maximum witness value attainable within such a restricted set
will be strictly lower than the ideal witness value. We exemplify this
approach in Appendix C through the certification of the non-coplanar nature of
Bloch vectors characterizing an actual configuration of states. For this
purpose, we consider a witness from the family of Eq. (17) that is constructed
to self-test a specific configuration that we call umbrella-like.

To illustrate that this methodology is not just a far-fetched theoretical one,
we have implemented this setup in the form of quantum circuits on publicly
available quantum processors. By our experimental results, presented in the
same Appendix, we have successfully certified the non-coplanar nature of
actual Bloch vectors and thereby the existence of a complex Hilbert space in
these experiments under the assumption of a dimensionality of two. Details on
the implementation are given in Appendix D.

As a future research direction, we are also aiming at robust self-tests in the
traditional sense [49]. Ref. [41] has fully characterized robust self-testing
in the dimension-bounded prepare-and-measure scenario in terms of upper bounds
on distances from the target; however, the scaling of these bounds makes them
impractical, so that determining tighter bounds would be essential. Once semi-
DI certification becomes established in real-world scenarios, it may open the
avenue to the anticipated quantum technological applications.

###### Acknowledgements.

We acknowledge the support of the EU (QuantERA eDICT, CHIST-ERA MoDIC) and the
National Research, Development and Innovation Office NKFIH (Grants No.
K145927, No. 2019-2.1.7-ERA-NET-2020-00003 and 2023-1.2.1-ERA_NET-2023-00009).

## Declarations

### Data availability statement

Raw experimental counts in support of Table 1 and Supplementary Table 1 are
available at https://doi.org/10.5281/zenodo.10723401.

### Code availability statement

A code implementing the prepare-and-measure scenario presented in Section C on
quantum processors according to Appendix D is available at
https://doi.org/10.5281/zenodo.10723275.

##  Appendix A Example for self-testing three states with coplanar Bloch
vectors

Here, we will apply the algorithm presented in Section V for self-testing
three specific states with coplanar Bloch vectors $\vec{m}_{x}$. In
particular, we consider the following Bloch vectors:

$\displaystyle\vec{m}_{1}$ $\displaystyle=(1,0,0),$ $\displaystyle\vec{m}_{2}$
$\displaystyle=(1/2,0,\sqrt{3}/2),$ $\displaystyle\vec{m}_{3}$
$\displaystyle=(-\sqrt{3}/2,0,-1/2).$ (34)

The first step is to find coefficients $r_{x}$ such that the linear
combination of the vectors $\vec{m}_{x}$ with $r_{x}$ is the null vector. In
the case of three vectors as here, these coefficients are unique up to an
overall constant multiplier. Let us choose them as: $r_{1}=r_{2}=1$,
$r_{3}=\sqrt{3}$. Note that all are positive as required.

We now compute the matrix to be diagonalized:

$\sum_{x=1}^{3}r_{x}\vec{m}_{x}\otimes\vec{m}_{x}=\left(\begin{array}[]{ccc}\frac{5+3\sqrt{3}}{4}&0&\frac{3+\sqrt{3}}{4}\\\
0&0&0\\\ \frac{3+\sqrt{3}}{4}&0&\frac{3+\sqrt{3}}{4}\\\ \end{array}\right).$
(35)

This matrix has three eigenvalues: $(3+2\sqrt{3})/2$, $1/2$, and $0$. The
corresponding normalized eigenvectors will be the Bloch vectors of the
measurements. However, since the third eigenvector is $(0,1,0)$, perpendicular
to the plane where the Bloch vectors $\vec{m}_{x}$ lie, it can be omitted, so
that two measurement settings are sufficient, as expected. The remaining
normalized eigenvectors, giving the corresponding Bloch vectors, are
orthogonal to each other and are given as follows:

$\displaystyle\vec{v}_{1}$ $\displaystyle=(\sqrt{3}/2,0,1/2),$
$\displaystyle\vec{v}_{2}$ $\displaystyle=(1/2,0,-\sqrt{3}/2).$ (36)

The coordinates of the vectors $\vec{m}_{x}$ in the coordinate system defined
by the vectors $\vec{v}_{y}$, multiplied by the coefficient $r_{x}$, give the
witness matrix $w$ as:

$w=\left(\begin{array}[]{rr}\sqrt{3}/2&1/2\\\ \sqrt{3}/2&-1/2\\\
-\sqrt{3}&0\\\ \end{array}\right).$ (37)

The sum of the elements in each column is zero by construction.

##  Appendix B Self-testing four-outcome POVMs with six projective
measurements

Consider an $O=4$-outcome POVM to be self-tested. Then the number of input
values for Alice and the number of states to be prepared is $M_{m}=O=4$. Let
the number of binary measurement settings for Bob be $M_{v}=6$. Instead of
$y$, let the first $M_{v}$ input values of Bob be labeled by a pair of indices
$ij$, where $1\leq i<j\leq 4$. Let us consider the following matrix for the
self-test of the four states:

$w_{x,ij}=F_{ij}(\delta_{xi}-\delta_{xj})$ (38)

with $F_{ij}>0$. As $\sum_{x}W_{x,ij}=0$ for any $ij$, no degenerate
measurement setting can be more advantageous than the best genuine two-outcome
measurement. Therefore, according to Eq. (12), $W$ may be written as

$W=\sum_{x=1}^{4}\sum_{i<j=1}^{4}w_{x,ij}\vec{m}_{x}\cdot\vec{v}_{ij},$ (39)

which, using Eq. (38), can be rewritten as:

$W=\sum_{i<j=1}^{4}F_{ij}(\vec{m}_{i}-\vec{m}_{j})\cdot\vec{v}_{ij}.$ (40)

This is the expression to be maximized in terms of the unit vectors
$\vec{m}_{x}$ and $\vec{v}_{ij}$.

As the number of binary measurements is larger than three (the dimensionality
of the Euclidean space), the method based on partial derivatives we applied in
the main text is inappropriate in this case. If the optimal measurement
settings are chosen in Eq. (40), the expression to be maximized in terms of
the Bloch vectors of the states $\vec{m}_{x}$ is:

$Q_{m}=\sum_{i<j=1}^{4}F_{ij}|\vec{m}_{i}-\vec{m}_{j}|.$ (41)

This is analogous to the case when the dependence on $\vec{v}_{y}$ is kept by
choosing the optimal $\vec{m}_{x}$ vectors, like in Eq. (15).

Actually, our aim is not to find the optimal $\vec{m}_{x}$ vectors for given
parameters $F_{ij}$, but to find $F_{ij}$ such that Eq. (41) is maximal with
the predefined set of vectors (which are anti-aligned with the vectors
defining the extremal POVM to be self-tested).

It is not difficult to see that Eq. (41) corresponds to minus one times the
potential energy of a simple mechanical system. The $\vec{m}_{x}$ vectors are
the positions of point objects whose motion is confined to the surface of a
unit sphere ($\vec{m}_{x}$ are normalized), with a constant $F_{ij}$ repulsive
force acting between them (we may define $F_{ji}\equiv F_{ij}$ for $i<j$).

The potential energy is minimal and, consequently, Eq. (41) is maximal where
the system is in a stable equilibrium. This happens when the resulting force
acting on any of the objects points outwards, in the direction of the radius
of the unit sphere. This condition can be expressed as:

$\sum_{j\neq
i}F_{ij}\frac{\vec{m}_{i}-\vec{m}_{j}}{|\vec{m}_{i}-\vec{m}_{j}|}=\tau_{i}\vec{m}_{i},$
(42)

where we have defined $F_{ji}\equiv F_{ij}$ for $i<j$.

We obtain the value of $\tau_{i}$ by taking the scalar product of both sides
of the equation with $\vec{m}_{i}$:

$\tau_{i}=\sum_{j\neq
i}F_{ij}\frac{1-\vec{m}_{i}\cdot\vec{m}_{j}}{|\vec{m}_{i}-\vec{m}_{j}|}.$ (43)

As $\tau_{i}$ is always positive, the condition of the stability of the
equilibrium is satisfied. This is not surprising: the radial component of a
repulsive force between objects on the surface of a sphere obviously points
outwards.

If we substitute $\tau_{i}$ from Eq. (43) into Eq. (42), a simple calculation
leads to:

$\sum_{j\neq
i}\frac{F_{ij}}{|\vec{m}_{i}-\vec{m}_{j}|}\vec{m}_{j}-\left(\vec{m}_{i}\cdot\sum_{j\neq
i}\frac{F_{ij}}{|\vec{m}_{i}-\vec{m}_{j}|}\vec{m}_{j}\right)\vec{m}_{i}=0.$
(44)

Notice that the left-hand side of the expression above is a linear combination
of the $\vec{m}_{x}$ vectors, which gives the zero vector. As the
$\vec{m}_{x}$ vectors are minus one times the Bloch vectors $\vec{n}_{x}$ of
the POVM to be self-tested [see Eq. (1)], they satisfy
$\sum_{x}\lambda_{x}\vec{m}_{x}=0$. Moreover, if the POVM is extremal, all
linear combinations of $\vec{n}_{x}$ and, consequently, also of $\vec{m}_{x}$
that give zero are proportional to each other. Therefore, the coefficients in
Eq. (44) for each $i$ must be proportional to $\lambda_{j}$, from which it
follows, considering the first sum, that

$\frac{F_{ij}}{|\vec{m}_{i}-\vec{m}_{j}|}=c_{i}\lambda_{j}$ (45)

with $c_{i}>0$, for $j\neq i$. By substituting this into the second sum in Eq.
(44), one finds that the coefficient of $\vec{m}_{i}$ is $c_{i}\lambda_{i}$,
that is, it does have the appropriate value. Moreover, as $F_{ji}=F_{ij}$,
$c_{i}$ must be proportional to $\lambda_{i}$. As an overall constant is
irrelevant, we may choose $c_{i}=\lambda_{i}$. Therefore, the choice for
$F_{ij}$ to get an appropriate witness matrix specified in Eq. (38) for the
self-test of an extremal POVM is, according to Eq. (45) and
$\vec{m}_{x}=-\vec{n}_{x}$:

$F_{ij}=\lambda_{i}\lambda_{j}|\vec{n}_{i}-\vec{n}_{j}|.$ (46)

This method may also be used to self-test three-outcome extremal POVMs using
three projective measurements (that is, $M_{v}=3$). It can also be extended to
self-test vectors from which the null vector may be combined with not all
coefficients positive. Only the signs of the appropriate rows of the $w$
matrix have to be changed.

We refer the reader to a more general method introduced in Ref. [41] which
allows one to self-test arbitrary ensembles of pure quantum states and
arbitrary extremal $D\geq 2$-dimensional quantum measurements in prepare-and-
measure scenarios. The method presented in the Appendix is a special case of
the one described there.

##  Appendix C Certifying complex qubit state space and an implementation on
quantum processors

For illustrative purposes, we pick a one-parameter family from the witness
matrix (17), the so-called umbrella-like construction; see the matrix (48)
parameterized by $c\in[0,3]$ below. According to the construction of the
witness matrix (17), the maximum value of the witness attainable by qubit
preparations is $2$ irrespective of $c$. However, to obtain this value for
$0<c<3$, both the preparations and the measurements must span the complex
qubit space, as shown by the self-testing argument in Sec. IV. That is,
coplanar arrangements of the Bloch vectors are not sufficient to achieve the
value of $2$. In this section, we provide actual bounds on the maximum value
that can be attained with real qubit preparations for given $c$ values. In
addition, we implement the PM setup with quantum circuits for specific values
of $c$, and certify, based on the umbrella-like linear witness, that
preparations with coplanar Bloch vectors are not sufficient to achieve the
experimentally measured witness values in a wide range of $c$.

###  C.1 The umbrella-like construction

We define the parameters in the coefficient matrix (17) by setting

$\displaystyle p_{1}$ $\displaystyle=\frac{c}{\sqrt{3+c^{2}}},$ $\displaystyle
p_{2}$ $\displaystyle=p_{3}=p_{4}=\frac{1}{\sqrt{3+c^{2}}},$ $\displaystyle
q_{1}$ $\displaystyle=q_{2}=q_{3}=\frac{1}{\sqrt{3}},$ (47)

where $c\in[0,3]$. This way we obtain the witness matrix

$w=\frac{1}{\sqrt{9+3c^{2}}}\left(\begin{array}[]{ccc}\hphantom{-}c&\hphantom{-}c&\hphantom{-}c\\\
\hphantom{-}1&-1&-1\\\ -1&\hphantom{-}1&-1\\\ -1&-1&\hphantom{-}1\\\
\end{array}\right).$ (48)

On the other hand, let us define the following unit Bloch vectors:

$\displaystyle\vec{m}_{1}$ $\displaystyle=\left(0,0,-1\right),$
$\displaystyle\vec{m}_{2}$
$\displaystyle=\left(-\frac{\sqrt{9-c^{2}}}{3},0,\frac{c}{3}\right),$
$\displaystyle\vec{m}_{3}$
$\displaystyle=\left(\frac{\sqrt{9-c^{2}}}{6},\frac{\sqrt{9-c^{2}}}{2\sqrt{3}},\frac{c}{3}\right),$
$\displaystyle\vec{m}_{4}$
$\displaystyle=\left(\frac{\sqrt{9-c^{2}}}{6},-\frac{\sqrt{9-c^{2}}}{2\sqrt{3}},\frac{c}{3}\right).$
(49)

We call this set of Bloch vectors umbrella-like. It has the property that
$\vec{m}_{1}\cdot\vec{m}_{x}$ are the same for $x=2,3,4$ and
$\vec{m}_{x}\cdot\vec{m}_{x^{\prime}}$ are the same for all other distinct
pairs $(x,x^{\prime})\in\\{(2,3),(2,4),(3,4)\\}$.

It can be shown that the results presented in Sec. IV imply that the maximum
value $W(c)=2$ of the witness is achieved if Alice’s preparations are given by
Bloch vectors $\vec{m}_{x}$ for $x\in\\{1,2,3,4\\}$ in (C.1) and Bob’s
projective measurements are

$\displaystyle\vec{v}_{1}$
$\displaystyle=r\left(-2\sqrt{(9-c^{2})},0,-4c\right)\,,$
$\displaystyle\vec{v}_{2}$
$\displaystyle=r\left(\sqrt{9-c^{2}},\sqrt{3(9-c^{2})},-4c\right)\,,$
$\displaystyle\vec{v}_{3}$
$\displaystyle=r\left(\sqrt{9-c^{2}},-\sqrt{3(9-c^{2})},-4c\right),$ (50)

where $r=1/(2\sqrt{9+3c^{2}})$ is a normalization constant. Moreover, the
above set of vectors is unique up to a rotation and a reflection through the
origin. Note that apart from $c=0$ and $c=3$, both the preparation and
measurement unit Bloch vectors span the full three-dimensional space. In fact,
for $c=3$ all the Bloch vectors are either aligned or anti-aligned, and the
witness value of $2$ can be obtained simply by preparing classical bits.

###  C.2 Certifying complex qubit preparations

Recall that the witness matrix (48) is constructed such that the maximum
witness with preparations of complex qubits is $2$ for all $c$. Our aim here
is to compute bounds on the witness using real qubit preparations. That is, we
consider the witness matrix (48) for a given $c$ and we calculate the maximum
value of the witness attainable with real qubit preparations and real-valued
measurements. Let us call this bound by $W_{\mathbb{R}^{2}}(c)$ for a given
$c$.

We provide a family of preparations below that appears to saturate the bound
for real qubits. Actually, there are two separate families, one for $c\leq 1$
and an other for $c\geq 1$. When $c=1$, the two families are the same up to a
relabeling of the inputs $x$. It turns out that $W_{\mathbb{R}^{2}}(c)<2$ for
any $0<c<3$ according to these families. Hence, our witness parameterized by
$c$ enables us to differentiate between real and complex two-level systems
across the entire range of $0<c<3$.

For $0\leq c\leq 1$, the following co-planar preparations are conjectured to
reach the real qubit bound $W_{\mathbb{R}^{2}}(c)$:

$\displaystyle\vec{m}_{1}$ $\displaystyle=(1,0,0),$ $\displaystyle\vec{m}_{2}$
$\displaystyle=(\cos\alpha(c),0,\sin\alpha(c)),$ $\displaystyle\vec{m}_{3}$
$\displaystyle=(\cos\alpha(c),0,-\sin\alpha(c)),$ $\displaystyle\vec{m}_{4}$
$\displaystyle=(1,0,0),$ (51)

where the angle $\alpha(c)$ is given by

$\alpha(c)=2\arctan{\sqrt{f(c)}}$ (52)

with

$f(c)=\frac{c^{2}-2c+25}{-c^{2}+2c+15}+4\sqrt{5}\sqrt{\frac{c^{2}-2c+5}{(c^{2}-2c-15)^{2}}}.$
(53)

For $1\leq c\leq 3$, on the other hand, the following set of preparations is
conjectured to reach the real qubit bound $W_{\mathbb{R}^{2}}(c)$ of the
witness:

$\displaystyle\vec{m}_{1}$ $\displaystyle=(\cos\beta(c),0,\sin\beta(c)),$
$\displaystyle\vec{m}_{2}$ $\displaystyle=(\cos\gamma(c),0,-\sin\gamma(c)),$
$\displaystyle\vec{m}_{3}$ $\displaystyle=(1,0,0),$ $\displaystyle\vec{m}_{4}$
$\displaystyle=(1,0,0),$ (54)

where

$\displaystyle\beta(c)$
$\displaystyle=\frac{\pi}{2}+\arctan\frac{7c^{2}-3}{\sqrt{-9+82c^{2}-9c^{4}}},$
$\displaystyle\gamma(c)$
$\displaystyle=\frac{\pi}{2}-\arctan\frac{3c^{2}-7}{\sqrt{-9+82c^{2}-9c^{4}}}.$
(55)

For both families, any rotation and a reflection through the origin is
permitted, _and_ also any relabeling involving the indices $x\in\\{2,3,4\\}$
but not $x=1$. However, for $c=1$, $\alpha(c)=\beta(c)=\gamma(c)$, and the two
families coincide up to a relabeling involving $x=1$.

In geometric terms, there are two Bloch vectors that coincide for any $c$. For
$c<1$, $\vec{m}_{1}$ must be among them, and for $c>1$, $\vec{m}_{1}$ must not
be among them, while both possibilities are permitted for $c=1$. For $c\leq
1$, the two non-coinciding Bloch vectors are symmetric to the coinciding ones,
whereas they are not for $1<c<3$. In particular, $\vec{m}_{1}$ forms a greater
angle with the coinciding vectors than the other non-coinciding one. In the
limit of $c=3$, $\vec{m}_{1}$ becomes opposite to the rest which all coincide,
and we thus recover the ideal configuration which is also classical.

[trim=5 0 0 0,width=0.75]Fig1.pdf

Figure 1: The prepare-and-measure witness $W(c)$ defined through the matrix
(48) as a function of $c\in[0,3]$. The upper part of the figure presents the
maximum witnesses attainable using classical strategies ($W_{\text{class}}$),
real qubits ($W_{\mathbb{R}^{2}}$), and complex qubits ($W_{\mathbb{C}^{2}}$).
The best experimentally measured values are also displayed for specific values
of $c$, separately for IonQ and IBM machines. The error bars correspond to the
estimated standard deviation associated with the finite sample size (see
Appendix D). The lower part of the figure shows the optimal angles (52) and
(55) of the Bloch vectors corresponding to the maximum value of the real-qubit
case for $c\leq 1$ and $c\geq 1$, respectively.

All this is illustrated in Fig. 1, where witness values $W(c)$ are also
displayed as a function of $c$ within the entire range $0\leq c\leq 3$. In
particular, we show the maximum classical value $W_{\text{class}}(c)$ of the
witness (see below) and the maximum real qubit witness $W_{\mathbb{R}^{2}}(c)$
in comparison with the maximum $W_{\mathbb{C}^{2}}(c)\equiv Q$ of the complex
qubit witness; note that $W_{\mathbb{C}^{2}}(c)\equiv Q=2$ in the entire range
$0\leq c\leq 3$. The range $0<c<3$ in the figure demonstrates the distinctions
between the classical bit, real qubit, and complex qubit cases. Moreover, it
provides a means to certify the existence of complex qubit Hilbert spaces.

The maximum value $W_{\text{class}}(c)$ attainable by classical bits is
straightforward to determine and is obtained as

$W_{\text{class}}(c)=\begin{cases}(c+5)\frac{1}{\sqrt{3(3+c^{2})}}&\text{if
$c\leq 1$},\\\ (c+1)\sqrt{\frac{3}{3+c^{2}}}&\text{if $c\geq 1$}.\end{cases}$
(56)

On the other hand, we compute $W_{\mathbb{R}^{2}}(c)$ for Fig. 1 directly from
the Bloch vectors specified by (51-55) by assuming corresponding optimal
measurements in Eq. (12) which then simplifies to the form
$\sum_{x}\|\sum_{y}w_{xy}\vec{m}_{x}\|$, cf. Eq. (27); the coefficients
$w_{xy}$ are taken from (48). One may ask if the analytic formulae (51-55)
merely define some generic lower bound on the exact value of
$W_{\mathbb{R}^{2}}(c)$ or the bound is tight. To address this question, we
numerically upper-bound the expression (12), i.e.,
$\sum_{x,y}w_{x,y}\vec{m}_{x}\cdot\vec{v}_{y}$, with assuming $\vec{m}_{x}$
and $\vec{v}_{y}$ to be generic coplanar Bloch vectors. The expression is a
quadratic function of the parameters defining the Bloch vectors, featuring
quadratic constraints $\|\vec{m}_{x}\|\leq 1$ and $\|\vec{v}_{y}\|\leq 1$. To
determine an upper bound $W^{(\mathrm{U})}_{\mathbb{R}^{2}}(c)$, we turned to
the semidefinite programming approach of Lasserre [50] which introduces moment
relaxations and is applied, e.g., in Refs. [51, 52]. In particular, we used
the corresponding module built in the YALMIP package [53] with second-order
relaxation. We considered several samples of $c$ and found in each case that
the numerical upper bound $W^{(\mathrm{U})}_{\mathbb{R}^{2}}(c)$ obtained for
real qubit preparations is saturated with our analytic lower bound up to high
numerical precision. In particular, the two bounds always coincide to 7
decimals at least. We note that for such a problem, the finite-dimensional
semidefinite programming techniques introduced in Refs. [54, 55, 56, 37] could
also be applied.

After determining $W_{\mathbb{R}^{2}}(c)$ to high precision, we may ask if it
is violated in certain experimental settings. In particular, we implemented
the PM setup for the umbrella-like configuration as quantum circuits on
quantum processors of IBM [57] and IonQ [58]; details of the implementation
can be found in Appendix D.

We considered various values of $c$ and repeated most experiments several
times to study reproducibility. We present the best experimentally measured
witness values for each considered $c$, separately for IBM and IonQ, in Table
1 and include them in Fig. 1 as well. The experimental data, in comparison
with the numerical upper bounds $W^{(\mathrm{U})}_{\mathbb{R}^{2}}(c)$, show
convincingly that we can certify complex qubit preparations in the PM setup by
making use of the umbrella-like witness defined through (48).

However, not all values of $c$ are suitable for this purpose; for $c=2.5$, we
could not even certify qubits, as the best experimental witness value can be
achieved with classical bits as well. Furthermore, the IBM processors do not
appear to be very stable: as an extreme example, the experimental witness
value for $c=0.625$ dropped from $1.95$ to $1.55$ in 25 hours on qubit No 7 of
ibm_osaka, and calibration data indicating the quality drop were not released
by the time of the execution of the first affected experiment. Results for the
witness and its estimated standard deviation from all of our experiments
performed on quantum processors, along with metadata including calibration
data for the machine associated with the individual experiments, are provided
in Supplementary Table 1; the corresponding raw outcome counts can also be
accessed [59].

$c$ | $W$ | $\sigma_{W}$ |  Machine (No qubit) | $W^{(\mathrm{U})}_{\mathbb{R}^{2}}(c)$
---|---|---|---|---
$0.25$ | $1.9706$ | $0.0081$ | ibm_osaka (7) | $1.9881$
$0.5$ | $1.9436$ | $0.0086$ | IonQ Harmony (7) | $1.9567$
$0.5$ | $1.9865$ | $0.0085$ | ibm_kyoto (73) | $1.9567$
$0.625$ | $1.9663$ | $0.0088$ | ibm_kyoto (73) | $1.9362$
$0.75$ | $1.9943$ | $0.0089$ | ibm_kyoto (73) | $1.9139$
$0.875$ | $1.9908$ | $0.0090$ | ibm_kyoto (73) | $1.8910$
$1$ | $1.9604$ | $0.0091$ | IonQ Harmony (7) | $1.8683$
$1$ | $1.9905$ | $0.0090$ | ibm_kyoto (73) | $1.8683$
$1.25$ | $1.9814$ | $0.0089$ | ibm_osaka (7) | $1.9089$
$1.5$ | $1.9728$ | $0.0085$ | ibm_kyoto (73) | $1.9404$
$1.75$ | $1.9692$ | $0.0079$ | ibm_kyoto (73) | $1.9635$
$2$ | $1.9805$ | $0.0070$ | ibm_kyoto (73) | $1.9795$
$2.5$ | $1.9786$ | $0.0050$ | ibm_kyoto (73) | $1.9960$
Table 1: The best experimentally measured witness $W$ for different values of
$c$, separately for IonQ and IBM machines, in comparison with the
corresponding numerical upper bounds $W^{(\mathrm{U})}_{\mathbb{R}^{2}}(c)$.
The standard deviation $\sigma_{W}$ is associated with the finite number of
shots ($8192$ in all cases) and has been estimated from the experimentally
obtained probabilities (see Appendix D).

Note that a similar distinguishability of real and complex Hilbert spaces of
given dimensionality can also be considered in the Bell nonlocality setup. In
this scenario, one compares the maximum quantum violation of Bell inequalities
achieved using real qubit component spaces with that achieved using complex
qubit component spaces. See, e.g., Ref. [60] and Appendix B in Ref. [61]. In
addition, the more demanding task of distinguishing real and complex Hilbert
spaces without fixing their dimension has been achieved in the network
configuration [62, 63, 64, 65] along with experimental validations [66, 67].

##  Appendix D Details of implementing the PM setup on a quantum processor

Our task is to implement the preparations and measurements of a PM scenario as
a set of quantum circuits. These can then be submitted to quantum processors.

From the computational basis state $|0\rangle$, an arbitrary state
$\alpha|0\rangle+\beta|1\rangle$ can be obtained by applying the unitary gate

$U_{\mathrm{prep}}=\begin{pmatrix}\alpha&-\beta^{*}\\\
\beta&\alpha^{*}\end{pmatrix},$ (57)

where the second column follows from unitarity and is determined up to a
factor of $-1$. The coefficients $\alpha$ and $\beta$ are related to the
coordinates of the corresponding Bloch vector $\vec{b}=(b_{1},b_{2},b_{3})$ as

$\displaystyle\alpha$ $\displaystyle=\sqrt{\frac{1+b_{3}}{2}},$
$\displaystyle\beta$
$\displaystyle=\frac{b_{1}+ib_{2}}{\sqrt{b_{1}^{2}+b_{2}^{2}}}\sqrt{\frac{1-b_{3}}{2}},$
(58)

assuming $\sqrt{b_{1}^{2}+b_{2}^{2}}\neq 0$ for $\beta$ (in the opposite case,
$\beta=0$). For our purposes, we shall identify $\vec{b}$ with each
$\vec{m}_{x}$, $x\in\\{1,2,3,4\\}$, of Eq. (C.1).

Quantum processors are designed to perform projective measurements in the
computational basis. In order to emulate a projective measurement in a
different basis, one can define a unitary gate by identifying the rows of the
corresponding matrix $U_{\mathrm{proj}}$ with the complex conjugates of the
desired basis states. If this unitary operator is applied to a given state,
then performing a measurement in the computational basis on the new state will
be equivalent to performing a measurement in the desired basis on the original
state. In terms of a Bloch vector $\vec{v}=(v_{1},v_{2},v_{3})$ characterizing
the first basis state defining the desired projective measurement,
$U_{\mathrm{proj}}$ is obtained as

$U_{\mathrm{proj}}=\begin{pmatrix}\cos\frac{\theta}{2}&e^{-i\phi}\sin\frac{\theta}{2}\\\
\sin\frac{\theta}{2}&-e^{-i\phi}\cos\frac{\theta}{2}\end{pmatrix},$ (59)

where

$\displaystyle\cos\frac{\theta}{2}$ $\displaystyle=\sqrt{\frac{1+v_{3}}{2}},$
$\displaystyle\sin\frac{\theta}{2}$ $\displaystyle=\sqrt{\frac{1-v_{3}}{2}},$
$\displaystyle e^{-i\phi}$
$\displaystyle=\frac{v_{1}-iv_{2}}{\sqrt{v_{1}^{2}+v_{2}^{2}}}$ (60)

are defined through the polar and azimuthal angles $\theta$ and $\phi$ of
$\vec{v}$, if $\sqrt{v_{1}^{2}+v_{2}^{2}}\neq 0$
($U_{\mathrm{proj}}=\mathbb{1}$ or $U_{\mathrm{proj}}=\sigma_{1}$ otherwise).
We shall substitute $\vec{v}=\vec{v}_{y}$ for each $y\in\\{1,2,3\\}$ from Eq.
(C.1).

After these considerations, both elements are given to build the quantum
circuits that implement the PM setup for the umbrella-like preparations. In
fact, this requires a collection of 12 different quantum circuits, each
realizing one preparation (out of four) from Alice and one measurement (out of
three) from Bob. The practical implementation has been carried out with Qiskit
[68].

In principle, when constructing the outcome statistics for computing the
witness, one of the 12 different circuits should be chosen randomly for each
shot. However, it is equivalent and much more resource efficient to perform a
random but predefined number of shots consecutively with each circuit.
Following Ref. [69], we further simplify the experiments by performing the
_same_ number, $N$, of shots with each circuit.

With this choice, the standard deviation $\sigma_{W}$ corresponding to the
sampling distribution of the witness (4) can be calculated in terms of the
conditional probabilities $P(b|xy)$; the witness matrix is given by (48) for
the PM setup for the umbrella-like preparations. Each term in Eq. (4) has a
binomial sampling distribution, and the perfect anticorrelation between the
opposing outcomes of a projective measurement has to be taken into account for
the propagation of the error through the summation.

As in Ref. [69], we estimate the standard deviation characterizing each
experiment by substituting the experimentally obtained relative frequencies in
place of the conditional probabilities. We furthermore note that the standard
deviation corresponding to ideal umbrella-like preparations and associated
measurements can be analytically computed, as a function of $c$, as

$\sigma_{W}=\frac{1}{3+c^{2}}\sqrt{\frac{27+42c^{2}-5c^{4}}{6N}}.$ (61)

## References

  * Acín  _et al._ [2007] A. Acín, N. Brunner, N. Gisin, S. Massar, S. Pironio, and V. Scarani, Device-independent security of quantum cryptography against collective attacks, Physical Review Letters 98, 230501 (2007).
  * Scarani [2012] V. Scarani, The device-independent outlook on quantum physics, Acta Physica Slovaca 62, 347 (2012).
  * Mayers and Yao [2004] D. Mayers and A. Yao, Self testing quantum apparatus, Quantum Information & Computation 4, 273 (2004).
  * Bell [1964] J. S. Bell, On the Einstein Podolsky Rosen paradox, Physics Physique Fizika 1, 195 (1964).
  * Brunner  _et al._ [2014] N. Brunner, D. Cavalcanti, S. Pironio, V. Scarani, and S. Wehner, Bell nonlocality, Reviews of Modern Physics 86, 419 (2014).
  * Pawłowski and Brunner [2011] M. Pawłowski and N. Brunner, Semi-device-independent security of one-way quantum key distribution, Physical Review A 84, 010302 (2011).
  * Brask  _et al._ [2017] J. B. Brask, A. Martin, W. Esposito, R. Houlmann, J. Bowles, H. Zbinden, and N. Brunner, Megahertz-rate semi-device-independent quantum random number generators based on unambiguous state discrimination, Physical Review Applied 7, 054018 (2017).
  * Tebyanian  _et al._ [2021] H. Tebyanian, M. Zahidy, M. Avesani, A. Stanco, P. Villoresi, and G. Vallone, Semi-device independent randomness generation based on quantum state’s indistinguishability, Quantum Science and Technology 6, 045026 (2021).
  * Van Himbeeck  _et al._ [2017] T. Van Himbeeck, E. Woodhead, N. J. Cerf, R. García-Patrón, and S. Pironio, Semi-device-independent framework based on natural physical assumptions, Quantum 1, 33 (2017).
  * Chaves  _et al._ [2015] R. Chaves, J. B. Brask, and N. Brunner, Device-independent tests of entropy, Physical Review Letters 115, 110501 (2015).
  * Jones  _et al._ [2022] C. L. Jones, S. L. Ludescher, A. Aloy, and M. P. Mueller, Theory-independent randomness generation with spacetime symmetries (2022), arXiv:2210.14811 [quant-ph] .
  * Vallone  _et al._ [2014] G. Vallone, D. G. Marangon, M. Tomasin, and P. Villoresi, Quantum randomness certified by the uncertainty principle, Phys. Rev. A 90, 052327 (2014).
  * Marangon  _et al._ [2017] D. G. Marangon, G. Vallone, and P. Villoresi, Source-device-independent ultrafast quantum random number generation, Phys. Rev. Lett. 118, 060503 (2017).
  * Sarkar  _et al._ [2022] S. Sarkar, D. Saha, and R. Augusiak, Certification of incompatible measurements using quantum steering, Phys. Rev. A 106, L040402 (2022).
  * Ambainis  _et al._ [2008] A. Ambainis, D. Leung, L. Mancinska, and M. Ozols, Quantum random access codes with shared randomness (2008), arXiv:0810.2937 [quant-ph] .
  * Woodhead and Pironio [2015] E. Woodhead and S. Pironio, Secrecy in prepare-and-measure clauser-horne-shimony-holt tests with a qubit bound, Phys. Rev. Lett. 115, 150501 (2015).
  * Lunghi  _et al._ [2015] T. Lunghi, J. B. Brask, C. C. W. Lim, Q. Lavigne, J. Bowles, A. Martin, H. Zbinden, and N. Brunner, Self-testing quantum random number generator, Phys. Rev. Lett. 114, 150501 (2015).
  * Tavakoli  _et al._ [2018] A. Tavakoli, J. Kaniewski, T. Vértesi, D. Rosset, and N. Brunner, Self-testing quantum states and measurements in the prepare-and-measure scenario, Physical Review A 98, 062307 (2018).
  * Farkas and Kaniewski [2019] M. Farkas and J. Kaniewski, Self-testing mutually unbiased bases in the prepare-and-measure scenario, Physical Review A 99, 032316 (2019).
  * Mironowicz and Pawłowski [2019] P. Mironowicz and M. Pawłowski, Experimentally feasible semi-device-independent certification of four-outcome positive-operator-valued measurements, Physical Review A 100, 030301 (2019).
  * Tavakoli  _et al._ [2020a] A. Tavakoli, M. Smania, T. Vértesi, N. Brunner, and M. Bourennane, Self-testing nonprojective quantum measurements in prepare-and-measure experiments, Science Advances 6, eaaw6664 (2020a).
  * de Gois  _et al._ [2021] C. de Gois, G. Moreno, R. Nery, S. Brito, R. Chaves, and R. Rabelo, General method for classicality certification in the prepare and measure scenario, PRX Quantum 2, 030311 (2021).
  * Diviánszky  _et al._ [2023] P. Diviánszky, I. Márton, E. Bene, and T. Vértesi, Certification of qubits in the prepare-and-measure scenario with large input alphabet and connections with the Grothendieck constant, Scientific Reports 13, 13200 (2023).
  * Alves  _et al._ [2023] G. P. Alves, N. Gigena, and J. Kaniewski, Biased random access codes, Physical Review A 108, 042608 (2023).
  * Farkas  _et al._ [2023] M. Farkas, N. Miklin, and A. Tavakoli, Simple and general bounds on quantum random access codes (2023), arXiv:2312.14142 [quant-ph] .
  * Gallego  _et al._ [2010] R. Gallego, N. Brunner, C. Hadley, and A. Acín, Device-independent tests of classical and quantum dimensions, Physical Review Letters 105, 230501 (2010).
  * Peres [1997] A. Peres,  _Quantum theory: concepts and methods_ (Springer, 1997).
  * Nielsen and Chuang [2002] M. A. Nielsen and I. Chuang,  _Quantum computation and quantum information_ (Cambridge University Press, 2002).
  * Holevo [2003] A. S. Holevo,  _Statistical structure of quantum theory_, Vol. 67 (Springer Science & Business Media, 2003).
  * Shang  _et al._ [2018] J. Shang, A. Asadian, H. Zhu, and O. Gühne, Enhanced entanglement criterion via symmetric informationally complete measurements, Physical Review A 98, 022309 (2018).
  * Bae  _et al._ [2019] J. Bae, B. C. Hiesmayr, and D. McNulty, Linking entanglement detection and state tomography via quantum 2-designs, New Journal of Physics 21, 013012 (2019).
  * Dieks [1988] D. Dieks, Overlap and distinguishability of quantum states, Physics Letters A 126, 303 (1988).
  * Peres [1988] A. Peres, How to differentiate between non-orthogonal states, Physics Letters A 128, 19 (1988).
  * Bennett [1992] C. H. Bennett, Quantum cryptography using any two nonorthogonal states, Physical Review Letters 68, 3121 (1992).
  * Renes  _et al._ [2004] J. M. Renes, R. Blume-Kohout, A. J. Scott, and C. M. Caves, Symmetric informationally complete quantum measurements, Journal of Mathematical Physics 45, 2171 (2004).
  * Fuchs  _et al._ [2017] C. A. Fuchs, M. C. Hoang, and B. C. Stacey, The SIC question: History and state of play, Axioms 6, 21 (2017).
  * Tavakoli  _et al._ [2019] A. Tavakoli, D. Rosset, and M.-O. Renou, Enabling computation of correlation bounds for finite-dimensional quantum systems via symmetrization, Physical review letters 122, 070501 (2019).
  * Tavakoli  _et al._ [2020b] A. Tavakoli, I. Bengtsson, N. Gisin, and J. M. Renes, Compounds of symmetric informationally complete measurements and their application in quantum key distribution, Physical Review Research 2, 043122 (2020b).
  * Geng  _et al._ [2021] I. J. Geng, K. Golubeva, and G. Gour, What are the minimal conditions required to define a symmetric informationally complete generalized measurement?, Physical Review Letters 126, 100401 (2021).
  * Drótos  _et al._ [2023] G. Drótos, K. F. Pál, and T. Vértesi, Self-testing of semisymmetric informationally complete measurements in a qubit prepare-and-measure scenario (2023), arXiv:2306.07248 [quant-ph] .
  * Navascués  _et al._ [2023] M. Navascués, K. F. Pál, T. Vértesi, and M. Araújo, Self-testing in prepare-and-measure scenarios and a robust version of Wigner’s theorem, Physical Review Letters 131, 250802 (2023).
  * Sarkar  _et al._ [2023] S. Sarkar, J. J. Borkała, C. Jebarathinam, O. Makuta, D. Saha, and R. Augusiak, Self-testing of any pure entangled state with the minimal number of measurements and optimal randomness certification in a one-sided device-independent scenario, Phys. Rev. Appl. 19, 034038 (2023).
  * Šupić and Hoban [2016] I. Šupić and M. J. Hoban, Self-testing through EPR-steering, New Journal of Physics 18, 075006 (2016).
  * Schrödinger [1935] E. Schrödinger, Discussion of probability relations between separated systems, Mathematical Proceedings of the Cambridge Philosophical Society 31, 555 (1935).
  * Wiseman  _et al._ [2007] H. M. Wiseman, S. J. Jones, and A. C. Doherty, Steering, entanglement, nonlocality, and the einstein-podolsky-rosen paradox, Physical Review Letters 98, 140402 (2007).
  * Zhao  _et al._ [2024] Y. Zhao, Z. Guo, L. Feng, S. Luo, and T.-L. Lee, Equioverlapping measurements in qutrit systems, Physics Letters A , 129314 (2024).
  * Bowles  _et al._ [2014] J. Bowles, M. T. Quintino, and N. Brunner, Certifying the dimension of classical and quantum systems in a prepare-and-measure scenario with independent devices, Phys. Rev. Lett. 112, 140407 (2014).
  * Pauwels  _et al._ [2022] J. Pauwels, S. Pironio, E. Z. Cruzeiro, and A. Tavakoli, Adaptive advantage in entanglement-assisted communications, Physical Review Letters 129, 120504 (2022).
  * McKague  _et al._ [2012] M. McKague, T. H. Yang, and V. Scarani, Robust self-testing of the singlet, Journal of Physics A: Mathematical and Theoretical 45, 455304 (2012).
  * Lasserre [2001] J. B. Lasserre, Global optimization with polynomials and the problem of moments, SIAM Journal on optimization 11, 796 (2001).
  * Brunner  _et al._ [2008] N. Brunner, S. Pironio, A. Acin, N. Gisin, A. A. Méthot, and V. Scarani, Testing the dimension of Hilbert spaces, Physical review letters 100, 210503 (2008).
  * Brunner  _et al._ [2012] N. Brunner, J. Sharam, and T. Vertesi, Testing the structure of multipartite entanglement with Bell inequalities, Physical Review Letters 108, 110501 (2012).
  * Löfberg [2004] J. Löfberg, Yalmip : A toolbox for modeling and optimization in MATLAB, in  _Proceedings of the CACSD Conference_ (Taipei, Taiwan, 2004).
  * Navascués  _et al._ [2014] M. Navascués, G. de la Torre, and T. Vértesi, Characterization of quantum correlations with local dimension constraints and its device-independent applications, Physical Review X 4, 011011 (2014).
  * Navascués and Vértesi [2015] M. Navascués and T. Vértesi, Bounding the set of finite dimensional quantum correlations, Physical Review Letters 115, 020501 (2015).
  * Navascués  _et al._ [2015] M. Navascués, A. Feix, M. Araújo, and T. Vértesi, Characterizing finite-dimensional quantum behavior, Physical Review A 92, 042117 (2015).
  * IBM Quantum [2023] IBM Quantum, https://quantum.ibm.com/ (2023).
  * IonQ [2023] IonQ, https://ionq.com/ (2023).
  * Drotos and Taoutioui [2024] G. Drotos and A. Taoutioui, Raw counts from prepare-and-measure experiments implemented on quantum processors, 10.5281/zenodo.10723401 (2024).
  * Pál and Vértesi [2008] K. F. Pál and T. Vértesi, Efficiency of higher-dimensional hilbert spaces for the violation of Bell inequalities, Physical Review A 77, 042105 (2008).
  * Gisin [2009] N. Gisin, Bell inequalities: Many questions, a few answers, Quantum Reality, Relativistic Causality, and Closing the Epistemic Circle , 125 (2009).
  * Renou  _et al._ [2021] M.-O. Renou, D. Trillo, M. Weilenmann, T. P. Le, A. Tavakoli, N. Gisin, A. Acín, and M. Navascués, Quantum theory based on real numbers can be experimentally falsified, Nature 600, 625 (2021).
  * Bednorz and Batle [2022] A. Bednorz and J. Batle, Optimal discrimination between real and complex quantum theories, Phys. Rev. A 106, 042207 (2022).
  * Yao  _et al._ [2024] J. Yao, H. Chen, Y.-L. Mao, Z.-D. Li, and J. Fan, Proposals for ruling out real quantum theories in an entanglement-swapping quantum network with causally independent sources, Phys. Rev. A 109, 012211 (2024).
  * Batle  _et al._ [2024] J. Batle, T. Białecki, T. Rybotycki, J. Tworzydło, and A. Bednorz, Efficient discrimination between real and complex quantum theories (2024), arXiv:2405.03013 [quant-ph] .
  * Chen  _et al._ [2022] M.-C. Chen, C. Wang, F.-M. Liu, J.-W. Wang, C. Ying, Z.-X. Shang, Y. Wu, M. Gong, H. Deng, F.-T. Liang, _et al._ , Ruling out real-valued standard formalism of quantum theory, Physical Review Letters 128, 040403 (2022).
  * Li  _et al._ [2022] Z.-D. Li, Y.-L. Mao, M. Weilenmann, A. Tavakoli, H. Chen, L. Feng, S.-J. Yang, M.-O. Renou, D. Trillo, T. P. Le, _et al._ , Testing real quantum theory in an optical quantum network, Physical Review Letters 128, 040402 (2022).
  * Qiskit contributors [2023] Qiskit contributors, Qiskit: An open-source framework for quantum computing (2023).
  * Bäumer  _et al._ [2021] E. Bäumer, N. Gisin, and A. Tavakoli, Demonstrating the power of quantum computers, certification of highly entangled measurements and scalable quantum nonlocality, npj Quantum Information 7, 117 (2021).