# Data underlying the CSE Research Project: Using the CHSH game quantum network application as a bench-marking tool

# Contact information:
author: Thomas Maliappis
email: t.maliappis@student.tudelft.nl

# Introductory information
This dataset was generated using SquidASM to simulate 
an almost perfect quantum network to run the CHSH application. 
Specifically, for a single experiment,
a simulated quantum network is utilized, wherein all properties are set
to their ideal values, except for a single property which is considered
as the independent variable of the experiment.


# Description of Raw Data collected
For a single CHSH game, the values of all input bits (bit x and bit y) and 
output bits (bit a and bit b)
are recorded, along with the total simulated time in nanoseconds.
However, a single game alone is insufficient. Instead, multiple 
games are conducted across a range of values for the independent
variable. Specifically, for each CHSH game value, five sets (batches) of
games are simulated, with each set consisting of 1600 games. 
Each set includes an equal number of games
covering all possible combinations of input values 
for bit x and bit y. The range of values for the
independent variable spans from fifteen to twenty equally spaced values.
The data is stored in a .xlsx file for processing and is sorted in 
ascending order based on the value of the independent variable and 
the batch number as primary keys.

# Description of Desired result
To determine if the CHSH game can be used as a benchmarking tool, 
it is essential to define metrics for assessing the networks performance. 
Consequently, the following performance metrics have been
established: the success probability of running the game, the number of 
successes per second, and the input-based success probability. After each 
experiment these performance metrics are calculated
for each batch and averaged, resulting in a plot for each metric


# File naming convention:
Each files name is the same as the name of the experiment which
is formed by concatenating the stack type used
(G for generic qDevice, NV for nv qdevices) and the link type 
(D for depolarized link, H for heralded link) and then the
name of the property that is used as the independent variable.
All property names come from SquidASM's documentation.

Example: GD\_init\_time = Generic Qdeivce stack with depolarized link and
the independant variable is the init\_time property.



# Data specific information:
Each file contains 5 worksheets that use a row-by-row storage
arrangement. The first row always contains a header. Each worksheet will
be explained column by column if possible

## Settings worksheet: contains settings used in the simulation
COL  NAME                          Description
A    num\_runs               The int number of runs that single input combination has in a batch
B    batches                 The int number of batches
C    processes_start_point   An int showing that the starting point of a segment that was
                              simulated in it's own dedicated process.

## Raw Data worksheet: each row is a single simulation
COL  NAME       Description
A    x          The value of the x bit used
B    y          The value of the y bit used
C    a          The value of the a bit used
D    b          The value of the b bit used
E    success    1 if the success equation is satisfied else 0 (x*y=a xor b)
F    time(ns)   total simulated time in nanoseconds
G    batch      The id of the batch from 0 to 4
H    x_var      The value of the independent variable

## Batch Data worksheet: data from the rawData worksheet sum or averaged per batch
The primary is key is the combinatino fo the batch and x_var values.
COL  NAME       Description
A    x_var      The value of the independent variable 
B    batch      The id of the batch from 0 to 4
C    avg_succ   The average number of successes in this batch
D    time(ns)   The total time taken to complete this batch
E    total_succ The total number of successes in this batch
F    succ/sec   The division of the cells in the same row total_succ/time(ns)  
G    00_suc     The average number of successes in this batch for inputs 00 where the first bit is x and the second is y
H    01_suc     ... same for inputs 01
I    10_suc     ... same for inputs 10
J    11_suc     .... smae for inptus 11


## Value Data worksheet: data from the batchData workshhet sum or averaged per independant variable value
COL  NAME            Description
A    x_var           The value of the independent variable used as primary key
B    avg_success     Avg success probability of the x_var value
C    sem_succ        Standard error of measurement of the avg success probability
D    avg_suc/seuc    Avg success per second per x_var value
E    sem_suc/sec     Standard error of measurment of the successes per second per x_var_value
F    00_success      Avg success probability for input combination 00 where x is first then y
G    01_success      ... same but for 01
H    10_success      ... same but for 10
I    11_success      ... same but for 11
J    00_sem          Standard error of measurment of the input combo 00 where x is the first bit then the y bit
K    01_sem          ... same but for input 01
L    10_sem          ... same but for input 10
M    11_sem           ... same but for input 11


## Chart Data worksheet
Contains the three performance metric plots based on
the data calculated in the value data worksheet. 
Specifically, the three plots are the success probability,
the successes per second and the success probability based on different inputs
vs the values of the independent variable. All plots contain error bar
lines for the standard measurement error