This repository contains scripts developed to find the optimal parameters for a chosen non-linear crystal and optical cavity geometry. Please note that this repository does not include the literature review or theoretical background; it is solely focused on the practical aspect of parameter optimization.
Required python >= 3.8
and pip
pip install -r requirements.txt
If you are using Pycharm follow these simple steps:
Git > Clone
Tutorial was found at this link.
You need to open a system terminal, go to the directory you want to clone and do git clone your-repo-here.git
, then you
can open Spyder and either create a new project in the directory where you cloned your repository, or just open in the
files pane the directory where you cloned the repository
To sync your folder you need to use git commands, https://education.github.com/git-cheat-sheet-education.pdf, normally you will have two most use cases that are syncing with your remote repo and publishing your changes to the remote repo. This has to be done in a system terminal as well.
git fetch
git pull
git add -A
git commit -m "Description of the changes"
git push
cavity\
: Contains formulae and plotting function related to the optimization of the cavity parameters related to
the bandwidth and beam waist;squeezing\
: Contains scripts related to the prediction of squeezing generated by an Optical Parametric Oscillator(OPO);utils\
: Various utility functions for plot, settings, logger, etc.All the settings and grouped up in a single file called settings.yaml
. If this file is missing, create one at the
root of the repository. Below is an example:
# Plot parameter
number_points: 500
cmap_name: 'rainbow'
alpha: 0.3
plot_bandwidth: False
plot_waist: True
plot_kaertner: False
# Wavelength
wavelength: 780e-9
# Cavity parameters
fixed_length: 600e-3
min_L: 0.2
max_L: 1.0
cavity_loss: 0.004
d_curved_min: 0
d_curved_max: 100e-3
# Transmission coefficients
min_T: 0.1
max_T: 0.3
R: 50e-3
R1: 10e-2 # for Kaertner plot
R2: 11e-2 # for Kaertner plot
# Bandwidth
central_freq: 6.0e6
range_freq: 0.1
# Crystal parameters
crystal_length: 10e-3
crystal_index: 1.8396 # PPKTP refraction index
# Squeezing parameters
omega_c: 65000000.0 # bandwidth of the cavity
threshold: 1.0
To run any scripts related to cavity optimization, make sure you set at least one parameter among:
plot_bandwidth
plot_waist
plot_kaertner
plot_pump_power
squeezing_wavelength
plot_threshold
is set to True
. Then simply execute run.py
.
In Pycharm, make sure in the configuration
that the project directory is set to the root of the repository, otherwise utils\settings.py
will not be able to load
the yaml
file containing new settings and will return an empty settings object. Uncomment the debugging line in
utils\settings.py
to check if the settings file is correctly loaded.