# Quantum Inflation: A General Approach to Quantum Causal Compatibility

Causality is a seminal concept in science: any research discipline, from sociology and medicine to physics and chemistry, aims at understanding the causes that could explain the correlations observed among some measured variables. While several methods exist to characterize classical causal models, no general construction is known for the quantum case. In this work we present quantum inflation, a systematic technique to falsify if a given quantum causal model is compatible with some observed correlations. We demonstrate the power of the technique by reproducing known results and solving open problems for some paradigmatic examples of causal networks. Our results may find an application in many fields: from the characterization of correlations in quantum networks to the study of quantum effects in thermodynamic and biological processes.

## Authors

• 6 publications
• 5 publications
• 1 publication
• 2 publications
• 3 publications
• 3 publications
03/08/2019

### A Quantum Observation Scheme Can Universally Identify Causalities from Correlations

It has long been recognized as a difficult problem to determine whether ...
04/24/2021

### Quantum Causal Inference in the Presence of Hidden Common Causes: an Entropic Approach

Quantum causality is an emerging field of study which has the potential ...
01/26/2021

### The membership problem for constant-sized quantum correlations is undecidable

When two spatially separated parties make measurements on an unknown ent...
04/18/2014

### Beyond Bell's Theorem II: Scenarios with arbitrary causal structure

It has recently been found that Bell scenarios are only a small subclass...
05/12/2021

### Causal networks and freedom of choice in Bell's theorem

Bell's theorem is typically understood as the proof that quantum theory ...
07/31/2018

11/17/2014

### A unifying framework for relaxations of the causal assumptions in Bell's theorem

Bell's Theorem shows that quantum mechanical correlations can violate th...
##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## I Introduction

Causality is an ubiquitous concept in science. It can be argued that one of the main challenges in any scientific discipline is to identify which causes are behind the correlations observed among some measured variables, encapsulated by their joint probability distribution. Understanding this problem is crucial in many situations, such as, for example, the development of medical treatments, taking data-based social policy decisions, the design of new materials or the theoretical modeling of experiments. More precise characterizations of causal correlations enable better decision among competing explanation for given statistics, a task known as

causal discovery. Advances in causal understanding also enables quantification of causal effects from purely observational data, thus extracting counterfactual conclusions even in instances where randomized or controlled trials are not feasible, a task known as causal inference [1, 2, 3].

Bayesian causal networks, in the form of directed acyclic graphs (DAGs), provide the tools to formalise such problems. These graphs, examples of which are shown in Fig. 1, encode the causal relations between the various variables in the problem, which could be either observed or non-observed. The latter, also known as latent, are required in many relevant situations in order to explain correlations among the observed. The fundamental task addressed in this work underlies both causal discovery and causal inference, and is known as the causal compatibility

problem. It consists of deciding whether a given joint probability distribution over some observed variables can be explained by a given candidate Bayesian causal network. Equivalently, the objective of causal compatibility can be viewed as characterizing the set of distributions compatible with a given Bayesian network.

In all cases, the measured variables in a causal network are, by definition, classical. However, causal networks may be classical or quantum depending on whether correlations are established by means of classical or quantum information. Because of its importance and broad range of applications, there is a vast literature devoted to understanding the problem of causal compatibility for classical causal networks, see for instance Ref. [1]. On the contrary, very little is known for the quantum case despite the fact that nature is ultimately quantum and quantum effects are expected to be crucial for the understanding of many relevant phenomena in many scientific disciplines. Moreover the two problems are known to be different, as one of the consequences of Bell’s theorem [4, 5] is that quantum causal networks can explain correlations for which the analogous classical network fails [6, 7, 8, 9, 10]. Our work addresses these issues and provides a systematic construction to tackle the problem of causal compatibility for quantum causal networks.

As mentioned, several results already exist in the classical case. Whenever the network does not contain any latent variable the solution is rather simple and it suffices to check whether all the conditional independences associated to the network topology are satisfied [1]. The problem, however, becomes much more difficult as soon as the network also includes latent variables, as their presence generally implies non-trivial inequalities on the observed probabilities. A general method to tackle the causal compatibility problem, known as the inflation technique, was obtained in [11]. It consists of a hierarchy of conditions, organised according to their computational cost, that are necessary for a Bayesian network to be be able to explain the observed correlations. Moreover, the hierarchy is asymptotically sufficient, in the sense that the candidate Bayesian network is compatible if, and only if, all conditions in the hierarchy are satisfied [12].

When moving to quantum causal scenarios, the problem of causal compatibility presents several new features. In the classical case, the cardinality of the latent variables can be upper bounded and, therefore, the problem is decidable. In the quantum case, however, a similar upper bound cannot exist because the problem of quantum causal compatibility is undecidable, as implied by recent results on quantum correlations [13]. Yet, this does not preclude the existence of a method similar to inflation to tackle the question. Unfortunately, the inflation technique cannot be straightforwardly adapted to the quantum case because it relies on information broadcasting, a primitive that is not plausible with quantum information [14, 15]

. Other causal analysis techniques which are fundamentally quantum have been proposed. Notably among these is the quantum entropy vector approach of

[16], which is applicable to all causal structures but uses only those constraints on entropies imposed by the causal structure, or the scalar extension of [17], which imposes stronger constraints but cannot be applied to causal structures in which all observed nodes are causally connected, such as the triangle scenario of Fig. 1(b).

The main result of our work is the construction of quantum inflation, a systematic technique to study causal compatibility in any quantum Bayesian network. It can be seen as a quantum analogue of the classical inflation technique which avoids the latter’s reliance on information broadcast. We first explain in Sec. II how quantum inflation works by means of an example, and provide the details of the construction in Sec. III. Then, we describe how to address quantum causal compatibility in complex scenarios in Sec. IV. Also, quantum inflation can serve as a tool for assessing causal compatiblity with classical models. We detail this construction in Sec. V. Finally, in Sec. VI we apply quantum inflation to characterize correlations achievable in various tripartite quantum causal networks, and after that we conclude in Sec. VII.

## Ii Quantum Inflation by Example

Consider the quantum causal network depicted in Fig. 2(a)

, whereby three random variables

, , are generated by conducting bipartite measurements over the ends of three bipartite quantum states , , . We are handed the distribution of observed variables and asked if it is compatible with this model. How to proceed?

Suppose that there existed indeed bipartite states of systems , and commuting measurement operators , acting on systems , respectively, which were able to reproduce the correlations . Now imagine how the scenario would change if independent copies , of each of the original states were distributed instead, as depicted in Fig. 2(b). Call the overall quantum state before any measurement is carried out. For any we can, in principle, implement measurement on the copy of and the copy of : we denote by the corresponding measurement operators. Similarly, call , () the measurement () over the states ().

The newly defined operators and their averages under state satisfy non-trivial relations. For example, for and the operators and act on different Hilbert spaces, and hence . Similarly, expressions such as and can be shown identical, since one can arrive at the second one from the first one just by exchanging with . More generally, for any function of the measurement operators and any three permutations of the indices , one should have

 (1)

Finally, note that, if we conducted the measurements at the same time (something we can do, as they all commute with each other), then the measurement outcomes would be distributed according to

 (2)

If the original distribution is compatible with the network in Fig. 2(a), then there should exist a Hilbert space , a state and operators , , satisfying the above relations. If such is the case, we say that admits an . By increasing the index of , we arrive at a hierarchy of conditions, each of which must be satisfied by any compatible distribution .

At first glance, disproving the existence of a quantum inflation looks as difficult as the original feasibility problem. However, the former task can be tackled via non-commutative polynomial optimization (NPO) theory [18]. Originally developed to characterize quantum nonlocality [19, 20], the general goal of NPO theory is to optimize the expectation value of a polynomial over operators subject to a number of polynomial operator and statistical constraints. This is achieved by means of a hierarchy of semidefinite programming tests [21], see also Appendix A. In our particular case, we are dealing with a feasibility problem. The polynomial operator constraints we wish to enforce on are that they define complete families of projectors, which commute when acting on different quantum systems. The statistical constraints are given by Eqs. (1-2). If for some we were able to certify, via NPO theory, that does not admit an -order quantum inflation, then we would have proven that does not admit a realization in the quantum network of Fig. 2(a).

The method just described can be easily adapted to bound the statistics of any network in which the observed variables are defined by measurements on the quantum latent variables, such as the triangle scenario. To test the incompatibility of a distribution , we would consider a modified network with copies of each of the latent variables, extend the original measurement operators to act on all possible copies of each system and work out how operator averages relate to and to each other. Finally, we would use NPO theory to disprove the existence of a state and operators satisfying the inferred constraints. In Section IV we further show how to extend the notion of quantum inflation to prove infeasibility in general quantum causal structures, where there might be causal connections among observed variables, as well as from observed to latent variables.

## Iii Detailed Description

To illustrate the details of the construction, we first consider a subset of causal scenarios in which single measurements are applied to different quantum states. They correspond to two-layer DAG’s in which arrows coming from a first layer, consisting in both observed and latent variables, go to a second layer of observed variables. Each of the variables in the second layer is regarded as an outcome variable, since it is the result of conducting a measurement on a quantum state. The set of all classical observed parents of such a variable can be understood as the measurement setting used to produce this outcome.

The essential premise of quantum inflation is to ask what would happen if multiple copies of the original (unspecified) quantum states were simultaneously available to each party. In this gedankenexperiment the parties use copies of their original measurement apparatus to perform simultaneous measurements on the copies of the original quantum states now available to them. There are different ways in which a party can align her measurements to act on the states now available, thus we must explicitly specify upon which unique set of Hilbert spaces a given measurement operator acts non-trivially. Let us therefore denote measurement operators by

 ^Os|ki|m≡^O( Outcome variable=k,Spaces=s, Setting=m,Outcome=i),

where the four indices specify

1. , the index or name of the outcome variable in the original causal graph,

2. , the Hilbert spaces the given operator acts on,

3. , the measurement setting being used,

4. , the outcome associated with the operator.

For example, using an quantum inflation of the triangle scenario (see Fig. 2) one would find that for outcome variable may be sampled from precisely four possibilities, each value being a different tuple:

 s∈{{A′1,A′′1},{A′1,A′′2},{A′2,A′′1},{A′2,A′′2},}.

where () denotes the factor of the Hilbert space where () acts.

These operators will be regarded as the non-commuting variables of an NPO problem where the polynomial constraints are derived according to rules pertaining to the operators’ projective nature and as well as a number of commutation rules. The statistical constraints are then imposed from symmetry under permutations of the state indices and enforcing consistency with the observed probabilities.

#### Projection rules

For fixed , the non-commuting variables must correspond to a complete set of measurement operators. Since we do not restrict the dimensionality of the Hilbert space where they act, we can take them to be a complete set of projectors. That is, they must obey the relations

 ^Os|ki|m=(^Os|ki|m)†,^Os|ki|m^Os|ki′|m=δii′^Os|ki|m,∀s,k,i,i′,m (3a) ∑i^Os|ki|m=1, for all s,k,m. (3b)

These relations imply, in turn, that each of the noncommuting variables is a bounded operator. Hence, by [18], the hierarchy of SDP programs provided by NPO is complete, i.e., if the said distribution does not admit an -order inflation, then one of the NPO SDP relaxations will detect its infeasibility.

#### Commutation rules

Operators acting on different Hilbert spaces must commute. More formally,

 [^Os1|k1i1|m1,^Os2|k2i2|m2]=0 if s1∩s2=∅. (4)

Later on we consider modifying these commutation rules so as to construct an alternative SDP for constraining the correlations of classical causal structures.

#### Symmetry under permutations of the indices

The critical ingredient that relates the inflated network structure to the original network is that all averages of products of the noncommuting variables must be invariant under any permutation of the source indices. Call the overall quantum state of the inflated network (since we do not cap the Hilbert space dimension, we can assume that all state preparations in the original network are pure). Then we have that

 (5)

An example of such statistical constraints imposed in the triangle scenario was given in Eq. (1). Another example, for an inflation level , is the following:

 ⟨E{A′1,A′′1}0E{A′2,A′′2}1F{B′′3,B′1}0G{C′′1,C′2}0⟩ρ apply ρ1AB↔ρ2AB =⟨E{A′2,A′′1}0E{A′1,A′′2}1F{B′′3,B′2}0G{C′′1,C′2}0⟩ρ (6a) apply ρ1AB↔ρ3AB =⟨E{A′2,A′′1}0E{A′3,A′′2}1F{B′′3,B′2}0G{C′′1,C′2}0⟩ρ (6b) apply ρ1BC↔ρ3BC =⟨E{A′2,A′′1}0E{A′3,A′′2}1F{B′′1,B′2}0G{C′′1,C′2}0⟩ρ, (6c)

where, for readability, we identified () [] with () [].

#### Consistency with the observed probabilities

Finally, as described by Eq. (2) in Section II, certain product averages can be related to products of the probabilities of the distribution that one wishes to test. More specifically, let be the order of the considered inflation, and denote by the set of Hilbert spaces where variable acts, with the copy labels of all Hilbert spaces equal to (e.g.: , in Fig. 2). Then, for any set of indices , we have that

 ⟨n∏j=1∏k^O→jk|kij,k|mj,k⟩ρ=n∏j=1Pobs(⋂k(ij,k|mj,k,k)), (7)

where denotes the event of probing with setting and obtaining the result .

## Iv Arbitrary Causal Scenarios

In the previous section we provided a systematic method to characterize the correlations achievable in a subset of quantum causal networks, namely two-layer DAG’s where no node has both parents and children. In this section we extend those ideas to characterize correlations in arbitrary causal structures.

### iv.1 Classical Exogenous Variables

The first important case that must be dealt with is that of the so-called exogenized causal structures, where all unobserved nodes are root nodes but otherwise classical variables can have both parents and children. We address the case of arbitrary, non-exogenized causal structures in the next section.

There exists a procedure that can be used to map the correlations of any exogenized causal structure to the correlations of a unique two-layer DAG associated with the original structure. We call such procedure interruption. Graphically, interruption modifies a graph as follows: For every observed variable which is neither a root node nor a terminal node, introduce a new variable and replace all edges formerly originating from by edges originating from . In the interruption graph, becomes a terminal node and is a root node. Proceeding in this fashion, any causal structure can be converted into a two-layer scenario. Graphical examples of interruption are shown in Fig. 3. Conceptually, interruption has extensive precedent in literature regarding classical causal analysis. It is closely related to the Single-World Intervention Graphs (SWIGS) pioneered by [22], as well as the -separation technique introduced in [23]. Interruption previously has been used to show Tsirelson inequalities constraining the set of quantum correlations compatible with the Bell scenario can be ported to quantum constraints pertaining to the Instrumental scenario [24], see also the proof of Theorem 25 in Ref. [7].

### iv.2 Quantum Exogenous Variables

Thanks to Evan’s exogenization procedure [25], classical non-exogenous structures can be transformed into exogenous causal structures with the same predictive power. The procedure consists in replacing all arrows from a parent node to a latent node with arrows from the parent node to the children of the latent node. This operation is repeated for all parents of all latent nodes such that finally all latent variables become parentless.

Unfortunately, when applied to quantum latent variables, exogenization results in a new quantum network that, in general, does not predict the same distributions of observed events as its predecessor. The example in Fig. 4, evidencing this compatibility mismatch, is wholly due to Stefano Pironio.

To make this explicit, in Fig. 4(a) the variable can serve as a setting, which adjusts the state before it is sent to B and C. Thus, it is possible for to maximally violate a Bell inequality for A and B, and to maximally violate a Bell inequality for A and C. No quantum state prepared independently of can do so, due to the monogamy of quantum correlations [26, 27]. Consequently, it is not possible to reproduce such correlations within the causal network of Fig. 4(b).

One way to deal with this predicament is to regard observable variables with unobserved children as random variables indicating the classical control of a quantum channel. Thus, in Fig. 4(a) we treat the root variable as the classical control for a quantum channel acting on the subsystems. That is, one understands , where, for all values of , is a unitary operator that commutes with any operator acting solely on

’s subsystem. As such, the joint distribution of the values of the visible variables

conditioned on the root visible nodes can be understood as generated by

 P(A =a,B=b,C=c|X=x,Y=y,Z=z,S=s) =⟨^U†s^Aax^Bby^Ccz^Us⟩ρAS=⟨^Aax^U†s^Bby^Ccz^Us⟩ρAS.

This interpretation can be made without loss of generality, since the subspace of the complete Hilbert space can be understood as containing the subspaces corresponding to and .

As in the exogenous case, an -order inflation of a causal structure with non-exogenous quantum variables requires taking copies of the unobserved root nodes. Each unitary operator in the original causal structure gives rise to operators of the form in the inflated graph, where denotes the copy of the Hilbert space where acts. The unitary or outcome operators associated to the descendants of any such “unitary node” (, in Fig. 4) inherit the copy label of the Hilbert space .

With this last prescription, the symmetry relabelling rule, Eq. (5), still holds. However, the projection rules (3a-3b) only hold if the non-commuting variable in question corresponds to an outcome variable in the original graph. If corresponds to a unitary variable, then the operator must be subject to the constraints

 ^Os|km(^Os|km)†=(^Os|km)†^Os|km=1. (8)

The commutation rule (4) remains valid upon qualifying that the Hilbert spaces listed in must be simultaneously co-existing in the original graph. For example, in Fig. 4(a), the operators corresponding to the Hilbert spaces associated to the outcome variables and co-exist after the transformation is applied over system . It follows that the corresponding measurement operators , commute. Finally, rule (7) expressing consistency with the observed probabilities must also be amended, to take into account that descendants of a unitary variable must be bracketed by the corresponding unitary and its adjoint.

Note that the aforementioned operator and statistical constraints are all polynomial, and thus they can all be enforced in the framework of NPO theory.

Interruption, classical exogenization, and the treatment for quantum exogenous variables hereby presented cover all possible nontrivial causal influences in arbitrary quantum causal structures. Quantum inflation is therefore a technique of full applicability to bound the quantum correlations achievable in any causal scenario.

## V Sdp for Classical Compatibility

The quantum inflation technique can be easily adapted for solving the problem of causal compatibility with an arbitrary classical causal structure. It is known that any correlation achievable with only classical sources can be realized in terms of commuting measurements acting on a quantum state [28]. Therefore, in order to detect correlations incompatible with classical networks, one must generalize the commutation relations in the original quantum inflation method to the constraint that any pair of measurement operators commute. That is,

 ^Os1|k1i1|m1⋅^Os2|k2i2|m2=^Os2|k2i2|m2⋅^Os1|k1i1|m1,

for all . This defines a hierarchy of constraints that classical correlations compatible with a given causal structure must satisfy.

The associated NPO hierarchy is guaranteed to converge at a finite level. In fact, for hierarchy levels higher than —where is the number of parties, is the number of settings per party and

is the number of outcomes per measurement—application of the commutation relations allows one to reduce any product of the operators involved into one of shorter length. For a fixed inflation level, the problem solved at the highest level of the NPO hierarchy is analogous to the linear program solved in classical inflation

[11] at the same inflation level.

In contrast with the original classical inflation technique, the classical variant of the quantum inflation technique described in this article uses semidefinite programming, and exhibits far more efficient scaling with the inflation hierarchy than the original linear programming approach [12]. One must note that this gain in efficiency comes at the expense of introducing further relaxations in the problem. Nevertheless, this classical variant of quantum inflation is capable of recovering a variety of seminal results of classical causal compatibility, such as the incompatibility of the W and GHZ distributions with classical realizations in the triangle scenario. It also identifies the distribution described by Fritz [6], known to have a quantum realization in the triangle scenario, as incompatible with classical realizations. For all these results, the relaxed SDP formulation is far less memory-demanding than the raw linear programming formulation. Furthermore, the SDP approach is the only method that can be used when using inflation to assess causal compatibility in the presence of terminal nodes which can take continuous values.

In conclusion, not only can quantum inflation be leveraged to obtain results for networks with classical sources, but we argue that it is the most suitable technique to be used for addressing causal compatibility with classical realizations in large networks.

## Vi Results

In the following we demonstrate the power of quantum inflation by reproducing known results and solving open problems in different tripartite causal networks.

### vi.1 The Triangle Scenario

The triangle scenario consists of three parties that are influenced in pairs by bipartite latent variables, as depicted in Fig. 1(b). Additionally, each of the visible variables may be influenced by another visible variable, that represent a measurement choice.

The first example we study in this scenario is the so-called W distribution. This distribution is defined by the task of all parties outputting the outcome except one, which should output . Explicitly, it is

 PW(a,b,c)\coloneqq{13a+b+c=10otherwise. (9)

The W distribution was proven in [11] not to be realizable in the triangle scenario where the latent variables are classical. Additionally, it is easy to see that it is realizable with tripartite classical randomness. It can be shown that does not admit a second-order quantum inflation. Therefore, a quantum realization of the W distribution in the triangle scenario is impossible.

Quantum inflation is robust, and certifies that when mixing the W distribution with white noise, the resulting distribution

does not have a quantum realization in the triangle for all visibilities higher than . This result is obtained by solving the NPO program associated to a second-order inflation and the set of monomials (see Appendix B for the definition of this set), restricted to operators of length .

### vi.2 The Triangle Scenario with Settings

As mentioned before, one can also consider more complicated networks that include additional observable variables to encode for choices of discrete measurement settings. Fig. 5 shows this type of network for the case of the triangle scenario. In this setup we study the Mermin-GHZ distribution, defined by

 ⎧⎪⎨⎪⎩1/8x+y+z=0mod2,(1+(−1)a+b+c)/8x+y+z=1,(1−(−1)a+b+c)/8x+y+z=3. (10)

Quantum inflation also allows one to prove that the Mermin-GHZ distribution is not compatible with a quantum realization in the triangle scenario with inputs, by showing that does not admit a second-order quantum inflation. Additionally, its noisy version can be proven not to have a quantum realization for any visibility higher than .

### vi.3 The Tripartite-Line Scenario

Quantum inflation is organised as an infinite hierarchy of necessary conditions. There are however situations in which it recovers the quantum boundary at a finite step. An example of these situations is provided by the tripartite-line scenario of Fig. 1(c), which underlies phenomena such as entanglement swapping. The main characteristic of this structure is that there is no causal connection between the extreme variables and . As a consequence of this, all correlations realizable in the tripartite-line scenario satisfy the following factorization relation

 ∑bPobs(a,b,c|x,y,z)=Pobs(a|x)Pobs(c|z). (11)

This scenario has been thoroughly studied in the literature [29, 30]. In fact, it is known that the probability distribution

 P2PR(a,b,c|x,y,z)\coloneqq[1+(−1)a+b+c+xy+yz]/8, (12)

despite satisfying the constraint of Eq. (11), cannot be realized in the tripartite-line scenario in terms of classical or quantum latent variables. However, it is known that its mixture with white noise, , can be realized if the visibility parameter is sufficiently small [30]. admits a realization in terms of quantum latent variables for any , and in terms of classical latent variables for any .

Quantum inflation correctly recovers that all with visibility are incompatible with the quantum tripartite line scenario. It does so by certifying that for any , the corresponding does not admit a second-order inflation, and this infeasibility is found already at the NPO hierarchy level corresponding to the set (see Appendix B for a definition of this monomial set). Furthermore, we can also contrast against realizations in terms of classical latent variables by imposing that all measurements in the problem commute. While not being tight, this classical version of quantum inflation witnesses that all with visibility cannot be realized in terms of classical hidden variables. This result is obtained when analyzing compatibility with a third-order inflation, solving the NPO problem associated to the corresponding set of monomials (its definition can be found in Appendix B).

## Vii Conclusions

We introduced the quantum inflation technique, a systematic method to discern whether an observable distribution is compatible with a causal explanation involving quantum degrees of freedom. The technique is of general applicability, in that it can be employed to analyze correlations achievable by any quantum causal structure with, potentially, visible-to-visible, latent-to-visible, visible-to-latent or latent-to-latent connections. Furthermore, we discussed how a slight modification allows also to study causal realizations in terms of classical latent variables.

We used quantum inflation to study realizations of famous tripartite distributions in different causal structures, proving that the W and Mermin-GHZ distributions cannot be generated in the triangle scenario with quantum latent variables and bounding their noise resistance. We also showed, in the entanglement swapping scenario, how quantum inflation is capable of recovering known results.

The implementation of quantum inflation comprises two different hierarchies: the one of inflations, and for each inflation, the NPO hierarchy used to determine whether a distribution admits such an inflation. While asymptotic convergence has been proven for the latter, that of the former is an open question. Nevertheless, we have identified situations in which tight results can be obtained at finite steps of the hierarchies.

Quantum inflation can find an application in many fields. A clear first application is found in multi-party quantum information protocols [31]. From a more general perspective, and due to the central role that causality has in science, we expect quantum inflation to become a fundamental tool for analyzing causality in any situation where a quantum behavior is presumed.

###### Acknowledgements.
We acknowledge useful discussions with Stefano Pironio. This work is supported by Fundació Obra Social “la Caixa” (LCF/BQ/ES15/10360001), the ERC CoG QITBOX, the AXA Chair in Quantum Information Science, the Spanish MINECO (QIBEQI FIS2016-80773-P and Severo Ochoa SEV-2015-0522), Fundació Cellex, Generalitat de Catalunya (SGR 1381 and CERCA Programme) and the Austrian Science fund (FWF) stand-alone project P 30947. This research was supported by Perimeter Institute for Theoretical Physics. Research at Perimeter Institute is supported in part by the Government of Canada through the Department of Innovation, Science and Economic Development Canada and by the Province of Ontario through the Ministry of Economic Development, Job Creation and Trade. 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 A Non-Commutative Polynomial Optimization

A generic NPO problem can be cast as

 p∗= such that qi(X)⪰0∀i=1…mq,

that is, finding a Hilbert space , a positive-semidefinite operator with trace one, and a list of bounded operators in (where in general) that minimize the expectation value of the polynomial operator given some polynomial constraints , where means that the operator should be positive semidefinite. One can also add to the optimization statistical constraints of the form , for . Note that the NPO formalism can also accommodate equality constraints of the form or , since they are equivalent to the constraints and , respectively. The procedure for solving these problems is described in Ref. [18], and uses a hierarchy of relaxations where each of the steps is a semidefinite program. The solutions to these problems form a monotonically-increasing sequence of lower bounds on the global minimum :

 p1≤p2≤⋯≤p∞≤p∗.

If the constraints imply (explicitly or implicitly, see Ref. [18]) that all non-commuting variables are bounded (and they do so in all the NPO problems considered in this work), then the sequence of lower bounds is asymptotically convergent. That is, .

In our case, given some observed correlations, we deal with a feasibility problem about the existence of a quantum state and measurements subject to polynomial operator and statistical constraints arising from the causal networks and the observed correlations. This feasibility problem can be mapped into an optimization problem in different ways. For instance, while not being the most practical procedure, the easiest way of doing it is by considering a constant polynomial as the function to be optimized. This problem has solution equal to provided that the polynomial and statistical constraints are simultaneously satisfiable. Any step in the hierarchy is therefore a necessary SDP test to be satisfied for the causal model to be compatible with the observed correlations. Note that the same formalism can be used to optimize polynomials of the operators, such as, for instance, Bell-like inequalities, over quantum correlations compatible with a given causal structure [31].

## Appendix B Monomial Sets for NPO Problems

The hierarchies of semidefinite programs that bound the solutions of NPO problems can be described in terms of sets of products of the non-commutative operators in the problem. In this article we use two different hierarchies, that are both asymptotically complete. The levels in the first hierarchy are known as NPA levels [19, 20]. The NPA level , , is associated to the set of all products of operators in the problem, of length no larger than . For example, the set associated to the inflations of the quantum triangle scenario discussed in the main text is

 S2={1}∪{Hi,jp}p,i,j∪{Hi,jpHk,lq}p,q,i,j,k,l,

where . On the other hand, some problems may achieve tighter results at lower levels if one instead considers local levels [32]. The local level , , is built from the products of operators that contain at most operators of a same party. For instance, in the quantum triangle scenario, the set associated to its inflations is

 L1= {1}∪{Hi,jp}p,i,j∪{Hi,jp(H′)k,lq}p,q,i,j,k,l ∪{Ei,jaFk,lbGm,nc}a,b,c,i,j,k,l,m,n,

where . While both hierarchies are asymptotically complete, they satisfy the relation (in fact, the smallest set of the NPA hierarchy that contains is , where is the number of parties), and thus the use of finite levels of one or the other hierarchy may vary with the specific problem to solve.