It's Alive!
Kraymer-Moyal
Today, after some quick cleanup of yesterday’s Network
troubles, I got to work on implementing the various algorithms necessary for the OPO simulation. This first started with the Network::kraymer_moyal
method, a process to find the current gradient of the in-phase and quadrature-phase components of DOPO pulses. This task was very easy, since it only involved copying my old C code and changing some syntax and variable names. This worked first try!
Euler-Maruyama
Secondly, I had to use the gradients and a C++ normal distrobution generator to numerically integrate across the gradient. This was done from memory since I had written this function a few times before. I did need to figure out how RNG worked in C++, but this was exeedingly easy and allowed me to add a universal RNG for the entire Network
class, so any random number generation within works via the same seed. This did not work first try, since I had forgotten to include the pdates for the quadrature phase.
cimmi
Works!
Afterwards, all I had to do was manuever the two functions into the Network::run
method, and everything was good to go! This process was exeedingly easy after the preperation, and there were no issues with SWIG since none of this code passes the interface.
Features to do:
Still, while we have the DOPO network equations simulating, we are far from a useable library. The main features that need to be added before include:
- A
Simulator
class to perform network control and readout - A proper
Simulator
class interface to allow us to hide theNetwork
andGraph
classes from Python exposure- This includes documentation of the interface
- Proper Logging
- Error handling for all functions that could be used improperly
- This includes state tracking for
Network
class setup (since there is a particular order that if not followed can cause segfaults)
- This includes state tracking for
- GPU acceleration of
Network::kraymer_moyal
- Reworking build process into
setuptools
library - Automatic evaluation of max cut solutions
- Additional solvers (Sahini-Gonzales, Simulated Annealling)
- Internal random graph generation
Enjoy Reading This Article?
Here are some more articles you might like to read next: