Computational appendix for the work on exploring local hidden variable models in the fully symmetric subspace of the triangle network.
Organization: data is provided in the data
directory, scripts are in the main directory, and plots that are generated by the scripts can be found in the plots
directory.
The data
folder includes
with:
where
The python script ineq_finding_best_w_plots.py
evaluates function f_w_minus_f_w_Elegant
, we can evaluate the inequality's main expression for any distribution pabc and any w, l (use verbose=True to see the average values and penalties used in the inequality). Together with the delta_w values, we can then check if the inequality is violated for a given distribution pabc and w,l.
The distribution found by LHV-Net with data/probs_LHVNet_high111.csv
, with probabilities given in lexicographic order (0,0,0; 0,0,1; ... 3,3,3). np.reshape can reshape it into a (4,4,4) tensor if necessary. The discretized, deterministic apporixmation of this distribution (with data/probs_high111.csv
, with a similar format.
The flags of the determistic, discretized approximation (flags discretized to a 100x100 grid), can be found in data/flags_high111.json
. An example python script for loading and plotting these flags, as well as analyzing the distribution, is provided (flag_plotter_high111.py
)
Data can be found in data/symmetric_subspace_maps/
, one csv for each of the four considered cardinalities (3,4,5,6). First three columns give the
An accompanying python script is provided, symmetric_subspace_map_plotter.py
, which loads and plots this data. Moreover for cardinality 4, it plots the Elegant distribution and its noisy verison as well, where sources are given a finite visibility (see https://www.nature.com/articles/s41534-020-00305-x for details).
The Mathematica notebook flag_check.nb
provides utilities to define flag models (local models), plot them, and compute the associated output distributions.
A sample of this notebook can be found in plots/flag_check_sample_plot.pdf
, showing the kind of local model that can be plotted with this notebook.
This notebook contains code that defines flags models as found in the paper, and compares the associated output distributions to the ones stated in the paper.
The python script plot_full_inner_approx.py
, to be ran as python3 plot_full_inner_approx.py
, generates the plot plots/full_inner_approx.png
.
The way the script works is by sampling uniformly over the analytical parameters that define the local region, and plotting the corresponding points.
The resulting sampled local points in the symmetric subspace are not themselves uniformly spaced out, though.
One can easily modify the script to choose a denser sampling, if desired.