Qcheck version 1.2 , Linux + C++ version For faster calculus on the same pc, it's better to use C++ or C. Qcheck is a set of 4 small C++ scripts which try to emulate a real EPR-Bell experiment. * In the folder cpp/ -------------------- - qgenHid.cpp will generate the hidden and common random variables file - qRotat.cpp , to run for each arm will generate the random rotations file - qPolarize.cpp , to run for each arm will generate the the double channel polarizer output file - qStat.cpp will do some sums and averages and output a csv file suitable for excel-like softwares This set uses float angles , rotations and hidden variables. Results are averaged in integer angles and angles differences. There is no include file, the scripts are short and easy to check , edit, extend. The same files , prefixed by 'i' , use integer angles , rotations and hidden variables. They are faster and efficient. To use this set in bat.sh use the argument 'i' or 'V i' Installation ------------ Check the unix owner of the files. Hoping your system accepts C++ , Makefile and provides libraries math++ and m , you can do a make Else check the Makefile to suit your environment. A Windows version is coming soon. Running Commands ---------------- bat.sh will collect your arguments or use the default and call the 4 scripts to output files in the data folder. You can also run individual commands. * bat.sh syntax --------------- bash bat.sh argument value ... if an argument is not specified, the default value is used ex : bash bat.sh largarc 20 section 5 doors 12 All the default values may be overridden. You can also edit bat.sh to set you favorite parameters as default values. V "" # float version ; use V i for the integer version or only i num_pat 10000000 # number of initial pairs num_test 1 # index of the test if you need to keep history arm1 alice # nick names of the arms arm2 bob largarc 16 # ring size in degrees around the angle section 7 # number of sections in this ring doors 20 # number of doors of the potential R "4" # base of the restriction to 4 angles , ignore for all ** for a copy/paste/edit : integer : bash bat.sh V i num_pat 10000000 num_test 1 arm1 alice arm2 bob largarc 16 section 7 doors 20 float : bash bat.sh num_pat 10000000 num_test 1 arm1 alice arm2 bob largarc 16 section 7 doors 20 * qgenHid syntax ---------------- ./bin/qgenHid num_pat outfile num_pat , number of initial pairs outfile , name of the output file 5000000 hidden float random variables in data/hidden.test1 ./bin/qgenHid 5000000 data/hidden.test1 3500000 hidden integer random variables in data/hidden.test1 ./bin/iqgenHid 5000000 data/hidden.test1 * qRotat syntax --------------- This command must be run for Alice and then for Bob ./bin/qRotat num_pat outfile num_pat , number of initial pairs outfile , name of the output file 5000000 float random rotations in r.alice.test1 ./bin/qRotat 5000000 data/r.alice.test1 5000000 float random rotations in r.bob.test1 ./bin/qRotat 5000000 data/r.bob.test1 3500000 integer random rotations in r.bob.test1 ./bin/iqRotat 3500000 data/r.bob.test1 etc * qPolarize syntax ------------------ ./bin/qPolarize largarc section doors hiddenvarfile rotationfile outfile hiddenvarfile , the hidden file shared by the 2 polarizers rotationfile , the rotation file outfile , name of the output file largarc section doors as decribed above ./bin/qPolarize 16 5 12 data/hidden.test1 data/r.bob.test1 data/pol.bob.test1 * qStat syntax -------------- ./bin/qStat alice_polarizer bob_polarizer outfile alice_polarizer , the previous output of the Alice polarizer bob_polarizer , the previous output of the Bob polarizer outfile , name of the output file ./bin/qStat data/pol.alice.test1 data/pol.bob.test1 data/alice-bob.test.result