# Numerical optimization of QRAC

I need to optimize a general version of 3$$\rightarrow$$1 QRAC where Bob is asked to retrieve one of the XOR combinations of the bits( If ABC is the given string to Alice, then Bob would be asked to retrieve one of the following functions, namely, A, B, C, A$$\oplus$$B, A$$\oplus$$c, B$$\oplus$$C, A$$\oplus$$B$$\oplus$$C). I know that build in optimization in Mathematica could be used for this kind of stuff, but I'm unsure how to proceed.

Kindly ask if you have any confusion regarding my problem. Thanks

More precisely, the probability of success is given by $$p_\text{succ} := \sum_{x,y,b} c_{xyb} \operatorname{tr} \rho_x E^b_y,$$ where $$\rho_x$$ will be the 8 different states you use to encode the bits, and $$\{E^0_y,E^1_y\}$$ the 7 different POVMs that should get the functions you want. The coefficients $$c_{xyb}$$ are then determined by the functions.
Define then $$A^b_y := \sum_{x} c_{xyb} \rho_x$$ and $$B_x:= \sum_{y,b} c_{xyb} E^b_y,$$ so that $$p_\text{succ} = \sum_{x} \operatorname{tr} \rho_x B_x = \sum_{yb} \operatorname{tr} A^b_y E^b_y.$$ Then a given choice of observables determines $$B_x$$, and you get the optimal states for them by maximizing $$\sum_{x} \operatorname{tr} \rho_x B_x$$, and a given choice of states determines $$A^b_y$$, and you get the optimal observables for them by maximizing $$\sum_{yb} \operatorname{tr} A^b_y E^b_y$$.