Read Me:
==== ==

			Programs for
			======== ===
			
	Programmed discrimination of multiple sets of qbits with added 
	========== ============== == ======== ==== == ===== ==== =====
			classical information
			========= ===========


				Introduction
				============

This is not a commercial product, and we do not offer a "Wizard" to set the 
system up for you. To use these programs effectively, you should have some 
familiarity with

a)	A Text editor such as EMACS or TextPad. Do not use Microsoft Word, 
although Microsoft WordPad would serve.

b)	Using a command line processor, which would be an emulated terminal
under UNIX and its descendants LINUX or UBUNTU, or the program "cmd.exe" 
under Windows 7. On a PC running under Windows you will generally find this
program at c:\Windows\System32\cmd.exe.

c)      Compiling C programs with gcc (or another C/C++ compiler) and 
running them. We assume that the compiler has been downloaded to your 
computer.

To summarise, you should at least know how to enter, compile and run the 
traditional "Hello World!" program in C.  If necessary, you should ask a 
colleague for help.


The programs have been tested on an IBM PC under Windows 7, using both 
the GNU and Borland compilers, and under UBUNTU using GNU. 

The work reported in this paper was done with six C programs, whose functions 
are evident from their names:

	fixedoverlapbest.c
	fixedoverlapunam.c
	greatcirclebest.c
	greatcircleunam.c
	polarcapbest.c
	polarcapunam.c

The programs are provided in source form, so that they can be used on 
a variety of different computers and operating systems. 

				Setup
				=====

1. Make a new directory (suggested name: "Discrimination"). Under UNIX 
and its variants LINUX and UBUNTU, the directory should be in your home 
directory. For Windows it can be in any convenient place,

2. You have already unzipped the file you have down-loaded (otherwise you 
would not be reading this).  Copy all the files into the new directory.

3  Open the command line processor or a simulated terminal 
(if you have not already done so), 

4.  Move to the new directory, using a 'cd' command.

5.  To compile the first program, enter

	gcc fixedoverlapbest.c -lm -o fixedoverlapbest.exe
	
This assumes that the GNU C/C++ compiler has been loaded. If necessary
you can use another C/C++ compiler such as the one issued by Borland. In
this case the command line would read

	bcc32 fixedoverlapbest.c

6.  Do the same for the other programs (now or later), using their
names instead of "fixedoverlapbest.c".

			Executing the programs:
			========= === =========
			
To run the first program, enter the command line

   fixedoverlapbest.exe  a  b  c
   
where a,b and c stand for small whole numbers:  For example

   fixedoverlapbest.exe  3 2 1

Here a is the number of program qbits on the "left";
     b is the number of data qbits;
     c is the number of data qbits on the 'right'.
     
The program displays a message like 

    Output will be sent to:
         fixedoverlapbest(3,2,1).txt
         
This file will be in the same directory as the programs.

As the program runs, it displays a * from time to time to reassure 
you of progress.

When the program ends, it dislays a message like

	Elapsed time = 314 seconds

The other programs in suite are run in the same way,
but using their names instead of "fixedoverlapbest" .

				Timing
				======

The time taken to analyse any configuration increases more than
exponentially with the total number of qbits. It also varies
with the number of rows in your table, and doubles when the
input parameters are not symmetrical, so that (1,2,3) takes at
least twice as long as (2,2,2).

The programs for unambiguous discrimination take much longer
than the ones for best discrimination.

We strongly suggest that you start with small configurations
(such as (1,1,1)) and work up. with the total number of qbits.
	

				Modification
				============

You can make various changes by editing the configuration.c document 
in your directory.

Formats
=======

The default format of the output is a table like this:

Fixed Overlap Optimum {1,1,3}
Beta      pi/6    pi/3    pi/2   2pi/3   5pi/6    pi    

Eta
0.0000   0.00000 0.00000 0.00000 0.00000 0.00000 0.00000
0.2500   0.23995 0.21250 0.17500 0.13750 0.11005 0.10000
0.5000   0.47354 0.40126 0.30253 0.20379 0.13151 0.10505
0.7500   0.23719 0.20219 0.15439 0.10658 0.07158 0.05877
1.0000   0.00000 0.00000 0.00000 0.00000 0.00000 0.00000

This can be loaded into a spreadsheet for further analysis and drawing graphs

You can alter the number of decimal places in the table by
changing the line
   
      #define DECIMALS   5
      
appropriately.  For example,  

      #define DECIMALS  8
      
will generate tables with 8 decimal places.      

If you edit the source text by inserting the line 

	#define LATEX
	
the output will be in a format suitable for inclusion in a 
Latex document:

\begin{table}[h]
  \begin{center}    \begin {tabular}{|l|cccccc|}\hline
$\beta$     & $\pi$/6 & $\pi$/3 & $\pi$/2 &2$\pi$/3 &5$\pi$/6 & $\pi$  \\
\hline
$\eta$&&&&&&\\
0.00   &0.000 &0.000 &0.000 &0.000 &0.000 &0.000\\
0.25   &0.240 &0.212 &0.175 &0.137 &0.110 &0.100\\
0.50   &0.474 &0.401 &0.303 &0.204 &0.132 &0.105\\
0.75   &0.237 &0.202 &0.154 &0.107 &0.072 &0.059\\
1.00   &0.000 &0.000 &0.000 &0.000 &0.000 &0.000\\
\hline
\end{tabular}
\caption{Fixed Overlap Optimum \{1,1,3\}}
\end{center} 
\end{table} 

The number of decimal places in the table is controlled by the line

	#define LATEXDECIMALS 3
 
Changing the interval between values of eta
======== === ======== ======= ====== == ===

Suppose you want the interval between successive values of eta to be 0.05. 
Find the line which says,

	#define ETAINTERVAL 0.25

and change it to

	#define ETAINTERVAL 0.05

It is important that the interval be a sub-multiple of 1

Changing the interval between values of beta in the two 
======== === ======== ======= ====== == ==== == === === 
fixed-overlap programs
===== ======= ========

Suppose you want the interval between successive values of beta to be PI/8. 
Find the line which says,

	#define BETAINTERVAL (PI/6)

and change it to

	#define BETAINTERVAL (PI/8)

It is important that the interval be a sub-multiple of PI. The round brackets 
are essential.

Changing the interval between values of theta in the two 
======== === ======== ======= ====== == ===== == === ===
polar caps programs
===== ==== ========
 
Suppose you want the interval between successive values of theta to be PI/4.
Find the line which says,

	#define THETAINTERVAL (PI/6)

and change it to

	#define THETAINTERVAL (PI/4)

It is important that the interval be a sub-multiple of PI. The round brackets 
are essential.

				Important
				=========

When you have changed the configuration file you MUST recompile the programs!

				Help
				====

If you have difficulties which cannot be solved, even with expert help, 
send an email to Andrew at andrew@crm.scotnet.co.uk


