Download qCheck

Download the EPR-Bell experiment software qCheck version 1.3

download version 1.3 in tar.gz format 

 

download version 1.3 in zip format

Browse the distibution tree

README file

Qcheck version 1.3 , Linux and Windows VC versions

Qcheck is 4 + 4 small C++ scripts , using floats or integers , which try to emulate a real EPR-Bell experiment.

For Windows, qCheck solution is located in the vs folder. There are 8 projects, 4 for integers and 4 for doubles. To generate the commands, open the solution in Visual Studio Express, accept the Visual version conversion warnings if any and generate the whole solution. New commands will go in the bin folder. Outside the dos folder separator and the dot bat name, all scripts behave exactly the same and use the same syntax, even the shell one.

DOS accept a maximum of 9 arguments. If more is needed, try to change de default value in the script.

For Linux, the scripts have been copied in /cpp. Go in console mode in the application folder and call the scripts bat.sh or else batdos.bat to produce results files in the data folder.

There are small differences between the Windows and the Linux results, mainly because their variables types conversion implementation.

 

* 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 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.

* In the folder cpp-int/

The same files but this set uses integer angles , rotations and hidden variables.

After compilation, the integer command names are prefixed by ‘i’

 

Installation

Check the unix owner of the files.

Hoping your system has a gnu C++ compiler , you can do a

># make all

Else check the Makefile to suit your environment. There is no need for a particular library.

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 comma

All the default values may be overridden.
You can also edit bat.sh to set your 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
comma “comma” # use comma as decimal separator in the excel-like csv
# to reverse the comma default , use nocomma alone
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