{'fraction_non_alphanumeric': 0.04025771503611293, 'fraction_numerical': 0.012065003282994091, 'mean_word_length': 4.6227503461006, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Certifying Non-Classical Behavior for Negative Keldysh Quasi-Probabilities

We introduce an experimental test for ruling out classical explanations for the statistics obtained when measuring arbitrary observables at arbitrary times using individual detectors. This test requires some trust in the measurements, represented by a few natural assumptions on the detectors. In quantum theory, the considered scenarios are well captured by von Neumann measurements. These can be described naturally in terms of the Keldysh quasi-probability distribution (KQPD), and the imprecision and backaction exerted by the measurement apparatus. We find that classical descriptions can be ruled out from measured data if and only if the KQPD exhibits negative values. We provide examples based on simulated data, considering the influence of a finite amount of statistics. In addition to providing an experimental tool for certifying non-classicality, our results bestow an operational meaning upon the non-classical nature of negative quasi-probability distributions such as the Wigner function and the full counting statistics.

Introduction.-The theory of quantum mechanics contains ingredients that are absent in classical theories, such as entanglement, wave-function collapse, and superposition of arbitrary states [1][2][3]. In some scenarios, these ingredients are beneficial (e.g., quantum information [4]), while in other scenarios, they provide limitations (e.g., quantum noise in measurement and amplification [5]). The realm of possibilities that are enabled or prohibited by quantum mechanics is a highly non-trivial subject of current research.
At the heart of this problem lies the question: "which observations cannot be explained by classical theories?" A strong result in this direction is provided by Bell inequalities [6]. With the help of such inequalities, observed data alone can rule out any theory that fulfills a natural definition of locality [7]. While this is an extremely powerful result, locality is a rather specific requirement and does not encompass all classical theories [8].
Another well established approach for testing for nonclassicality is given by the Glauber-Sudarshan P -function in quantum optics [9,10]. If a state is described by a P -function that cannot be interpreted as a probability distribution, then some measurable intensity correlators resulting from this state cannot be described by classical electrodynamics [11,12]. In contrast to Bell inequalities, the measurement device thus has to be trusted to produce intensity correlators of light.
Arguably the most striking difference to classical theories is the fact that observables cannot be described using positive probability distributions in quantum mechanics. Leggett-Garg inequalities [13] provide a test for non-classicality based on this criterion. However, an additional assumption of non-invasive measurability which is not generally justified complicates the conclusions [14].
In this letter, we we provide a test for non-classicality which rules out any description based on positive probabilities under a few realistic assumptions on the measurement apparatus. To this end, we consider scenarios where observables are measured using individual detec- tors, see Fig. 1. In quantum theory, such scenarios are well described by von Neumann type measurements [15][16][17][18], where observables of interest are coupled to detectors which are subsequently measured projectively. The probability distribution describing the measurement outcomes have a natural description in terms of a quasiprobability distribution that we abbreviate with KQPD due to its reminiscence of the Keldysh path-integral formulation [19,20]. The KQPD depends on the observables of interest and can reduce to the Wigner function [21] or the full counting statistics [22]. Other applications include quantum thermodynamics [23][24][25][26][27][28], quantum optics [29], generalized Wigner functions [30], weak values [19] (see also [31][32][33]), and non-equilibrium phenomena in quantum systems [20]. Importantly, the KQPD can become negative, indicating non-classical behavior [18,29,[34][35][36][37][38][39]. Here we put this non-classical feature on a firmer footing by taking an operational approach. To this end, we put forward a classical model for measurements based on individual detectors. This model is based on a few natural assumptions on the detectors and results in an experimentally accessible inequality. We show that within quantum theory, negativity in the KQPD is a necessary and sufficient condition to violate the inequality, ruling out a classical description. Just like negativity in the P -function rules out an explanation by classical electrodynamics (as long as the detectors can be trusted to produce intensity correlators), negativity in the KQPD rules out an explanation based on positive probabilities, as long as the measurement apparatus can be trusted to fulfill the assumptions specified below.
In contrast to Leggett-Garg inequalities, noninvasiveness of the measurement is not required. The proposed experimental test of non-classical behavior is therefore not subject to a clumsiness [14] or a finite precision loophole [40,41]. The model is not necessarily local or non-contextual [42][43][44].
Before we introduce the classical model, we provide the quantum mechanical (QM) description of the scenario under investigation, sketched in Fig. 1. While we assume this to be the correct description, we stress that our test for non-classicality does not rely on the QM-model.
-The QM-model relies on the KQPD which is discussed in detail in Ref. [19]. It encodes the joint fluctuations of multiple observables of interest. For simplicity, we consider the situation where we are interested in two observablesÂ 1 andÂ 2 at times t 1 and t 2 respectively. The generalization to more observables is straightforward. Let us further consider the situation where t 2 either comes immediately after t 1 (subsequent measurements) or where t 1 = t 2 (simultaneous measurements). The KQPD is then defined as ( = 1) for simultaneous measurements. The state before the measurement is denoted byρ. We grouped the observables into a vector A = (A 1 , A 2 ) and similarly for λ and γ. As shown below, the variables γ j are necessary to take into account the backaction exerted by the measurement and can be seen as random variables determined by the detectors. A physical motivation for the definition in Eq. (1) is provided below, by Eq. (3).
If [Â 1 ,Â 2 ] = 0, the measurement ofÂ 1 may influence the measurement ofÂ 2 and a description of the system in terms of pre-determined values of A 1 and A 2 is not generally possible. In this case, the KQPD may become negative. It has been shown that such negativity requires the system to be in a superposition of states that correspond to different values for the observable A 1 [39]. Negativity in the KQPD can thus be seen as an indicator for non-classical behavior. However, in an experiment, the negativity of the KQPD is masked by measurement imprecision and backaction, rendering the measured probability distribution strictly non-negative. The inequality that we introduce below relies on a way to unmask the KQPD experimentally.
The QM-model.-We consider two detectors, one for each observable to be measured. The detectors can be described by canonically conjugate observablesr j andπ j , and they are coupled to the system through the Hamiltonian [15] where j = 1, 2, and χ j denotes the measurement strength. We assume that the time-evolution induced by any Hamiltonian other than Eq. (2) can be neglected during (and between) the measurements, noting that it is straightforward to include time-evolution between the measurements (for an investigation on detector memory effects, see Ref. [45]). Equation (2) induces a displacement in the detector coordinatesr j which depends on the state of the system. After the interaction, a projective measurement of the detectors is performed to complete the measurement of the system observablesÂ j . The measured distribution reads [19] (see also [46,47]) where W j (r, π) denotes the Wigner function of detector j and we introducedĀ j = χ j A j andγ j = γ j /χ j . This equation has a simple interpretation, motivating the definition in Eq. (1). The KQPD describes the intrinsic fluctuations of the observables, containing all the information of the system. These fluctuations are distorted by the measurement process, giving rise to the convolution with the Wigner functions of the detectors. The uncertainty in the position coordinates induces a fuzziness in the measurement (measurement imprecision) and the uncertainty in the momentum coordinates introduces a random kick in the measured observable through Eq. (2) (measurement backaction). Due to the Heisenberg uncertainty relation, there exists a trade-off between imprecision and backaction [5] which ensures that the measured distribution is always positive, even when the KQPD exhibits negativity. For an investigation of the classical limit of von Neumann type measurements, see Ref. [48].
The classical model.-We now introduce a classical hidden-variable model that describes the situation sketched in Fig. 1 (a). To this end, we assume that the system is described by a probability distribution S(A|γ). This distribution encodes the (hidden) values of the observables (A) and takes into account that the presence of the detectors may modify the system behavior (γ). The measured distribution can then be written in the com-pletely general form (4) where χ describes the (changeable) detector settings. The function M describes the effect of the detectors. We say that an observed probability distribution has a classical explanation if it can be described by the right-hand side of Eq. (4) with positive S and M .
Equation (4) is sufficiently general that it can essentially describe any observations. To rule out a classical explanation, we place some trust in the detectors and make the assumptions: 1. Uncorrelated detectors: 2. Uncorrelated imprecision and backaction: (6) 3. Backaction only affects the other observable: 4. Translational invariance: 5. Detectors can be detached: In the spirit of the considered scenario, the first assumption allows us to treat the detectors as individual objects (note that this assumption is also present in the Bell scenario). Assumptions 2 and 3 ensure that the backaction of a detector does not interfere with its own measurement, i.e., a detector's output is independent of its backaction on the system. In Eq. (7), we introduced the distribution relevant for measuring a single variable, S(A j ), which is assumed to be independent of the backaction of its own detector. In assumption 5, U denotes the uniform distribution and we defined γ j = 0 to denote the absence of any backaction of detector j. We note that our assumptions only include the effect of the detectors. On a qualitative level, one can thus replace our assumptions with the notion of having control over measurements of single observables and preventing any cross-talk between the detectors. Certifying non-classicality.-We denote by P (A j |χ j ) the distribution that describes a measurement of a single observable.
We further denote the Fourier transform of any distribution with a tildeP (λ) = dA exp(−iλA)P (A). We then consider the quantity where we note that the right-hand side only contains Fourier transforms of measurable probability distributions. If the measurement is described by our classical model, we can write this quantity as [49] (11) This equation is very similar to Eq. (4) (under our assumptions) with the only difference that χ j is replaced by χ j in the measurement imprecision term D j . Within our assumptions, the measurement imprecision of the detectors can be corrected for. We end up with a distribution where the backaction is determined by χ j and the imprecision by χ j . In our classical model, this still results in a positive distribution Any violation of this inequality implies that the observed data cannot be explained by Eq. (4) with positive S and M that satisfy the five assumptions. Trusting the detectors (i.e., the assumptions) then allows us to conclude that no explanation in terms of positive probabilities is possible. The assumptions thus introduce loopholes since a violation of Eq. (12) could in principle result from their breakdown.
In quantum mechanics, the delicate interplay between backaction and imprecision is what masks the negativity of the KQPD. This may result in a violation of the inequality. Using detectors with positive Wigner functions that factorize in a position and a momentum part ensures that our assumptions on the detectors are satisfied. The quantity K is then given by an expression analogous to Eq. (11), with S replaced by the KQPD P. This can be seen by plugging Eq. (3), and a similar expression for single observables, into Eq. (10). A positive KQPD then immediately ensures K ≥ 0. In the limit where χ j → 0 and χ j → ∞, we find K → P. Whenever the KQPD exhibits negativity, we can thus find K < 0, violating the inequality in Eq. (12). Since the assumptions on the detectors are met, this implies that the measured data cannot be explained by positive probability distributions. Negativity in the KQPD is therefore a necessary and sufficient condition for certifying non-classicality. Examples.
-We now illustrate how our classical model can be ruled out from experimental (in our case, simulated) data by violating the inequality in Eq. (12). We consider two examples: The simultaneous measurement of position and momentum, and two subsequent, noncommuting Stern-Gerlach type spin measurements. For both examples, we consider identical detectors that are described by the Wigner function (throughout, we consider dimensionless units for position and momentum) corresponding to unsqueezed Gaussian states of minimal uncertainty. As demanded by assumption 2, they factorize into distributions for position (imprecision) and momentum (backaction). We first consider a simultaneous measurement of position and momentum on a single-photon Fock state described by the Wigner function In this case, our quantum mechanical model reduces to the Arthurs-Kelly model [50]. We note that such a measurement can be implemented by heterodyne detection [51], see Ref. [52] for an experimental realization. As discussed in detail in Ref. [19], the KQPD for the simultaneous position and momentum measurement is given by W(x − γ p /2, p + γ x /2). Choosing equal measurement strengths χ x = χ p = χ and χ x = χ p = χ we then find (see supplemental information for details [49]) where g = (χ/2) 2 + 1/(χ ) 2 . We note that in the limit χ → 0 and χ → ∞, we have g → 0 and Eq. (15) reduces to Eq. (14). As long as g < 1, we find K < 0 at the origin, see Fig. 2 (a).
Equation (15) implies that the smaller χ, the stronger the negativity in the measurable quantity K. Weaker measurements thus always seem to be preferable. This is only true under the assumption that K can be estimated precisely. Strictly speaking, this requires an infinite amount of data. For a finite and fixed number of measurements, we will find a trade-off between having large negative values in K (requiring small χ) and being able to reliably estimate K (requiring large χ). To estimate K, we consider an experiment with N measurements resulting in outcomes x j . We define the empirical characteristic function [53] which provides an unbiased estimator of the characteristic function (i.e., the Fourier transform of the probability distribution). We note that it is imprecise for large values of λ, where the characteristic function is a small number. For K, we introduce the estimator where λ · A = λ x x + λ p p. Here the different empirical characteristic functions are labeled by λ for the joint measurement and by a prime for the measurements with strength χ . Two empirical cut-offs increase the stability of the estimator. The first, c o , ensures that values of λ where we divide by a very small number are not taken into account. The second, λ c , allows for integrating over a finite domain. The estimator in Eq. (17) is illustrated in Fig. 2 (a) for simulated data. For large values of χ, it is both accurate and precise. As χ becomes smaller, the spread of the estimates increases (the precision is reduced). Eventually, the cut-off c o prevents an accurate estimation because the true characteristic function becomes very small for almost all values of λ x/p . As expected, we find a trade-off between large χ, where the negativity in K is not very pronounced, and small χ, where it is hard to estimate K.
Our second example is provided by subsequent, noncommuting measurements on a two-level system (for a recent experimental implementation of non-commuting spin measurements, see Ref. [54], for a detailed discussion on simultaneous spin measurements, see Ref. [55]). We consider the system to be in a pure state |+ , which is an eigenstate of the Pauli matrixσ x . We then make a measurement ofσ z with strength χ 1 = χ, followed by a projective measurement ofσ x . The KQPD for this system is discussed in Ref. [19] and given in the supplemental information [49]. Because it is unavoidable that the first measurement influences the second one, the KQPD exhibits negativity. Since the second measurement is projective, we only correct for the measurement imprecision of the first measurement, choosing χ 2 = χ 2 → ∞ in Eq. (10). All distributions can then be given as densities in the continuous variable σ 1 and probabilities in the discrete variable σ 2 = ±1. Certifying non-classicality of this system is illustrated in Fig. 2 (b), where we show both K as well as K est . We find the same qualitative results as for the simultaneous position and momentum measurement. The weaker the first measurement, the more pronounced the negativity but the less reliable is the estimate K est . Detailed calculations can be found in the supplemental information [49].
Conclusions.-We introduced a classical model for measurements that use individual detectors for different observables. Under five natural assumptions, we find the inequality K ≥ 0. Any violation of this inequality implies that either no description in terms of positive probabilities is possible, or one of the assumptions on the detectors is not met. In scenarios which are well described by quantum mechanical von Neumann measurements, we find that K can become negative if and only if the KQPD exhibits negative values. In this case, K provides a way of approximating the KQPD from measurable probability distributions. This is possible because measurement imprecision is a property of the detector alone and can thus be inferred and corrected for. In weak measurements, where backaction becomes small, correcting for the measurement imprecision "unmasks" the KQPD, exposing its negativity.
Our classical model is appropriate whenever individual detectors are used to measure different observables. The introduced operational procedure for certifying nonclassicality is thus of broad experimental relevance and it puts the non-classical nature of the negative values in the KQPD on a firmer footing. Here we give a detailed derivation of the inequality K cl ≥ 0 [Eq. (12) in the main text], illustrating where the assumptions on the detectors enter the derivation. Our starting point is given by Eq. (10) in the main text which reads whereP The distribution describing the joint measurement of A 1 and A 2 is given by Here we have already made the assumption of uncorrelated detectors. While this assumption is necessary only later in the derivation, the whole derivation becomes considerably more transparent by making the assumption at this early stage. The quantity P cl (A j |χ j ) describes the measurement of a single observable and is not in general given by the marginal of Eq. (S3). To recover P cl (A j |χ j ) from P cl (A|χ), we require assumption five (detectors can be detached) With this equation, we find where k = j and, as in the main text, we defined dA k S(A|γ j , γ k = 0) ≡ S(A j |γ j ). Using the translational invariance of the detectors M j (A j , A j , γ j |χ j ) = M j (A j − A j , γ j |χ j ), i.e., assumption 4, the Fourier transforms of the probability distributions reduce to products due to the convolution theorem where the Fourier transforms of M and S are given analogously to Eq. (S2). Using Assumption 3 [a measurement of a single observable is not affected by backaction, i.e.,S(λ j |γ j ) is independent of γ j ] we can writẽ where at this point, D j is obtained by integrating M j over γ j . We can then write Using assumption 2 (uncorrelated imprecision and backaction) Eq. (S8) reduces to (this is where we also need assumption 1, uncorrelated detectors) (S10) The second line corresponds to Eq. (11) in the main text and we used the convolution theorem once more to arrive there. Since all involved distributions are assumed to be positive, the inequality follows directly. Note that within our assumptions, we can writẽ which looks very similar to Eq. (S10) with the sole exception that both the backaction (p j ) and the measurement imprecision (D j ) are determined by the same measurement strength (χ j ). Intuitively, our assumptions allow for determining the measurement imprecision of a detector by measuring a single observable. In particular, the ratiõ is then just the ratios of the measurement imprecision terms. This allows for exchanging the measurement imprecision at one value of χ with the measurement imprecision at another value χ which is how K cl is related to P cl . In the quantum case, K can be obtained analogously but starting with Eq. (3) in the main text instead of Eq. (S3). One then proceeds by making the same assumptions on the detectors which corresponds to using Wigner functions that factor in a position and a momentum part.  (14) , we find the probability distribution describing the outcomes of a joint position and momentum measurement P (x, p|χ) = 4χ 2 π(2 + χ 2 ) 6 e − 4χ 2 (x 2 +p 2 ) (2+χ 2 ) 2 where we assumed the measurement strengths to be equal, i.e., χ x = χ p = χ. The corresponding characteristic function readsP Analogously, we find the probability distribution that describes a measurement ofx alone with the characteristic functionP Due to the rotational invariance of the Wigner function of a single-photon Fock state [cf. Eq. (14)], the distributions for a measurement of momentum alone are equivalent. From the last equation, we find where for the last equality, we used the Wigner function of the detectors [cf. Eq. (13)], and the fact that they can be written as where, as discussed in the main text, p(γ j |χ j ) encodes the backaction (arising from the momentum distribution of the detector) and D(A j |χ j ) encodes the imprecision (arising from the position distribution). Equation (S17) thus shows that the measurement imprecision of a detector can be isolated by measuring a single observable with different measurement strengths. Importantly, this works because backaction is irrelevant when measuring a single observable (we are not interested in the post-measured state). We can now write where P(x, p|γ x , γ p ) = W(x − γ p /2, p + γ x /2). Note the close similarity between Eq. (11) in the main text and Eq. (S19). From Eqs. (S14) and (S17), we recover K given in Eq. (15) in the main text.

C. SUBSEQUENT MEASUREMENTS ON A TWO-LEVEL SYSTEM
In the second example, we consider a two level system in a pure statê whereσ x denotes a Pauli matrix. We are then interested in a weak measurement ofσ 1 , followed by a projective measurement ofσ 2 . We denote the eigenvector of those Pauli matrices byσ j |± j = ±|± j . It is convenient to express all states in the basis that diagonalizesσ 1 .
To estimate K from experimental data, we consider N joint measurements, which result in outcomes σ j 1 and σ j 2 = ±1. We then introduce the estimate of Eq. (S25) as We can then write where Y λ1 and Y λ1 denote the estimate ofP (λ 1 |χ) andP (λ 1 |χ ) respectively, following Eq. (16) . We note that it is beneficial to use a χ of moderate strength because the estimator in Eq. (S30) becomes unreliable when the respective probability distributions vary over short scales.