----- Package contents ---- This is the source code required to carry out iterative inverse design of structures that optimise coherence in an atomic \Lambda system, as detailed in the accompanying paper. It contains three files; Readme.txt Module_GCalc.py Calc_Iterative.py and one directory called Example_Output. ----- System requirements ---- The system requirements are a working installation of Python 3, as well as the package Meep (https://meep.readthedocs.io/en/latest/Installation/) and jobib (https://joblib.readthedocs.io/en/latest/). The simulations in the accompanying paper were carried out using: Python 3.7.6 Meep 1.12.0 joblib 0.14.1 No guarantee is made that the scripts will run using different versions to these, in particular they will not run under Python 2. The scripts have been tested on Centos6 and MacOS 10.15.4. ----- Instructions ---- The functionality of each script is explained in detail through numerous comments in the scripts themselves. Briefly, the two scripts are: - Module_GCalc.py: This carries out the actual calculation of Green's tensors. A typical end-user will not need to open or modify this. - Calc_Iterative.py: This is where the user specifies the parameters of the simulation, and is the script which is to be run. ---- Interpretation of output ---- Running Calc_Iterative.py with the default parameters will create a folder called 'XY_Res4_eps3_plate0z1_bpt1_bpeps999' and fill it with identical output to that given in the Example_Output folder. This takes around thirty seconds on a 2.6Ghz 6-core Intel Core i7 machine running MacOS 10.15.4. Four files will be created, - coherenceList.txt - A list of the absolute value of the atomic coherence \rho_12 at each iteration. - coherenceProgression.pdf - A simple plot of the values found in coherenceList.txt, updated at each iteration - optPointList.txt - The spatial positions at which the algorithm has placed cubic blocks of side length blockSize and permittivity eps. Each row represents a point in space (x,y,z) - geom.pdf - A simple visualisation of the geometry found so far, found by plotting the first two columns of optPointList.txt ---- Reproduction of results in accompanying paper ---- The simulation with the highest degree of coherence in the accompanying manuscript ('Perpendicular rotation, with backplate', reaching absolute coherence of 0.16) can be reproduced by taking the following parameters: simbox = [[-3,3],[-3,3],[-3,3]] w = np.pi dpml = 2 pad = 1 maxSteps = 350 exclusionRadius = 1 direction = 'YZ' resolution = 6 eps = 3 backPlateThickness = 1 backPlateEps = 999 optPlanePosition = 0 zSource = 0.596033 Using four cores of the University of Glasgow's High Performance Compute Cluster, this takes around twelve hours. ---- Miscellaneous usage notes ---- - The only supported values for the rotation parameter ('direction') are the strings 'XY' or 'YZ'. Use of any other input will cause an error. - If the script Calc_Iterative.py is finds that the folder it would like to create already exists, it takes the optimisation output in that folder as the input for a new run. This allows simulations to be interrupted and resumed. - The coherence will always be identical for the first two steps in the iteration, this is useful for debugging and is explained in detail in Calc_iterative.py