State-independent contextuality in classical light

State-independent contextuality is a fundamental phenomenon in quantum mechanics, which has been demonstrated experimentally in different systems in recent years. Here we show that such contextuality can also be simulated in classical optical systems. Using path and polarization degrees of freedom of classical optics fields, we have constructed the classical trit (cetrit), here the term ‘cetrit’ is the classical counterpart of a qutrit in quantum systems. Furthermore, in classical optical systems we have simulated the violations of several Yu-Oh-like noncontextual inequalities in a state-independent manner by implementing the projection measurements. Our results not only provide new physical insights into the contextuality and also show the application prospects of the concepts developed recently in quantum information science to classical optical systems and optical information processes.

where the symbols behind a i in the parentheses are the expressions of unit vectors in various inequality forms 14,16,17 . For the 13 operators a a i i , their eigenvalues are 0 or 1. Here we make a transform, which is = − A I a a 2 i i i , where I is the identity matrix, so the observables A i have two eigenvalues +1 or −1. If the measurement outcomes of A i (or A j ) are the noncontextual value +1 or −1, the original Yu-Oh inequality 14 is obtained. It is listed in the middle column of the second row in Table 1, where Γ i,j are the coefficients. If the observables A i and A j are compatible (the corresponding vectors are orthogonal), the value of Γ i,j is 1. If A i and A j are not compatible, the value of Γ i,j is 0. The Yu-Oh inequality can be obtained by the exhaustive check of the value +1 or −1 of A i and A j or an elegant analytic demonstration 14 . But in the case of quantum mechanics, for any qutrit state, the Yu-Oh inequality is violated 14 1  13  1  4  1  13 1, 13 , 25 3 , where A i denotes the mean value of the operator A i and A A i j denotes the mean value of the produce A i A j of measurement outcome. In Yu-Oh's scenario, the inequality can be violated through 13 observables and 24 observable pairs 14 , so that the 12 additional observables corresponding to the 12 discarded vectors 15 , need not be involved. The inequality and its quantum violation are all listed in the second row of Table 1.
In ref. 16 , the original Yu-Oh inequality is improved and its coefficients are changed, and a new inequality obtained is listed in middle column of the third row in Table 1. Here the requirement for Γ m,n is the same as the requirement for Γ i,j , and its value corresponds to the compatible relation between A m and A n . In the case of quantum mechanics 16 , for any qutrit state the result 29 3 can be obtained, and the inequality shows the violation. In addition, Kleinmann et al. proposed two other optimal inequalities opt 2 and opt 3 17 corresponding to the original Yu-Oh inequality, but the coefficients before the observables are given in tabular form in original literature, which are not intuitive. After our sorting out, the two inequalities are showed in the middle columns of the fourth and fifth row in Table 1. However, their quantum violations are 52   3   and 83   3 , respectively 17 , these are also listed in the Table 1.
The above descriptions are about the original Yu-Oh inequality, its improved and optimal forms in quantum mechanics. Now we give the corresponding descriptions in classical optical systems. We rewrite the corresponding unit vectors ′ A i in the classical optical system as

Quantum violations
Original Yu-Oh form 14 1  13  1  4  1  13  1,  13 , 25 3 Improved form 16 k  k  m  n m m n  m n   1  2  1  4  1  4  5  10  ,  5  13  5  12 13 , 29 3 Optimal form opt 2 2  3   2  2  16   i  i  j  j  k  k  i  j  i j  i j  m  m   m  n m m n  m n  n  n   1  6  7  11  12  13  1  4  5  10  ,  5  6  11   7  10  13  ,  12  13  11  12 13   52  3 Optimal form opt 3 www.nature.com/scientificreports www.nature.com/scientificreports/ These unit vectors ′ a i are showed in Fig. 1, and the 13 corresponding operators are expressed as | ′ ′| a a )( i i . Here a slightly modified version of the familiar bra-ket notation of quantum mechanics is taken to express the vectors in classical optical fields. Similarly, the dichotomic observables are ′ = − | ′ ′| A I a a 2 )( i i i , and the eigenvalues of ′ A i are +1 or −1. As shown in Eq. (2), the expressions of the vectors in classical case are similar to the vectors in quantum case. For any cetrit state |χ), we can write where E 0 , E 1 and E 2 are the amplitudes of the classical optical fields, and | → e ) 0 , | → e ) 1 and | → e ) 2 are the cetrit bases corresponding to quantum bases 0 , 1 and 2 . In order to give the classical analogy of Yu-Oh original form, the corresponding operators in the left-hand side of Yu-Oh inequality are expressed as the multiples of identity matrix 14 j  1  13  1  4  1  13 1, 13 , 25 3 . When these operators corresponding to the observables project onto any cetrit states, the average values of the operators can be obtained, namely, j  1  13  1  4  1  13 1, 13  Similarly, for the improved form in ref. 16 and the optimal forms opt 2 and opt 3 in ref. 17 , the operators in the left-hand side of inequalities in Table 1 are also expressed as the multiples of the identity matrix, namely, I 29 3 , I 52 3 and I 83 3 . When the operators project onto any cetrit states, the inequalities are violated. That is ,   Experimental demonstration of state-independent contextuality for the original Yu-Oh inequality in classical optics systems. In this section, we describe the experimental demonstration of state-independent contextuality for the original Yu-Oh inequality. In order to test the state-independent contextuality in classical optical systems, the constructed experimental setup is shown in Fig. 2. It is divided into two stages: state preparation and measurement. In the state preparation stage, because it is state-independent contextuality, several different cetrit input states need to be prepared. The laser beam from He-Ne laser transmits through the polarizing beam splitter (PBS) (is not shown in Fig. 2) and the Glan lens, and then the horizontal polarization beam can be obtained. There the central wavelength of He-Ne laser is 633 nm. After the horizontal polarization beam transmits through the half wave plate 1 (HWP1) and a PBS1, it is divided into two beams. One of the beams transmits through a HWP2 and a PBS2, thereupon three beams of light are obtained. The horizontal polarization field in the first path is coded as | → e ) 0 , the vertical polarization field in the second path is coded as | → e ) 1 , and the horizontal polarization field in the third path is coded as | → e ) 2 . The polarization fields in the three paths are taken as the basis vectors to constitute the input cetrit states. With tuning the angles of HWP1 and HWP2, any composition of the optical fields for the three paths can be obtained, thus the desired input state can be prepared. Here seven different cetrit input states are prepared. The seven input states and the setting angles of HWP1 and HWP2 for the input state preparations are listed in the table (see Methods section: The setting angles of HWPs for the different input state preparations).
In the measurement stage, the projection measurement method is adopted. The input state projects onto the eigenstates of the observable, and the probabilities of eigenvalues can be gotten. When we sum the product of each eigenvalue and its probability, the average value of the observable can be calculated. This is where M is the average value of the observable M , |m i ) is the eigenstate of M with the eigenvalue m i , 2 is the probability of eigenvalue m i , |χ) is the input state. For the measurement of single observable, we only need to establish its eigenstates, and map the basis vectors of input cetrit state to the three eigenstates to obtain the probabilities of eigenvalues. For the measurement of two compatible observables ′ ′ A A i j , we use joint measurement method 21,49 , which is that the input state projects onto the mutual eigenstate of the two compatible observables.
Corresponding to the joint measurement of two compatible observables, the establishment of the mutual eigenstate of the observables is a key task. As shown in the measurement stage of Fig. 2, we use the HWPs and PBSs to construct the desirable eigenstates. Taking the measurement of the compatible observables ′ ′ A A 9 10 as an example, we appropriately arrange the experiment devices and set up the angles of HWP5 and HWP6, and the required mutual eigenstates can be established. With assuming that the input base vectors all are unit vectors, under the setting angles 22.5° for HWP5 and 0° for HWP6, the state vectors at output ports PD1, PD2 and PD3 are expressed as | → + | → e ) e ) 2 2 0 2 2 1 and | → e ) 2 , respectively. Thus, the state vector at the output port PD1 is the eigenstate of ′ = − A 1 9 and ′ = + A 1 10 ; the state vector at the output port PD2 corresponds to the eigenstate of ′ = + A 1 9 and ′ = − A 1 10 ; the state vector at the output port PD3 describe the eigenstate of ′ = + A 1 9 and ′ = + A 1 10 .
indicates that its eigenvalue is +1 (−1). These eigenstates meet the requirement of the above-mentioned joint measurement.
When the input state projects onto the eigenstates at the three output ports, namely the input base vectors are mapped to the polarization mode at the three output ports, we measure the optical intensities at these output ports. Then the optical intensities are normalized, namely, the optical intensity at each output port is divided by the total optical intensities, the probabilities of these eigenvalues can be obtained 47 . The probabilities at output port PD1, PD2 and PD3 are expressed as , and , respectively. Based on these probabilities, the average value of the correlation pair ′ ′ A A 9 10 can be calculated by . Meanwhile, the average value of ′ a 9 can also be obtained. At this moment, we do not need to consider ′ a 10 , and only ′ A 9 is considered. www.nature.com/scientificreports www.nature.com/scientificreports/ The probabilities of ′ A 9 at the output ports PD1, PD2 and PD3 are 9 and ′ = + P A ( 1 ) 9 , respectively. Thus, we can obtain . Here the optical intensities are detected by the photoelectric detectors (PDs).
For all other compatible observables ′ ′ A A i j , their mutual eigenstates can be obtained when the angles of the HWP5 and HWP6 are set up appropriately. Following the projection joint measurement, the probabilities can also be obtained by measuring the optical intensities at the output ports. Thereupon the average values of ′ ′ A A i j can be calculated by , and the average values of 13 single observables can be also obtained. The setting angles of HWP5 and HWP6 for all the observable measurements (13 observables and 24 compatible observable pairs) are listed in the table (see Methods section: The setting angles of HWPs for the observable measurements and the measurement methods for all observables).
In fact, the all 25 vectors (contain the dropped 12 vectors) and 48 orthogonalities shown in ref. 15 are involved in the experiment. For simplicity, we only give an example ′ a 9 and ′ a 10 (the measurement for ′ ′ A A 9 10 ), but all 16 triplets of mutually orthogonal vectors and all 25 vectors are given and are listed in the tables (see Methods section: The setting angles of HWPs for the observable measurements and the measurement methods for all observables). They can be obtained by appropriately setting the angles of HWP5 and HWP6. For instance, for the triplets , ′ ′ = a z ( ) (1, 0, 0) 11 11 , ′ = ′+ a y ( ) (0, 1, 1) }. For the additional 12 vectors, they act as the eigenstates of observables and observable pairs and also contribute to data used to form the statistics. In our experiment the optical intensity is the square of the vector product of the input state and the eigenstate 47 . Thus, after the projection measurements are implemented, the probabilities of eigenvalues are just the normalized optical intensities.  1 6 0.704 (7) 0.778 6 11 0.212 (1) 0.333 8 12 0.253 (12) 0.333 10 13 0.286 (11) 0.333  The experimental values and theoretical results of observables for the different input states), and the experimental contextuality results for the seven input states are summarized in Table 3. After these results for the different input states are obtained, we can compare them with the noncontextual results and theoretical maximum predictions.
It can be seen from Table 3 that the original Yu-Oh inequality shows the violations for seven different input states. The experimental average result for seven different input states is . ± . 8 258 0 079, which exceeds the noncontextual bound 8 by 3.2%, and the results show the favorable state-independent contextuality phenomenon. But they have some deviations from the theoretical maximum prediction 25 3 . These are caused by the experimental imperfections, such as the imperfect PBS and HWP. Despite existence of these imperfections, the results in classical optical experiment still show the large violations of the noncontextual inequality, which are agreement with the theoretical prediction.
Experimental demonstration of state-independent contextuality for the improved and optimal forms of Yu-Oh inequality in classical light systems. In this section, the experimental demonstration of state-independent contextuality for the improved and optimal forms of Yu-Oh inequality is given in classical light. Based on the experimental setup in Fig. 2, the violations of the improved and optimal forms of Yu-Oh inequality can  Table 4. Experimental results and the errors for the improved form 16 of the Yu-Oh inequality for the seven input states. The theoretical predictions for all input states are 29 3 , and the noncontextual results are 9.   www.nature.com/scientificreports www.nature.com/scientificreports/ also be testified in classical optical systems. Similarly, the experiment processes require the input states preparations and observable measurements. We can prepare the different input states by using the method in the state preparation stage. For the measurements of the single observable and compatible observable pairs, the methods are also the same to the measurements of observables in original Yu-Oh form, namely, establishing the eigenstates, implementing the projection measurements, measuring optical intensities to obtain the probabilities of eigenvalues, and calculating the average values of observables. However, in inequality Eq. (7) three compatible observables ′ ′ ′ A A A i j k are involved. Their mutual eigenstates can be also established, thus the joint probabilities

Input states Experimental value Errors
All observables are measured, thus the contextuality results in Eqs (5-7) can be obtained. For example, using the equation ′ ′ − ′ ′ and measured data shown in Table 2, we obtain the contextuality result . ± . 17 181 0 087 corresponding to the input state | → + | → + | → ( e ) e ) e )) 1 3 0 1 2 for the optimal form opt 2 . Of course, for the six other input states, we can also obtain the contextuality values by using the data shown in the tables (see Methods section: The experimental values and theoretical results of observables for the different input states).
Following the similar method, the contextuality results of the improved form, and the optimal forms opt 2 and opt 3 for the different input states can also be obtained. For these modified contextuality forms, the concrete calculations are  11 12 , ′ ′ A A 11 13 , ′ ′ A A 12 13 ( ′ a 11 ) ( ′ a 12 ) ( ′ a 13 ) 0°0°T able 8. The setting angles of HWP5 and 6 for the observable measurements. The observables (vectors) in parentheses are the observables in Yu-Oh's scenario, and the vectors in square brackets are the additional vectors in ref. 15 .
able 9. The exchanges of the input basis vectors for the measurement of the other correlation pairs. The meanings of parentheses and square brackets are same as www.nature.com/scientificreports www.nature.com/scientificreports/ not given, and here we only list the final experimental results. For the improved form of Yu-Oh inequality in ref. 16 , the experimental results of contextuality are showed in Table 4. The experimental average result for the seven input states is . ± . 9 622 0 067, which exceeds the noncontextual bounds 9 by 6.9%. The large noncontextual violations are revealed. For the optimal forms opt 2 and opt 3 in ref. 17 , the experimental results of contextuality are showed in Tables 5 and 6, respectively. The average values of the experiment results for opt 2 and opt 3 are .
± . 27 505 0 099, respectively, and they exceed the noncontextual bounds 16 by 7.8% and 25 by 10.0%. These results show the clear-cut noncontextual violations. This means that the state-independent contextualities for the different Yu-Oh forms are testified in classical optical systems. In addition, the violation degrees for the optimal forms are larger than those for the original form and the improved form, which shows that the optimal forms are tighter.

conclusions
In summary, we have simulated experimentally the state-independent contextuality in the classical optical systems. Based on the path and polarization degrees of freedom of classical optics fields, we have constructed the cetrit. Furthermore, the different input states have been established. Using projective measurement, the average values of the observables and observable correlation pairs have been obtained, and the results of contextuality for different Yu-Oh forms have been calculated. The violation of the original form of Yu-Oh inequality has not only  2 5 0.364 (14) 0.333 10 13 0.015 (2) 0 12 13 0.973 (1) 1  6 11 0.007 (22) 0 4 8 0.322 (2) 0.333 ′ ′ A A 11 13 0.969 (1) 1 1  13  1  4  1  13 1, 13 , www.nature.com/scientificreports www.nature.com/scientificreports/ been observed, the violations of the improved and optimal forms of Yu-Oh inequality for different input states have also been observed in the classical optical experiments. In our opinion, Maxwell's equations in the paraxial ray approximation describing classical optical field have a form similar to the Schrodinger equation describing quantum mechanics, and such a correspondence leads to the analogy between quantum mechanics and classical optics to be made. Thus, our results not only provide new physical insights into the contextuality, but also enrich the theory of classical optical coherence and show the application prospect of the concepts developed recently in quantum information science to classical optical systems and optical information processes.

Methods
The setting angles of HWPs for the different input state preparations. In order to test the inequality (4), namely the original Yu-Oh inequality, the operations about the state preparations and the observable measurements are implemented. The setting angles of HWPs and some details for the observable measurements are given as follow. Of course, these operations for the different forms of Yu-Oh inequality are the same basically. In the state preparation stage, the setting angles of HWP1 and HWP2 for the seven different input states are summarized in Table 7.  1 9 0.356 (5) 0.333 ′ ′ A A 6 11 −0.010 (11) 0 2 9 0.364 (10) 0.333 3 10 0.313 (11) 0.333 ′ ′ A A 10 13 11 12 0.961 (1) 1 4 10 0.349 (15) 0.333  1 6 0.408 (9) 0.5 ′ ′ A A 5 6 0 (25) 0 2 5 0.433 (14) 0.5 ′ ′ A A 7 8 0.032 (7) 0 8   | → e ) 6 3 2 . We can see that all 13 observables are contained in Table 8, but the 24 correlation pairs are not contained entirely. For the rest of correlation pairs, the additional experimental designs are needed. It is implemented by changing the first four columns in Table 8. The concrete methods are that the basis vectors are exchanged. Following this operation, | → e ) 0 and | → e ) 2 are exchanged, and a parts of correlation pairs can be obtained. Exchanging the basis vectors → e ) 1 and | → e ) 2 , the other parts of correlation pairs can also be obtained. As a result, all correlation pairs (24 pairs) can be gotten, and these exchange processes are showed in Table 9.
Because of the exchanges of the basis vectors for the input states, the sate vectors at the output port PD3 are also changed. For the exchange → ↔ → e ) e )