Semi-device-independent certification of indefinite causal order

When transforming pairs of independent quantum operations according to the fundamental rules of quantum theory, an intriguing phenomenon emerges: some such higher-order operations may act on the input operations in an indefinite causal order. Recently, the formalism of process matrices has been developed to investigate these noncausal properties of higher-order operations. This formalism predicts, in principle, statistics that ensure indefinite causal order even in a device-independent scenario, where the involved operations are not characterised. Nevertheless, all physical implementations of process matrices proposed so far require full characterisation of the involved operations in order to certify such phenomena. Here we consider a semi-device-independent scenario, which does not require all operations to be characterised. We introduce a framework for certifying noncausal properties of process matrices in this intermediate regime and use it to analyse the quantum switch, a well-known higher-order operation, to show that, although it can only lead to causal statistics in a device-independent scenario, it can exhibit noncausal properties in semi-device-independent scenarios. This proves that the quantum switch generates stronger noncausal correlations than it was previously known.

A common quantum information task consists in certifying that some uncharacterised source is preparing a system with some features. By making the assumption that the measurement devices are completely characterised, that is, that they are known exactly, it is possible to infer properties of the system. In this device-dependent scenario, fidelity of a quantum state with respect to a target state can be estimated, entanglement witnesses can be evaluated [1], and even complete characterisation of the source via state tomography is possible [2].
Remarkably, it is possible to certify properties of systems even without fully characterizing the measurement devices [3,4]. In such a deviceindependent scenario it is only assumed that the measurements are done by separated parties and compose under a tensor product, which is justified by implementing them with a space-like separation. Under these circumstances, Bell scenarios can be used to certify properties like entanglement of quantum states [4], incompatibility of quantum measurements [5], or to perform device-independent state estimation via selftesting [6,7].
Since the assumptions are weaker, demonstrations of device-independent certification are usually experimentally challenging. For instance, although experimental device-independent certification of entanglement has been reported [8,9,10,11], its experimental difficulty has so far prevented its use in practical applications such as deviceindependent quantum key distribution [12] and randomness certification [13].
An interesting middle ground is the semidevice-independent scenario, where assumptions are made about some parties but not others. Semi-device-independent schemes have been developed and extensively studied for the certification of entanglement [14] and measurement incompatibility [15,16], known as EPR-steering, and applied to quantum key distribution protocols where some but not all parties can be trusted [17].
A close analogy can be developed with regard to the certification of indefinite causal order, as encoded in a process matrix [18]. A process matrix is a higher-order operation [19,20,21] -i.e. a transformation of quantum operations -that acts on independent sets of operations. Fundamental laws of quantum theory predict the existence of process matrices that act on these operations in a such a way that a well-defined causal order cannot be established among them. Process matrices with indefinite causal order were proven to be a powerful resource, outperforming causally ordered ones in tasks such as quantum channel discrimination [22], communication complexity [23,24], quantum computation [25], and inverting unknown unitary operations [26].
To certify that a process matrix in fact does not act in a causally ordered way, there are two standard methods available in the literature. The first is to evaluate a causal witness [27,28]. Analogous to the evaluation of an entanglement witness, this method relies on detailed knowledge of the quantum operations being implemented, and as such it allows for a device-dependent certification. All experimental certifications of indefinite causal order to date either measure a causal witness [29,30] or rely on similar device-dependent assumptions [31,32,33]. The second method is the violation of a causal inequality, phenomenon which is also predicted by quantum mechanics [18,34]. Analogous to the violation of a Bell inequality, this method does not rely on detailed knowledge of the quantum operations implemented by the parties, but rather only that they compose under a tensor product. As such, it allows for a device-independent certification. When a causal inequality is violated, it is verified that least one of the principles used to derived it is not respected. Moreover, this claim holds true independently of the physical theory that supports the experiment that led to the violation. Hence, although we focus on quantum theory, indefinite causal order could in principle be certified even without relying on the laws of quantum mechanics. Although it would be highly desirable to perform such device-independent certification of indefinite causal order, no physical implementation of process matrices that would violate a causal inequality is currently known.
In this work, we introduce a semi-deviceindependent framework for certifying noncausal properties of process matrices that allows for an experimental certification of indefinite causal order that relies on fewer assumptions than previous ones. In our semi-device-independent scenario, the operations of some parties are fully characterized while no assumptions are made about the others.
We begin by considering the bipartite case, for which we construct a general framework for certifying indefinite causal order in a semidevice-independent scenario, while contextualizing previously developed device-dependent andindependent ones. We then extend our framework to a tripartite case in which the third party is always in the future of the other two, and provide an extensive machinery that may be generalized to other multipartite scenarios. We apply our methods to the notorious quantum switch [22,35], a process matrix that, despite having an indefinite causal order, only leads to causal correlations in a device-independent scenario. We show that the noncausal properties of the quantum switch can be certified in a semi-device-independent way, proving that it generates stronger noncausal correlations than it was previously known.

Preliminaries
In our certification scheme, we will deal with statistical data in the form of behaviours.
A general bipartite behaviour {p(ab|xy)} is a set of joint probability distributions, that is, a set in which each element p(ab|xy) is a real non-negative number such that a,b p(ab|xy) = 1 for all x, y, where a ∈ {1, . . . , O A } and b ∈ {1 . . . , O B } are labels for outcomes and x ∈ {1, . . . , I A } and y ∈ {1, . . . , I B } are labels for inputs, for parties Alice and Bob, respectively.
The most general operation allowed by quantum theory is modelled by a quantum instrument, which is a set of completely-positive (CP) maps that sum to a completely-positive tracepreserving (CPTP) map [36].
The Choi-Jamiołkowski (CJ) isomorphism [37,38,39] allows us to represent every linear map 1 M : L(H I ) → L(H O ) by a linear operator M ∈ L(H I ⊗ H O ) acting on the joint input and output Hilbert spaces. In this representation, a set of instruments is a set of operators {I a|x }, I a|x ∈ L(H I ⊗ H O ), that satisfies where x ∈ {1, . . . , I} labels the instrument in the set and a ∈ {1, . . . , O} its outcomes, and 1 I is the identity operator on H I . Now let us consider the most general set of behaviours which respects quantum theory. For that we follow the steps of ref.
[18] to analyse behaviours that can be extracted by pairs of independent quantum instruments. Let {A a|x }, A a|x ∈ L(H A I ⊗ H A O ) and {B b|y }, B b|y ∈ L(H B I ⊗ H B O ) be the Choi operators of Alice's and Bob's local instruments. We then seek a function which assigns probabilities to a pair of instrument elements A a|x and B b|y . In order to preserve the structure of quantum mechanics, we assume that this function is linear in both arguments. It follows from the Riesz representation lemma [40]

Tr (A
represents 2 elements of valid probability distributions for every state ρ and sets of instruments {A a|x } and {B b|y }. 1 In this paper we only consider finite dimensional complex linear spaces. That is, all linear spaces are isomorphic to C d for some natural number d. 2 In eq. (3), as well as in some other equations, we add superscripts on the operators to indicate the Hilbert spaces in which they act, for sake of clarity.
It was shown in ref.
[27] that a linear operator W is a process matrix if and only if it respects W ≥ 0 (4) where X W := Tr X W ⊗ 1 X d X is the trace-and-replace operation and d X = dim(H X ).
We then define process behaviours {p Q (ab|xy)} as behaviours which can be obtained by process matrices according to for all a, b, x, y.
Now we begin to discuss the causal properties of behaviours and process matrices.
A behaviour is considered causally ordered when it can be established that one party acted before the other because the marginal probability distributions of one party do not depend on the inputs of the other. Formally, we have that a be- for all a, x, y, y , and equivalently from Bob to Alice. Behaviours that are within the convex hull of causally ordered behaviours are also considered causal, as they can be interpreted as a classical mixture of causally ordered behaviours. Hence, a causal behaviour {p causal (ab|xy)} is a behaviour that can be expressed as a convex combination of causally ordered behaviours, i.e., for all a, b, x, y, where 0 ≤ q ≤ 1 is a real number. Behaviours that do not satisfy eq. (11) are called noncausal behaviours. Following the same reasoning as the one in the definition of a general process matrix, in order to associate causal properties to process matrices we now define causally ordered process matrices as the most general operator that takes pairs of local instruments to causally ordered behaviours, that is, for all a, b, x, y. This definition is equivalent to the one in refs. [20,18], which states that a bipartite process matrix W A≺B ∈ L( and equivalently from Bob to Alice. In line with the definition of a causal behaviour, a causally separable process matrix is a process matrix that can be expressed as a convex combination of causally ordered process matrices, i.e., where 0 ≤ q ≤ 1 is a real number. Process matrices that do not satisfy eq. (14) are called causally nonseparable process matrices.

Certification
Let us consider the following task: we are given a behaviour that describes the statistics of a quantum experiment. We analyse this behaviour in the process matrix formalism, that is, we assume that there exists a process matrix W and sets of local instruments that give rise to this behaviour according to the rules of quantum theory. Without any information about W -i.e., without direct assumptions about the process matrix -the goal is to verify whether it is causally nonseparable. Additionally, information about the instruments which were performed may or may not be given.
The assumptions about the instruments can be split in three: device-dependent,independent, and semi-device-independent. A device-dependent certification scenario is one in which the operations of all parties are fully characterised, i.e., the whole matrix description of the elements of all applied instruments is known. A device-independent certification scenario is the opposite, no knowledge or assumption is made regarding the operations performed by any parties, not even the dimension of the linear spaces used to describe them. Finally, a semi-deviceindependent certification scenario is one in which at least one party is device-dependent, which is often called trusted, and at least one is deviceindependent, often called untrusted.
In the following we formalise our notions of certification for bipartite process matrices. We refer to appendix E and to section 3 for a discussion of more general scenarios.
Definition 1 (Device-dependent certification). Given a process behaviour {p Q (ab|xy)}, that arises from known instruments {A a|x } and {B b|y } and an unknown bipartite process matrix, one certifies that this process matrix is causally nonseparable in a device-dependent way if, for some a, b, x, y, for all causally separable process matrices W sep .
Definition 2 (Device-independent certification). Given a process behaviour {p Q (ab|xy)}, that arises from unknown instruments and an unknown bipartite process matrix, one certifies that this process matrix is causally nonseparable in a deviceindependent way if, for some a, b, x, y, On eqs. (15), (16), and (17) one can identify the quantities that are given -the behaviour and the trusted instruments that belong to the devicedependent parties -and the variables in the certification problem -the unknown instruments that belong to the device-independent parties and any causally separable process matrix. If one can guarantee that, for any sets of instruments for the device-independent parties and any causally separable process matrix, the given behaviour cannot be described by the left-hand side of eqs. (15), (16), or (17), then the fact that the process matrix

Device-independent
Given quantities Variables

Semi-device-independent
Given quantities Variables that generated this behaviour is causally nonseparable is certified. A summary of the given quantities and variables in each certification scenario is provided by table 1. Before proceeding we remark an analogy with the entanglement certification problem in which behaviours are assumed to arise from quantum measurements performed on a quantum state. In the entanglement certification case, devicedependent scenarios are related to entanglement witnesses [1], device-independent scenarios to Bell nonlocality [4], and the semi-deviceindependent ones to EPR-steering [14].

Device-dependent
We start be analysing the device-dependent scenario and definition 1. This scenario has been thoroughly studied before using the concept of causal witnesses [27], analogous to entanglement witnesses [1], and now we formulate it under our certification paradigm.
In this scenario, the behaviour and sets of instruments of both parties are given and we aim to check whether the given process behaviour is consistent with performing these exact instruments on a causally separable process matrix. This problem can be solved by semidefinite programming (SDP) with the following formulation: where SEP denotes the set of causally separable matrices (i.e. W is constrained to eq. (14)) which can be characterized by SDP. If the problem is infeasible, that is, if there does not exist a process matrix W that satisfies the constraints of eq. (18), then the process matrix that generated {p Q (ab|xy)} is certainly causally nonseparable. Consequently, there exists a causal witness that can certify it, without the need of performing full tomography of the process matrix [27]. On the contrary, if the problem is feasible, then the solution provides a causally separable process matrix that could have generated the given behaviour.
We now show that all causally nonseparable process matrices can be certified to be so in a device-dependent way.
Theorem 1. All causally nonseparable process matrices can be certified in a device-dependent way for some choice of instruments.
The proof of the above theorem follows from the fact that one can always consider a scenario where Alice and Bob have access to tomographically complete instruments, which allows for the complete characterization of the process matrix [41,42].

Device-independent
A device-independent approach for the process matrix formalism has been previously studied in terms of causal inequalities [34], analogous to Bell inequalities [4], and now we formulate it under our certification paradigm, exploring definition 2.
In a device-independent scenario, besides assuming that the given behaviour is a process behaviour following eq. (9), no extra assumptions are made. It is then necessary to check whether the given behaviour is consistent with probability distributions that come from any tensor product of pair of sets of instruments, with fixed number of inputs and outputs, performed on any causally separable process matrix of any dimension.
Before characterizing the problem of whether a certain behaviour can be obtained by a causally separable process matrix, we ask the more fundamental question of whether any behaviour can be obtained by a general process matrix on which instruments are performed locally. That is, whether all general (valid) behaviours are process behaviours.
By definition, every process matrix leads to valid general behaviours. However, it is shown in ref.
[43] that in the scenario where all parties have dichotomic inputs and outputs, the deterministic two-way signalling behaviour defined by p 2WS (ab|xy) := δ a,y δ b,x , where δ i,j = 1 if i = j and δ i,j = 0 otherwise, cannot be obtained exactly by any process matrix. Here we show that one cannot obtain this two-way signalling behaviour even approximately for finite-dimensional process matrices. The proof can be found in appendix A.
Theorem 2. All process behaviours are valid behaviours, however, not all valid behaviours are process behaviours.
In particular, in the scenario where all parties have dichotomic inputs and outputs, any behaviour {p(ab|xy)} such that is not a process behaviour for process matrices Here we can make a parallel with Bell nonlocality, where the Popescu-Rohrlich behaviour is known to respect the non-signalling conditions which arise naturally in Bell scenarios but cannot be obtained by performing local measurements on entangled states [44,45,46].
As for causal behaviours, the analogous question is also pertinent. Can all causal behaviours be obtained by pair of sets of instruments and causally separable process matrices? We answer this question positively, which allows us to relate the properties of a behaviour directly to the properties of the process matrices that could have given rise to it.

Lemma 1. A general behaviour is causal if and
only if it is a process behaviour that can be obtained by a causally separable process matrix.
The proof is made by explicitly constructing the instruments and causally separable process matrix that can recover any causal behaviour. It can be found in appendix B.
This result allows us to identify which causally nonseparable process matrices can be certified in a device-independent way:

Theorem 3. A process matrix can be certified to be causally nonseparable in a device-independent way if and only if it can generate a noncausal behaviour for some choice of instruments for Alice and Bob.
Proof. If a process matrix is causally separable then its behaviours will be causal. If a behaviour is causal, even though it could in principle have been generated by a causally nonseparable process matrix, according to lemma 1 it can always be reproduced by a causally separable process matrix. Hence, no causal properties of the process matrix can be inferred.
From the formulation of the deviceindependent certification problem in definition 2, it is not clear whether one could obtain a simple characterisation to solve it. In particular, because there are no constraints on the dimension of the linear spaces and there is a product of variables (that represent the unknown instruments and process matrix). Interestingly, we can explore the above theorem to present simple necessary and sufficient conditions for a general behaviour to allow for device-independent certification of indefinite causal order. This follows from the fact that a behaviour can be checked to be noncausal by linear programming [34]. More explicitly, the certification problem can be formulated as follows: where {D A≺B λ (ab|xy)} and {D B≺A λ (ab|xy)} are the finite set of deterministic causal distributions described in ref. [34].
If the problem is infeasible, then the process matrix that was used to generate the process behaviour {p Q (ab|xy)} is certainly causally nonseparable and there exists a causal inequality that can witness it [34]. If the problem is feasible, then one can use the results presented in appendix B to explicitly find a causally separable process matrix W sep and sets of instruments {A a|x } and {B b|y } such that p Q (ab|xy) = Tr (A a|x ⊗ B b|y )W sep .
Differently from the device-dependent scenario, it is known that some causally nonseparable process matrices cannot be certified in a deviceindependent way [27,47,48]. In particular, there exist causally nonseparable bipartite process matrices that, for any choice of instruments of Alice and Bob, will always lead to causal behaviours. This result was first presented in ref.
[48] and we rephrase it here: Proposition 1 (Device-dependent certifiable, device-independent noncertifiable process matrix). There exist causally nonseparable process matrices that, for any sets of instruments, always give rise to causal behaviours. That is, a causally nonseparable process matrix that cannot be certified in a device-independent way.
In particular, let W ∈ L( We would like to remark that this phenomenon can be seen as a consequence of the choice of definition of causally separable process matrices. Recalling section 1, a causally ordered process matrix is defined as the most general operator W A≺B that takes any pairs of sets of instruments to causally ordered behaviours according to p A≺B (ab|xy) = Tr[(A a|x ⊗ B b|y ) W A≺B ]. On the other hand, the definition of a causally separable process matrix W sep as a convex combination of process matrices with definite causal orders, instead of focusing on the behaviours, has an arguably more physical motivation of a classical mixture of causal orders. If the definition were to, alternatively, focus on the behaviours, then a natural choice would be to define a 'causally separable' process matrixW sep as the most general operator that takes any pairs of sets of instruments to causal behaviours according to p causal (ab|xy) = Tr[(A a|x ⊗ B b|y )W sep ]. With this alternative, inequivalent definition, 'causally nonseparable' process matrices would always lead to noncausal behaviours, for some choice of instruments, by definition. We observe the phenomenon of causally nonseparable process matrices leading exclusively to causal behaviours, presented in proposition 1, when we take the physically motivated definition, and it exposes an intrinsic difference between these two kinds of reasoning. In the next sections, we show how this phenomenon manifests itself in the semi-deviceindependent scenario.

Semi-device-independent
In this final scenario, which has not been explored for process matrices before, we have the information of the behaviour and the instruments of one party, in this case, Bob. According to definition 3, one needs to check whether the given behaviour can be reproduced by performing these exact given instruments for Bob, and any set of instruments for Alice with fixed number of inputs and outputs, on any causally separable process matrix that has a fixed dimension on Bob's side. Since both the process matrix and Alice's instruments are variables in eq. (17), it is not clear whether this problem can be solved by SDP.
Our approach contrasts a previous one which exploits communication complexity tasks to certify indefinite causal order in process matrices assuming an upper bound for communication capacity between parties and the dimension of their local systems [23,24].
However, consider the following expression for a process behaviour, ∀ a, b, x, y, (22) which motivates us to define w Q a|x . Definition 4 (Process assemblage). A process for all a, x.
By defining the process assemblage, we gather all the variables in the certification problem in one object and can start to relate properties of this object to properties of the process matrix. We remark that the process assemblage generalizes the notion of assemblage in EPR-steering [14,49], which is recovered when both Alice's and Bob's output spaces have d A O = d B O = 1. Consequently, {A a|x } becomes a set of POVMs, W becomes a bipartite quantum state, and the process assemblage recovers the steering assemblage Let us first examine the equation below more closely: In the same way that a process matrix was defined as the most general operator that takes sets of local instruments to a behaviour, we can define a general assemblage to be the most general object that takes a set of instruments to a valid behaviour and respects linearity. In the appendix C, we prove that this definition is equivalent to: By defining the general assemblage as the most general set of operators that takes a set of instruments to a behaviour and respects linearity, we are no longer considering its relation with a process matrix or requiring that it is a process assemblage.
If one compares the set of all general assemblages to the set of all process assemblages, it is clear that the set of general assemblages contains the set of process assemblages, since one can see from eq. (21) that all process assemblages lead to valid behaviours. But the former set is in principle larger, an outer approximation with a simpler characterisation. We show that, indeed, the set of general assemblages is larger than the set of process assemblages, because just like general behaviours, not all general assemblages can be realised by process matrices.
Theorem 4. All process assemblages are valid assemblages, however, not all valid assemblages are process assemblages.
In particular, in the scenario where Alice has dichotomic inputs and outputs, the general assemblage {w a|x } given by w a|x = |x x| ⊗ |a a| is not a process assemblage.
The proof presented in appendix A is based on the fact that this assemblage can lead to a deterministic two-way signalling behaviour, which we know not to be attainable by process matrices from theorem 2.
Although the process assemblage can be regarded as a generalisation of the steering assemblage that arises in EPR-steering scenarios, here we point out an important difference between semi-device-independent certification of indefinite causal order and entanglement. A fundamental result on EPR-steering theory is that all steering assemblages admit a quantum realisation by performing POVMs on a quantum state [50,51,52]. On the other hand, theorem 4 shows that some process assemblages do not admit a quantum realisation by performing a set of instruments on a process matrix. The next step is to assign causal properties to assemblages. A natural approach is to define that an assemblage {w Q, A≺B a|x } is causally ordered from Alice to Bob if it is a process assemblage that can be obtained from a process matrix that is causally ordered from Alice to Bob, namely, for some set of instruments {A a|x } and some causally ordered process matrix W A≺B , and equivalently from Bob to Alice.
Since the above definition depends on an unknown set of instruments {A a|x }, it is not easy to check whether a given general assemblage {w a|x } is causally ordered. We therefore derive a simpler characterisation of causally ordered assemblages that is equivalent to the one above.
Analogously to how we defined a general assemblage, we characterise the most general set of operators {w A≺B a|x } that give rise to a causally ordered behaviour {p A≺B (ab|xy)} according to the equation for any set of instruments {B b|y } for Bob. We then prove its equivalence to the definition below in appendix C.

An assemblage {w A≺B a|x } is causally ordered from Alice to Bob if it satisfies
while an assemblage {w B≺A a|x } is causally ordered from Bob to Alice if it satisfies In appendix B, we show that all causally ordered assemblages {w A≺B a|x } and {w B≺A a|x } can be realized by some set of instruments {A a|x } and some causally ordered process matrix W A≺B and W B≺A , respectively. That is, we show that all {w A≺B a|x } satisfy eq. (28), and analogously for the causal order B ≺ A.
We now contrast the statement made in the previous paragraph with general assemblages. As stated before, the technique of defining the general assemblage as the most general set of linear operators that takes instruments to general behaviours results in an object that cannot always be described by process matrices. On the other hand, in the case of causally ordered assemblages, this technique yielded an object that can always be described by (causal) process matrices. The main point to be taken here is that to characterize the most general set of linear operators that takes instruments to some kind of behaviour is a mathematical artifice to find an outer approximation to the set of assemblages that are described by process matrices. The goal is to find an approximation of this set with a potentially simpler characterization. This approximation may be tight, as in the case of causal assemblages, or may not be tight, as in the case of general assemblages. We explore this further in appendix E for assemblages in tripartite scenarios.
We now define a causal assemblage by taking the elements of the convex hull of causally ordered assemblages.

Definition 7 (Causal assemblage). An assemblage {w causal
a|x } is causal if it can be expressed as a convex combination of causally ordered assemblages, i.e., for all a, x, where 0 ≤ q ≤ 1 is a real number. An assemblage that does not satisfy eq. (32) is called a noncausal assemblage.
We can now express our result in terms of the following lemma, proved in appendix B.

Lemma 2. A general assemblage is causal if and only if it is a process assemblage that can be obtained from a causally separable process matrix.
This result allows us to identify which causally nonseparable process matrices can be certified in a semi-device-independent way:

Theorem 5. A process matrix is certified to be causally nonseparable in a semi-deviceindependent way if and only if it can generate a noncausal assemblage for some choice of instruments for Alice.
Proof. If a process matrix is causally separable then its assemblages will be causal. If the assemblage is causal, even though it could in principle have been generated by a causally nonseparable process matrix, according to lemma 2 it can always be reproduced by a causally separable process matrix and hence this property cannot be certified.
Note that all requirements for an assemblage to be causal are linear and positive semidefinite constraints, hence one can check whether an assemblage is causal via SDP.
However, in our semi-device-independent certification scenario, the only information available is the process behaviour and Bob's instruments, not the assemblage itself. If it were the case that Bob's instruments are tomographically complete, he could obtain full information about the assemblage, and check whether it is causal via SDP. Nevertheless, we show that it is possible to check whether a given behaviour can certify indefinite causal order in a semi-device-independent scenario using SDP even without the knowledge of the assemblage. We do this by rephrasing our certification task in terms of an unknown assemblage.
Definition 3' (Semi-device-independent certification, with assemblages). Given a behaviour {p Q (ab|xy)}, that arises from unknown instruments on Alice's side, known instruments {B b|y } on Bob's side, and an unknown bipartite process matrix, one certifies that this process matrix is causally nonseparable in a semi-deviceindependent way if, for some a, b, x, y, for all causal assemblages {w causal a|x }.
Now we are able to formulate the semi-deviceindependent certification problem in terms of SDP: where CAUSAL denotes the set of causal assemblages, that is, {w a|x } is constrained to eq. (32). As in the previous cases, if the problem is infeasible, then the process matrix that was used to generate the process behaviour {p Q (ab|xy)} is certainly causally nonseparable. If the problem is feasible, then one can use the results presented in appendix B to explicitly find a causally separable process matrix W sep and sets of instruments All three SDP formulations we presented in eqs. (18), (19) and (34) are feasibility problems which can be turned into optimisation problems that allow for a robust certification of indefinite causal order. We discuss this further in section 3.
We now show that not all process matrices can be certified in a semi-device-independent way, as some process matrices cannot lead to noncausal assemblages. The proof is in appendix D.
Theorem 6 (Device-dependent certifiable, semi-device-independent noncertifiable process matrix). There exist causally nonseparable process matrices that, for any sets of instruments on Alice's side, always give rise to causal assemblages. That is, causally nonseparable process matrices that cannot be certified in a semi-deviceindependent way. In We remark that the above theorem strictly extends proposition 1 which was first proved in ref. [48]. That is, with the same hypothesisthat W T A is causally separable -we can make a stronger claim -that W cannot be certified as causally nonseparable even if Bob is treated in a device-dependent way (is trusted).
In ref.
[48], the authors show that, when extended with an entangled state, the resulting process matrix can violate a causal inequality and can therefore be certified in a device-independent way. This implies that this extended process matrix can also be certified in a semi-deviceindependent way. Ref. [48] leaves as an open question the existence of a causally nonseparable bipartite process matrix that cannot be certified in a device-independent way even when extended by entanglement. We remark that this open question is also relevant in the context of semi-deviceindependent certification.
Another natural question also emerges: is there a bipartite process matrix that can be certified to be causally nonseparable in a semi-deviceindependent scenario but that cannot be certified to be causally nonseparable in any deviceindependent scenario? Although we believe such process matrix exists, no example is currently known.

The Quantum Switch
The concepts of certification presented in the previous section have a natural generalisation to different multipartite scenarios. We are now going to illustrate one particular tripartite case by discussing and presenting some results involving the quantum switch [22,35]. In appendix E, we present a detailed extension of the concepts and results from the bipartite case, introduced in section 2, to the tripartite case in which the quantum switch is defined, and pave the way to future more general tripartite and multipartite extensions.
On its first appearance, the quantum switch was defined as a higher-order transformation that maps quantum channels into quantum channels and it can be defined as the following. Let U A and U B be two unitary operators that act on the same space of a target state |ψ t . Let |c c := α|0 +β|1 , |α| 2 + |β| 2 = 1, be a 'control' state that is able to coherently control the order in which the operations U A and U B are applied. The quantum switch acts as following: When applied to the state |c c ⊗ |ψ t we have Physically, the equation above can be understood as the control qubit determining which unitary is going to be applied first on the target state |ψ . If the control qubit is in the state |0 (α = 1, β = 0), the unitary U B is performed before the unitary U A . If the control qubit is in the state |1 (α = 0, β = 1), the unitary U B is performed before the unitary U A . In general, if the control qubit is in the state |c = α|0 + β|1 , α = 0, β = 0, the output state will be in a coherent superposition of two different causal orders.
In the process matrix formalism, ref.
[21] has analysed the quantum switch as a four-partite process matrix of which the first party has only an output space, which defines the input target and control states, one party inputs U A , another party inputs U B , and a final party obtains the output control and target states. Here we follow instead the steps of ref.
[27] to associate tripartite process matrices to the quantum switch. This can be done by absorbing the input target and control states into the process matrix and setting the third party with output space of dimension equal to one. Hence, the quantum switch is described by a family of tripartite process matrices that is shared among three parties, Alice, Bob, and Charlie, for which Charlie is always in the future of Alice and Bob, and the causal order between Alice and Bob may or may not be well defined. A consequence of the fact that Charlie is last and his output space H C O has d = 1 is that the most general instrument Charlie can perform is a POVM.
Formally, we define a family of tripartite process matrices associated to the quantum switch according to: where |ψ is a d-dimensional pure state, α, β are complex numbers such that |α| 2 + |β| 2 = 1, and |ii is a maximally entangled unnormalised bipartite qudit state, the Choi representation of the identity channel.
Then, the pure quantum switch processes are a family of tripartite process matrices given by When the control state is in a nontrivial superposition of |0 and |1 , the quantum switch processes have been shown to have some interesting properties [27,47]. They are causally nonseparable process matrices, meaning they cannot be expressed as a convex combination of tripartite process matrices with definite causal ordered between Alice and Bob, with Charlie in their common future. Namely, when α = 0 and β = 0, for all |ψ , and all real numbers 0 ≤ q ≤ 1. The exact definitions of causally ordered and general tripartite process matrices can be found in appendix E. However, when Charlie is traced out, the resulting bipartite process matrices shared by Alice and Bob are causally separable, namely, for all |ψ , α, and β, where q = |α 2 |.
These causally nonseparable tripartite process matrices can be certified in a device-dependent way, since theorem 1 also holds for tripartite process matrices. Yet, it has been shown in refs. [27,47] that the quantum switch processes cannot be certified in a device-independent way, as they always lead to causal behaviours for any choice of instruments of Alice, Bob, and Charlie. It remains to find out whether these processes can be certified in semi-device-independent scenarios.
For this purpose, we extend all concepts and methods from bipartite semi-device-independent certification. Much like in the bipartite case, we make different assumptions about the knowledge of the operations performed by each party. We call untrusted (U) a party that is treated in a device-independent way and trusted (T) a party that is treated in a device-dependent way, and we use the convention Alice Bob Charlie for denoting the parties. For example, a scenario TTU means Alice = T (device-dependent), Bob = T (device-dependent), and Charlie = U (device-independent). The four inequivalent semidevice-independent tripartite scenarios are TTU, TUU, UTT, and UUT.
The core idea of the certification task remains the same. For a given process behaviour and given sets of instruments for the trusted parties, one needs to check whether it is possible that this behaviour comes from performing this instruments on a causally separable tripartite process matrix. We also derive the concepts of general, process, causally ordered, and causal assemblages for each scenario. In appendix E, we provide all details and calculations, including for the tripartite device-dependent TTT and -independent UUU scenarios.
Our next theorem strengthens the previous result [27] that showed that the quantum switch processes cannot be certified in a full deviceindependent scenario, i.e., in the UUU scenario. We show that when the instruments of Alice and Bob are unknown, even if the measurements performed by Charlie are known, the quantum switch processes can never be proven to be causally nonseparable, for any pairs of sets of instruments for Alice and Bob. In other words, we prove that the quantum switch processes cannot be certified to be causally nonseparable in the UUT scenario. The previous result of the full device-independent scenario can now be seen as a particular case of the theorem we now present, whose proof is in appendix F.

Theorem 7. The quantum switch processes cannot be certified to be causally nonseparable on a semi-device-independent scenario where Alice and Bob are untrusted and Charlie is trusted (UUT).
Moreover, any tripartite process matrix W ∈ L( with Charlie in the future of Alice and Bob, that satisfies for all a, b, x, y, where 0 ≤ q ≤ 1 is a real number, cannot be certified to be causally nonseparable in a UUT scenario.
We now show that in the three remaining semidevice-independent scenarios, TTU, TUU, and UTT, the quantum switch processes can be certified to be causally nonseparable, proving that they can demonstrate stronger noncausal properties than it was previously known.
For our remaining calculations we use the reduced quantum switch process By choosing a reduced, mixed switch process in these scenarios, in which the space of the target state is traced out, we guarantee that the pure switch process version can also be certified without performing any measurements on the output target space. We show that the reduced quantum switch process W red can be certified in the TTU, TUU, and UTT scenarios by providing sets of instruments for the device-independent (untrusted) parties that, when applied to W red , generate TTU-, TUU-, and UTT-assemblages that are noncausal. We prove these assemblages to be noncausal by means of SDP.
Let us illustrate with the TUU case. To construct the TUU-assemblage, we use the instruments from eq. (43) for the untrusted parties, Bob and Charlie, according to Then, we show via SDP that proving that the switch process can be certified in this scenario. This is possible due to the SDP characterization of causal assemblages presented in appendix E (for instance, see definition 20 for the TUU scenario). It follows analogously for the scenarios TTU and UTT.
To be able to compare and quantify the causal properties of the quantum switch across different certification scenarios, from full device-dependent to full device-independent, we introduce a robustness measure. We start by defining the noisy version of the switch, a mixture of the reduced quantum switch process with a 'trivial' process matrix (the normalised identity): We then estimate the minimum value of η for which W η red has only causal properties in a given scenario. For example, in the device-dependent scenario, this is the minimum value of η for which W η red is causally separable. In a semi-devicedependent scenario, this is the minimum value of η for which W η red only generates causal assemblages. Finally, for the device-independent scenario, this is the minimum value of η for which W η red only generates causal behaviours. It is immediate to see that in the UUU (deviceindependent) scenario, η * = 0, since the switch process always generates causal behaviours [27]. Equivalently for the UUT scenario, as a direct consequence of our theorem 7. For the TTT scenario, we evaluate via SDP a value of η * = 0.6118 for which W η * red is causally separable and bellow which it is causally nonseparable.
In the remaining scenarios, TTU, TUU, and UTT, in order to calculate the exact value of η * , one should consider every possible assemblage that could be generated from W η red , by optimizing over the set of instruments of the deviceindependent (untrusted) parties. Since we only consider the fixed instruments of eq. (43), we calculate lower bounds for η * . Additionally, as detailed in appendix E, in some of these scenarios our SDP characterization of the set of causal assemblages only constitutes an outer approximation of the set of assemblages that can be described by causal process matrices. Since with SDP we calculate the minimum η for the assemblages to be inside this outer approximation, this again gives only a lower bound for η * .
Let us illustrate again with the TUU case. We construct a noisy TUU-assemblage using the instruments from eq. (43) and W η red according to We then calculate via SDP the minimum value of η for which w η,switch bc|yz is causal and below which it is noncausal. This value constitutes a lower bound for η * . In the TUU scenario, we evaluate η * ≥ 0.1621 for the reduced switch process. Analogously, we evaluate η * ≥ 0.1802 in the UTT scenario. Finally, in the TTU scenario, η * ≥ 0.5687. All these values are summarized in table 2. All code used to obtain these results is freely available in an online repository [53]. We remark that the set of instruments required to obtain a robust certification of noncausal separability of the quantum switch is relatively simple and that Charlie can be restricted to perform a single POVM.
The quantum switch has motivated several experiments that explore optical interferometers to certify indefinite causal order of process matrices [31,29,30,33]. Up to now, all experimental results rely on, among other assumptions, complete knowledge of the instruments to certify of causal nonseparability, i.e., they are fully devicedependent. As shown in this section, one can also certify the causal nonseparability of the quantum switch without trusting some of the instruments and measurement apparatuses, in a semi-deviceinpedendent way. We have used the machinery developed in this paper to analyse the experiments of refs.
[29] and [30] and concluded that, the instruments used in these experiments could allow us to make a stronger claim than what was reported. More precisely, the instruments used to certify that the quantum switch is causally nonseparable on refs.
[29] and [30] can lead to a semi-device-independent certification of the noncausal properties of the quantum switch in the . The values and bounds for η * concern the critical value of the mixing parameter 0 ≤ η ≤ 1 in eq. (46) for which the quantum switch cannot be certified to causally nonseparable on each scenario, and below which, it can be certified. All non-zero values were obtained via SDP. All code is publicly available in an online repository [53].
TTU scenario. We discuss this results further in appendix G.

Conclusions
We developed a framework for certifying indefinite causal order in the process matrix formalism under different sets of assumptions about the operations of the involved parties. In particular, we constructed a semi-device-independent approach to certification of causally nonseparable process matrices, and unified previously explored devicedependent and -independent approaches.
We showed that the sets of causally nonseparable process matrices that can be certified in each scenario are different. More specifically, we proved that some bipartite process matrices can be certified to be causally nonseparable in a device-dependent way but not in a semi-deviceindependent way, and that some tripartite process matrices can be certified to be causally nonseparable in a semi-device-independent way but not in a device-independent way.
In our framework, we formulated the problem of certifying causally nonseparable process matrices in the device-dependent, semi-deviceindependent, and device-independent scenarios in terms of semidefinite programming (SDP), implying they can be efficiently solved.
We also showed that some noncausal behaviours and some noncausal assemblages cannot be obtained by process matrices according to the rules of quantum mechanics. For the device-independent case, we presented non-trivial bounds that relate the dimension of a process matrix with its maximal attainable violation of a causal game inequality. Concerning bipartite causal behaviours and causal assemblages, we explicitly showed how to obtain them from causally separable process matrices.
Concerning the quantum switch, we proved that it can produce noncausal correlations, that is, can be certified to be causally nonseparable, in three out of four semi-device-independent scenarios, and proved that its noncausal properties cannot be certified in the remaining one.
Finally, we showed that previous experiments that claim to have certified causal nonseparability with the quantum switch under device-dependent assumptions [29,30] could have, in principle, dropped some assumptions to achieve a stronger form of certification. Our results provide the theoretical basis for a future experimental demonstration of stronger noncausal phenomena that will rely on weaker assumptions than previous ones.
the Austrian Science Fund (FWF) through the SFB project "BeyondC", the projects I-2526-N27 and I-2906. This publication was made possible through the support of a grant from the John Templeton Foundation. The opinions expressed in this publication are those of the authors and do not necessarily reflect the views of the John Templeton Foundation.

Appendix
In these appendices we provide material to complement the main text. In appendix A, we present the proofs of theorems 2 and 4, regarding behaviours and assemblages that cannot be expressed in terms of process matrices. In appendix B, we present the proofs of lemmas 1 and 2, regarding the realization of causal behaviours and assemblages in terms of causally separable process matrices. In appendix C, we show how to obtain the characterization of general and causal assemblages presented in definitions 5 and 6. In appendix D, we present the proof of theorem 6, showing a class of causally nonseparable process matrices that cannot be certified in a semi-device-independent way. In appendix E, we re-derive all concepts and results of the main text concerning certification of bipartite process matrices for the tripartite process matrices whose third party is always in the future of the other two. We start by defining all notions of certification for these tripartite process matrices and then explore each scenario (TTT, UUU, TTU, TUU, UTT, and UUT) in detail. This appendix contains technical results not used nor mentioned in the main text. In appendix F, we present the proof of theorem 7, i.e., we prove that the quantum switch cannot be certified to be causally nonseparable in the UUT scenario. Finally, in appendix G, we present our theoretical analysis of the quantum switch experiments of refs.

A Behaviours and assemblages unattainable by process matrices
In this appendix, we prove theorem 2 and theorem 4, concerning behaviours and assemblages which cannot be obtained by process matrices. We start by presenting and proving the following lemma, which will be necessary for the proof of theorem 2.

Lemma 3. Let A ∈ L(H 1 ⊗ H 2 ) be a positive semidefinite operator. It holds that
where d = min{d 1 , d 2 } and 1 denotes the identity operator acting on H 2 .
Proof. Let us start with the case where A is a rank-1 operator, so that A = |λ λ| for some unnormalized vector |λ . The Schmidt decomposition ensures that every bipartite vector |λ ∈ (H 1 ⊗ H 2 ) can be written as |λ = d i=1 λ i |ii for some real non-negative coefficients {λ i } d i=1 and d = min{d 1 , d 2 }. We can then define a diagonal operator D : 1 √ d |ii is a d-dimensional maximally entangled state acting on H 1 ⊗ H 2 . Using the diagonal operator D, and D † = D, the partial trace Tr 2 (A) can be written as Direct calculation of the left-hand side of inequality (48) leads to where the last inequality holds since 1 ⊗ 1 − |φ + d φ + d | ≥ 0 and D ≥ 0 . To prove the general case, note that we can write A as a sum of rank-1 operators, A = i |λ (i) λ (i) |. Since for every i it holds that we also have that

is not a process behaviour for process matrices with total dimension d
Proof. It follows by definition that all process behaviours are valid behaviours, we now show that there exist valid behaviours that are not process behaviours for any finite dimension. Assume that there exists a process matrix W with total dimension and where δ ij is the Kronecker's delta function and p succ GYNI is the probability of success achieved by this behaviour in the GYNI causal game (defined in ref. [34]).
Let then we define the GYNI operator so that p succ GYNI = Tr(W M ).
Since W is a valid process matrix, it admits the decomposition and by linearity we have Also, it follows from lemma 3 that We than have which implies and bounds the maximal attainable value for process behaviours on the GYNI causal game, which can attain p succ GYNI = 1 for general behaviours. Note that this robust bound only holds for finite dimensional process matrices. In ref.
[43], the authors have shown that a process matrix W cannot attain the exact maximal success probability in the GYNI causal game i.e., p succ GYNI = Tr(W M ) = 1, even with infinite dimension.
Theorem 4. All process assemblages are valid assemblages, however, not all valid assemblages are process assemblages. In particular, in the scenario where Alice has dichotomic inputs and outputs, the general assemblage {w a|x } given by w a|x = |x x| ⊗ |a a| is not a process assemblage.
Proof. First we see that w a|x = |x x| ⊗ |a a| is a valid assemblage, since |x x| ⊗ |a a| ≥ 0 for all a, x, and Assume then that {w a|x } is a process assemblage. Then, there must exist a process matrix W and instruments {A a|x } such that and that for any set of instruments {B b|y }, Consider now the valid set of instruments given by Behaviours obtained by this set of instruments and the assemblage {w a|x } would be p(ab|xy) = Tr(B b|y w a|x ) which according to theorem 2 cannot be obtained by any finite dimensional process matrix, contradicting the hypothesis that {w a|x } is a process assemblage.

B Behaviours and assemblages attainable by causally separable process matrices
In this appendix we prove lemma 1 and lemma 2, which we reestate for the convenience of the reader.

Lemma 1. A general behaviour is causal if and only if it is a process behaviour that can be obtained by a causally separable process matrix.
Proof. To prove the if part we show that causally separable process matrices can only give rise to causal behaviours, regardless of the instruments performed on them.
We start by showing that a behaviour {p(ab|xy)} that comes from acting with any sets of instruments {A a|x } and {B b|y } on a process matrix that is causally ordered from Alice to Bob W A≺B is also causally ordered from Alice to Bob. Given {p(ab|xy)} that arises from W A≺B according to one can check that Alice's marginal probability distributions, are independent of y for all a, x. Hence, p(ab|xy) = p A≺B (ab|xy) is causally ordered from Alice to Bob. Equivalently, W B≺A implies {p B≺A (ab|xy)}. Hence, behaviours that come from a causally separable process matrix according to = qp A≺B (ab|xy) + (1 − q)p B≺A (ab|xy) are causal by definition. In other words, causally separable process matrices can only generate causal behaviours.
To prove the only if part we show that all behaviours that are causal can be reproduced by performing some instruments on some causally separable process matrix.
Given a causal behaviour {p causal (ab|xy)}, according to Bayes' rule and the non-signalling principle, one can decompose it in the following form: and process matrix where |Φ + Φ + | is the Choi operator of the identity channel, with |Φ + = d i=1 |ii . It can be checked that for every a, b, x, y. Hence, such construction can recover any behaviour that is causally ordered from Alice to Bob. Analogously, for {p B≺A (ab|xy)}, one has Now, for causal behaviours, which are convex combinations of causally ordered behaviours, we construct instruments and process matrices in such a way that each causal order acts on a complementary subspace. That is, we define the valid process matrix by extending Alice's and Bob's input spaces according to

and we define the valid instruments
In this way, it is easy to check that orthogonal terms cancel out and we arrive at = p causal (ab|xy), recovering any causal behaviour.

Lemma 2. A general assemblage is causal if and only if it is a process assemblage that can be obtained from a causally separable process matrix.
Proof. To prove the if part we show that a causally separable process matrix can only give rise to a causal assemblage regardless of Alice's sets of instruments. First we show that an assemblage that is generated by a process matrix that is ordered from Alice to Bob is also ordered from Alice to Bob.
since W A≺B = B O W A≺B . Hence, {w a|x } = {w A≺B a|x } is causally ordered from Alice to Bob.
Next, we show that an assemblage that is generated by a process matrix that is ordered from Bob to Alice is also ordered from Bob to Alice.
which is independent of x. Hence, {w a|x } = {w B≺A a|x } is causally ordered from Bob to Alice. Consequently, assemblages that come from causally separable process matrices according to are causal by definition. In other words, causally separable process matrices can only generate causal assemblages.
To prove the only if part we show that all assemblages that are causal can be reproduced by performing some instruments on some causally separable process matrix. Given a causal assemblage, it can be decomposed in {w A≺B a|x } and {w B≺A a|x } with some convex weight q. With the contribution that is causally ordered from Alice to Bob, {w A≺B a|x }, one can write its elements where Tr a σ a|x = 1. We show that it can be recovered by instruments where T is the transposition in the computational basis of H A O , and a causally ordered process matrix from Alice to Bob where |Φ + Φ + | is the Choi operator of the identity channel, with |Φ + = d i=1 |ii . Indeed, On the other hand, with the contribution that is causally ordered from Bob to Alice, {w B≺A a|x }, one can write a w B≺A a|x = ρ B I ⊗ 1 B O , where Trρ B I = 1. Since ρ ≥ 0, it can be written as ρ = i µ i |i i|, which is purified by |ψ = i √ µ i |ii . We show that {w B≺A a|x } can be recovered by instruments {A a|x }, where ρ −1 is the inverse of ρ on its support, H A I = H A I ⊗ H A I , T is the transposition in the {|i } i basis, and a causally ordered process matrix from Bob to Alice Indeed, Finally, just like in the proof of lemma 1, by allowing the different causal orders to act in complementary subspaces, we can recover any convex combinations of causally ordered assemblages, i.e., causal assemblages, from causally separable process matrices.

C Characterization theorems for general and causal assemblages
In this appendix, we prove the equivalence between the definition induced by eq. (24) and definition 5, that is, we show that the most general set of operators {w a|x } that satisfies where {p(ab|xy)} is a general behaviour and {B b|y } is a valid set of instruments, is a general assemblage of definition 5. Next, we prove this equivalence to hold also between the definition induced by eq. (29) and definition 6, that is, we show that the most general set of operators {w A≺B a|x } that satisfies where {p A≺B (ab|xy)} is a behaviour that is causally ordered from Alice to Bob and {B b|y } is a valid set of instruments, is an assemblage that is causally ordered from Alice to Bob, of definition 6, end equivalently from Bob to Alice. Let us begin with the conditions of a general assemblage. Non-negativity yields while normalization yields Tr(B b|y w a|x ) = 1.
Let B y = b B b|y be the Choi operator of a CPTP map. Then, following ref.
[27], we can parametrize it according to where Y is an hermitian operator and we define the map Applying the parametrization, it follows that If Y = 0, we have If Y = 0, and using eq. (125), we have Due to the self-duality of the map [1−B O ] ·, Hence, Together, eqs. (121), (125) and (128) define a general assemblage. It is simple to verify that general assemblages lead to valid probability distributions for all sets of instruments.
For assemblages that are causally ordered from Alice to Bob, we require first that they satisfy the conditions of a general assemblage, in order to lead to valid behaviours, and second that Alice's marginal probability distributions b p A≺B (ab|xy) = Tr b B b|y w A≺B a|x (129) are independent of y, so that the resulting behaviour is causally ordered from Alice to Bob. The implication is that will be independent of y if and only if Hence, Finally, for an assemblage that is causally ordered from Bob to Alice, it is also required that they satisfy the conditions of a general assemblage. To guarantee that Bob's marginal probability distribu- Together, eqs. (133) and (135) and the conditions of general assemblages define causally ordered assemblages. It is simple to verify that causal assemblages lead to causal probability distributions for all sets of instruments.
The technique used here to arrive at the definitions of general and causal assemblages is the same that will be used in all tripartite scenarios to define their respective general and causal assemblages.

D Causally nonseparable process matrices that cannot be certified in a semi-device-independent way
In this section we present the proof of theorem 6 from the main text.
Theorem 6 (Device-dependent certifiable, semi-device-independent noncertifiable process matrix). There exist causally nonseparable process matrices that, for any sets of instruments on Alice's side, always give rise to causal assemblages. That is, causally nonseparable process matrices that cannot be certified in a semi-device-independent way. In Now notice that every instrument can be written as a transposition of another instrument and we can define new valid instruments via A a|x := A T a|x , which allows us to recover any assemblages generated by W and instruments {A a|x } with a causally separable process matrix. More precisely, since (A T a|x ) T = A a|x , the mathematical identities provide an explicit decomposition for the assemblage {w a|x } in terms of a causally separable process matrix and valid instruments. We finish our proof by referring to ref.
[48], which presents several examples of process matrices W which are causally nonseparable but that W T A is causally separable.

E Certification of tripartite process matrices
Here we generalize our approach to certification of indefinite causal order for a tripartite scenario where a process matrix is shared between parties Alice, Bob, and Charlie. In this particular tripartite scenario, Charlie is always in the future of Alice and Bob, so we only study tripartite process matrices that have the causal order (A, B) ≺ C, however, the causal order between Alice and Bob may or may not be well defined. We will only consider this kind of tripartite scenario, the one which is appropriate for the study of the quantum switch processes. A semi-device-independent approach to more general tripartite scenarios, or multipartite scenarios, may be derived, in principle, from a straightforward generalization of our particular tripartite scenario. For more general multipartite scenarios under a device-dependent approach, we refer the reader to ref. [54], and for device-independent, ref. [55].
In the following, we explicitly extend all concepts, definitions, and results from the bipartite case presented in the main text to the tripartite case. We start by defining certification in all 6 inequivalent scenarios that arise from making different assumptions about the operations of each party: TTT (devicedependent), UUU (device-independent), TTU, TUU, UTT, and UUT (semi-device-independent).
Definition 9 (TTT (device-dependent) certification). Given a tripartite behaviour {p(abc|xyz)} that arises from known instruments {A a|x } and {B b|y }, known POVMs {M c|z }, and an unknown tripartite process matrix, one certifies that this process matrix is causally nonseparable if, for some a, b, c, x, y, z, p(abc|A a|x , B b|y , M c|z for all causally separable tripartite process matrices W sep .
Definition 10 (UUU (device-independent) certification). Given a tripartite behaviour {p(abc|xyz)} that arises from unknown instruments and an unknown tripartite process matrix, one certifies that this process matrix is causally nonseparable if, for some a, b, c, x, y, z,  , b, c, x, y, z, p(abc|A a|x , y, z) , b, c, x, y, z, p(abc|x , B b|y , b, c, x, y, z, p(abc|x, y, M c|z A tripartite process matrix W A≺B≺C is causally ordered from Alice to Bob to Charlie if it satisfies and a tripartite process matrix W B≺A≺C is causally ordered from Bob to Alice to Charlie if it satisfies A tripartite process matrix W sep is causally separable if it can be expressed as a convex combination of causally ordered process matrices of the kind W A≺B≺C and W B≺A≺C , i.e., where 0 ≤ q ≤ 1 is a real number. A tripartite process matrix that does not satisfy eq. (156) is called causally nonseparable. Just as in the bipartite case, all causally nonseparable tripartite process matrices can be certified in a device-dependent way for some choice of instruments, since tomographically complete instruments allow for the full characterization of the process matrix. Hence, theorem 1 also holds in the tripartite case.

E.2 Device-independent -UUU
A tripartite behaviour {p(abc|xyz)} is a set of joint probability distributions, that is, a set in which each element p(abc|xyz) is a real number, such that that is, a behaviour whose Alice and Bob's joint marginal does not depend on Charlie's inputs. We will only consider this type of behaviours and will refer to them as simply tripartite behaviours. A tripartite behaviour is called a tripartite process behaviour if there exist a tripartite process matrix Just like in the bipartite case, it can be shown that the tripartite process matrix is the most general operator that leads to valid tripartite behaviours when taken the trace with product instruments. Additionally, since not all bipartite behaviours can be realized by process matrices and the bipartite case is a particular case of the tripartite case, not all tripartite behaviours can be realized by process matrices as well. Hence, theorem 2 also holds in the tripartite case.
A tripartite behaviour {p A≺B≺C (abc|xyz)} is causally ordered from Alice to Bob to Charlie if Alice's marginals do not depend on the inputs of Bob and Charlie, that is, We use them to define instruments and the process matrix One can check that = p A≺B≺C (abc|xyz).
Equivalently, the instruments and process matrix for the causal order B ≺ A ≺ C can be constructed, and by allowing each order to act on a complementary input subspace, just like in the proof of lemma 1, all causal tripartite behaviours can be recovered.

Theorem 8. A tripartite process matrix is certified to be causally nonseparable in a device-independent way if and only if it can generate a noncausal tripartite behaviour for some choice of instruments for Alice and Bob and some choice of POVMs for Charlie.
The proof is analogous to theorem 3.
In the bipartite case, we have proven that not all general bipartite assemblages can be realized by process matrices (are process bipartite assemblages), while in the previous tripartite case, TTU, we have proven that all general TTU-assemblages can indeed be realized by process matrices (are process TTU-assemblages). However, in this tripartite scenario, TUU, as well as in the remaining cases, UTT and UUT, it is not clear whether all general TUU-, UTT-, and UUT-assemblages can be realized by process matrices. We leave this problem as an open question.
Nevertheless, all process TUU-assemblages are valid general TUU-assemblages. We now define our notion of causality for TUU-assemblages.
where 0 ≤ q ≤ 1 is a real number. A TUU-assemblage that does not satisfy eq. (191) is called a noncausal TUU-assemblage.
Notice that one can decide whether a TUU-assemblage is causal by means of an SDP. All causally separable tripartite process matrices lead to causal TUU-assemblages, for whatever choice of instruments. Whether all causal TUU-assemblages can be written in terms of causally separable process matrices is not clear, although for the particular case of assemblages that are causally ordered from Alice to Bob to Charlie, we can show this to be the case.
Here we present our explicit construction of any TUU-assemblage that is causally ordered from Alice to Bob to Charlie by a tripartite process matrix that is causally ordered from Alice to Bob to Charlie. Given where ρ −1 be the inverse of ρ on its support, the transpose T is taken on the {|i } i basis and H C I = be a tripartite process matrix that is causally ordered from Alice to Bob to Charlie. Then, it is true that the assemblage {w A≺B bc|yz } can be recovered by E.5 Semi-device-independent -UTT Here we detail our concepts and definitions for the UTT scenario.
Definition 22 (General UTT-assemblage). A general UTT-assemblage is a set of operators {w a|x }, w a|x ∈ L(H B I B O ⊗ H C I ), that satisfies Intuitively, behaviours are extracted from UTT-assemblages according to p(abc|xyz) = Tr w a|x (B b|y ⊗ M c|z ) ∀ a, b, c, x, y, z.
Definition 23 (Causal UTT-assemblage). A UTT-assemblage is causally ordered from Alice to Bob to Charlie if it satisfies where 0 ≤ q ≤ 1 is a real number. A UTT-assemblage that does not satisfy eq. (203) is called a noncausal UTT-assemblage.
Notice that one can decide whether a UTT-assemblage is causal by means of an SDP. It is not clear whether all general UTT-assemblages can be realized by tripartite process matrices nor whether all causal UTT-assemblages can be realized by causally separable tripartite process matrices. Nevertheless, the set of general UTT-assemblages is an outer approximation of the set of process UUTassemblages and the set of causal UUT-assemblages is an outer approximation of the set of process UTT-assemblages that come from causally separable process matrices. What is not clear is whether these approximations are tight.

E.6 Semi-device-independent -UUT
The final tripartite semi-device independent scenario studied in this work is the UUT scenario.
Definition 25 (General UUT-assemblage). A general UUT-assemblage is a set of operators {w ab|xy }, w ab|xy ∈ L(H C I ), that satisfies w ab|xy ≥ 0 ∀ a, b, x, y Tr a,b w ab|xy = 1 ∀ x, y.
Intuitively, behaviours are extracted from UUT-assemblages according to p(abc|xyz) = Tr w ab|xy M c|z ∀ a, b, c, x, y, z.
The set of general UUT-assemblages is an outer approximation of the set of process UUT-assemblages but it is not clear to us whether this approximation is tight, i.e., it is not clear whether or not all general UUT-assemblages can be obtained by tripartite process matrices.
where 0 ≤ q ≤ 1 is a real number. A UUT-assemblage that does not satisfy eq. (210) is called a noncausal UUT-assemblage.
Notice that one can decide whether a UUT-assemblage is causal by means of an SDP. For the case of causal UUT-assemblages, we prove that our approximation is indeed tight, i.e., that all causal UUT-assemblages can be realized by causal tripartite process matrix, analogously to lemma 2 in the bipartite case and lemma 5 in the TTU tripartite case.

Lemma 6. A UUT-assemblage is causal if and only if it is a process UUT-assemblage that can be obtained from a causal tripartite process matrix.
Proof. We begin by showing that all UUT-assemblages that come from a causal process matrix are causal. Let {w ab|xy } be such that Then, using eq. (152), which is C I W A≺B≺C = B O C I W A≺B≺C , it is possible to deduce that Tr b w ab|xy is independent of y, and hence {w ab|xy } = {w A≺B≺C ab|xy } is causally ordered. The equivalent is true for the order B ≺ A ≺ C.
To prove the only if part we show that every causal UUT-assemblage can be reproduced by acting with some instruments on a causal process matrix. Given a causal UUT-assemblage, it can be decomposed into {w A≺B≺C ab|xy } and {w B≺A≺C ab|xy } with some convex weight q.
and also the process matrix and check that for every a, b, x, y. Analogously, the same holds for {w B≺A≺C ab|xy }. Finally, just like in the proof of lemma 1, by allowing the different causal orders to act in complementary subspaces, we can recover any convex combinations of causally ordered assemblages, i.e., causal assemblages.

Theorem 11. A tripartite process matrix is certified to be causally nonseparable in a semi-deviceindependent UUT way if and only if it can generate a noncausal UUT-assemblage for some choice of instruments for Alice and Bob.
The proof is analogous to theorem 5. F Proof that the quantum switch processes are causal in the UUT scenario In this appendix we prove theorem 7, which we reestate for the convenience of the reader.
for all a, b, x, y, where 0 ≤ q ≤ 1 is a real number, cannot be certified to be noncausal in a UUT scenario.
3 If Tr(w A≺B≺C ab|xy ) = 0, we define ρ ab|xy as the null operator.
One can verify that the first term satisfies