ChrisZeThird / SqueezingSimulation

Simulation of the noise spectrum of an optical parametric amplifier (OPO).
1 stars 0 forks source link

Creation of a squeezed states source

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.

Install

General information

Required python >= 3.8 and pip

pip install -r requirements.txt

Using Pycharm

If you are using Pycharm follow these simple steps:

  1. On GitHub, click the button <> Code and copy the link
  2. On Pycharm, go to Git > Clone
  3. Paste the url of the GitHub repository you just copied and click clone.
  4. You can now access the files. The GUI should automatically ask you if you want to download the requirements

Using Spyder

How to clone a repository in Spyder?

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

How to sync a Spyder folder with GitHub?

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.

Project organization

Folders

Settings

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

Main script

To run any scripts related to cavity optimization, make sure you set at least one parameter among:

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.