We first consider the 3-PORAC game and showcase the violation of the corresponding noncontextual inequality which in turn establishes preparation contextuality of ontic distribution associated with completely mixed state of a three-dimensional quantum system (qutrit).

Quantum protocol for 3-PORAC: In 3-PORAC task, the three parity partitions of Alice’s strings are \(\mathbb {P}_0=\{00,12,21\}\), \(\mathbb {P}_1=\{01,10,22\}\), and \(\mathbb {P}_2=\{02,20,11\}\). For playing this game in quantum theory, Alice encodes her string \(x_1x_2\) into some quantum states \(\rho _{x_1x_2}\) and sends the state to Bob. The parity obliviousness requirement demands that

$$\begin{aligned} \rho _{00}+\rho _{12}+\rho _{21}=\rho _{01}+\rho _{10}+\rho _{22}=\rho _{02}+\rho _{20}+\rho _{11}, \end{aligned}$$ (11)

If Alice encodes her strings into three orthogonal sets of states (each forming a basis) \(\mathcal {A}_0=\{|\psi _{00}\rangle ,|\psi _{12}\rangle ,|\psi _{21}\rangle \}\), \(\mathcal {A}_1=\{|\psi _{01}\rangle ,|\psi _{10}\rangle ,|\psi _{22}\rangle \}\), and \(\mathcal {A}_2=\{|\psi _{02}\rangle ,|\psi _{20}\rangle ,|\psi _{11}\rangle \}\) then the above requirement is always fulfilled.

Now consider the following pure state qutrit encoding. Denoting the computational basis of qutrit as \(\{|0\rangle ,|1\rangle ,|2\rangle \}\), any vector \(|\psi \rangle \in \mathbb {C}^3\) (\(d_\mathrm{q}=3\)) can be represented as \(|\psi \rangle =\alpha |0\rangle +\beta |1\rangle +\gamma |2\rangle \). Alice encodes her strings as follows:

$$\begin{aligned} |\psi _{21}\rangle= & {} |0\rangle , |\psi _{12}\rangle = |1\rangle , |\psi _{00}\rangle = |2\rangle ;\\ |\psi _{01}\rangle= & {} \frac{1}{3}(2|0\rangle +|1\rangle -2|2\rangle ),\\ |\psi _{10}\rangle= & {} \frac{1}{3}(|0\rangle +2|1\rangle +2|2\rangle ),\\ |\psi _{22}\rangle= & {} \frac{1}{3}(2|0\rangle -2|1\rangle +|2\rangle );\\ |\psi _{02}\rangle= & {} \frac{1}{3}(\omega ^2|0\rangle +2\omega |1\rangle +2|2\rangle ),\\ |\psi _{20}\rangle= & {} \frac{1}{3}(2\omega ^2|0\rangle +\omega |1\rangle -2|2\rangle ),\\ |\psi _{11}\rangle= & {} \frac{1}{3}(2\omega ^2|0\rangle -2\omega |1\rangle +|2\rangle ); \end{aligned}$$

where \(\omega \) is cube root of unity. These three sets of orthonormal vectors \(\mathcal {A}_0\), \(\mathcal {A}_1\), and \(\mathcal {A}_2\) have the following property; each vector from any of the set has similar overlap with vectors from the remaining two sets. More precisely, for example, \(|\psi _{21}\rangle \) from the set \(\mathcal {A}_0\) has similar overlaps (in absolute value) with vectors from set \(\mathcal {A}_1\) and the set \(\mathcal {A}_2\). With set \(\mathcal {A}_1\), the overlaps are 2 / 3 with \(|\psi _{01}\rangle \), \(|\psi _{22}\rangle \), and 1 / 3 with \(|\psi _{10}\rangle \), and with \(\mathcal {A}_2\), the overlaps are 1 / 3 with \(|\psi _{02}\rangle \), and 2 / 3 with \(|\psi _{20}\rangle \) and \(|\psi _{11}\rangle \). This feature has a resemblance to a set of mutually unbiased basis (MUB) [51, 52], except that in a MUB all overlaps are equal; therefore, we call the set of bases a mutually asymmetrically biased basis (MABB).

For decoding each of the alphabet, Bob performs a three-outcome quantum measurement and guesses the alphabet based on the measurement result. Given the above encoding, Bob performs measurement \(\sum _{i=0}^{2}|E_i \rangle \langle E_i|=\mathbf {I}_3\) to guess the first trit \(x_1\), where

$$\begin{aligned} |E_0\rangle= & {} \frac{1}{\sqrt{7}}\left( |\psi _{00}\rangle -|\psi _{01}\rangle +|\psi _{02}\rangle \right) ,\\ |E_1\rangle= & {} \frac{1}{\sqrt{7}}\left( |\psi _{12}\rangle +|\psi _{10}\rangle +e^{\frac{\pi \mathbf {i}}{3}}|\psi _{11}\rangle \right) ,\\ |E_2\rangle= & {} \frac{1}{\sqrt{7}}\left( |\psi _{21}\rangle +|\psi _{22}\rangle +e^{\frac{2\pi \mathbf {i}}{3}}|\psi _{20}\rangle \right) ; \end{aligned}$$

and for the second trit \(x_2\), he performs measurement \(\sum _{i=0}^{2}|F_j \rangle \langle F_j|=\mathbf {I}_3\), where

$$\begin{aligned} |F_0\rangle= & {} \frac{1}{\sqrt{7}}\left( |\psi _{00}\rangle +|\psi _{10}\rangle -|\psi _{20}\rangle \right) ,\\ |F_1\rangle= & {} \frac{1}{\sqrt{7}}\left( |\psi _{21}\rangle +|\psi _{01}\rangle +e^{\frac{2\pi \mathbf {i}}{3}}|\psi _{11}\rangle \right) ,\\ |F_2\rangle= & {} \frac{1}{\sqrt{7}}\left( -|\psi _{12}\rangle +|\psi _{22}\rangle +e^{\frac{\pi \mathbf {i}}{3}}|\psi _{02}\rangle \right) . \end{aligned}$$

For this quantum protocol, it turns out that \(|\langle E_i|\psi _{ij}\rangle |^2=|\langle F_j|\psi _{ij}\rangle |^2=7/9\) for \(i,j=0,1,2\). Therefore, the average success probability is \(P=1/18\sum _{i,j=0,1,2}(|\langle E_i|\psi _{ij}\rangle |^2+|\langle F_j|\psi _{ij}\rangle |^2)=7/9\) which is strictly greater than the corresponding classical (noncontextual) bound, i.e., \(1/2(1+1/3)=2/3\).

In order to establish that in general, the inequalities presented in this work are nontrivial and provide for significant quantum violations, we used the following numerical methods to compute quantum violation and find the optimal protocol.

Nonlinear gradient descent

We find quantum protocols for \(d=4\) and \(d=5\) employing \(d_\mathrm{q}=4\) and \(d_\mathrm{q}=5\) dimensional quantum systems for communication, respectively, which violate the corresponding noncontextual bounds (see Appendix-A, B). These results were obtained numerically by optimizing over all possible pure state encoding, respectively, in \(\mathbb {C}^4\) (\(d_\mathrm{q}=4\)) and \(\mathbb {C}^5\) (\(d_\mathrm{q}=5\)) and all possible projective measurements for decoding. For \(d=4\) and \(d=5\), the obtained quantum protocol gives average success probabilities 0.7405 and 0.7177, respectively, which clearly beat the respective optimal classical (as well as noncontextual) bounds of 0.625 and 0.6. Specifically, for \(d=3,4,5\), we parameterized pure states as preparations for Alice \(\rho _{x_1x_2}=|\psi _{x_1x_2} \rangle \langle \psi _{x_1x_2}|\) (where \(|\psi _{x_1x_2}\rangle \in \mathbb {C}^d\)) that sum up to a completely mixed state \(\frac{\mathbb {I}}{d}\) for each distinct value of the parity. For Bob, we parameterized projective measurements \(|E_i \rangle \langle E_i|\) and \(|F_i \rangle \langle F_i\) (where \(|E_i \rangle ,|F_i \rangle \in \mathbb {C}^d\)). Based on these parameterizations, we used a straightforward gradient descent algorithm (a first-order iterative optimization algorithm for finding the maximum of a function) to find the optimal quantum protocol. Apart from the possibility of ending up in a local maximum, this method is exceedingly inefficient. In particular, the size of the Hilbert space we could handle was limited up to dimension 8.

See-saw iterative algorithm

We use see-saw SDP technique to obtain lower bounds on \(d=3,\ldots ,10\), demonstrating violation of the associated preparation noncontextual inequalities. The see-saw SDP iteration is an efficient algorithm for maximizing an affine functional with respect to Hermitian operators. The technique was first introduced to quantum information in [41] to find the maximal quantum violation of Bell inequalities. A variant of the see-saw SDP algorithm for Bell inequalities with multiple outcomes has also been described in [42,43,44]. The optimization problem relevant to this work consists of maximizing the success probability of the PORAC task with respect to \(d'\) dimensional states \(\rho _{x_0,x_1}\) and \(d'\) dimensional d outcome POVMs \(\{M_b^y\}\):

Notice that the objective function comprises of a product of semi-definite matrices. This keeps us from deploying this optimization problem as a SDP directly. This necessitates the see-saw iterative algorithm. Heuristically, the see-saw algorithm consists of fixing one of the two semi-definite variables and optimizing the other iteratively. In the first step of the algorithm, we choose and fix appropriate random matrices for Bob’s POVMs (bold) and find optimum preparations for Alice which maximize the objective function:

Notice as now the objective function is linear on the semi-definite variables (Alice’s preparations), this problem can easily be cast as a SDP. In the second step, we choose and fix the optimal preparations found in the previous step as Alice’s preparations (bold) for this round and optimize Bob’s POVM so as to maximize the objective function:

Again as the objective function is a linear function of the semi-definite variables (Bob’s POVM), this problem can easily be cast as a SDP. Next, we fix Bob’s POVM for the first step of the next iteration to be the optimal Bob’s POVM found in the last step of the previous iteration. The algorithm then proceeds to repeat these steps for several iterations until the success probability reaches convergence. What is not guaranteed is that the algorithm will converge onto a global maximum. In order to better the chances for finding a global maximum, the entire procedure is repeated several times with different initial values. The results and the increasing trend of the ratio of quantum bias to classical bias are presented in Table 1 and Fig. 1, respectively.

State-of-the-art SDP hierarchy for upper bounds

Furthermore, we employ state-of-the-art NPA-hierarchy like SDP technique to obtain upper bounds on the quantum success probability of \(d=3,\ldots ,10\)-level PORAC task. NPA- hierarchy [45] of Bell correlations and NV-hierarchy for finite dimensional correlations [46] use semi-definiteness of cleverly constructed series moment matrices to bound quantum correlations. Our method is an amalgamation of the methods presented in [45] and [46]. The resemblance of our method to the one in [45] is based on the fact that just like Bell inequalities, quantum bound for d-level PORAC is independent of the dimension of the physical (communicated) system. Our method relies on semi-definiteness of several distinct moment matrices, and in this sense, it resembles the method in [46]. The method, its detailed description, and the nuances thereof will be detailed in an upcoming article [53]. While \(\mathrm{level}=1\) of this hierarchy is relatively computationally inexpensive, our machines can only perform \(\mathrm{level}=2\) of this hierarchy for \(d=3,4\). The results and the almost linearly increasing trend of the ratio of quantum bias to classical bias are presented in Table 1 and Fig. 1, respectively.

Table 1 List of bounds on the quantum success probability of \(d=2,\ldots ,10\) -PORAC Full size table

Fig. 1 Trend of success probability in d-PORAC tasks a achievable while using classical or equivalently preparation noncontextual resources (these form our noncontextual inequalities), b lower bounds on quantum success probabilities obtained via see-saw SDP (these serve as demonstration of violation of our noncontextual inequalities), and c upper bounds on quantum success probabilities obtained via NPA-hierarchy like SDP techniques [53] (these bounds are independent of the dimension \(d_\mathrm{q}\) of the system) Full size image