The Low-Latency Reconfiguration System (LLRS) is a closed-loop feedback control system that arranges and reconfigures atoms within an array of laser traps.
The LLRS contains five submodules:
graph TD
A[Image Acquisition] -->|image of the trap array| B[Image Processing]
B -->|binary vector of atom presences in each trap| C[Problem Solving]
C -->|list of ordered and batched moves to be performed| D[Waveform Synthesis]
D -->|waveforms representing the atom movements| E[Waveform Streaming]
E -->| new reconfiguration of atoms in the trap trap array| A
Each of these submodules is defined in modules/llrs-lib/modules
.
LLRS
├─ .gitignore
├─ README.md
├─ LICENSE
├─ resources
├─ configs
│ ├─ llrs
│ ├─ awg
│ ├─ emccd
│ ├─ fgc
│ ├─ waveforms
│ ├─ waveform-power-safety
│ ├─ runtime-benchmarking
│ └─ operational-benchmarking
├─ tools
│ ├─ setup-emccd.ipynb
│ ├─ generate-fake-psf.py
│ ├─ psf-translator.py
│ ├─ algorithm-animation-generator.ipynb
│ └─ benchmarks
│ ├─ operational-benchmarking.ipynb
│ ├─ runtime-benchmarking.ipynb
│ ├─ image-acquisition-characterization.ipynb
│ ├─ image-processing-characterization.ipynb
│ └─ wfm-streaming-characterization.ipynb
└─ modules
├─ awg [External Dependency]
├─ fgc [External Dependency]
├─ llrs-lib
│ ├─ image-acquisition
│ ├─ image-processing
│ ├─ reconfiguration
│ ├─ solver
│ ├─ waveform-synthesis
│ ├─ waveform-streaming
│ ├─ setup
│ ├─ collector
│ ├─ utility
│ └─ jsonwrapper
├─ llcs
├─ llrs-exe
├─ operational-benchmarking
├─ runtime-benchmarking
├─ waveform-loader
├─ hdf5-wrapper
├─ movement-generator
└─ zmq-server
The LLRS requires the PC with the following hardware specifications to operate:
- x86 64-bit CPU
- Nvidia GPU with CUDA support
- Unix-based OS (Developed and tested on Ubuntu 18.04 LTS)
-
Frame Grabber Card (FGC): The Frame Grabber Card must be installed on a PCIe slot and connected to the EMCCD camera via a Camera Link cable. Additionally, the camera must be connected via a trigger (MMCX) cable to the AWG trigger port (multipurpose IO port) for image triggering.
-
Arbitrary Waveform Generator (AWG): The Arbitrary Waveform Generator card must be installed on a PCIe slot and its analog output channels be connected to the respective AODs via a SMA cable.
erDiagram
"CPU-based motherboard" }|..|{ GPU : PCIe
"CPU-based motherboard" }|..|{ FGC : PCIe
"CPU-based motherboard" }|..|{ AWG : PCIe
FGC ||--|{ EMCCD : "Camera Link"
EMCCD ||--|{ AWG : "MMCX Cable"
AODs ||--|{ AWG : "SMA Cable"
Before usage, the following software must be installed and compiled to have a LLRS executable:
-
GCC | The C++ compiler that is used to compile LLRS. Pre-installed on most GNU/Linux distro. | Installation Guide
-
NVCC CUDA Compiler | The Cuda compiler that is used to compile the LLRS. Requires a CUDA-enabled Nvidia GPU.| Installation Guide
-
Nvidia CUDA Toolkit | The CUDA library is used only for the GPU features of the LLRS. | Installation Guide
-
Meson Build System | The build system used to compile the project. | Installation Guide
-
Python3 (Version 3.8 or newer) | Only required for benchmarking. | Installation Guide
-
Jupyter Notebook | Only required for benchmarking. | Installation Guide
-
FGC: The LLRS uses ActiveSilicon FireBird Stick FGC and hence requires the installation of the ActiveSilicon SDK. It can be obtained from ActiveSilicon, and must be then installed on the system. LLRS' build system will look for the SDK in the default installation path at
/usr/local/activesilicon
, but this can be changed in the corresponding Meson file. -
AWG: Similar to the FGC, the LLRS uses Spectrum Instrumentation's AWG cards and hence requires the installation of the Spectrum Instrumentation driver and SDKs. They can be obtained from Spectrum Instrumentation, and must be then installed on the system. LLRS' build system will look for the Spectrum library in the default installation paths.
-
EMCCD: Although the LLRS doesn't directly interact with the EMCCD, the EMCCD is required to be set up and waiting for hardware triggers before running the LLRS. The exact drivers and function calls that are necessary for this depends on your camera's make and model. An example for such a procedure using the Andor's Python SDKs for the Andor iXon Ultra 888 can be found in the
tools/setup-emccd.ipynb
notebook.
To compile the LLRS, follow these steps:
- Clone the repo on your local machine and navigate to the LLRS directory.
- In the terminal, execute the command
meson setup bin
in the LLRS directory. - Navigate into the bin directory using
cd bin
. - Execute
meson compile
to compile the LLRS. - The compiled libraries and executables can be found under the
bin/modules
directory.
LLRS requires multiple experiment-specific configurations and resources in order to run:
The LLRS utilizes the images acquired by the frame grabber card to determine the position of atoms and reconfigure them. To process these images the LLRS requires the user to define the position of each trap and the expected fluoresence from atoms to detect the vacant and occupied traps.
LLRS utilizes a set of point-spread functions corresponding to each trap and a universal threshold to determine if the traps are occupied by atoms or are vacant. Put simply, for each trap a set of pixels and their associated weights are specified. The image processing algorithm calculates the weighted average of each of these pixels and compares them against the threshold. Averages above this threshold correspond to an occupied trap, and averages below the threshold correspond to a vacant trap.
Example: Suppose for trap
Here we describe the format in which the threshold and the point spread functions are stored.
configs/llrs/default.yml:
problem_definition:
experiment_params:
detection_threshold: 580
psf: psf.bin # name of the file under resources/psf/
resources/psf/psf.bin: This is a binary file. A list of numbers are stored on this file in the following order: trap index 1 (type int), pixel index 1 (type int), weight 1 (type double), trap index 2 (type int), pixel index 2 (type int), weight 2 (type double), ... . Note that this is a binary file, meaning that all the numbers are written consecutively with no delimiters.
Example:
0 4098 0.25 # in order: trap index, pixel index, weight
0 4099 0.50
0 4100 0.25
1 4110 0.25
1 4111 0.5
1 4112 0.2
1 4113 0.05
This binary file corresponds to two traps. The first trap (index 0) has three pixels with indices 4098, 4099, and 4100. The corresponding weights are
The LLRS utilizes optical tweezers generated by one or a pair of acousto-optical deflectors (i.e. dynamic traps) to extract, move, and implant atoms in an existing array of optical tweezers (i.e. static traps). To use the LLRS in your system, the user needs to specify the waveforms streamed to the acousto-optical deflectors to generate the traps.
When the dynamic traps are generated and left in an idle state (not moving), the waveform streamed by the acousto-optical deflectors (AODs) are as follows:
Under the directories resources/coef/primary and resources/coef/secondary (for the first and second AODs respectively) save the confiurations related to the idle waveforms in a .csv file of your choosing in the following format. Afterwards, change the llrs config file under configs/llrs to use the file you defined under resources/coef.
Example:
configs/llrs/default.yml:
problem_definition:
experiment_params:
coef_x: coef_x.yml
coef_y: coef_y.yml
resources/coef/primary/coef_x.csv:
alpha,nu,phi
<alpha_0>,<nu_0>,<phi_0>
<alpha_1>,<nu_1>,<phi_1>
...
<alpha_N>,<nu_N>,<phi_N>
resources/coef/primary/coef_y.csv:
alpha,nu,phi
<alpha_0>,<nu_0>,<phi_0>
<alpha_1>,<nu_1>,<phi_1>
...
<alpha_N>,<nu_N>,<phi_M>
The waveforms corresponding to the movement along the traps can be configured at configs/waveforms/config.yml
. A more detailed explanation of the configuration parameters can be found in the Waveform Synthesis' README file.
The AWG configuration can be found at configs/awg/awg.yml
. This file contains the configuration for the AWG-related parameters, e.g., the nominal peak-to-peak voltage, the sampling rate, and the number of segments.
There is a need for predicting the power streamed by the AWG (and potentially amplified by an electronic amplifier) before supplying it to the target device, e.g. AOMs or AODs. To perform this calculation and to ensure the safety of the device, the following information must be provided. This information can be found by 'calibrating' the AWG.
To do this, follow the following procedure.
-
Keep track of the nominal peak-to-peak voltage configured for the AWG channel you wish to calibrate at
config/awg/awg.yml
. -
Connect the AWG output to the Spectrum Analyzer. If you wish to use an electronic amplifier in the final setup, you can connect the AWG output to the amplifier and connect the amplifier output to the Spectrum Analyzer instead.
-
Stream a monotonic waveform at some frequency with the maximum amplitude possible.
-
Fill out the config file at
configs/waveform-power-calculator/config.yml
Note that this calculator assumes the gain of the AWG/amplifiers for different frequencies is identical.
The FGC requires a PCF file containing the information about the camera connected to the card. This file must be stored under the configs/fgc
directory.
All parameters related to the LLRS can be modified in the configs/llrs/llrs.yml
file. This file contains the configuration for the LLRS-related parameters, e.g., the target config and the algorithm used. It also contains the path to the PSF file and the coefficient files.
Note: The LLRS is set up to search the proper subdirectories for necessary support files. All resource files must be stored at the appropriate subdirectory, and only the file name must be provided in the field, not the full file path.
There are several methods for running the LLRS.
Run the LLRS executable placed at bin/modules/llrs-exe/llrs-exe
.
This is the simplest way to run the LLRS. The LLRS-exe will wait for a hardware trigger to the AWG, and then execute the LLRS sequence. The LLRS-exe will then reset and wait for the next hardware trigger to re-execute the LLRS.
This Finite State Machine-based system is designed to be integrated with LabScript Suit via a ZMQ server. Details can be found at the LLCS README.
The LLRS shared libraries (.so
) are designed to be modular and can be used to design your own control system that suits your experiment's needs. The shared library can be found at bin/modules/llrs-lib/
, and can be installed on the system using meson install
.