Load CddIF - package (insert your path to cddif.m if necessary)

<< cddif.m

2 Particles - 3 Measurement Directions

Functions used to calculate the quantum mechanical probabilities:

Prob[{x_}] := (1/2)
Prob[{x_, y_}] := Sin[((x - y ) /2)]^2/2

Truthtable for this configuration:

TruthTable[2, 3]

Calculation of the H-Representation in the case "2-particles, 3-measurement directions":

hrep = ConvToHRep[2, 3]

Representation of the inequalities in readable format:

GetInequFromHRep[hrep] // InequToRead

Display violated inequalities for a specific setting of the measurement directions:

GetViolInequalities[
        hrep, {{0, 2  π/3, 4  π/3}, {0, 2  π/3, 4  π/3}}, 
        Prob, All] // TableForm

Graphical representation of the violated inequalities:

plot = 
      PlotInequalities[
        hrep, {x, 0, π}, {{0, x, 4  π/3}, {0, x, 4  π/3}}, 
        Prob]

ContourPlot of all inequalities vioalted more than 0.1:

cont = 
      ContPlotInequalities[
        hrep, {x, 0, π}, {y, 0, π}, {{0, x, y}, {0, x, y}}, Prob, 
        All, 0.2]

Show some of the inequalities found above:

Show[GraphicsArray[Partition[cont, 3]]] // TableForm

Example to CddIF - Package, Author: Stefan Filipp, May 2001