Experimental generalized contextuality with single-photon qubits

Contextuality is a phenomenon at the heart of the quantum mechanical departure from classical behaviour, and has been recently identified as a resource in quantum computation. Experimental demonstration of contextuality is thus an important goal. The traditional form of contextuality -- as violation of a Kochen-Specker inequality -- requires a quantum system with at least three levels, and the status of the assumption of determinism used in deriving those inequalities has been controversial. By considering `unsharp' observables, Liang, Spekkens and Wiseman (LSW) derived an inequality for generalized noncontextual models that doesn't assume determinism, and applies already to a qubit. We experimentally implement the LSW test using the polarization states of a heralded single photon and three unsharp binary measurements. We violate the LSW inequality by more than 16 standard deviations, thus showing that our results cannot be reproduced by a noncontextual subset of quantum theory.


I. INTRODUCTION
There are a number of proposals for tests which pit quantum mechanics against alternative views of reality, including the theorems of Bell [1] and of Kochen and Specker (KS) [2]. Corresponding experimental tests [3][4][5][6][7][8] have been performed and support the validity of quantum mechanics. Bell's theorem refers to a situation with two or more spatially separate particles and states that local hidden variable theories are incompatible with the statistical predictions of quantum mechanics. The KS theorem has the advantage of applying to a single system, and states that noncontextual hidden variable theories are incompatible with quantum predictions, under the assumption that the measurements can be described by projectors. A qutrit (three-level system) and five projectors are required for a proof of the traditional KS contextuality in a state-dependent manner [9,10], while a qutrit and thirteen projectors for such a proof in a stateindependent manner [11][12][13][14][15][16][17].
To find simpler proofs of contextuality, applicable to a qubit (two-level system), generalizations of KS noncontextuality have been proposed [18][19][20][21]. These all utilise generalized measurements, described by positive operator-valued measures (POVMs). It has been argued, however [22] that these works make an unwarranted assumption of determinism for unsharp measurements. * Electronic address: yshzhang@ustc.edu.cn † Electronic address: h.wiseman@griffith.edu.au ‡ Electronic address: gnep.eux@gmail.com More recently, Liang, Spekkens and Wiseman (LSW) [23] (Sec. 7.3) followed a different approach to derive noncontextuality inequalities for a particular class of non-projective measurements. The relevant class is the unsharp projective measurements, in which each of the set of orthogonal projectors is mixed in some ratio with other projectors from the same set, in order to make the POVM. (Thus each element of the POVM commutes with each other element, just as for a projective measurement.) The LSW assumption is that the response function is likewise a mixture of the deterministic response functions assumed by KS for projective measurements, in the same ratios. Using this principle, LSW derived a generalized noncontextuality inequality involving three different unsharp projective measurements on a qubit. Subsequently, Kunjwal and Ghosh [24] found a triple of unsharp observables that, according to the predictions of quantum mechanics, would give a significant violation of the LSW inequality, in a state-dependent manner.
Here, we experimentally violate the LSW inequality for the first time, via three unsharp binary qubit measurements that are pairwise jointly measurable. We use a photon polarization qubit, and the scheme of Ref. [24]. Our work verifies experimentally that even a single qubit is enough to demonstrate quantum contextuality, under the weak assumptions of Ref. [23]. As we assume the validity of operational quantum theory for the error analysis, our work demonstrates that our results cannot be reproduced by a noncontextual fragment of quantum theory -an important experimental benchmark. We exceed the LSW bound by many standard deviations, in an experimentally verified regime of validity for the inequality.
We note that an independent experimental demonstra-tion of contextuality with qubit systems, following techniques complementary to the present work, is reported in [25]. There, the state preparations and measurements are realized with time-sharing methods, and the problem of noises in measurements is solved with a technique derived within the framework of generalised probabilistic theories.

II. THEORETICAL IDEA
A. Scheme for violating the LSW inequality A generalized noncontextual model, referred to as a LSW model, can be realized using noisy spin-1 2 observables [23]. Specifically, three such observables, M k (k = 1, 2, 3), are required, each described by a two-outcome Here 1 is the 2 × 2 identity matrix, σ is the vector of Pauli matrices (σ x , σ y , σ z ),n k is the axis for measurement k, and η ∈ [0, 1] is the sharpness associated with each observable. For η = 1, these reduce to projective measurements, P k = {Π k + , Π k − }. In our experiment, we choose a special case of trine spin axeŝ (2) equally spaced in the z-x plane.
Testing the LSW inequality for a quantum mechanical violation requires a special kind of joint measurability, denoted by joint measurability contexts That is, the three observables M k (k = 1, 2, 3) are pairwise jointly measurable, for all three pairs, but not triply jointly measurable. Pairwise joint measurability is possible only if η ≤ ( √ 3−1) ≈ 0.732 [23]. Triple-wise joint measurability -which would eliminate any possibility of contextuality since the entire experiment could be performed using a single context {M 1 , M 2 , M 3 } -is possibly only if η < 2/3 [23]. Here we restrict our consideration of η to the narrow range 2/3 < η ≤ ( √ 3 − 1).
The joint measurability context We follow Ref. [24] in using joint POVMs with the following general form: where α ij ∈ R and a ij ∈ R 3 , and the relation G ij The LSW inequality is the following [23] where Pr(X i = X j |J ij ) denotes the probability of obtaining anticorrelated outcomes in a joint measurement denoted J ij . Note that by the (unreasonable) assumption of outcome determinism for POVMs in Refs. [18][19][20][21], the bound on the right-hand-side would be 2/3 [23], whereas the LSW bound is at least 0.756 (since we require η < 0.732 for pairwise joint measurability).
In our experiment, we aim for η = 0.670, strictly within the range [2/3, 0.732] but close to the optimum at 2/3.

B. Implementation of joint POVMs
For the pairwise joint measurements described above, each element of the POVM is rank one, and can be rewritten as G ij ǫε = λ ǫε ξ ij ǫε ξ ij ǫε with ǫ, ε ∈ {+1, −1}. Here, λ ++ = λ −− = (2 − η 2 )/4 and λ +− = λ −+ = (2 + η 2 )/4. We propose a scheme for implementing the joint POVMs in three stages, each of which is a single-qubit rotation followed by a two-outcome measurement. In each, the positive result (i.e. a detector click) has a POVM element proportional to the appropriate projector, while the null result qubit is fed into the next stage. The null result qubit from the third stage is then also detected.
To be more specific, the three single-qubit rotations are designed as while the POVM elements {P 0 ǫε , P 1 ǫε } take the form In the above, |φ ′ ǫε and χ ǫε are chosen such that after the projector is applied, the probability of the click If the other (null) result is obtained, the qubit enters the next stage of the apparatus, having had the operator P 0 ǫε applied to its state. For example, we implement G ij +− at the first stage by choosing φ ′ +− = |ξ ij⊥ +− and χ +− = λ +− . The first detector clicks with probability Tr(G ij +− |φ 0 φ 0 |), and if it does not click then the qubit state entering the next stage of apparatus is We design the apparatus so as to next measure G ij −+ , then G ij ++ , in the same way. Since ǫε G ij ǫε = 1, the fourth possible click, following the null outcome at the third state, corresponds to the implementation of G ij −− . For further details see the Supplemental Material.

A. Experimental violation of the LSW inequality
We perform the test of the LSW inequality with single photons. The basis states of the qubit, |0 and |1 , are encoded by the polarizations of single photons, |H and |V . We generate contextual quantum correlations by performing the four-outcome joint POVM on this qubit.
The experimental setup shown in Fig. 1 involves preparing the specific state (preparation stage) and then performing the joint POVM (measurement stage). In the preparation stage, polarization-degenerate trigger-herald photon pairs are produced and are registered by a coincidence count at two single-photon avalanche photodiodes (APDs) with 7ns time window. Total coincidence counts are about 10 5 over a collection time of 60s, and the probability of randomly creating more than one simultaneous photon pair is thus of order 10 −4 , which is negligible. The second-order correlation g (2) is measured as 0.0089 ± 0.0018 which shows that the single-photon source is extremely non-classical [26]. The heralded single photons are prepared in state |φ 0 = (|H + i |V )/ √ 2 after passing through a polarizing beam splitter (PBS), a half-wave plate (HWP, H0), and a quarter-wave plate (QWP, Q0).
In the measurement stage, to implement the twooutcome measurements, partially projecting polarizing elements are added to the setup and allow us to produce the required projectors with the appropriate weights. We employ partially polarizing beam splitters (PPBSs) with specific transmission probabilities for vertical polarization T V and same transmission probability for horizontal 0.8125 (10) polarization T H = 1. This allows us to project the state onto |V on the reflected port of the PPBSs.
After passing through each QWP-HWP-QWP set and the following PPBS, the photons are detected by APDs on the reflected port, in coincidence with the trigger photons. The transmitted photons go into the next QWP-HWP-QWP set and PPBS (or, at the final stage, a PBS which can be regarded as a special PPBS with equal transmission and reflection probabilities). The relative detection efficiencies of the detectors D2-D4 with respect to D1, are measured as 0.9499 ± 0.0070, 0.9199 ± 0.0069 and 0.9801 ± 0.0063 respectively and these figures are used to correct the coincidence counts (see the Supplemental Material). The probability of measuring the photons is obtained by normalizing the corrected coincidence counts on each mode with respect to the total corrected coincidence counts. The overall detection efficiency of the heralded photons in our experiment is approximately 11%. Thus we make the fair-sampling assumption: that the event selected out by the photonic coincidence is an unbiased representation of the whole sample.
The probabilities of photons being measured on the reflected ports (clicks on the detectors D1-D3) correspond to those of the joint POVM elements G ij +− , G ij −+ , and G ij ++ , whereas the probability of photons being measured on the transmitted port of the PBS (click on the detector D4) corresponds to that of the element G ij −− . We can estimate the matrix forms of the joint POVM elements from the measured probabilities (see Subsec. III B). The negligible difference from the theoretical prediction guarantees successful experimental realization of joint POVMs by taking into account of all the imperfections of the experimental setup.
In Table I, we present the measured probabilities and the outcomes of the joint POVM with noise parameter η = 0.67 on the specific state |φ 0 . The result of measured average probability of anticorrelations is R Q 3 = 0.8125 ± 0.0010. Here, and below, the tilde relates to the experimentally implemented POVMs, as opposed to the theoretical ones aimed for; see Subsec. III B. This R Q 3 violates the bound set by the noncontextual hidden variable theory 1 − η/3 = 0.7767 by 35 standard deviations. Furthermore, in our experiment the noise parameter can be estimated by the experimental data (see Subsec. III B). The average value of the estimated noise parameters in the experiment isη = 0.6690 ± 0.0019. Using this value, rather than the aimed-for 0.670, makes almost no difference in the LSW bound: the bound set by the noncontextual hidden variable theory can be calculated as 1 −η/3 = 0.7770 ± 0.0006 compared to 1 − 0.670/3 = 0.7767. Even including the uncertainty in the former bound, the experimentally measured average probability of anticorrelation,R Q 3 = 0.8125 ± 0.0010, still implies a violation of this experimental bound of the LSW inequality 1 −η/3 by 22 standard deviations. In Subsec. III B we give an alternate way of comparing the correlations and the bound, which also gives a violation by many standard deviations. Here, we finish by noting that the experimental valueR Q 3 is in agreement (1.6 standard deviations) with its theoretical prediction 0.8087±0.0022, predicted via the estimated noise parameterη.

B. Evaluating the quality of experimental realization of POVM
We consider the effect on the implementation of the joint POVM due to all the important imperfections, namely in the PPBSs (T 1 V = 0.3904 ± 0.0045, T 2 V = 0.2897 ± 0.0050), WPs (typical retardance accuracy< 2.67nm), PBSs (typical extinction ratio ∼ 10 5 : 1), and detectors. We define a modified 2-norm distance D(A, B) between the matrix form of the theoretical prediction of POVM element A and that of experimental implementation of the corresponding POVM element B as For the particular forms of the POVM described in our paper, the distance ranges between 0 for a perfect match and √ 2 for a complete mismatch. For example, we use the distance D(G ij ǫε ,G ij ǫε ) to measure the mismatch between the theoretical prediction of G ij ǫε with i = j ∈ {1, 2, 3}, ǫ, ε ∈ {+1, −1}, and the corresponding experimental implementationG ij ǫε . To obtain the distance, we perform measurement tomography [27,28]. Single photons, prepared in the states |H , |V , |R = (|H + i |V )/ √ 2 and |D = (|H + |V )/ √ 2, are passed through the optical circuit and are detected by APDs in coincidence with the trigger photons. After correcting for the relative efficiencies of the different detectors, the photon counts give the measured probabilities. From these we can obtain the matrix forms of all twelve elements of the joint POVMsG via maximum-likelihood estimation.
In our experiment the accuracy of the experimental implementation of the measurements described by the POVMẼ As shown in Fig. 2, all the distances D(Ẽ i(j) ,Ẽ i(k) ) are smaller than 0.0006, which validates the experimental realizations of pairwise jointly measurable POVMs.
We also compare the estimated elementẼ i(j) ǫ with the theoretical ideal E i ǫ by calculating the 2-norm distance ). Since the distances satisfy D(E i + ,Ẽ i(j) − ) we only show six values of the distances D(E i ,Ẽ i(j) ) in Fig. 3. All the distances are smaller than 0.0007, which shows the successful experimental realizations of the POVMs with the chosen noise parameter η = 0.67.
For determining the LSW bound used in Subsec. III A it is important to know the noise parameter ofη associated with the POVM. This can be estimated as The conditionẼ Finally, the value R Q 3 corresponding to the ideal POVMs can also be bounded, as follows. An arbitrary qubit POVM element G can be written as G = a1+bn· σ, wheren is a unit vector and a and b are nonnegative numbers satisfying b ≤ a and b ≤ 1 − a. An arbitrary qubit density operator can be written as ρ = 1 2 (1 + r · σ), where | r| ≤ 1. The probability of obtaining the outcome corresponding to G for a POVM containing G on state ρ is given by Pr(G) = Tr [Gρ] = 1 2 (a + b r ·n). Let g = (a, bn x , bn y , bn z ) and s = 1 2 (1, r x , r y , r z ). Then Pr(G) = g · s. LetG denote the experimentally realized POVM element corresponding to G, and likewise g to g. Then Pr(G) − Pr(G) = g − g · s ≤ g − g | s| ≤ 1 √ 2 g − g . Thus we obtain the bound Letg ij +− (g ij −+ ) be the vector representation of G ij +− (G ij −+ ) in our experiment, obtained above by tomography. Then from (10) we obtain a lower bound for the ideal value We estimate the bound for the ideal value R Q 3 based on the measured valueR Q 3 and the estimatedG ij ǫε . We find The uncertainty here is larger than that inR Q 3 because of uncertainties in thegs that contribute to the correction term in Eq. (11). Now, the appropriate point of comparison is the ideal noncontextual bound of 0.7767, from the aimed-for η = 0.67, because we are inferring the correlations from an ideal measurement with this η. The value of the bound in Eq. (12) implies a violation of this ideal bound by at least 16 standard deviations.
Note that as we assume the validity of quantum mechanics, there is no need to establish operational equivalences between the measured POVM elements in different contexts, as done in Ref. [25].

IV. DISCUSSION
Any realistic measurement necessarily has some nonvanishing amount of noise and therefore never achieves the ideal of sharpness. This provides a compelling reason to test contextuality applicable to unsharp measurements. Here we test the generalized noncontextuality inequality for the unsharp measurements of LSW [23]. For unsharp measurements that can be jointly performed, correlated noise could allow correlations to be generated by a non-contextual hidden variable model. The LSW inequality takes such correlations into account by setting a higher bound. Thus a violation of the LSW inequality certifies nonclassicality that cannot be attributed to hidden variables associated with noise in the unsharp measurements.
Our experimental results show convincing violation of the LSW inequality with single-photon qubits. That is, it is a demonstration of contextuality for the simplest type of quantum system. It is also the first experiment to apply the LSW argument to rule out noncontextuality within quantum theory.
The experimental confirmation of quantum contextuality in its simple and fundamental form sheds new light on the contradiction between quantum mechanics and noncontextual realistic models. Furthermore, we realize joint POVMs of noisy spin-1 2 observables on a single-qubit system which is the key point to implement the unsharp measurements, paving the way for further developments such as the real time estimation [29], monitoring of the Rabi oscillations of a single qubit in a driving field [30] and understanding the relation between information gain and disturbance [31]. Experimental generalized contextuality with single-photon qubits: supplementary material In the supplementary document, we provide the details of the experiment and data analysis. The raw probabilities to demonstrate the joint measurability of positive operator-valued measures (POVMs) are also provided.

I. IMPLEMENTATION OF THE ELEMENTS OF THE JOINT POVM G
Each element of the POVM can be written as G ij ǫε = λ ǫε ξ ij ǫε ξ ij ǫε , with ǫ, ε ∈ {+1, −1}, i = j ∈ {1, 2, 3}, and Each element can be implemented by a single-qubit rotation followed by a two-outcome measurement. In the first step, to realize the element G ij +− the single-qubit rotation is designed as The POVM element {P 0 +− , P 1 +− } takes the form The choice of φ ′ +− guarantees if P 1 +− clicks the initial state is projected onto the eigenstate ξ ij +− and let the component of the state ξ ij⊥ +− which is orthogonal to ξ ij +− all pass through for the next measurement. Therefore the state after the first rotation is U +− |φ 0 φ 0 | U † +− for any input |φ 0 . The first detector (P 1 +− ) clicks with the probability Tr(P 1 Thus we implement the element of POVM G ij +− . The other state without click is In the second step, to implement the element G ij −+ , the single-qubit rotation is designed as where The parameter χ −+ is chosen such that after the projector is performed, the probability of the click of P 1 −+ is that of the measurement G ij −+ performing on the initial state |φ 0 . The state after the second qubit rotation is U −+ P 0 The second detector (P 1 −+ ) clicks with the probability Tr(P 1 −+ U −+ P 0 Thus we implement the element G ij −+ . The other state without click is In the third step, to implement G ij ++ the single-qubit rotation is designed as where (S10) with the normalization factor N ++ . Comparing Eqs. (S9) and (S11), one can find that we replace |φ 0 in Eq. (S9) by ξ ij⊥ ++ in Eq. (S11). The third POVM element takes the form {P 0 ++ , P 1 ++ }, where With this setup when the input state is ξ ij⊥ ++ the detector (P 1 ++ ) never clicks. Thus the measurement corresponding to click of P 1 ++ is proportional to ξ ij ++ ξ ij ++ . We now prove the measurement we implement is exactly G ij ++ .
Assume the POVM elements corresponding to clicks of P 1 ++ and P 0 ++ are x ξ ij ++ ξ ij ++ and y |ψ ψ|. Due to the fact that we have realized λ +− ξ ij Tracing both sides of Eq. (S12) leads to and Then we also have Thus the POVM element corresponding to the click of P 1 ++ is G ij ++ = λ ++ ξ ij ++ ξ ij ++ . The POVM element corresponding to the click of P 0

II. THE MEASUREMENT STAGE OF REALIZING JOINT POVMS
In the measurement stage, the single-qubit rotations can be realized by a combination of quarter-wave plates (QWPs) and half-wave plates (HWPs), so-called a sandwich-type QWP-HWP-QWP set, with certain setting angles depending on the parameters of the joint positive operator-valued measure (POVM). The setting angles of the wave plates (WPs) used to realize the corresponding elements of joint POVMs are shown in Table S1. We employ partially polarizing beam splitters (PPBSs) with specific transmission probabilities for vertical polarization T V and same transmission probability for horizontal polarization T H = 1. This allows us to implement the measurement V | on the reflected port of the PPBSs.
In the basis {|H , |V }, the single-qubit rotations realized by HWP and QWP are R HW P (θ H ) = cos 2θ H sin 2θ H sin 2θ H − cos 2θ H , (S17) respectively, where θ H and θ Q are the angles between the optic axes of HWP and QWP and horizontal direction.

III. RELATIVE DETECTION EFFICIENCIES OF DETECTORS
After applying joint POVM on the single-photon qubit, the photons are detected by single-photon avalanche photodiodes (APDs) on the reflected ports of the two PPBSs, and both reflected and transmitted ports of PBS, in coincidence with the trigger photons. The relative detection efficiencies of the detectors D1-D4 are measured and used to correct the coincidence counts.
To measure the relative efficiencies of the different detectors D1, D2, D3 and D4, we make a reasonable assumption that the total number of photons is fixed. We tune the setting angles of WPs to change the photon distribution. That is, for each time after we tune the setting angles of WPs, the normalized number of photons at each output port with respect to the total number of photons is changed, which can be read at the corresponding detector. The readout photon counts at each detector equal to the number of photons at each output port multiplied by the relative efficiency of the corresponding detector. After we tune the setting angles of WPs for four times, we have four linear equations with four variables (relative efficiencies of detectors) and then solve them to obtain the relative efficiencies of the detectors D1, D2, D3, and D4.
In our experiment, the relative efficiencies of the detectors D1, D2, D3, and D4 are 1, 0.9499±0.0070, 0.9199±0.0069 and 0.9801 ± 0.0063 respectively calculated from the experimental data. Thus we can use the relative efficiencies of the detectors to correct the photon counts in the measurement stage. For example, after the correction the photon counts at D2 which are used to calculate the probability of the photons being measured at D2 should be the readout photon counts divided by the relative efficiency of D2 0.9499 ± 0.0070.

IV. JOINT MEASURABILITY OF POVMS.
We test the joint measurability of the constructed joint POVM G ij . For different qubit states, we analyze the experimental results of the joint POVM and test whether the marginal condition X j(i) G ij Xi,Xj = E i(j) X i(j) is satisfied. Without loss of generality, we choose the four states |H , |V , |R = (|H + i|V )/ √ 2, and |D = (|H + |V )/ √ 2 as states being measured. The results are shown in Table S2.
The measured probabilities Tr( Xj G ij Xi,Xj ρ) are in agreement with the theoretical predictions of the probabilities Tr(E i Xi ρ) of the POVM element E i Xi on the state ρ ∈ {|H H| , |V V | , |R R| , |D D|}, which proves the marginal condition is satisfied. Thus the constructed joint POVM G ij shows the joint measurability.