Coherence and contextuality in a Mach-Zehnder interferometer

We analyse nonclassical resources in interference phenomena using generalized noncontextuality inequalities and basis-independent coherence witnesses. We use recently proposed inequalities that witness both resources within the same framework. We also propose, in view of previous contextual advantage results, a systematic way of applying these tools to characterize advantage provided by coherence and contextuality in quantum information protocols. We instantiate this methodology for the task of quantum interrogation, famously introduced by the paradigmatic bomb-testing interferometric experiment, showing contextual quantum advantage for such a task.

Photonic devices such as beam-splitters can be interpreted as generators of quantum coherence [24,25] and play a major role in modern quantum optics.The abilities of generating, controlling and measuring quantum superposition of single photons in SWAP test and related interferometric schemes are relevant resources in quantum information, particularly useful for learning properties of quantum systems [26,27,28].
Coherence of quantum states is commonly described with respect to a specific choice of reference basis.Such a choice is normally wellunderstood in the paradigm of quantum computation, where high control of specific basis states is assumed.Nevertheless, it becomes somewhat arbitrary for states that decohere onto eigenstates of an unknown reference observable.Describing coherence as a basis-dependent quantity is not necessary, and basis-independent coherence can be properly defined for sets of states, in the so-called set-coherence approach, introduced recently in Ref. [29].
Despite the foundational importance of quantum coherence, quantum superposition and entanglement, those nonclassical phenomena are not sufficient for passing stronger tests of nonclassicality such as violating Bell inequalities, or noncontextuality inequalities [30,31,32].Mach-Zehnder interferometers (MZIs) are among the simplest interferometers, and thus a good testbed for investigating the possibility of demonstrating stronger non-classicality criteria, clarifying when can we witness quantum contextuality in single qubit interference.In Ref. [33] the authors constructed a noncontextual model that reproduces a set of interesting quantum phenomena using a MZI with symmetric beam-splitters and a single phase-shifter with phase ϕ = π.
In this work we show that we can witness and quantify basis-independent quantum coherence inside Mach-Zehnder interferometers (MZIs) using violations of known coherence-free inequalities, which can be probed using finitely many measurements, as opposed to visibility-based schemes that rely on continuously monitoring a quantum system.We also comment on the experimental benefits our approach has with respect to the estimation of basis-dependent coherence monotones [14].
Our approach allows us to propose a general way for demonstrating contextual advantage for quantum information tasks, first envisioned in Ref. [36].It will be possible to demonstrate advantage arising from coherence/contextuality when a particular task achieves, with a figure of merit, values above thresholds provided by our inequalities.Using the inequalities from Refs.[34,35] one can then link the figure of merit to such known inequalities to bound classical success rates.As an instance of this methodology, we consider the case-study of quantum interrogation [11,37,38,39,40], which exploits a MZI.Using our techniques, we show that quantum contextuality provides a quantifiable advantage for this task.
In this work, we push further the analysis of contextuality of MZIs for any asymmetric beamsplitter and any choice of phase-shifter.Using the inequality-based framework developed in Refs.[34,35], we present experimentally accessible ways to witness and quantify the regime where the superposition created within the interferometer cannot be explained by noncontextual or coherence-free models.Our results show that symmetric beam-splitters in a MZI are the exception, and that virtually any other BS splitting ratio results in phenomena not explainable by a non-contextual model.Furthermore we discuss experimental implementations and their feasibility.
In summary, our main contributions are as follows: 1. We apply recently introduced inequalities that witness coherence to the setting of Mach-Zehnder interferometers, while also remarking that most of our constructions are well-defined for more general interferometric settings.We focus on MZIs, as they may be argued to be the simplest interferometric device.

We provide numerical and analytical results
showing that the inequality-based formalism is well suited to experimentally assess quantum coherence inside interferometers.
3. We present two simple and experimentally accessible settings to probe coherence inside interferometers (the parallel and sequential settings).The parallel setting avoids estimating the visibility and applies also to more general multimode interferometers, while the sequential setting is suitable to demonstrating the advantage provided by contextuality, as we show.
4. We present a novel robust noncontextuality inequality that is capable of probing the ability of MZIs to generate contextual data, that is a generalization of the cycle inequalities found in Ref. [34].
5. We highlight a general strategy for proving quantum advantages in interferometric experiments using the inequalities proposed in Refs.[34,35], and showcase the applicability of this methodology to the task of quantum interrogation.
6.We apply the known 3-cycle inequalities from Ref. [34] to quantify contextual advantage in the task just mentioned.This solves an open problem proposed in Ref. [33] of what statistics arising from interference, present in the bomb-testing gedanken experiment, defy explainability by noncontextual models.
This paper is organised in two main sections, the first of which provides the relevant theoretical basis for understanding the main results presented in the second.We start by reviewing the notion of contextuality, and the way in which it is possible to connect contextuality and coherence using the recently proposed event graph approach [35].We briefly introduce the experimental device we analyze, a MZI, and the information task of quantum interrogation.In the results section afterwards, we first outline how to use coherence witness inequalities to quantify nonclassical behaviour inside the MZI, making a comparison with known results in literature.We then proceed describing how contextuality can be witnessed in those devices, and prove contextual advantage for the task of quantum interrogation.

Background
Contextuality is a characteristic of probability distributions.There are three main proposals for defining contextuality.The standard definition, known as Kochen-Specker contextuality [41], is built on the seminal work of Bell, Kochen and Specker [42,43,44] on the impossibility of noncontextual hidden-variable models for quantum systems of dimension larger than 2. The second proposal is known as contextualityby-default [45,46,47], which extended the analysis beyond physical systems [48].And finally, the generalized contextuality description, first proposed by Spekkens in Ref. [49].In this work, we take contextuality to be defined in the Spekkens sense only, a choice that will become clear later.

Generalized Contextuality
We can theoretically and experimentally analyse generalized contextuality using two approaches, (i) via the characterization of operationalprobabilistic prepare-and-measure contextuality scenarios with finite operational equivalences [50,51,52,53,36,54], and (ii) via the characterization of a prepare-and-measure fragment of general probabilistic theories (GPTs) [55,56,57,58].In Ref. [49], Spekkens defined generalized noncontextuality as a property of ontological models [59,60] explaining an operational-probabilistic theory (OPT).We will only treat the former wellestablished approach and leave connections and applications of the results for the latter to future work.
The finite scenarios approach is a technique for selecting finite sets of accessible processes and equivalences in the OPT for probing generalized contextuality as originally proposed.We hereby review the necessary tools for understanding the operational content of prepare-and-measure contextuality scenarios, and how it is possible to probe contextuality in this setting.We follow Refs [50,51,52,53,36,61,62,54], mostly inspired by the informal description of operational theories from Ref. [49]; see Ref. [63] for the distinction between OPTs and GPTs we will assume.
An OPT prescribes lists of operations, subdivided into preparations P, transformations T , and measurements M with associated effects, i.e. ordered pairs of outcomes and their corresponding measurements, {[k|M ]} k , with M ∈ M and k some outcome of M .Elements in these lists correspond to laboratory instructions to be done during an experiment, e.g. an element P 0 ∈ P can represent the instruction "prepare a single photon in mode a" and another element P 0 ⊥ ∈ P can represent the instruction "prepare a single photon in mode b" (see Fig. 2).In theory, all these lists can have infinite elements.An OPT is also assumed to be convex [63] and to have consistent composition operations.Using this framework we must also postulate a probability rule between preparations followed by measurements p(k|M, T, P ).Indistinguishable operations of an OPT with respect to the rule p are said to be equivalent.
Formally, any two P 1 , P 2 ∈ P are operationally equivalent if p(k|M, T, P 1 ) = p(k|M, T, P 2 ) for all conceivable effects {[k|M ]} k , M ∈ M and transformations T ∈ T in the OPT, and we write P 1 ≃ P 2 .Similarly for measurement effects, any two effects T, P ) for all conceivable preparations P ∈ P and transformations T ∈ T , in which case we write In words, equivalent processes are indistinguishable through the lenses of the operational theory.We will not consider operational equivalences between transformation procedures, since we will assume that operations of the form T (P ) correspond to valid new preparation procedures within the OPT, similar to Refs.[36,64].
When quantum theory is viewed as an operational theory, quantum states ρ ∈ D(H), over some space H, label equivalence classes of operationally equivalent preparation procedures, and POVM elements label equivalence classes of measurement effects.Hence, operational equivalences P 1 ≃ P 2 are represented in quantum theory as equality between corresponding states ρ 1 = ρ 2 , and The operational theory does not attempt to explain the phenomenology of a given experiment, since it merely provides the set of rules for obtaining the statistical results thereof.Explanations for the success of an operational theory are given by the ontological models framework [60,59].Such models are constructed by postulating the existence of a set Λ of physical variables λ ∈ Λ, that is relevant for the explanations of the phenomena that constitute the elements of reality [65] of the theory.Let us now introduce the ontological counterparts of the operational elements P, T and k|M , i.e. functions acting over Λ. Preparations P are associated with the probability µ P that a given λ is prepared, Λ µ P (λ)dλ = 1, µ P (λ) ≥ 0. Transformations T label statistical changes from a given λ into a different λ ′ , and are represented as stochastic transition matrices over Λ.Finally, measurement effects correspond to functions ξ which describe, for each given λ ∈ Λ, probability distributions over all the outcomes of the measurement M , k ξ(k|M, λ) = 1, ξ(k|M, λ) ≥ 0. This causal description within the variables of Λ explains the operational-probabilistic theory when it agrees with experiments, i.e. it satisfies (1) The probability µ P plays a central role in quantum foundations.When P corresponds to the preparation of some quantum state, say |ψ⟩, the associated distributions µ ψ are referred to as the epistemic states of the ontological model.In such a case, epistemic states carry only some knowledge about reality, itself described by the ontic states λ.The theories for which quantum states are interpreted as epistemic states are generically known as epistemic interpretations of quantum mechanics.For an overview of such a discussion we refer to Ref. [59].Some celebrated results in quantum foundations are presented in this language, such as Spekkens' noncontextual toy theory [31], and the Pusey-Barrett-Rudolph (PBR) no-go theorem [66].
So far, ontological models as described can explain any statistics arising from an OPT, be it classical, quantum, or even post-quantum.Constraining ontological explanations to satisfy specific assumptions is then necessary to possibly create a gap between classical and quantum explanations.To do so, we constrain operationally equivalent procedures P 1 ≃ P 2 .Distinctions in the labels, 1 or 2, of such equivalent procedures label the elements in the same equivalence class . Each choice of label corresponds to the context in which the procedure was made.For instance, the procedure P (0 or 1) is described as "flip a fair coin to decide if preparing a single photon in mode a or in mode b", and the procedure P (+ or −) is described as "flip a fair coin to decide if preparing a single photon in mode a that later passes through a symmetric BS, or in mode b that later passes through a symmetric BS", see Fig. 2 for this example.In quantum theory the first procedure prepares the equal mixture of states 1 2 |0⟩⟨0| + 1 2 |1⟩⟨1| = 1 2 1, and the second prepares the equal mixture of states 1  2 These two procedures are operationally equivalent, since for every POVM element we will have p(k|M, P (0 or 1) ) = Tr(E M k 1 2 1) = p(k|M, P (+ or −) ).The operational procedures were nevertheless performed by different elements in the OPT.
It can be argued that this difference in labels is not acceptable from a classical perspective [49,67], and disregarding labels of operationally equivalent processes is the relevant constraint over ontological models to be deemed classical.That is precisely what defines the notion of noncontextuality.Formally, we say that an ontological model is preparation noncontextual if and measurement noncontextual if The noncontextual constraint just described is consistent with classical mechanics [61, Supp.Material A], and with the emergence of classical objectivity [64].Moreover, it is grounded by philosophical desiderata [67], is experimentally robust [68,69], reduces to Kochen-Specker noncontextuality under specific conditions, see [70,Section 1.3.2]or [71], and generalises to the GPT framework [55,56].When there exists no noncontextual ontological model explaining the given OPT, we say that the theory is contextual.
When viewed as an operational theory, quantum theory is contextual for preparations, transformations and measurements [49,72,73,62].OPTs have possibly infinitely many procedures and infinitely many operational equivalences; each prepare-and-measure contextuality scenario, for which we write B, corresponds to finite instances of the underlying OPT being experimentally probed.A scenario has finite sets of preparations {P x } x∈X , X := {1, 2, . . ., X}, measurements {M y } y∈Y , and outcomes {k} k∈K , as well as finite sets of operational equivalences for the preparations OE P and for the measurement effects OE M .We will represent these scenarios with tuples B = (X, Y, K, OE P , OE M ).Such scenarios have had their noncontextual characterization fully described in terms of complete sets of inequalities [50], were applied to proofs of contextual advantage [53,36,61], investigated using resource theoretic approaches [74,75], and fully analysed in terms of the quantum set of correlations using semi-definite programming techniques [51,52] inspired by similar approaches to quantum non-local correlations [76].Since B is characterized by finite sets, the rule p applied to the prepare-andmeasure elements of B defines tuples R XY K ∋ p = (p(k|M y , P x )) k∈K,x∈X,y∈Y , usually called behaviours.The set of noncontextual behaviours N C, for a given scenario B, corresponds to the set of all points p that can be explained by some noncontextual ontological model.This set forms a convex polytope [50] 1 .The set of all quantum behaviours Q, for a given scenario B, corresponds to all points p that can be represented using quantum theory as an operational theory, i.e. there exist sets of states {ρ x } x∈X and effects {{E y k } k∈K } y∈Y satisfying the operational equivalences of B such that p(k|M y , P x ) = Tr(ρ x E y k ).For connecting such operational scenarios with coherence and contextuality inside the interferometers, we will show a parallel between those and the inequalities that were first proposed to rule out coherence-free models for quantum states.In the following, we introduce the inequalities that witness basis-independent coherence for a given set of quantum states.

Event graph formalism
In this section, we review the event graph 1 We review some basic aspects of the theory of convex polytopes in Sec.1.2.approach introduced in Ref. [35] for witnessing basis-independent coherence, contextuality, and nonlocality, which builds on results by Boole [77], n-cycle inequalities [78], two-state overlap inequalities [34], and well-established graph-approaches to contextuality [79,80].In this formalism we use graph theory, and the theory of convex polytopes, to obtain inequalities whose violation witnesses coherence based solely on the statistics of two-state overlaps.Let us first introduce the mathematical tools needed for the presentation of the event graph approach: graph theory and the theory of convex polytopes.
A graph G is an ordered pair (V, E) of two sets.Elements of V are called vertices or nodes of the graph, while E is a set of pairs e ≡ {v, w}, with v, w ∈ V , and which e ∈ E elements are called edges of the graph.A graph is said to be finite if |V | < ∞ and complete if E = {{v, w} | ∀v, w ∈ V }, i.e., E has every possible pair of elements from V .It is possible to depict graphs as we do in Fig. 1, where each element from V is depicted as a node (circle) while each element {v, w} of E is depicted as a line drawn between nodes v and w.A graph is said to be fully connected if there exists a way to move along any two vertices of V using the edges of the graph.Graphs described as above are sometimes called simple, as the edges are undirected (i.e., {v, w} = {w, v}), nodes have no loops (i.e., {v, v} / ∈ E), and two nodes can pertain to at most one edge (i.e.∀e 1 , e 2 ∈ E such that v, w ∈ e 1 ∩ e 2 with v ̸ = w, then e 1 = e 2 ).We say that and denote the set of all possible subgraphs of G as sub(G).Finally, we say that two graphs G 1 , G 2 are isomorphic, and write We will refer to fully connected simple graphs as event graphs.
The most important example of event graphs in our work will be the n-cycle graphs C n , where n represents the number of vertices of the graph, with V = {1, 2, . . ., n}.Edges in these graphs are defined by E := {i, i + 1} i∈V , where summation is defined module n.The simplest such case is depicted in Fig. 1, showing the 3-cycle graph.
To each event graph it is possible to associate a specific region of the real space R N , with N = |E|, known as a convex polytope.Given some finite set S ⊂ R N of tuples, for some N ∈ N, convex polytopes are defined as the convex hull ConvHull(S) of this set, which is the so-called V-representation of the polytope.
Such polytopes are the higherdimensional generalization of polygons.Equivalently, the same finite convex subset of R N can be described in terms of a finite collection of closed half-spaces H := {r ∈ R N : h(r) ≤ b, b ∈ R}, where h : R N → R is a linear functional.Each h(r) ≤ b defines the so-called facet inequalities for the convex polytope.This collection of halfspaces is referred to as the H-representation.In our work, all the inequalities that we will use to quantify coherence inside interferometers correspond to facet-defining inequalities of a certain convex polytope that we now proceed to define.
To any event graph G we assign weights r e ∈ [0, 1] to the edges of G.The full set of possible edge weights forms the convex polytope [0, 1] |E(G)| .The event graph framework bounds coherence and contextuality depending on the possible realizations of these weights, that arise under a specific encoding of quantum information into the event graph.We define a quantum realization for a given event graph G with weights r = (r e ) e whenever we can associate the vertices of the graph V to density matrices V ∋ v ↔ ρ v ∈ D(H) over some Hilbert space H, such that r e = Tr(ρ i ρ j ), ∀e = {i, j}.
At this point, quantum realizations simply constitute a mathematical construction, lacking an operational interpretation.They may not exist, as for instance for the edge-weights (1, 0, 1) in the 3-cycle graph C 3 of Fig. 1.In general, there can be an infinite number of different realizations for the same set of edge-weights.For example, the triple of weigths (1, 1, 1), again defined with respect to the graph C 3 , can be realized making all nodes equal to |ψ⟩⟨ψ|, for any |ψ⟩ ∈ H.We will consistently use the same terminology for quantum realizations in the coming sections 2.1, 2.2 and 2.3.
The way in which one can experimentally infer quantum realizations may differ.For consistency, in our work all the two-state overlaps will be operationally interpreted as arising from prepare-and-measure statistics, with p(0|M σ , P ρ ) = Tr(ρσ) obtained from preparing the state ρ, denoted by P ρ , and measuring M σ := {σ, 1 − σ} with outcome σ, denoted as [0|M σ ].It is still worth pointing out that the interpretation of coherence witnesses from Sec. 2.1 remains valid if overlaps are estimated using different techniques, e.g., Hong-Ou-Mandel test statistics in photonics [81].
We will quantify coherence from the basisindependent perspective [29,34], that considers coherence as a property of a set of states, defined as follows: Let {ρ i } i be a finite set of quantum states defined over the same finite Hilbert space H.We say that this set is coherence-free, or set-incoherent, if all states in the set are mutually commuting operators.Otherwise, we say that such an ensemble of states is set-coherent.Equivalently, a set of states is coherence-free if there exists some basis Ω with respect to which all states can be represented as diagonal density matrices.
Let us consider the quantum realization of a given event graph for which the set of states is coherence-free.In this case, one can still use the same prepare-and-measure protocol to estimate the two-state overlaps, but the existence of a reference observable allows also for a different measurement protocol for estimating the overlaps.If all the states are incoherent with respect to some basis Ω, then ρ i = ω∈Ω p(ω|i)|ω⟩⟨ω|, which implies Any such r ij could be interpreted as the probability that, when the two states are measured with the basis Ω, they return equal outcomes.This means that we can see incoherent sets of states implying two-state overlaps, such that The set of all possible overlap tuples r = (r e ) e∈E associated with a given event graph G = (V, E) that are realized by set-incoherent quantum states in the nodes of the graph form an associated convex polytope C G .We now describe the construction of this polytope, for each event graph G.
Let H denote the vertices of the polytope [0, 1] |E| , defined as all possible 0/1 edge-weight assignments to an event graph G.We call such assignments for the edge-weights r = (r e ) e deterministic.If there exists at least one edge e ′ ∈ E such that r e ∈ (0, 1) we say that the weight r is probabilistic.Let for some n ≥ 3. Denoting r| ℓ the restriction of the edge-weights r : E → [0, 1] onto some subset of edges ℓ ∈ L(G) and define the vertex set V G as where root(r) := {e ∈ E : r e = 0}.In words, V G has all deterministic edge-assignments satisfying that for any cycle ℓ of G there is no single 0 edgeassignment.For instance, V C 3 , with C 3 the graph shown in Fig. 1, is given by, In the event graph framework, the convex polytope C G is defined by Since V G ⊆ H for all event graphs G, the polytope C G , for any event graph G = (V, E), is a subpolytope of the hypercube [0, 1] |E| .This is simply because while the hypercube is the convex hull of all possible 2 |E| 0/1 edge-assignments for G, the polytope C G will be defined as the convex hull of only a subset of possible 0/1 edge-assignments.
The possible ones will be those that satisfy the hypothesis of quantum realization by some set of incoherent states, with respect to some Hilbert space dimension, described by Eq. (4).
While the description just given for the convex polytopes C G is formal, it does not provide an intuitive understanding of why any quantum realization with incoherent states should return overlap tuples r ∈ C G .For that, notice that any incoherent quantum realization for the overlaps of the form given by Eq. (4) satisfies the property of transitivity of equality, which is a logical consistency condition necessary for classical probability distributions.This condition provides intuition on why we consider loops ℓ ∈ L(G) to construct C G .
As we have shown, for an incoherent quantum realization two-state overlaps can also be interpreted as r ij = p(v(Ω) ρ i = v(Ω) ρ j ), which is the probability that upon measuring Ω independently on each incoherent state in the nodes i and j the outcomes were equal.In case we have an incoherent quantum realization satisfying r ij = 1, we must conclude that the two states are indistinguishable under Ω.Let ℓ ∈ L(G) for any event graph G, if |root(r| ℓ )| = 1 and r is deterministic, there exists a single edge {i, j} ∈ ℓ such that r ij = 0, while all others are equal to 1.Under the hypothesis that r is realized by incoherent states, |root(r| ℓ )| = 1 implies a logical contradiction, as we must conclude that all states are indistinguishable, while due to r ij = 0 the states ρ i and ρ j must be different.For instance, with reference to Fig. 1, an assignment (1 1 0) is impossible for incoherent states, as it leads to a logical contradiction, since it would imply that states ρ 1 , ρ 2 are indistinguishable, and the same for ρ 1 , ρ 3 .By transitivity, we must conclude that ρ 1 , ρ 3 are also indistinguishable, but this is in contradiction with the fact that r 23 = 0.
Any set of quantum states realizing edgeweights r outside C G is then set-coherent, i.e. the set of states is coherent with respect to any possible basis.This formalism for witnessing coherence was first proposed in Ref. [34], and it was experimentally verified in Ref. [81].By construction, the set of allowed points r = (r e ) e for any given event graph realized by incoherent states corresponds to the proper subset C G of [0, 1] |E| , characterized in terms of overlap inequalities (from which we select some specific ones to study and that we present later on in this section, namely, in Eqs.(7)-( 9), Eq. (10) or Eq. ( 11)).In this manner, violations of the aforementioned inequalities constitute witnesses of basis-independent coherence for any set of states realizing the corresponding edge-weights.To conclude, it is also worth mentioning that there is no dimension constraint as well; coherence for any set of high-dimensional states can be probed using these inequalities.Furthermore, Ref. [35] showed that the inequalities associated to cycle graphs from the event graphs are preparation noncontextuality inequal-ities for specific prepare-and-measure scenarios.Of particular importance for our purposes is the C 3 graph shown in Fig. 1.Its facets correspond to the 3-cycle inequalities + which are noncontextuality inequalities under considerations to be clarified in the results section.
We refer to the n-cycle inequalities as the facet-defining inequalities of the convex polytope C Cn obtained from the event graphs These two-state overlap inequalities were first introduced in Ref. [34], but their derivation relate to other well-known n-cycle inequalities in contextuality theory [78].
The results of Ref. [35] are even stronger: every inequality of C G for every choice G can be viewed as a Kochen-Specker noncontextuality inequality for some scenario.We choose to only focus on Spekkens contextuality because we want to study single qubit interference, for which the Kochen and Specker approach has a noncontextual explanation [42].
Concretely, we focus on the interpretations of C 3 as basis-independent coherence witness and generalized noncontextual bounds because, (i) it is the simplest non-trivial inequality that has a clear link to generalized contextuality, (ii) a single notion of contextuality aids consistency and readability, (iii) it allows to analyse single-qubit interference, for which the Kochen-Specker theorem does not apply, (iv) it allows to probe nonclassicality focusing on states/preparations, and (v) also allows quantum states to be mixed, due to experimental imperfections.This choice marks a conceptual separation between inequalities that we will use to probe contextuality and inequalities we will use to probe coherence.We will focus on C 3 inequalities interpreted as generalized noncontextuality bounds and general C G inequalities as basis-independent coherence witnesses.
There are several inequalities that might be used to probe coherence instead of cycle inequalities.Interesting inequalities should use a small number of states and overlaps, have high violations, and be achievable with qubits, as this allows for violations using the two arms of a MZI.For three states, the only inequalities are the triangle inequalities in Eqs (7), ( 8) and (9), with violations up to a maximum of 0.25.Since for four states the only non-trivial non-cycle inequality does not have qubit violations [35], for probing larger violations using few states one needs to consider five-state inequalities.For instance, if G = K 5 is the complete graph of five nodes, the following inequality, first derived in Ref. [35], satisfies all the desired criteria outlined above, as we shall show later in Sec.2.1, We can quantify the amount of basisindependent coherence by using the degree of violation of those inequalities [82].Inequality violations have long been used for quantifying nonclassicality, and can be made rigorous lower bounds for distance-based resource theoretic monotones, similar to what was done in Ref. [83] (a brief comment on this issue can be found in Appendix A).

Mach-Zehnder Interferometer
A Mach-Zehnder interferometer (MZI) is a particularly simple device capable of demonstrating the wave-like behavior of photons [84,85].This device is present in many discussions in quantum foundations [12,11,33].In its standard configuration, a MZI is made of two beam-splitters (BSs) and two mirrors, with optical paths of equal length.Quantum information is encoded on the photons' path, and single photon interference is captured by variations of a phase-shifter (PS) tuned inside one of the arms.
To build a connection with contextuality scenarios, we can interpret the MZI as a prepareand-measure device.The MZI apparatus is depicted in Fig. 2, for the case where the ?-box represents a PS U ϕ 1 .The two BSs are defined with a fixed π/2 phase-shift between the optical modes and tunable transmissivity, where k = 1, 2. In this configuration, the preparation stage plays the role of a universal onequbit state generator.Given the orthonormal basis {|0⟩ , |1⟩}, corresponding to the upper and the lower optical paths respectively, we can encode any pure state using a single photon that enters BS 1 , for instance in mode a: Similarly, the measurement stage is made of a PS U ϕ 2 and a BS with photo-detectors at both outputs, a configuration that allows projection onto any qubit state.For instance, if we choose values θ 2 , ϕ 2 such that U ϕ 1 U ϕ 2 = 1 and U θ 1 U θ 2 = 1, the measurement stage performs exactly the conjugated operation of the preparation stage, and thus a measurement that exactly corresponds to a projector onto state |ψ(θ 1 , ϕ 1 )⟩.In the ideal case, detector D 1 will click with probability 1 = |⟨ψ(θ 1 , ϕ 1 ) |ψ(θ 1 , ϕ 1 )⟩ | 2 , while detector D 2 will click with probability 0. In such a case, the measurement stage performs a dichotomic measurement It is worth noting that this same measurement M can also perfectly distinguish between the case with an input photon in mode a, and the one in mode b.If we input the photon in mode b, detector D 1 will never click, as it is the orthogonal state ψ(θ 1 , ϕ 1 ) ⊥ the one prepared inside the interferometer.
It is interesting to look at the case where the two BSs are characterized by different parameters θ and ϕ.By interpreting the measurement stage as a time-reversed one-qubit state generator for a pure state |ψ(θ 2 , ϕ 2 )⟩, the overall action of the interferometer is to project the state prepared in the first stage onto the state prepared in the second This perspective allows to interpret the MZI as a natural device for estimating quantum two-state overlaps from the frequency of clicks in the detectors D 1 , D 2 , given various choices of PSs and BSs.As we have seen in Sec.1.2, we can infer set-coherence for the collection of states prepared by the MZI using precisely the overlap statistics described by Eq. ( 14).We will use this precise understanding in the upcoming Secs.2.1 and 2.2 to witness coherence and contextuality.One of the several important applications for such a simple linear optics device consists of performing the standard quantum interrogation task [11,37].For this task, in the ?-box from Fig. 2 is placed an object, typically chosen to be a bomb for historical reasons [11], that "explodes" if and only if it interacts with a single photon.We choose U θ 1 = U † θ 2 , θ 1 = θ 2 = θ and ϕ 2 = 0, so that the single photon superposition is controlled only by the BSs and one of the detectors is always dark when the bomb is not present.In this scenario, we input the photon in mode a (Fig. 2).The experiment thus consists of testing between two possibilities: Hypothesis 1) There is a bomb in the left arm of the MZI, but it is not active, hence it never interacts with the photon, detector D 1 will always click, and detector D 2 will never click (usually referred to as the dark detector), or Hypothesis 2) There is an active bomb in the left arm of the MZI, and therefore the photon will hit the bomb with probability cos 2 (θ), detonating it, while it will choose the different path with probability sin 2 (θ).The latter case, corresponding to a state |1⟩ after the first BS, gives a chance to detect the object/bomb without exploding it, exploiting the bomb as a complete path-information measurement device.In fact, after |1⟩ passes the second BS, detector D 1 will click with probability sin 2 (θ), and detector D 2 will click with probability cos 2 (θ).However, D 2 clicks only in the case of an unexploded active bomb, thus, detecting the presence of the object.With this protocol in mind we define the following information task: Quantum interrogation: Using as many photons as needed, detect the presence of an active bomb without exploding it, with the highest possible probability.
If the BSs are symmetric, detector D 2 clicks with probability 1/4.Therefore we may need to run the experiment many times to see any D 2 event, having the drawback that, by doing so, eventually the bomb will explode.The figure of merit for the efficiency of this task η is defined operationally as [11,38], where p succ corresponds to the probability that the dark detector D 2 clicks and we successfully detect the bomb without it exploding, while with probability p bomb the bomb explodes.In case of symmetric BSs, as pointed out in Ref. [11], we have η = 1/4 1/4+1/2 = 1 3 .The same efficiency can be achieved by the noncontextual model of Ref. [33].

Results
The event graph formalism for witnessing basis-independent coherence helps quantify nonclassical superpositions from two different perspectives.We call these two perspectives the parallel setting and the sequential setting, as schematically depicted in Fig. 3.

Parallel setting
In a parallel setting, shown in Fig. 3-(a), we investigate coherence as a relational property of the several different states that can be generated inside the MZI, for various choices of BSs and PSs.The coherence of the states |ψ(θ i , ϕ i )⟩ inside the interferometer can be witnessed and quantified by measuring only a finite number of two-state overlaps.This procedure is capable of evidencing basis-independent coherence, a stronger form than standard notions of basis-dependent coherence, using only a small sample of chosen quantum states inside the MZI.
Experimentally, probing coherence using violation of the inequalities reviewed in Section 1.2 with a parallel setting amounts to performing various prepare-and-measure experiments, each estimating a given overlap r e .In such a way, we can witness coherence solely with the overlap statistics, without assuming a fixed sequence of transformations as in the sequential setting, to be discussed in the next section.Moreover, depending on the inequality considered, one can significantly simplify the procedure for witnessing coherence, by using some finite number of phase-shifter settings, unlike methods based on the visibility of an interference fringe, requiring a continuous set of measurements.Finally, this protocol can be extended in a rather straightforward manner to probe coherence in multimode interferometric devices, hence beyond the two-mode MZI interfer-ence set-up we focus on here.
Figure 4-(a) shows how witnessing coherence can be done with asymmetric BSs, using the C 3 inequalities of Eqs.(7)- (9).One can also probe coherence using inequality (11), by setting a single symmetric BS, and choosing a set of 5 phases ϕ for preparations, and again 5 for measurement states, or equivalently 10 effective phasedifferences, each for the estimation of a single overlap r ij from Eq. (11), that allow for qubit violations up to 5 √ 5 4 ∼ 0.79 [35].Figure 4-(c) reports five different choices of phases {ϕ i } 5 i=1 to witness set coherence for the states {|ψ(π/4, ϕ i )⟩} 5  i=1 in the form of Eq. (13), showing that in this case we can find high violations with only five well-chosen PS settings.

Comparison with other methods for quantifying coherence
The parallel setting scheme performs better over the use of visibility as a measure of nonclassicality for the states inside the interferometer.Estimating the visibility requires a maximization process over all possible values of ϕ, whereas our scheme only needs to probe finitely many chosen values of ϕ.Moreover, the visibility has no direct link with stronger forms of nonclassicality as our witnesses do have2 , and it is not clear if it could potentially be used to witness coherence in a basis-independent form.Not only that, the visibility has been criticized as a measure of nonclassical behaviour inside the interferometer [15].Recent literature points towards the realization that resource theoretic coherence monotones quantify more consistently the non-classicality of quantum states inside interferometers.
We may hence compare our approach with known results in the basis-dependent coherence framework [13,20], beyond the connection with contextuality.Coherence monotones [14,20] have been proposed as a way to quantify coherence.Monotones have been widely studied in the abstract formalism, and are elements in complementarity relations [14,20].Experimentally probing the majority of interesting coherence monotones -as they were originally proposed -requires full quantum state tomography.Although tomography is a fairly standard experimental construction that is constantly being improved [86], the number of measurements and samples necessary for this task grows exponentially with the number of qubits in the best possible case, with or without the help of full quantum processing power [87].
A way to avoid state tomography for quantifying coherence is via experimentally probing coherence witnesses [88,20,89,90], which greatly improve experimental investigations of coherence monotones.Nevertheless, there is the draw-back that, even if finding the specific witness that provides the value of the monotone could be simple by using semi-definite programming, the actual implementation of this observable may be difficult as the dimension of the system increases [91].
Notably, as it is clear from Sec. 1.2, this framework is capable of witnessing coherence independently of the way one encodes quantum information in the degrees of freedom of light, i.e., independently of Hilbert space dimension.Using the degree of violation of the quantum states as a generic measure of coherence of the set of states, as in Ref. [82], the lack of need for state tomography, or for maximization procedures, indicates that scalability of our approach is itself a promising tool for investigating multimode quantum interference.The parallel setting just described can be used to certify coherence in complex interferometric settings beyond the MZI, of the kind that have been shown to be useful for quantum computation with linear optics [92].

Sequential setting
In the sequential setting, see Fig. 3-(b), we study the ability of a single choice of MZI parameters, i.e. fixed values of θ 1 and ϕ 1 , of generating statistics that cannot be properly explained by a noncontextual model.For such, we consider three states |ψ(0, 0)⟩, |ψ(θ 1 , 0)⟩, |ψ(θ 1 , ϕ 1 )⟩.Operationally, they correspond to the preparation of the input state |0⟩, followed by the unitary describing the beam-splitter, U θ 1 , and then by the one describing the phase-shifter, U ϕ 1 .We show in Fig. 6-(b) that there are choices of (θ 1 , ϕ 1 ) implying violations of the C 3 inequalities in such a sequential description, which as discussed in Ref. [35] represent witnesses of contextuality.
The main relevance of the sequential setting we discuss in this section might be its connec- tion with contextuality, to be formally described in Sec.2.2.1, and which will be instrumental in Sec.2.3.1 to prove a contextual advantage for the task of quantum interrogation.Before delving into the connection between event graph inequalities and contextuality inequalities we must first clarify some subtleties.
We have seen in Section 1.1 that one can discuss noncontextuality defined for prepare-andmeasure scenarios.As discussed there, the set of noncontextual behaviors N C is completely characterized by inequalities defined for behaviours.Similarly, we have introduced in Section 1.2 an inequality framework bounding a different set, denoted C G , constituting two-state overlap inequalities.A priori, there is no clear connection between the two frameworks.For example, it is clear that behaviours p are more general than two-state overlaps, because they allow for generic statistics of the form p(k|M, P ) = Tr(ρE k ) while for overlaps we require that E k = σ (some quantum state).
In the rest of this section we show that each 3cycle overlap inequality discussed in Section 1.2 can be interpreted as a noncontextuality inequality from a prepare-and-measure scenario from the framework introduced in Section 1.1.For each 3-cycle overlap inequality, we will explicitly construct a prepare-and-measure scenario, with the structure reviewed in Sec.1.1, such that the chosen overlap inequality is now a valid noncontextuality inequality, for the constructed scenario.A similar approach was taken in Ref. [35], but assuming ideal preparations and measurements.We generalize this connection, and present the novel robust noncontextuality inequalities described in Eq. (17).Importantly, we then show that MZIs satisfy the exact operational constraints of the scenario constructed, implying that it is possible to test the noncontextuality inequalities found using such a simple experimental setting.Later, we use this inequality to quantify contextual advantage for quantum interrogation in Sec.2.3.1.
Differently from the case of basis-independent coherence, the connection with contextuality must be made rigorous by connecting these states and the experimental set-up of an MZI with some prepare-and-measure contextuality scenario3 , as we show now.

Generalized contextuality in the sequential setting
It is simple to translate the statistics arising from event graphs as a subset of the statistics arising from prepare-and-measure operational scenarios, in a way that event graph cycle inequalities become noncontextuality inequalities for such scenarios.This operational translation arises from structural results that noncontextual quantum two-state overlaps must obey from Refs.[36,53], together with self-duality property of quantum theory [93,94], for which any state can also be viewed as a measurement effect, and from the fact that the operational statistics of those scenarios can be related to the edge-assignments r of event graphs G.
Let us now describe the relation between the C 3 event graph, and a prepare-and-measure scenario for the specific case of the MZI experiment we are interested in, as depicted in Fig 5 .We discuss the generality of this approach in Appendix B.
Inside the MZI, two transformations T θ 1 and T ϕ 1 applied in sequence follow the preparation P 0 of a given state.The preparation P 0 corresponds to an element of the class of equivalent procedures represented by a state |0⟩⟨0| in a prepareand-measure setting, see Fig. 3-(b).Each fixed pair of transformations T θ 1 and T ϕ 1 operationally defines new preparation procedures T θ 1 (P 0 ) and T ϕ 1 (P 0 ).We let P 1 = T θ 1 (P 0 ) and P 2 = T ϕ 1 (P 1 ), corresponding to only one of the possible preparations that can be performed in the chosen scenario.Operationally we also assume that there exist preparations P 0 ⊥ , P 1 ⊥ , P 2 ⊥ such that 1 2 P 0 + , and we let the set OE M ZI P have this operational equivalence.As will be clear later when we discuss the quantum implementation with the MZI, for any i, P i ⊥ corresponds to preparing the state orthogonal to the one associated with preparation P i .It is well known that behaviours p in scenarios satisfying similar operational equivalences are related to behaviours in Bell scenarios [51].However, we make no assumptions related to probe non-locality for the inequalities we consider in order to claim they are Bell inequalities, since we are interested in probing generalized contextuality instead of nonclassicality of common causes, i.e., Bell nonlocality.
The final ingredient of the prepare-andmeasure scenario must be the measurement effects.We can set binary-outcome measurements M 1 , M 2 , M 3 with the constraints p(0|M i , P i ) ≥ 1 − ε i , and p(0|M i , P i ⊥ ) ≤ ε i ∀i ∈ {1, 2, 3}.In the ideal case we have ε i = 0, and the inequalities become equalities.Under such assumptions, each p(0|M j , P i ) ≡ p(M j |P i ) describes an operational confusability [53], because it allows for the interpretation as the probability that process P j passes the test of being process P i , under the discrimination measurement M i .We can then write the scenario B = (6, 3, 2, OE M ZI P , ∅).We will refer to these operational scenarios as the Lostaglio-Senno-Schmid-Spekkens scenarios (LSSS) [36,53], as well as to the general constructions made in Appendix B. Figure 5 depicts the connection between C 3 and B. Edges correspond to operational probabilities p(0|M i , P j ).Green edges have the constraints p(0|M i , P i ) = 1, and edges with p(0|M i , P i ⊥ ) = 0 are not represented.We thereafter note that we can interpret the confusabilities r ij = p(0|M i , P j ) from the imposed constraints.Structurally, any ontological model for the behaviours of scenario B with the constrains described satisfies the following inequality [36] where summation in the labels is mod 3, the epistemic states {µ i } 3 i=1 are the ontological model representation for the preparations {P i } 3 i=1 , and the norm corresponds to the l 1 -norm defined over the space Λ, given by ∥µ i − µ j ∥ := Λ |µ i (λ) − µ j (λ)|dλ.
In Figure 5 we present a schematic translation between the event graph C 3 and the prepareand-measure scenario we investigate.Note that, as is done throughout our work, we label the nodes of event graphs as 1, 2, . . ., n.In the figure, we initially show C 3 as before in Fig. 1.
Each node i in the event graph is then mapped to a preparation node P i−1 , a measurement effect node 0|M i−1 , and another preparation node P i ⊥ .All these operational constituents, together with the operational equivalence shown, form the scenario (6, 3, 2, OE M ZI P , ∅) mentioned before.For the interferometric description that follows, it is interesting to make this slight change in labels i → i − 1 from event graph to the prepare-andmeasure primitives.In this way, for Fig. 5, we have This is done so that we can naturally relate P 0 with preparation of |0⟩⟨0|.Preparation and measurement procedures alternate in an inner graph.We also include new procedures P 0 ⊥ , P 1 ⊥ , P 2 ⊥ corresponding to the included operational elements satisfying the operational equivalence in the figure, characteristic of the scenario4 .From this notation, we naturally associate P 0 ⊥ with the preparation of |1⟩⟨1|.
As a result from the LSSS structural results of Eq. ( 16), we find that the 3-cycle inequalities, facet-defining for the convex polytope C C 3 associated with event graph C 3 (c.f.Section 1.2), are actually related to the robust noncontextuality inequality for the LSSS scenario just described and depicted in Fig. 5, which can be shown by a simple application of the triangle inequality.A similar result holds for any n-cycle overlap inequality, which allows us to prescribe a new family of robust noncontextuality inequalities.We also remark that a similar construction using the C 3 noncontextuality inequality structure has appeared in Ref. [95].
Although the noncontextual confusabilities and the coherence-free two-state overlaps differ in interpretation, their description collapses in the deterministic assignments defining the classical C C 3 polytope, implying that the two seemingly different interpretations can be linked by the same inequalities.We map event graph inequalities into noncontextuality inequalities by mapping edge-assignments r ij into confusabilities satisfying r ij = r ji .
It remains to show that the statistics arising from the quantum theory of the MZI respect the operational equivalences and symmetries of the LSSS scenario B. When we treat quantum theory as an operational theory, the confusabilities p(M i |P j ) match the two-state overlaps related to processes P i in the equivalence class defined by |ϕ i ⟩.In this sense, we have that in the ideal case where we consider pure quantum states as vertices of the C 3 graph.This connection also clarifies that the violation of generalized inequalities needs basis-independent coherence of the chosen states, that per se may be seen as an application of basis-independent coherence in the context of strong witnesses of contextuality.In the case of the MZI in Fig. 2, the preparation procedures P 0 and P 1 correspond to preparing a photon in modes a or b, states |0⟩⟨0| and |1⟩⟨1|, respectively.The transformations are described by unitaries U BS 1 (θ 1 ) and U ϕ 1 , which imply that Hence, the preparation of the states |ψ(0, 0)⟩, |ψ(θ 1 , 0)⟩, |ψ(θ 1 , ϕ 1 )⟩ and of their complements satisfies the operational equivalences we have described before.Moreover, the MZI's measurement stage can universally implement the binary outcome measurements M 1 = {|ψ(0, 0)⟩⟨ψ(0, 0)|, 1 − |ψ(0, 0)⟩⟨ψ(0, 0)|}, as well as for the remaining states.Defining the quantum effects [0|M ] to be the same as the quantum states being prepared, we have ideally the signatures p(M 1 |P 1 ) = 1 and p(M 1 |P 1 ⊥ ) = 0.With the tools provided so far, let us now describe when one can witness generalized contextuality in a single MZI, using the simplest 3-cycle inequality.Considering the states |ψ 1 ⟩ = |ψ(0, 0)⟩, |ψ 2 ⟩ = |ψ(θ 1 , 0)⟩ and |ψ 3 ⟩ = |ψ(θ 1 , ϕ 1 )⟩, we can calculate Eq. ( 7) ) which will characterize the violations with respect to this encoding.Note that this is the only functional h, of all 3 non-trivial5 ones presented in Eqs.(7)-( 9) from the convex polytope defined with respect to the C 3 graph, that can have a quantum violation, due to the sequential setting encoding of states we choose.Figure 7-(b) shows all the possible choices of BSs and PSs to violate the contextuality inequalities of the C 3 event graph given the constraint imposed by the choice of triple of states just described.When the first BS is symmetric, corresponding to θ = π/4, we find no violation of the noncontextuality inequal- ≤ 1, see also Fig. 6.This is consistent with Ref. [33], that explicitly provides a noncontextual model for the cases with θ = π/4 The lower curve shows the case where the first BS in the interferometer is symmetric, i.e. θ = π/4, and it is clear that it is never possible to witness contextuality with the inequality (7).On the opposite, the case with θ = π/3 allows the best violation for variations in the phase parameter ϕ.In the picture, due to a choice of encoding in the description of the first BS, the phase for this latter case is taken to be θ = 5π/6 = π/2 + π/3.and ϕ ∈ {0, π}, from modifications of the famous Spekkens Toy Model of Ref. [31].As shown in Fig. 6, if we relax the constraint of having the first BS to be symmetric, for θ = π/3 we find maximal violation for quantum states over a great circle in the Bloch sphere, consistently with the results in Refs.[34,81].As a remark, we notice that not all choices made for BSs and PSs violate the C 3 inequalities we have chosen, but the related states could still be used to violate some other noncontextuality inequality different than the one we are focused on.
From the results presented so far it is clear that, in order to access violations of the simple C 3 inequalities of a fixed MZI setting, we need the input photons to pass through an asymmetric BS.The maximal value h Q max of a violation is given by 1/4, and can be experimentally investigated in a robust way.This maximal violation was analytically obtained in Ref. [34].These results allow to interpret the pairs (θ, ϕ) not only as coherence generators [25], but also as preparation contextuality generators, again quantified by the degree of violation.From the robust inequality in Eq. (17), we find a threshold for the allowed noise parameters {ε i } 3 i=1 : if their sum surpasses 1/4, no quantum violation can be found.
Up to now, we studied the case for which the input of the MZI in Fig. 2 consisted of the state |0⟩ ⟨0| (or equivalently |1⟩ ⟨1|).We can relax this constraint by using generic input states, and un- derstand what the benefits may be of doing so.One possibility is to simply prepare general states using additional BS and PS before entering the MZI [15], to prepare general two-mode superpositions that are then fed into the input ports of the MZI.Strikingly, it is in fact possible to find specific input states |ψ⟩ that violate the C 3 inequalities for virtually all states inside the MZI.More precisely, it is possible to find input states |ψ⟩ so that, as we can see numerically, for any choice of BS U θ 1 and any choice of PS U ϕ 1 we have that, violates the 3-cycle inequality considered.In Appendix C, we calculate the functional h(θ 1 , ϕ 1 ) resulting from the above triplet for a general input state |ψ⟩ = U ϕ 0 U θ 0 |0⟩, considering some other pair MZI (θ 0 , ϕ 0 ) responsible for preparing this state.Figure 7 (c)-(f) shows plots corresponding to the violations of inequality (7) obtainable by different input states in the MZI.In Fig. 7 (c) we present the situation in which for all values in the range 0 ≤ θ 1 ≤ π and 0.042 ≤ ϕ 1 ≤ π − 0.084, all choices of U θ 1 and U ϕ 1 incur in a violation of the inequality.It is clear that there is an interesting trade-off between broad and high violations for states found.
It is important to point that the investigation of contextuality in interferometers has been experimentally addressed before with the Kochen-Specker approach to contextuality [96,97].See Ref. [41] for a recent comprehensive review with interferometric investigations of quantum contextuality; none of those reported in the review have used single photons in a simple MZI.The difficulty in probing this notion of contextuality on a single MZI stems from the fact that it is not applicable to two-dimensional systems, as already mentioned.

Advantages for information tasks over coherence-free and noncontextual models
The simplicity of the argument for finding contextual violations using C 3 cycle graphs is built over strong structural results.However, the generality of the application, and the usefulness of such results may have a broader impact for generic proofs of contextual advantage provided by quantum theory, as it was already anticipated by Ref. [36].The common nontrivial aspects of proving contextual advantage of a given information task relies on finding the correct operational prepare-and-measure scenario for it, followed by later finding (possibly robust) noncontextuality inequalities, and relating those with a figure of merit that quantifies the success of the particular task [36,53,95,98,99].This generic strategy is greatly simplified by the advent of a clear connection among contextuality scenarios, event graphs, and any figure of merit of quantum information tasks that can be described in terms of two-state overlaps.This precise connection allows to simplify this kind of result using the following approach: 1. Given a particular quantum information task of interest, describe the figure of merit for this task in terms of two-state overlaps.
2. Use the event graph inequalities to obtain bounds for the the specific figure of merit at study.
3. Compare the optimal results obtainable using quantum theory with the inequality bounds.If there are quantum violations, there will be an advantage for the task, provided by either coherence or contextuality.
This strategy for contextual advantage was first envisioned in Ref. [36], yet we extend it to the case of advantages provided by basis-independent coherence.As an example of this algorithmic approach, we apply this methodology for the MZI prepare-and-measure scenario to the task of quantum interrogation.We will see that, although interrogation can be reproduced by a noncontextual model for some cases, as was shown in Ref. [33], there exists a quantifiable gap between efficiency achievable with such models and with quantum theory.

Contextual advantage for quantum interrogation
Consider the MZI from Fig. 2, the ?-box being the photosensitive bomb associated with the quantum interrogation protocol [11].In this scenario, we set U θ 1 = U † θ 2 , with U θ 1 given by the general Table 1: Operational symmetries over the statistics of quantum interrogation.Notation for the prepareand-measure statistics arising from the quantum interrogation scenario.
description of a BS in Eq. (12), in order to have a dark detector.
Let us now address operationally the content of the MZI statistics arising from quantum interrogation.The efficiency of the task arises from a specific interplay between the creation of superposition in the preparation stage, and the ability to make a coherent detection in the measurement stage [24].By using the formal operational terminology, we write P 1 to describe the preparation of a photon in mode a which, in quantum theory, corresponds to the preparation of the state |0⟩.Similarly, with P 2 , P 3 we refer to the preparations of a photon again in mode a, followed by the two beam-splitters BS 1 and BS 2 as in Fig. 2, that in quantum theory are modelled as U θ 1 |0⟩ and U θ 2 |0⟩.Each preparation has associated a measurement procedure in the prepare-and-measure scenario we construct, exactly as we have described before when looking at the LSSS constraints and contextuality in the sequential setting.To ease notation with respect to the operational content of the scenario, we write r ij = p(0|M i , P j ), see table 1.From the assumption U θ 1 = U † θ 2 , we can simply write θ 1 = θ and θ 2 = θ † .
The efficiency of the task thus addressed can be expressed solely by the operational quantities just described.The quantity p succ = r θ0 r θ † 1 corresponds to the probability that the photon enters the MZI, does not chose the path with the bomb, and then, after the second BS, it makes the dark detector light up, ending up with a successful detection of the bomb without exploding it.On the contrary, p bomb = r θ1 corresponds to the probability that, after the first BS, the photon takes the path with the bomb, which consequently explodes, failing to accomplish the task.Hence, It is interesting to note that there are operationally relevant symmetries that are respected by quantum theory, and that can be imposed in the prepare-and-measure scenario.In particular, quantum theory satisfies 2 .Therefore, we assume the following symmetries over the scenario, Under symmetries (22) and ( 23) we can re-write the efficiency η as a function of r θ0 only, In blue, the upper curve presents the efficiency for an ideal action of asymmetric BSs in the MZI, achievable with standard quantum theory.In pink, the lower curve shows the optimal efficiency achievable by any noncontextual ontological model that explains the statistics of the associated prepare-and-measure scenario, while respecting two operational constraints also satisfied by quantum theory: and with the symmetry (24) and the C 3 inequality, it is possible to find a clear gap bounding the efficiency achievable by any noncontextual model that attempts at explaining the quantum theory predictions,
Figure 8 shows a plot of the efficiency η, achievable by quantum theory as described by Eq. (25), versus the optimal noncontextual efficiency η N C opt = 1+(2r θ0 −1) 2 2(r θ0 +1) , as functions of the operational quantity r θ0 .From this plot, it is clear that the efficiencies meet at 1/3, corresponding to the efficiency of the original proposal [11], as well as that of the noncontextual model of Ref. [33].Our results parallel those of Ref. [33], which presents a noncontextual model for the cases when r θ0 = 1/2 and r θ0 = 1.
We observe that asymmetric BSs provide contextual advantage for the task described with quantum theory, performing significantly better for some choices of r θ0 .The maximum gap is given by max r θ0 (η − η N C opt ) ≈ 0.071 at r θ0 = √ 3 − 1 ≈ 0.73.It is also unclear if quantum theory, or some other toy noncontextual models, could respect the constraints imposed and follow the optimal noncontextual path depicted in Fig. 8.Although the scenario just described achieves maximal efficiency for contextual advantage with η max = 1/2, it is possible to develop robust schemes of quantum interrogation that are more efficient devices different from the MZI [38,39,40].Those different scenarios allow, theoretically, for efficiencies as high as η = 1.

Discussion and future work
In this work we have provided experimentally robust tools to witness and quantify basisindependent coherence and contextuality inside Mach-Zehnder interferometers, from the toolbox of event graph scenarios and prepare-andmeasure contextuality scenarios.We have also devised a general methodology for rigorously investigating quantum advantages related to interference, and showed a contextual advantage for the task of quantum interrogation as a case-study.
As a future step, it would be interesting to find complementarity relations between basis-independent coherence witnesses and pathinformation.To do so, one must develop a resource-theory for the event graph witnesses; a research path with independent merits.It is also relevant to study how the witnesses compare with standard quantification approaches in the cases for which the states ρ have large dimensions.
Finally, a relevant open problem is whether any event graph inequality can be interpreted as a preparation noncontextuality inequality with respect to the construction of the scenarios we have considered here.

A Violations represent lower bounds on distance quantifiers
We may define the degree of basis-independent coherence witnessed by a given quantity r in terms of the minimal distance with respect to the set C G , D(r) := min for D(r, r * ) some abstract notion of distance.Even though there is no formal resource theory yet built from the structure described in Ref. [35], the quantity D(r) would be a natural candidate for any future one; Ref. [5, section VI, B] discusses at length this standard construction within quantum resource theories and Ref. [74] gives some examples of the same construction for the resource theory of pre/post-processing for generalized contextuality.Any violation of the event graph inequalities may serve as a lower bound for D(r) up to the factor 1/∥h∥ ∞ .This allows us to use inequality violations to quantify the coherence related to the set of states chosen.
B General connection between event graphs and prepare-and-measure scenarios In this appendix we show a mapping between event graphs and prepare-and-measure contextuality scenarios.Recall that any state ρ can also be understood as a POVM element of a binary outcome measurement procedure M = {ρ, 1 − ρ}.This implies that any event graph defines the preparation procedures to be considered as well as such possible measurements to be performed.Assuming that those states are close to being pure, it is possible to claim the existence of operations satisfying the operational constraints described below, in general, different than what was considered in the main text.The relationship can be described operationally as follows, for any given event graph G with G = (V, E): 1.For each vertex v ∈ V of G we associate processes v and measurement events 0|M v of binary outcome measurements M v .
2. For each edge e ∈ E of G we associate two other preparation processes e = {v, w}, P e v ⊥ , P e w ⊥ .
3. To each 4-tuple of processes (P v , P e v ⊥ , P w , P e w ⊥ ) for each edge e ∈ E we associate the operational equivalence 1  2 P v + 1 2 P e v ⊥ ≃ 1 2 P w + 1 2 P e w ⊥ .
4. Each measurement procedure M v satisfy the operational equivalences that p(0|M v , P v ) ≥ 1 − ε v and p(0|M v , P e v ⊥ ) ≤ ε v for every e ∈ E for some real parameter ε v ≥ 0.
In terms of the notation introduced in the main text we can write the above construction to define what we refer generically as Lostaglio-Senno-Schmid-Spekkens (LSSS) scenarios B LSSS = (N v + N v N e , N v , 2, OE P , ∅) where OE P correspond to the operational equivalences just described.Assuming more operational equivalences in OE P between the elements P e v ⊥ is also possible, as was done in the main text, which may simplify the scenario.We also assume that the scenarios B LSSS satisfy the constraints of p(0|M v , P v ) ≥ 1 − ε v and p(0|M v , P e v ⊥ ) ≤ ε v since this relation is somewhat needed for the structure of noncontextual models explaining the so-called operational confusabilities r e ≡ p(0|M v , P w ) for every edge e = {v, w}.We have then the following result.We are using notation present in Refs.[51,75] for the scenarios.
Theorem 1 (Adapted from Ref. [36]).Let B LSSS be the operational scenario described before.Then, a generalized noncontextual ontological model explaining the statistics of p(0|M v , P w ) ≡ p(M v |P w ) must satisfy the following inequality, in the limit of ideal measurements ε i → 0 we have, This kind of structural result for the confusabilities was first introduced in Ref. [53] using infinitely many operational equivalences.The above theorem directly implies, as a corollary, that the n-cycle event graph inequalities of C n provide us with robust generalized noncontextuality inequalities,  [35], while now allowing ε v ̸ = 0 and therefore using the robust bounds provided by theorem 1.Every confusability r ii+1 satisfy, Using this and applying the triangle inequality to ∥µ 1 − µ n + (µ 2 − µ 2 + • • • + µ − µ n−1 )∥ 1 we have the result.
When we treat quantum theory as an operational theory, the confusabilities p(M i |P j ) match the two-state overlaps related to processes P i in the equivalence class defined by |ϕ i ⟩.
The mapping from event graphs into prepare-and-measure scenarios is general.However, only the cycle-inequalities have been connected to noncontextuality inequalities.If any event graph inequality can also be understood as a noncontextuality inequality for such scenarios, under the symmetries respected by confusabilities r ij = r ji is an open problem.

C MZI with a generic state in input
We can use the so-called double Mach-Zehnder interferometer [15] to input general states in a standard MZI, see Fig. 9 for the construction.This is a simple way of constructing a MZI with general input states.When we refer to the MZI, we mean the two BSs and PSs BS 1 , BS 2 and ϕ 1 , ϕ 2 depicted in Fig. 9 while we simply consider the first stage as a universal single-qubit state preparation tool, described by BS )) sin(4θ 0 ) sin(2θ 1 ) + 2 sin 2 (2θ 0 ) sin 2 (2θ 1 )).

Figure 1 :
Figure 1: Simplest non-trivial event graph.The C 3 cycle graph is an event graph with possible edge weights r 12 , r 13 , r 23 ∈ [0, 1].Classical weights are convex combinations of deterministic assignments satisfying transitivity of equality.

Figure 2 :
Figure 2: Mach-Zehnder Interferometer as a Prepare-and-measure experiment.In the preparation stage the interferometer is fed with a single photon.The first beam-splitter, BS 1 generates superposition between the spatial modes.Qubit path encoding is chosen as |0⟩ and |1⟩ for modes a and b, respectively.The ?-box allows for either the presence of a phase-shifter ϕ 1 , placed after BS 1 , or a bomb that explodes in case it absorbs a photon, present in the standard quantum interrogation scheme.The measurement stage is made of a phase-shifter ϕ 2 , and a second beam-splitter BS 2 , with photo-detectors placed after each output mode.

Figure 3 :
Figure 3: Parallel versus sequential settings.We follow the prepare-and-measure scheme for representing the Mach-Zehnder interferometer as in Fig. 2. (a) We choose a finite number of MZI configurations to probe coherence of quantum states inside the interferometer.Measurements correspond to dual representations of the chosen quantum states.(b) We interpret a single MZI configuration as capable of preparing different states due to BS and PS transformations.The measurement stage performs tomographically complete measurements.

Figure 4 :
Figure 4: Witnesses of basis-independent coherence and preparation contextuality in a standard Mach-Zehnder Interferometer (MZI).Plot of phases ϕ i and beam splitter's transition/reflection rates θ i for which there are violations.A parallel setting is shown in (a), where several runs of a given MZI allow to estimate the overlaps of the chosen states.The states inside the MZI are taken to be in their general form as |ψ(θ i , ϕ i )⟩ = e iϕi cos(θ i )|0⟩ + i sin(θ i )|1⟩.In plot (b), three different MZI configurations are considered, with both symmetric and asymmetric BSs, and a fixed PS in the third state; the chosen states are {|ψ(θ 1 = π/4, ϕ 1 )⟩, |ψ(θ 2 = π/3, ϕ 2 )⟩, |ψ(θ 3 = 4π/4, ϕ 3 = 6π/3)⟩}, and the plot shows many possible violations of the C 3 inequality.In plot (c), the BSs are all taken to be symmetric, i.e., θ i = π/4 for all states i = 1, . . ., 5; in the plot, three out of five phase choices are fixed to be ϕ 1 = 0, ϕ 4 = 4π/5, ϕ = π/3, letting the two remaining phases ϕ 2 , ϕ 3 to vary in [0; 2π], in order to look for high violations.Pure state violations in (b) can be mapped to contextual behaviors in prepare-and-measure scenarios, and general states violating (b) or (c) are basis-independent coherence witnesses.

Figure 5 :
Figure 5: Contruction of the prepare-and-measure scenario from the C 3 graph.The event graph with edges r 12 , r 13 , r 23 is mapped towards a prepare-andmeasure scenario where each vertex is associated to two new preparation procedures and one measurement effect.Edge-assignments in the latter are mapped to symmetric confusabilities in the former.

Figure 6 :
Figure 6: Violations for fixed beam-splitter (BS) ratios.The lower curve shows the case where the first BS in the interferometer is symmetric, i.e. θ = π/4, and it is clear that it is never possible to witness contextuality with the inequality(7).On the opposite, the case with θ = π/3 allows the best violation for variations in the phase parameter ϕ.In the picture, due to a choice of encoding in the description of the first BS, the phase for this latter case is taken to be θ = 5π/6 = π/2 + π/3.

Figure 8 :
Figure 8: Contextual advantage for quantum interrogation.In blue, the upper curve presents the efficiency for an ideal action of asymmetric BSs in the MZI, achievable with standard quantum theory.In pink, the lower curve shows the optimal efficiency achievable by any noncontextual ontological model that explains the statistics of the associated prepare-and-measure scenario, while respecting two operational constraints also satisfied by quantum theory: r θ0 = r θ † 0 , r θθ † = (2r θ0 − 1) 2 .

Corollary 1 .
Let G = C n be a cycle graph with n ≥ 3.Then, the n-cycle overlap inequalities, corresponding to the non-trivial facet-defining inequalities of the convex polytope C Cn , can be mapped to robust noncontextuality inequalities of the scenario B LSSS ,r 12 + r 23 + • • • + r (n−1)n − r n1 ≤ n − 2 + ε 1 + ε 2 + ε 3 + • • • + ε nand sign permutations of the r.h.s.Proof.Apply the triangle inequality satisfied by the l 1 -norm, similarly to what has already been done in Ref. [Appendix E]